diff options
Diffstat (limited to 'sys/dev/drm2/i915/i915_gem.c')
-rw-r--r-- | sys/dev/drm2/i915/i915_gem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/drm2/i915/i915_gem.c b/sys/dev/drm2/i915/i915_gem.c index 7204778..5afea4e 100644 --- a/sys/dev/drm2/i915/i915_gem.c +++ b/sys/dev/drm2/i915/i915_gem.c @@ -141,7 +141,7 @@ i915_gem_wait_for_error(struct drm_device *dev) } mtx_unlock(&dev_priv->error_completion_lock); - if (atomic_read(&dev_priv->mm.wedged)) { + if (atomic_load_acq_int(&dev_priv->mm.wedged)) { mtx_lock(&dev_priv->error_completion_lock); dev_priv->error_completion++; mtx_unlock(&dev_priv->error_completion_lock); @@ -743,7 +743,7 @@ i915_gem_ring_throttle(struct drm_device *dev, struct drm_file *file) int ret; dev_priv = dev->dev_private; - if (atomic_read(&dev_priv->mm.wedged)) + if (atomic_load_acq_int(&dev_priv->mm.wedged)) return (-EIO); file_priv = file->driver_priv; @@ -768,15 +768,15 @@ i915_gem_ring_throttle(struct drm_device *dev, struct drm_file *file) if (ring->irq_get(ring)) { while (ret == 0 && !(i915_seqno_passed(ring->get_seqno(ring), seqno) || - atomic_read(&dev_priv->mm.wedged))) + atomic_load_acq_int(&dev_priv->mm.wedged))) ret = -msleep(ring, &ring->irq_lock, PCATCH, "915thr", 0); ring->irq_put(ring); - if (ret == 0 && atomic_read(&dev_priv->mm.wedged)) + if (ret == 0 && atomic_load_acq_int(&dev_priv->mm.wedged)) ret = -EIO; } else if (_intel_wait_for(dev, i915_seqno_passed(ring->get_seqno(ring), seqno) || - atomic_read(&dev_priv->mm.wedged), 3000, 0, "915rtr")) { + atomic_load_acq_int(&dev_priv->mm.wedged), 3000, 0, "915rtr")) { ret = -EBUSY; } } |