From f0d3dad3ad618dbe4f65453c456c781c4568de29 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 7 Sep 2014 16:51:12 +0100 Subject: [PATCH] drm/i915: Wrap -EIO send-vblank event for failed pageflip in spinlock drm_send_vblank_event() demands that we hold the event spinlock whilst calling it, so do so. Signed-off-by: Chris Wilson [danvet: Fix the double lock as requested by Chris.] Signed-off-by: Daniel Vetter --- 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 f4b8cb388dd6..c5079f2c49f3 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -10084,8 +10084,11 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, out_hang: 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_unlock_irqrestore(&dev->event_lock, flags); + } } return ret; } -- GitLab