From d959cbfc96fc73f0010f4cedd6994ea96841ceb1 Mon Sep 17 00:00:00 2001 From: Owain Ainsworth Date: Tue, 4 Nov 2008 00:22:13 +0000 Subject: 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. --- sys/dev/pci/drm/i915_irq.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/dev/pci/drm/i915_irq.c') 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"); -- cgit v1.2.3