summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/drm/i915_irq.c
diff options
context:
space:
mode:
authoroga <oga@openbsd.org>2008-11-04 00:22:12 +0000
committeroga <oga@openbsd.org>2008-11-04 00:22:12 +0000
commit652713dba0de92e69ddf58767b99e29c7d27757d (patch)
tree90ee2bdf23de333f676d1e0fcbc600cdc9fed2bf /sys/dev/pci/drm/i915_irq.c
parentrevert the pageflipping and vblank sync code to the older style that (diff)
downloadwireguard-openbsd-652713dba0de92e69ddf58767b99e29c7d27757d.tar.xz
wireguard-openbsd-652713dba0de92e69ddf58767b99e29c7d27757d.zip
Hold the drm lock around all things that touch the ringbuffer.
Not strictly needed in the non-gem case, but it will be needed then, and doesn't hurt now. From Eric Anholt at intel.
Diffstat (limited to 'sys/dev/pci/drm/i915_irq.c')
-rw-r--r--sys/dev/pci/drm/i915_irq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915_irq.c b/sys/dev/pci/drm/i915_irq.c
index 4ad4824228a..d8e4c3a3921 100644
--- a/sys/dev/pci/drm/i915_irq.c
+++ b/sys/dev/pci/drm/i915_irq.c
@@ -504,7 +504,9 @@ int i915_irq_emit(struct drm_device *dev, void *data,
return EINVAL;
}
+ DRM_LOCK();
result = i915_emit_irq(dev);
+ DRM_UNLOCK();
if (DRM_COPY_TO_USER(emit->irq_seq, &result, sizeof(int))) {
DRM_ERROR("copy_to_user\n");