All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Busy-spin wait_for condition in atomic contexts
@ 2011-03-24 19:55 Chris Wilson
  2011-03-25  0:38 ` Keith Packard
  2011-03-25 18:30 ` Jesse Barnes
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2011-03-24 19:55 UTC (permalink / raw)
  To: intel-gfx

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>
---
 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 5daa991..ac70398 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_dbg_master() || in_atomic())) msleep(W);	\
 	}								\
 	ret__;								\
 })
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-25 18:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24 19:55 [PATCH] drm/i915: Busy-spin wait_for condition in atomic contexts Chris Wilson
2011-03-25  0:38 ` Keith Packard
2011-03-25  8:34   ` Chris Wilson
2011-03-25 18:30 ` Jesse Barnes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.