diff options
-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 302e096c3ca0..e6b85cdbc60f 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1987,6 +1987,7 @@ int | |||
1987 | i915_gem_object_unbind(struct drm_gem_object *obj) | 1987 | i915_gem_object_unbind(struct drm_gem_object *obj) |
1988 | { | 1988 | { |
1989 | struct drm_device *dev = obj->dev; | 1989 | struct drm_device *dev = obj->dev; |
1990 | drm_i915_private_t *dev_priv = dev->dev_private; | ||
1990 | struct drm_i915_gem_object *obj_priv = obj->driver_private; | 1991 | struct drm_i915_gem_object *obj_priv = obj->driver_private; |
1991 | int ret = 0; | 1992 | int ret = 0; |
1992 | 1993 | ||
@@ -2042,8 +2043,10 @@ i915_gem_object_unbind(struct drm_gem_object *obj) | |||
2042 | } | 2043 | } |
2043 | 2044 | ||
2044 | /* Remove ourselves from the LRU list if present. */ | 2045 | /* Remove ourselves from the LRU list if present. */ |
2046 | spin_lock(&dev_priv->mm.active_list_lock); | ||
2045 | if (!list_empty(&obj_priv->list)) | 2047 | if (!list_empty(&obj_priv->list)) |
2046 | list_del_init(&obj_priv->list); | 2048 | list_del_init(&obj_priv->list); |
2049 | spin_unlock(&dev_priv->mm.active_list_lock); | ||
2047 | 2050 | ||
2048 | if (i915_gem_object_is_purgeable(obj_priv)) | 2051 | if (i915_gem_object_is_purgeable(obj_priv)) |
2049 | i915_gem_object_truncate(obj); | 2052 | i915_gem_object_truncate(obj); |