]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/i915: No busy-loop wait_for in the ring init code
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 7 Aug 2014 14:05:39 +0000 (16:05 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 8 Aug 2014 15:44:01 +0000 (17:44 +0200)
Doing a 1s wait (tops) with the cpu is a bit excessive. Tune it down
like everything else in that code.

v2: Also insert the missing space Chris spotted.

Cc: Naresh Kumar Kachhi <naresh.kumar.kachhi@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ringbuffer.c

index 16371a444426d190d73b4baddd38cd8abeae66b2..117543e58d4889a74469a169efb65f94df0ef9da 100644 (file)
@@ -476,8 +476,8 @@ 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)) {
-                       DRM_ERROR("%s :timed out trying to stop ring\n", ring->name);
+               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;
                }
        }