[Intel-gfx] [PATCH] drm/i915: Wrap -EIO send-vblank event for failed pageflip in spinlock

Chris Wilson chris at chris-wilson.co.uk
Sun Sep 7 17:51:12 CEST 2014


drm_send_vblank_event() demands that we hold the event spinlock whilst
calling it, so do so.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e2c7e3941465..4642a0e6f20c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9981,8 +9981,11 @@ free_work:
 	if (ret == -EIO) {
 		intel_crtc_wait_for_pending_flips(crtc);
 		ret = intel_pipe_set_base(crtc, crtc->x, crtc->y, fb);
-		if (ret == 0 && event)
+		if (ret == 0 && event) {
+			spin_lock_irqsave(&dev->event_lock, flags);
 			drm_send_vblank_event(dev, pipe, event);
+			spin_lock_irqsave(&dev->event_lock, flags);
+		}
 	}
 	return ret;
 }
-- 
2.1.0




More information about the Intel-gfx mailing list