summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-07 16:51:12 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-19 14:41:15 +0200
commitf0d3dad3ad618dbe4f65453c456c781c4568de29 (patch)
tree395bf8ccb24724f2b9d4422ac4526ed6681aa7c5
parent1d1ef21dafd13ff5cedbde840544d6e86669fe1d (diff)
downloadlinux-f0d3dad3ad618dbe4f65453c456c781c4568de29.tar.gz
linux-f0d3dad3ad618dbe4f65453c456c781c4568de29.tar.bz2
linux-f0d3dad3ad618dbe4f65453c456c781c4568de29.zip
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 <chris@chris-wilson.co.uk> [danvet: Fix the double lock as requested by Chris.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c5
1 files changed, 4 insertions, 1 deletions
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 @@ free_work:
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;
}