From: Chris Wilson Date: Sat, 7 Aug 2010 11:16:25 +0000 (+0100) Subject: drm/i915: Avoid using msleep under kdb and wait_for() X-Git-Tag: MMI-PSA29.97-13-9~21924^2~31^2~251 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82d7c9e7da9fa11b8ed968c94a19c7732e11c1ad;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/i915: Avoid using msleep under kdb and wait_for() wait_for() uses msleep() to yield the cpu whilst spinning waiting for a register to change. kdb asserts that mode changes are atomic and so prohibits msleep. The alternative would be to use mdelay or to simply probe the register more often instead of busy waiting. Signed-off-by: Chris Wilson --- diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 686ed533dbe3..1ca3c9e2667a 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -41,7 +41,7 @@ ret__ = -ETIMEDOUT; \ break; \ } \ - if (W) msleep(W); \ + if (W && !in_dbg_master()) msleep(W); \ } \ ret__; \ })