diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-24 07:37:03 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-31 04:31:12 -0400 |
commit | 9f01b25048ad12b5d71f4f7d3b62ef737639a08d (patch) | |
tree | 8c718b415d6af80ab838490f8b09e8710b5e109f /drivers/gpu/drm/i915/intel_drv.h | |
parent | 6ee3b5a12740eddc5a76e130b6cc7cc64468d1f7 (diff) |
drm/i915: Busy-spin wait_for condition in atomic contexts
During modesetting, we need to wait for the hardware to report
readiness by polling the registers. Normally, we call msleep() between
reads, because some state changes may take a whole vblank or more
to complete. However during a panic, we are in an atomic context and
cannot sleep. Instead, busy spin polling the termination condition.
References: https://bugzilla.kernel.org/show_bug.cgi?id=31772
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 5daa991cb287..f5b0d8306d83 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -39,7 +39,7 @@ | |||
39 | ret__ = -ETIMEDOUT; \ | 39 | ret__ = -ETIMEDOUT; \ |
40 | break; \ | 40 | break; \ |
41 | } \ | 41 | } \ |
42 | if (W && !in_dbg_master()) msleep(W); \ | 42 | if (W && !(in_atomic() || in_dbg_master())) msleep(W); \ |
43 | } \ | 43 | } \ |
44 | ret__; \ | 44 | ret__; \ |
45 | }) | 45 | }) |