Skip to content

Commit

Permalink
drm/i915: Wrap -EIO send-vblank event for failed pageflip in spinlock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Sep 19, 2014
1 parent 1d1ef21 commit f0d3dad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f0d3dad

Please sign in to comment.