diff options
author | Ben Widawsky <[email protected]> | 2012-09-01 22:59:48 -0700 |
---|---|---|
committer | Daniel Vetter <[email protected]> | 2012-09-03 10:21:29 +0200 |
commit | 0cc2764cc4a4bd73df55f8893c871778cf7ddd0f (patch) | |
tree | f5f749fe2dcfab4801cfa00266c0bfbd36273ffd | |
parent | b67a4376d53e1ae6eaef05389cfd0e6e5b7097db (diff) |
drm/i915: use cpu_relax() in wait_for_atomic
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 913d8d110078788c14812dce8bb62c37946821d2
Author: Chris Wilson <[email protected]>
Date: Sat Aug 7 11:01:35 2010 +0100
drm/i915: Ensure that while(INREG()) are bounded (v2)
CC: Jani Nikula <[email protected]>
Signed-off-by: Ben Widawsky <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index ee0beb4833fb..3f7eefc5d976 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -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__; \ }) |