summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorDaniel Vetter2012-07-02 11:43:47 +0200
committerDaniel Vetter2012-09-06 07:57:45 +0200
commit08a48469691a1b9ed6ee92e726b66d4e59ffc253 (patch)
treedb372ecdebb2e3f7e57c8c7b6985205c077a2ec6 /drivers/gpu/drm/i915/intel_drv.h
parentdrm/i915: call crtc functions directly (diff)
downloadkernel-qcow2-linux-08a48469691a1b9ed6ee92e726b66d4e59ffc253.tar.gz
kernel-qcow2-linux-08a48469691a1b9ed6ee92e726b66d4e59ffc253.tar.xz
kernel-qcow2-linux-08a48469691a1b9ed6ee92e726b66d4e59ffc253.zip
drm/i915: WARN when trying to enabled an unused crtc
This is the first tiny step towards cross-checking the entire modeset state machine with WARNs. A crtc can only be enabled when it's actually in use, i.e. crtc->active imlies crtc->enabled. Unfortunately we can't (yet) check this when disabling the crtc, because the crtc helpers are a bit slopy with updating state and unconditionally update crtc->enabled before changing the hw state. Fixing that requires quite some more work. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 673e8d484bfa..36991dee2d40 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -158,7 +158,15 @@ struct intel_crtc {
enum plane plane;
u8 lut_r[256], lut_g[256], lut_b[256];
int dpms_mode;
- bool active; /* is the crtc on? independent of the dpms mode */
+ /*
+ * Whether the crtc and the connected output pipeline is active. Implies
+ * that crtc->enabled is set, i.e. the current mode configuration has
+ * some outputs connected to this crtc.
+ *
+ * Atm crtc->enabled is unconditionally updated _before_ the hw state is
+ * changed, hence we can only check this when enabling the crtc.
+ */
+ bool active;
bool primary_disabled; /* is the crtc obscured by a plane? */
bool lowfreq_avail;
struct intel_overlay *overlay;