drm/i915: vlv: increase timeout when forcing on the GFX clock
authorImre Deak <imre.deak@intel.com>
Mon, 14 Apr 2014 17:24:43 +0000 (20:24 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 5 May 2014 07:09:13 +0000 (09:09 +0200)
I've seen latencies up to 15msec, so increase the timeout to 20msec.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c

index 9f3e977d1877ecfaa7e13c62fcd22899f2c3917a..208e185c16a9932d3537177c8d537052763a7a1d 100644 (file)
@@ -944,7 +944,7 @@ int vlv_force_gfx_clock(struct drm_i915_private *dev_priv, bool force_on)
 #define COND (I915_READ(VLV_GTLC_SURVIVABILITY_REG) & VLV_GFX_CLK_STATUS_BIT)
        /* Wait for a previous force-off to settle */
        if (force_on) {
 #define COND (I915_READ(VLV_GTLC_SURVIVABILITY_REG) & VLV_GFX_CLK_STATUS_BIT)
        /* Wait for a previous force-off to settle */
        if (force_on) {
-               err = wait_for(!COND, 5);
+               err = wait_for(!COND, 20);
                if (err) {
                        DRM_ERROR("timeout waiting for GFX clock force-off (%08x)\n",
                                  I915_READ(VLV_GTLC_SURVIVABILITY_REG));
                if (err) {
                        DRM_ERROR("timeout waiting for GFX clock force-off (%08x)\n",
                                  I915_READ(VLV_GTLC_SURVIVABILITY_REG));
@@ -961,7 +961,7 @@ int vlv_force_gfx_clock(struct drm_i915_private *dev_priv, bool force_on)
        if (!force_on)
                return 0;
 
        if (!force_on)
                return 0;
 
-       err = wait_for(COND, 5);
+       err = wait_for(COND, 20);
        if (err)
                DRM_ERROR("timeout waiting for GFX clock force-on (%08x)\n",
                          I915_READ(VLV_GTLC_SURVIVABILITY_REG));
        if (err)
                DRM_ERROR("timeout waiting for GFX clock force-on (%08x)\n",
                          I915_READ(VLV_GTLC_SURVIVABILITY_REG));