Skip to content

Commit

Permalink
drm/i915: use cpu_relax() in wait_for_atomic
Browse files Browse the repository at this point in the history
As part of the advice given to us from the hardware designers regarding
the maximum wait time on the forcewake handshake we need to move from us
granularity to ms granularity. In earlier patches to do this, Jani
noticed that wait_for_us was properly converted to use cpu_relax(), but
wait_for was not.

The issue has existed since the introduction of the macro:
commit 913d8d1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Aug 7 11:01:35 2010 +0100

    drm/i915: Ensure that while(INREG()) are bounded (v2)

CC: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.oc.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Ben Widawsky authored and Daniel Vetter committed Sep 3, 2012
1 parent b67a437 commit 0cc2764
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/i915/intel_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
ret__ = -ETIMEDOUT; \
break; \
} \
if (W && drm_can_sleep()) msleep(W); \
if (W && drm_can_sleep()) { \
msleep(W); \
} else { \
cpu_relax(); \
} \
} \
ret__; \
})
Expand Down

0 comments on commit 0cc2764

Please sign in to comment.