public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm: Assert correct locking for drm_send_vblank_event
@ 2014-09-12 13:40 Daniel Vetter
  2014-09-12 15:23 ` Chris Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2014-09-12 13:40 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, dri-devel

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@chris-wilson.co.uk>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Daniel Vetter <daniel.vetter@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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-12 17:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-12 13:40 [PATCH] drm: Assert correct locking for drm_send_vblank_event Daniel Vetter
2014-09-12 15:23 ` Chris Wilson
2014-09-12 15:34   ` Daniel Vetter
2014-09-12 16:04     ` [Intel-gfx] " Chris Wilson
2014-09-12 17:03       ` Peter Hurley
2014-09-12 17:25         ` [Intel-gfx] " Daniel Vetter
2014-09-12 17:42           ` Peter Hurley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox