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 17:43:35 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-08 10:13:29 +0100
commit481b6af3d1f36d4a19bd36321c1e9f713db49aad (patch)
treeaf86f7fdd673130fe726df2bd822eb45abce63a4 /drivers/gpu/drm/i915/intel_drv.h
parent75ef9da2cdb64e7926404dd2b755bbbfe98eaeaf (diff)
downloadkernel_samsung_aries-481b6af3d1f36d4a19bd36321c1e9f713db49aad.zip
kernel_samsung_aries-481b6af3d1f36d4a19bd36321c1e9f713db49aad.tar.gz
kernel_samsung_aries-481b6af3d1f36d4a19bd36321c1e9f713db49aad.tar.bz2
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 ad312ca..686ed53 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -33,7 +33,7 @@
#include "drm_crtc_helper.h"
-#define wait_for(COND, MS, W) ({ \
+#define _wait_for(COND, MS, W) ({ \
unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \
int ret__ = 0; \
while (! (COND)) { \
@@ -46,6 +46,9 @@
ret__; \
})
+#define wait_for(COND, MS) _wait_for(COND, MS, 1)
+#define wait_for_atomic(COND, MS) _wait_for(COND, MS, 0)
+
/*
* Display related stuff
*/