aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-03-28 05:42:00 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-04-03 05:34:55 -0400
commit0e8ffe1bf81b0780cc6229cb38664754dffe8776 (patch)
treeda34a7d517687289abab3e9ea9b075862853efa2 /drivers/gpu/drm/i915/i915_drv.h
parent8b47047bd103c9fdb50440790a2ef17fa69a35c4 (diff)
drm/i915: add hw state readout/checking for pipe_config
We need to be able to read out the hw state code for a bunch of reasons: - Correctly disabling boot-up/resume state. - Pure paranoia. Since not all of the pipe configuration is e.g. relevant for fastboot (or at least we can allow some wiggle room in some parameters, like the clocks), we need to add a strict_checking parameter to intel_pipe_config_compare for fastboot. For now intel_pipe_config_compare should be fully paranoid and check everything that the hw state readout code supports. Which for this infrastructure code is nothing. I've gone a bit overboard with adding 3 get_pipe_config functions: The ilk version will differ with the next patch, so it's not too onerous. v2: Don't check the hw config if the pipe is off, since an enabled, but dpms off crtc will obviously have tons of difference with the hw state. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index b8df39e37135..44fca0b69473 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -285,6 +285,7 @@ struct drm_i915_error_state {
285}; 285};
286 286
287struct intel_crtc_config; 287struct intel_crtc_config;
288struct intel_crtc;
288 289
289struct drm_i915_display_funcs { 290struct drm_i915_display_funcs {
290 bool (*fbc_enabled)(struct drm_device *dev); 291 bool (*fbc_enabled)(struct drm_device *dev);
@@ -298,6 +299,10 @@ struct drm_i915_display_funcs {
298 void (*update_linetime_wm)(struct drm_device *dev, int pipe, 299 void (*update_linetime_wm)(struct drm_device *dev, int pipe,
299 struct drm_display_mode *mode); 300 struct drm_display_mode *mode);
300 void (*modeset_global_resources)(struct drm_device *dev); 301 void (*modeset_global_resources)(struct drm_device *dev);
302 /* Returns the active state of the crtc, and if the crtc is active,
303 * fills out the pipe-config with the hw state. */
304 bool (*get_pipe_config)(struct intel_crtc *,
305 struct intel_crtc_config *);
301 int (*crtc_mode_set)(struct drm_crtc *crtc, 306 int (*crtc_mode_set)(struct drm_crtc *crtc,
302 int x, int y, 307 int x, int y,
303 struct drm_framebuffer *old_fb); 308 struct drm_framebuffer *old_fb);