diff options
author | Luca Barbieri <luca@luca-barbieri.com> | 2010-02-09 08:49:12 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-02-11 07:22:34 +0300 |
commit | bc9025bdc4e2b591734cca17697093845007b63d (patch) | |
tree | a115cc34ee9650d94df7eb9d166ba98eb9d674a7 /drivers/gpu/drm/radeon/radeon_cs.c | |
parent | c3ae90c099bb62387507e86da7cf799850444b08 (diff) | |
download | linux-bc9025bdc4e2b591734cca17697093845007b63d.tar.xz |
Use drm_gem_object_[handle_]unreference_unlocked where possible
Mostly obvious simplifications.
The i915 pread/pwrite ioctls, intel_overlay_put_image and
nouveau_gem_new were incorrectly using the locked versions
without locking: this is also fixed in this patch.
Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cs.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cs.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index 1190148cf5e6..da59f5e78e09 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c @@ -196,11 +196,8 @@ static void radeon_cs_parser_fini(struct radeon_cs_parser *parser, int error) radeon_bo_list_unreserve(&parser->validated); } for (i = 0; i < parser->nrelocs; i++) { - if (parser->relocs[i].gobj) { - mutex_lock(&parser->rdev->ddev->struct_mutex); - drm_gem_object_unreference(parser->relocs[i].gobj); - mutex_unlock(&parser->rdev->ddev->struct_mutex); - } + if (parser->relocs[i].gobj) + drm_gem_object_unreference_unlocked(parser->relocs[i].gobj); } kfree(parser->track); kfree(parser->relocs); |