[Intel-gfx] [PATCH] drm/i915/display: stop potential rc6 disable infinite retries

Ben Widawsky bwidawsk at gmail.com
Thu Feb 24 05:00:47 CET 2011


On my Ironlake, I was consistently hitting this. I'm not yet sure what
the best fix is, but this is better than what is there currently.

Jesse can probably do something better... perhaps even a delay before calling
ironlake_disable_rc6() again would suffice.

Signed-off-by: Ben Widawsky <bwidawsk at gmail.com>
---
 drivers/gpu/drm/i915/intel_display.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 94622e3..32ac4f1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6483,6 +6483,7 @@ static void ironlake_teardown_rc6(struct drm_device *dev)
 static void ironlake_disable_rc6(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
+	static int max_tries = 100;
 
 	if (I915_READ(PWRCTXA)) {
 		/* Wake the GPU, prevent RC6, then restore RSTDBYCTL */
@@ -6496,8 +6497,10 @@ static void ironlake_disable_rc6(struct drm_device *dev)
 		I915_WRITE(RSTDBYCTL, I915_READ(RSTDBYCTL) & ~RCX_SW_EXIT);
 		POSTING_READ(RSTDBYCTL);
 	}
-
-	ironlake_disable_rc6(dev);
+	if (max_tries--)
+		ironlake_disable_rc6(dev);
+	else
+		DRM_DEBUG_DRIVER("Failed to disable RC6\n");
 }
 
 static int ironlake_setup_rc6(struct drm_device *dev)
-- 
1.7.3.4




More information about the Intel-gfx mailing list