[Intel-gfx] [PATCH 11/12] drm/i915: WARN if primary plane state doesn't match expectations

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Tue Oct 1 17:02:20 CEST 2013


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 76a77f7..a0d0202 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1817,6 +1817,8 @@ static void intel_enable_primary_plane(struct drm_i915_private *dev_priv,
 	/* If the pipe isn't enabled, we can't pump pixels and may hang */
 	assert_pipe_enabled(dev_priv, pipe);
 
+	WARN(!intel_crtc->primary_disabled, "Primary plane already enabled\n");
+
 	intel_crtc->primary_disabled = false;
 
 	reg = DSPCNTR(plane);
@@ -1845,6 +1847,8 @@ static void intel_disable_primary_plane(struct drm_i915_private *dev_priv,
 	int reg;
 	u32 val;
 
+	WARN(intel_crtc->primary_disabled, "Primary plane already disabled\n");
+
 	intel_crtc->primary_disabled = true;
 
 	reg = DSPCNTR(plane);
-- 
1.8.1.5




More information about the Intel-gfx mailing list