@@ -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)