aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-06-06 09:46:00 +0100
committerEric Anholt <eric@anholt.net>2009-06-09 14:41:37 -0700
commitb1ce786cb85280490ca3c29a62ddf8608826b414 (patch)
tree01c0eeda679de2a679f2e35a3495a6d5ec2b2bb4 /drivers/gpu
parentdrm/i915: Call drm_vblank_post_modeset() on error paths. (diff)
downloadlinux-dev-b1ce786cb85280490ca3c29a62ddf8608826b414.tar.xz
linux-dev-b1ce786cb85280490ca3c29a62ddf8608826b414.zip
drm/i915: no need to hold mutex for object lookup
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 2d705e8a297e..744bf9803ea3 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3701,15 +3701,14 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
struct drm_gem_object *obj;
struct drm_i915_gem_object *obj_priv;
- mutex_lock(&dev->struct_mutex);
obj = drm_gem_object_lookup(dev, file_priv, args->handle);
if (obj == NULL) {
DRM_ERROR("Bad handle in i915_gem_busy_ioctl(): %d\n",
args->handle);
- mutex_unlock(&dev->struct_mutex);
return -EBADF;
}
+ mutex_lock(&dev->struct_mutex);
/* Update the active list for the hardware's current position.
* Otherwise this only updates on a delayed timer or when irqs are
* actually unmasked, and our working set ends up being larger than