diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-12 13:34:08 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-12 13:34:08 +0100 |
commit | ec5da01e23eec303dd313aa62b8ed4712c488437 (patch) | |
tree | 7f5a6c4a606133e787cf9f052caad319bae35cd5 /drivers/gpu/drm/i915/intel_drv.h | |
parent | c9f9ccc150e119bab6a1003e7762b024623011d8 (diff) | |
download | linux-rt-ec5da01e23eec303dd313aa62b8ed4712c488437.tar.gz |
drm/i915: Use msleep instead of mdelay during wait_vblank_off
Avoid a potentially long busy-wait if we not in the process of
atomically switching to the kdb console.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 6c6b897539f8..e5f2a61af9f6 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -49,6 +49,13 @@ #define wait_for(COND, MS) _wait_for(COND, MS, 1) #define wait_for_atomic(COND, MS) _wait_for(COND, MS, 0) +#define MSLEEP(x) do { \ + if (in_dbg_master()) \ + mdelay(x); \ + else \ + msleep(x); \ +} while(0) + #define KHz(x) (1000*x) #define MHz(x) KHz(1000*x) |