From: Chris Wilson Date: Thu, 24 Mar 2011 11:37:03 +0000 (+0000) Subject: drm/i915: Busy-spin wait_for condition in atomic contexts X-Git-Tag: v2.6.39-rc2~3^2~3 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=9f01b25048ad12b5d71f4f7d3b62ef737639a08d;p=~emulex%2Finfiniband.git 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 Reviewed-by: Keith Packard Reviewed-by: Jesse Barnes --- diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 5daa991cb28..f5b0d8306d8 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -39,7 +39,7 @@ ret__ = -ETIMEDOUT; \ break; \ } \ - if (W && !in_dbg_master()) msleep(W); \ + if (W && !(in_atomic() || in_dbg_master())) msleep(W); \ } \ ret__; \ })