Skip to contentSkip to conversation

drm/i915: Ditch drm_can_sleep check in wait_for

PATCH New Daniel Vetter 1 participant 1 message Nov 25, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Ditch drm_can_sleep check in wait_for

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 <[email protected]>
Date:   Thu Jul 9 13:15:34 2015 +1000

drm/fb: drop panic handling

So let's just rip this out.

---
 drivers/gpu/drm/i915/intel_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_drv.h +1 -1
index ab5c147fa9e9..18d257898a78 100644
@@ -54,7 +54,7 @@
 				ret__ = -ETIMEDOUT;			\
 			break;						\
 		}							\
-		if ((W) && drm_can_sleep()) {				\
+		if (W) {				\
 			usleep_range((W)*1000, (W)*2000);		\
 		} else {						\
 			cpu_relax();					\
Signature · 6 lines
2.5.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx