aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-23 12:43:35 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-08 05:13:29 -0400
commit481b6af3d1f36d4a19bd36321c1e9f713db49aad (patch)
treeaf86f7fdd673130fe726df2bd822eb45abce63a4 /drivers/gpu/drm/i915/intel_drv.h
parent75ef9da2cdb64e7926404dd2b755bbbfe98eaeaf (diff)
drm/i915: Drop the msleep parameter to wait_for()
Jesse's feedback from using the wait_for() macro was that the msleep argument was that it was superfluous and made the macro more difficult to use and to read. As the actually amount of time to sleep is not critical, the crucial part is to sleep and let the processor schedule something else whilst we wait for the event, replace the argument with a hardcoded value. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index ad312ca6b3e5..686ed533dbe3 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -33,7 +33,7 @@
33 33
34#include "drm_crtc_helper.h" 34#include "drm_crtc_helper.h"
35 35
36#define wait_for(COND, MS, W) ({ \ 36#define _wait_for(COND, MS, W) ({ \
37 unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \ 37 unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \
38 int ret__ = 0; \ 38 int ret__ = 0; \
39 while (! (COND)) { \ 39 while (! (COND)) { \
@@ -46,6 +46,9 @@
46 ret__; \ 46 ret__; \
47}) 47})
48 48
49#define wait_for(COND, MS) _wait_for(COND, MS, 1)
50#define wait_for_atomic(COND, MS) _wait_for(COND, MS, 0)
51
49/* 52/*
50 * Display related stuff 53 * Display related stuff
51 */ 54 */