projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fb7dff
)
drm: hold event_lock while accessing vblank_event_list
author
Imre Deak
<
[email protected]
>
Fri, 2 Nov 2012 11:30:50 +0000
(13:30 +0200)
committer
Inki Dae
<
[email protected]
>
Thu, 29 Nov 2012 11:30:34 +0000
(
03:30
-0800)
Currently the only users of drm_vblank_off() are i915 and gma500,
neither of which holds the event_lock when calling this function.
Fix this by holding the event_lock while traversing the list.
Signed-off-by: Imre Deak <
[email protected]
>
Signed-off-by: Inki Dae <
[email protected]
>
Signed-off-by: Kyungmin Park <
[email protected]
>
drivers/gpu/drm/drm_irq.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_irq.c
b/drivers/gpu/drm/drm_irq.c
index 2ba9d7fac345109d3163669637e5ff2443909b2d..19c01ca3cc76aaa2f5fe7cae45f8759104f74190 100644
(file)
--- a/
drivers/gpu/drm/drm_irq.c
+++ b/
drivers/gpu/drm/drm_irq.c
@@
-1021,6
+1021,8
@@
void drm_vblank_off(struct drm_device *dev, int crtc)
/* Send any queued vblank events, lest the natives grow disquiet */
seq = drm_vblank_count_and_time(dev, crtc, &now);
+
+ spin_lock(&dev->event_lock);
list_for_each_entry_safe(e, t, &dev->vblank_event_list, base.link) {
if (e->pipe != crtc)
continue;
@@
-1031,6
+1033,7
@@
void drm_vblank_off(struct drm_device *dev, int crtc)
drm_vblank_put(dev, e->pipe);
send_vblank_event(dev, e, seq, &now);
}
+ spin_unlock(&dev->event_lock);
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
}