aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-23 12:43:35 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-08 05:13:29 -0400
commit481b6af3d1f36d4a19bd36321c1e9f713db49aad (patch)
treeaf86f7fdd673130fe726df2bd822eb45abce63a4 /drivers/gpu/drm/i915/intel_display.c
parent75ef9da2cdb64e7926404dd2b755bbbfe98eaeaf (diff)
drm/i915: Drop the msleep parameter to wait_for()
Jesse's feedback from using the wait_for() macro was that the msleep argument was that it was superfluous and made the macro more difficult to use and to read. As the actually amount of time to sleep is not critical, the crucial part is to sleep and let the processor schedule something else whilst we wait for the event, replace the argument with a hardcoded value. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 794d4ac0c40f..854d8f4415b7 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1007,9 +1007,9 @@ void intel_wait_for_vblank(struct drm_device *dev, int pipe)
1007 I915_READ(pipestat_reg) | PIPE_VBLANK_INTERRUPT_STATUS); 1007 I915_READ(pipestat_reg) | PIPE_VBLANK_INTERRUPT_STATUS);
1008 1008
1009 /* Wait for vblank interrupt bit to set */ 1009 /* Wait for vblank interrupt bit to set */
1010 if (wait_for((I915_READ(pipestat_reg) & 1010 if (wait_for(I915_READ(pipestat_reg) &
1011 PIPE_VBLANK_INTERRUPT_STATUS), 1011 PIPE_VBLANK_INTERRUPT_STATUS,
1012 50, 0)) 1012 50))
1013 DRM_DEBUG_KMS("vblank wait timed out\n"); 1013 DRM_DEBUG_KMS("vblank wait timed out\n");
1014} 1014}
1015 1015
@@ -1108,7 +1108,7 @@ void i8xx_disable_fbc(struct drm_device *dev)
1108 I915_WRITE(FBC_CONTROL, fbc_ctl); 1108 I915_WRITE(FBC_CONTROL, fbc_ctl);
1109 1109
1110 /* Wait for compressing bit to clear */ 1110 /* Wait for compressing bit to clear */
1111 if (wait_for((I915_READ(FBC_STATUS) & FBC_STAT_COMPRESSING) == 0, 10, 0)) { 1111 if (wait_for((I915_READ(FBC_STATUS) & FBC_STAT_COMPRESSING) == 0, 10)) {
1112 DRM_DEBUG_KMS("FBC idle timed out\n"); 1112 DRM_DEBUG_KMS("FBC idle timed out\n");
1113 return; 1113 return;
1114 } 1114 }
@@ -2070,7 +2070,7 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
2070 I915_WRITE(transconf_reg, temp | TRANS_ENABLE); 2070 I915_WRITE(transconf_reg, temp | TRANS_ENABLE);
2071 I915_READ(transconf_reg); 2071 I915_READ(transconf_reg);
2072 2072
2073 if (wait_for(I915_READ(transconf_reg) & TRANS_STATE_ENABLE, 100, 1)) 2073 if (wait_for(I915_READ(transconf_reg) & TRANS_STATE_ENABLE, 100))
2074 DRM_ERROR("failed to enable transcoder\n"); 2074 DRM_ERROR("failed to enable transcoder\n");
2075 } 2075 }
2076 2076
@@ -2102,7 +2102,7 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
2102 I915_WRITE(pipeconf_reg, temp & ~PIPEACONF_ENABLE); 2102 I915_WRITE(pipeconf_reg, temp & ~PIPEACONF_ENABLE);
2103 2103
2104 /* wait for cpu pipe off, pipe state */ 2104 /* wait for cpu pipe off, pipe state */
2105 if (wait_for((I915_READ(pipeconf_reg) & I965_PIPECONF_ACTIVE) == 0, 50, 1)) 2105 if (wait_for((I915_READ(pipeconf_reg) & I965_PIPECONF_ACTIVE) == 0, 50))
2106 DRM_ERROR("failed to turn off cpu pipe\n"); 2106 DRM_ERROR("failed to turn off cpu pipe\n");
2107 } else 2107 } else
2108 DRM_DEBUG_KMS("crtc %d is disabled\n", pipe); 2108 DRM_DEBUG_KMS("crtc %d is disabled\n", pipe);
@@ -2160,7 +2160,7 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
2160 I915_WRITE(transconf_reg, temp & ~TRANS_ENABLE); 2160 I915_WRITE(transconf_reg, temp & ~TRANS_ENABLE);
2161 2161
2162 /* wait for PCH transcoder off, transcoder state */ 2162 /* wait for PCH transcoder off, transcoder state */
2163 if (wait_for((I915_READ(transconf_reg) & TRANS_STATE_ENABLE) == 0, 50, 1)) 2163 if (wait_for((I915_READ(transconf_reg) & TRANS_STATE_ENABLE) == 0, 50))
2164 DRM_ERROR("failed to disable transcoder\n"); 2164 DRM_ERROR("failed to disable transcoder\n");
2165 } 2165 }
2166 2166
@@ -5521,7 +5521,7 @@ void ironlake_enable_drps(struct drm_device *dev)
5521 rgvmodectl |= MEMMODE_SWMODE_EN; 5521 rgvmodectl |= MEMMODE_SWMODE_EN;
5522 I915_WRITE(MEMMODECTL, rgvmodectl); 5522 I915_WRITE(MEMMODECTL, rgvmodectl);
5523 5523
5524 if (wait_for((I915_READ(MEMSWCTL) & MEMCTL_CMD_STS) == 0, 1, 0)) 5524 if (wait_for((I915_READ(MEMSWCTL) & MEMCTL_CMD_STS) == 0, 10))
5525 DRM_ERROR("stuck trying to change perf mode\n"); 5525 DRM_ERROR("stuck trying to change perf mode\n");
5526 msleep(1); 5526 msleep(1);
5527 5527