diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-05-12 19:47:55 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-05-12 19:47:55 +0000 |
commit | 92db308cca1dc8968eaf6ae4fc41dd62b95a8931 (patch) | |
tree | 34692ec52bc0036651d5eaaf56b0c8e82c77685a /sys | |
parent | aa339e85ad498931052e2565d3c7d6455ee4a2f9 (diff) |
hold the mutex in drm_handle_vblank().
Ideally we could avoid this and still be mpsafe using atomic
increment/decrement operators, but for now best be correct.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/drm_irq.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/drm_irq.c b/sys/dev/pci/drm/drm_irq.c index 7ba4bf0da4d..8f0e3cd7ea9 100644 --- a/sys/dev/pci/drm/drm_irq.c +++ b/sys/dev/pci/drm/drm_irq.c @@ -368,6 +368,12 @@ drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *file_priv) void drm_handle_vblank(struct drm_device *dev, int crtc) { + /* + * XXX if we had proper atomic operations this mutex wouldn't + * XXX need to be held. + */ + mtx_enter(&dev->vblank->vb_lock); dev->vblank->vb_crtcs[crtc].vbl_count++; wakeup(&dev->vblank->vb_crtcs[crtc]); + mtx_leave(&dev->vblank->vb_lock); } |