drm/i915: hold mutex for unreference() in i915_gem_tiling.c

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
Chris Wilson 2009-02-08 19:07:51 +00:00 committed by Dave Airlie
parent a198bc80ae
commit d6873102fd

View File

@ -299,9 +299,8 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
} }
obj_priv->stride = args->stride; obj_priv->stride = args->stride;
mutex_unlock(&dev->struct_mutex);
drm_gem_object_unreference(obj); drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);
return 0; return 0;
} }
@ -340,9 +339,8 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
DRM_ERROR("unknown tiling mode\n"); DRM_ERROR("unknown tiling mode\n");
} }
mutex_unlock(&dev->struct_mutex);
drm_gem_object_unreference(obj); drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);
return 0; return 0;
} }