Skip to content

Commit

Permalink
drm/i915: No busy-loop wait_for in the ring init code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Vetter committed Aug 8, 2014
1 parent 01e184c commit 403bdd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/intel_ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 403bdd1

Please sign in to comment.