From 160d380656cc1cca12e0a27340f30a429b9c7e2d Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Wed, 6 Mar 2013 01:07:36 +1100 Subject: add some missing locking in the throttle func --- sys/dev/pci/drm/i915_gem.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/drm/i915_gem.c b/sys/dev/pci/drm/i915_gem.c index 2997ad8728b..ef0db7eb69f 100644 --- a/sys/dev/pci/drm/i915_gem.c +++ b/sys/dev/pci/drm/i915_gem.c @@ -2287,6 +2287,7 @@ i915_gem_ring_throttle(struct drm_device *dev, struct drm_file *file) return 0; ret = 0; + mtx_enter(&dev_priv->irq_lock); if (!i915_seqno_passed(ring->get_seqno(ring, false), seqno)) { /* And wait for the seqno passing without holding any locks and * causing extra latency for others. This is safe as the irq @@ -2311,6 +2312,7 @@ i915_gem_ring_throttle(struct drm_device *dev, struct drm_file *file) ret = EBUSY; } } + mtx_leave(&dev_priv->irq_lock); if (ret == 0) inteldrm_timeout(dev_priv); -- cgit v1.2.3