drm/i915: WARN if primary plane state doesn't match expectations
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 1 Oct 2013 15:02:20 +0000 (18:02 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 10 Oct 2013 10:47:03 +0000 (12:47 +0200)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index a2acf79c365d11a3467354c1a376fd02b2b2b9e0..2e3289c37034f4f2a2757198f3da5174f5e0f04d 100644 (file)
@@ -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);