mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
28184f2217
Daniel writes: Since I expect Linus to open the merge window in about a week I guess this is the last i915 feature pull for 3.10. Highlights: Updated testing tree for -next. Highlights: - Corner case fixes discovered with static analyzers (Damien). - More fixes to combat unclaimed register errors on Haswell (Paulo). - Some small fixes to the gpu turbo code (Rodrigo+Ben), Ben has more fixes for overclocking support pending. - More prep work for fastboot from Chris. - VT-switchless suspend/resume from Jesse. - The prep work of Egbert Eich's hpd irq storm handling. Hopefully we can squeeze in the actual storm handling code for 3.10 ... - More convenience helpers for Imre's sg iterator. Core parts acked by Andrew Morton. - A bit of backlight code cleanup from Jani. - Fixed ilk gpu reset (Jesse). - Reduced color range handling fixes for VLV (Ville). The big item here is though the introduction of pipe_config to properly pre-compute the desired modeset state before touching the hw. Together with some very basic support to read out the current config from the hw and compare the state with the sw tracking. This is all prep work for more reliable fastboot, atomic modesets and other cool features. Stuff converted to the new world includes: - Most simple pipe attributes (reduce color range, pixel multiplier). - Pipe bpp/dither handling. - Some convenience flags like ->has_pch_encoder to simplify the code flow. - (Almost) DP clock handling, had to be reverted since part of a prep patch was lost in rebasing ... Expect a lot of patches for this throughout 3.11, there's tons of work till we have all state properly tracked for fastbooting to woExpect a lot of patches for this throughout 3.11, there's tons of work till we have all state properly tracked for fastbooting to work. For 3.10 I have a bunch of fixes queued up and I plan to send them all out at the end of this week. I need to shuffle patches in my -next queue a bit so that we don't but feature-y stuff in there, too. The main thing I'd like to sneak in is Egbert's hpd irq storm handling, which should be pretty low-risk since all the infrastructure work has landed already. I also have the oops fix pending, but that only mustered review before the w/e and giving how hairy that part of our modeset code is, I want to give it some more testing before forwarding. Note: annarchy.fd.o seems to run out of disk space, so couldn't push the usual for-airlied branch. Tag should work though. Note 2: I've had to do a backmerge since conflicts grew too ugly, but the upstream -rc I've backmerged is already in your drm-next. * tag 'drm-intel-next-2013-04-06' of git://people.freedesktop.org/~danvet/drm-intel: (75 commits) drm/i915: info level for simulated gpu hang dmesg notice drm/i915: revert eDP bpp clamping code changes Revert "drm/i915: fix DP get_hw_state return value" drm/i915: Don't use the HDMI port color range bit on Valleyview drm/i915: Set PIPECONF color range bit on Valleyview drm/i915: extract i9xx_set_pipeconf drm/i915: Add no-lvds quirk for Fujitsu Esprimo Q900 drm/i915: create pipe_config->dpll for clock state drm/i915: hw readout support for ->has_pch_encoders drm/i915: add hw state readout/checking for pipe_config drm/i915: rip out superflous is_dp&is_cpu_edp tracking drm/i915: remove leaky eDP functions drm/i915: track dp target_clock in pipe_config drm/i915: move dp_m_n computation to dp_encoder->compute_config drm/i915: clear up the fdi/dp set_m_n confusion drm/i915: Fix sdvo connector get_hw_state function drm/i915: drop DPFLIPSTAT enables on VLV v3 drm/i915: add Punit read/write routines for VLV v2 drm/i915: panel power sequencing for VLV eDP v2 drm/i915/dp: fix up VLV DP handling v2 ...
125 lines
4.5 KiB
C
125 lines
4.5 KiB
C
/*
|
|
* Copyright (c) 2006-2009 Red Hat Inc.
|
|
* Copyright (c) 2006-2008 Intel Corporation
|
|
* Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
|
|
*
|
|
* DRM framebuffer helper functions
|
|
*
|
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
* documentation for any purpose is hereby granted without fee, provided that
|
|
* the above copyright notice appear in all copies and that both that copyright
|
|
* notice and this permission notice appear in supporting documentation, and
|
|
* that the name of the copyright holders not be used in advertising or
|
|
* publicity pertaining to distribution of the software without specific,
|
|
* written prior permission. The copyright holders make no representations
|
|
* about the suitability of this software for any purpose. It is provided "as
|
|
* is" without express or implied warranty.
|
|
*
|
|
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
* OF THIS SOFTWARE.
|
|
*
|
|
* Authors:
|
|
* Dave Airlie <airlied@linux.ie>
|
|
* Jesse Barnes <jesse.barnes@intel.com>
|
|
*/
|
|
#ifndef DRM_FB_HELPER_H
|
|
#define DRM_FB_HELPER_H
|
|
|
|
struct drm_fb_helper;
|
|
|
|
#include <linux/kgdb.h>
|
|
|
|
struct drm_fb_helper_crtc {
|
|
struct drm_mode_set mode_set;
|
|
struct drm_display_mode *desired_mode;
|
|
};
|
|
|
|
struct drm_fb_helper_surface_size {
|
|
u32 fb_width;
|
|
u32 fb_height;
|
|
u32 surface_width;
|
|
u32 surface_height;
|
|
u32 surface_bpp;
|
|
u32 surface_depth;
|
|
};
|
|
|
|
/**
|
|
* struct drm_fb_helper_funcs - driver callbacks for the fbdev emulation library
|
|
* @gamma_set: - Set the given gamma lut register on the given crtc.
|
|
* @gamma_get: - Read the given gamma lut register on the given crtc, used to
|
|
* save the current lut when force-restoring the fbdev for e.g.
|
|
* kdbg.
|
|
* @fb_probe: - Driver callback to allocate and initialize the fbdev info
|
|
* structure. Futhermore it also needs to allocate the drm
|
|
* framebuffer used to back the fbdev.
|
|
*
|
|
* Driver callbacks used by the fbdev emulation helper library.
|
|
*/
|
|
struct drm_fb_helper_funcs {
|
|
void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green,
|
|
u16 blue, int regno);
|
|
void (*gamma_get)(struct drm_crtc *crtc, u16 *red, u16 *green,
|
|
u16 *blue, int regno);
|
|
|
|
int (*fb_probe)(struct drm_fb_helper *helper,
|
|
struct drm_fb_helper_surface_size *sizes);
|
|
bool (*initial_config)(struct drm_fb_helper *fb_helper,
|
|
struct drm_fb_helper_crtc **crtcs,
|
|
struct drm_display_mode **modes,
|
|
bool *enabled, int width, int height);
|
|
};
|
|
|
|
struct drm_fb_helper_connector {
|
|
struct drm_connector *connector;
|
|
struct drm_cmdline_mode cmdline_mode;
|
|
};
|
|
|
|
struct drm_fb_helper {
|
|
struct drm_framebuffer *fb;
|
|
struct drm_device *dev;
|
|
int crtc_count;
|
|
struct drm_fb_helper_crtc *crtc_info;
|
|
int connector_count;
|
|
struct drm_fb_helper_connector **connector_info;
|
|
struct drm_fb_helper_funcs *funcs;
|
|
struct fb_info *fbdev;
|
|
u32 pseudo_palette[17];
|
|
struct list_head kernel_fb_list;
|
|
|
|
/* we got a hotplug but fbdev wasn't running the console
|
|
delay until next set_par */
|
|
bool delayed_hotplug;
|
|
};
|
|
|
|
int drm_fb_helper_init(struct drm_device *dev,
|
|
struct drm_fb_helper *helper, int crtc_count,
|
|
int max_conn);
|
|
void drm_fb_helper_fini(struct drm_fb_helper *helper);
|
|
int drm_fb_helper_blank(int blank, struct fb_info *info);
|
|
int drm_fb_helper_pan_display(struct fb_var_screeninfo *var,
|
|
struct fb_info *info);
|
|
int drm_fb_helper_set_par(struct fb_info *info);
|
|
int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
|
|
struct fb_info *info);
|
|
|
|
bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper);
|
|
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
|
|
uint32_t fb_width, uint32_t fb_height);
|
|
void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
|
|
uint32_t depth);
|
|
|
|
int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
|
|
|
|
int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
|
|
bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
|
|
int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
|
|
int drm_fb_helper_debug_enter(struct fb_info *info);
|
|
int drm_fb_helper_debug_leave(struct fb_info *info);
|
|
|
|
#endif
|