blob: 1f94ef74c9066658fe537b67fc279630d280fa71 [file] [log] [blame]
From d076f05348c10f762221a7c780fd8fefb6cfa8c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
Date: Tue, 1 Oct 2013 18:02:20 +0300
Subject: drm/i915: WARN if primary plane state doesn't match expectations
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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>
(cherry picked from commit 0037f71c4b7fc0cc70714c5a076f54f348c04dea)
Signed-off-by: Darren Hart <dvhart@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 8ee9d9e4e3f5..0091107cc975 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);
--
1.8.5.rc3