diff options
author | Jonathan Gray <jsg@jsg.id.au> | 2013-03-06 01:07:36 +1100 |
---|---|---|
committer | Jonathan Gray <jsg@jsg.id.au> | 2013-03-06 01:07:36 +1100 |
commit | 160d380656cc1cca12e0a27340f30a429b9c7e2d (patch) | |
tree | 97c951a7734ca3bb7006eefe0f32c09bdab8c5ec /sys/dev | |
parent | b01644984518c8ad617faedab6240d870194b7a3 (diff) |
add some missing locking in the throttle func
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/i915_gem.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |