[Intel-gfx] [PATCH] drm/i915: Ditch drm_can_sleep check in wait_for

Daniel Vetter daniel.vetter at ffwll.ch
Wed Nov 25 01:39:27 PST 2015


It's causing endless amounts of trouble by hiding pretty serious bugs
where we wait for a few msecs, but accidentally while holding a
spinlock (sometimes even an irqsafe one).

And the only reason for this was to make the mode for the panic
handler work somewhat. But that _really_ needs to be done at a higher
level, since all our sideband mutexes and other stuff isn't covered
with this either.

And the final straw: At least with the current drm infrastructure
we've given up on special panic handlers a while ago:

commit 6066677cfd9d73734ab678b9d14013c860f0f732
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Jul 9 13:15:34 2015 +1000

    drm/fb: drop panic handling

So let's just rip this out.

Cc: Mika Kuoppala <mika.kuoppala at intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 drivers/gpu/drm/i915/intel_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index ab5c147fa9e9..18d257898a78 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -54,7 +54,7 @@
 				ret__ = -ETIMEDOUT;			\
 			break;						\
 		}							\
-		if ((W) && drm_can_sleep()) {				\
+		if (W) {				\
 			usleep_range((W)*1000, (W)*2000);		\
 		} else {						\
 			cpu_relax();					\
-- 
2.5.1



More information about the Intel-gfx mailing list