The comment says that the caller must hold the dev->event_lock spinlock, so let's enforce this.
A quick audit over all driver shows that except for the one place in i915 which motivated this all callers fullfill this requirement already. Cc: Chris Wilson <chris at chris-wilson.co.uk> Cc: dri-devel at lists.freedesktop.org Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch> --- drivers/gpu/drm/drm_irq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 80ff94ada75e..bf248eb9ffb2 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -907,6 +907,9 @@ void drm_send_vblank_event(struct drm_device *dev, int crtc, { struct timeval now; unsigned int seq; + + assert_spin_locked(&dev->event_lock); + if (crtc >= 0) { seq = drm_vblank_count_and_time(dev, crtc, &now); } else { -- 1.9.3