Re: [Intel-gfx] [PATCH] drm/i915: Busy-spin wait_for condition in atomic contexts

2011-03-25 Thread Jesse Barnes
On Thu, 24 Mar 2011 19:55:59 + Chris Wilson wrote: > 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 pani

Re: [Intel-gfx] [PATCH] drm/i915: Busy-spin wait_for condition in atomic contexts

2011-03-25 Thread Chris Wilson
On Thu, 24 Mar 2011 17:38:32 -0700, Keith Packard wrote: > On Thu, 24 Mar 2011 19:55:59 +, Chris Wilson > wrote: > > > - if (W && !in_dbg_master()) msleep(W); \ > > + if (W && !(in_dbg_master() || in_atomic())) msleep(W); \ > > If the MSLEEP macro wer

Re: [Intel-gfx] [PATCH] drm/i915: Busy-spin wait_for condition in atomic contexts

2011-03-24 Thread Keith Packard
On Thu, 24 Mar 2011 19:55:59 +, Chris Wilson wrote: > - if (W && !in_dbg_master()) msleep(W); \ > + if (W && !(in_dbg_master() || in_atomic())) msleep(W); \ If the MSLEEP macro were ever used, would it need the same fix? wait_for_atomic is never u

[Intel-gfx] [PATCH] drm/i915: Busy-spin wait_for condition in atomic contexts

2011-03-24 Thread Chris Wilson
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 sp