drm/i915: Ditch drm_can_sleep check in wait_for

Submitted by Daniel Vetter on Nov. 25, 2015, 9:39 a.m.

Details

Message ID 1448444367-2431-1-git-send-email-daniel.vetter@ffwll.ch
State New
Headers show
Series "drm/i915: Ditch drm_can_sleep check in wait_for" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Daniel Vetter Nov. 25, 2015, 9:39 a.m.
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@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@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/intel_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

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();					\