From 0037f71c4b7fc0cc70714c5a076f54f348c04dea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Tue, 1 Oct 2013 18:02:20 +0300 Subject: [PATCH] drm/i915: WARN if primary plane state doesn't match expectations MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter --- 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 a2acf79c365d..2e3289c37034 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1840,6 +1840,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); @@ -1868,6 +1870,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); -- 2.39.5