[Intel-gfx] [PATCH] drm/i915: No busy-loop wait_for in the ring init code

Daniel Vetter daniel.vetter at ffwll.ch
Thu Aug 7 16:07:59 CEST 2014


Doing a 1s wait (tops) with the cpu is a bit excessive. Tune it down
like everything else in that code.

Cc: Naresh Kumar Kachhi <naresh.kumar.kachhi at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 05969f03c0c1..966d8f72da45 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -476,7 +476,7 @@ static bool stop_ring(struct intel_engine_cs *ring)
 
 	if (!IS_GEN2(ring->dev)) {
 		I915_WRITE_MODE(ring, _MASKED_BIT_ENABLE(STOP_RING));
-		if (wait_for_atomic((I915_READ_MODE(ring) & MODE_IDLE) != 0, 1000)) {
+		if (wait_for((I915_READ_MODE(ring) & MODE_IDLE) != 0, 1000)) {
 			DRM_ERROR("%s :timed out trying to stop ring\n", ring->name);
 			return false;
 		}
-- 
2.0.1




More information about the Intel-gfx mailing list