[Intel-gfx] [PATCH 1/2] drm/i915: Convert BUG_ON(!pll->active) to a WARN

Chris Wilson chris at chris-wilson.co.uk
Sun May 13 10:54:08 CEST 2012


Turn a fatal lockup into a merely blank display with lots of shouty
messages.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 12dba60..a679a9a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1524,7 +1524,11 @@ static void intel_disable_pch_pll(struct intel_crtc *intel_crtc)
 		      pll->pll_reg, pll->active, pll->on,
 		      intel_crtc->base.base.id);
 
-	BUG_ON(pll->active == 0);
+	if (WARN_ON(pll->active == 0)) {
+		assert_pch_pll_disabled(dev_priv, intel_crtc);
+		return;
+	}
+
 	if (--pll->active) {
 		assert_pch_pll_enabled(dev_priv, intel_crtc);
 		return;
-- 
1.7.10




More information about the Intel-gfx mailing list