[Intel-gfx] [PATCH] drm/i915: Fixup intel_wait_for_vblank*()
Chris Wilson
chris at chris-wilson.co.uk
Sun Aug 22 10:34:45 CEST 2010
Add a msleep to intel_wait_for_vblank().
Change intel_wait_for_vblank_off() to repeat *until* timeout.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes at virtuousgeek.org>
---
drivers/gpu/drm/i915/intel_display.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 23157e1..f048379 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -993,7 +993,7 @@ void intel_wait_for_vblank(struct drm_device *dev, int pipe)
/* Wait for vblank interrupt bit to set */
if (wait_for((I915_READ(pipestat_reg) &
PIPE_VBLANK_INTERRUPT_STATUS) == 0,
- 50, 0))
+ 50, 1))
DRM_DEBUG_KMS("vblank wait timed out\n");
}
@@ -1019,9 +1019,12 @@ void intel_wait_for_vblank_off(struct drm_device *dev, int pipe)
/* Wait for the display line to settle */
do {
last_line = I915_READ(pipedsl_reg) & DSL_LINEMASK;
- mdelay(5);
+ if (in_dbg_master())
+ mdelay(5);
+ else
+ msleep(5);
} while (((I915_READ(pipedsl_reg) & DSL_LINEMASK) != last_line) &&
- time_after(timeout, jiffies));
+ !time_after(timeout, jiffies));
if (time_after(jiffies, timeout))
DRM_DEBUG_KMS("vblank wait timed out\n");
--
1.7.1
More information about the Intel-gfx
mailing list