diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-02-19 11:51:57 +0100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-02-26 13:23:21 -0800 |
commit | 4a87b8ca2185199c5d1b37b570efffd2e46fe813 (patch) | |
tree | d7b6df2f58f56277d6dfeac43334b7279868451d /drivers | |
parent | 798750e30d3de7932b0ac420f8fae2a970f2ac34 (diff) |
drm/i915: fixup active list locking in object_unbind
All other accesses take this spinlock, so do this here, too.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 302e096c3ca..e6b85cdbc60 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1987,6 +1987,7 @@ int i915_gem_object_unbind(struct drm_gem_object *obj) { struct drm_device *dev = obj->dev; + drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_gem_object *obj_priv = obj->driver_private; int ret = 0; @@ -2042,8 +2043,10 @@ i915_gem_object_unbind(struct drm_gem_object *obj) } /* Remove ourselves from the LRU list if present. */ + spin_lock(&dev_priv->mm.active_list_lock); if (!list_empty(&obj_priv->list)) list_del_init(&obj_priv->list); + spin_unlock(&dev_priv->mm.active_list_lock); if (i915_gem_object_is_purgeable(obj_priv)) i915_gem_object_truncate(obj); |