diff options
author | Dave Airlie <airlied@redhat.com> | 2010-02-24 22:39:29 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-02-24 22:39:29 -0500 |
commit | de19322d554fd0f449d17610823c38494c06db9e (patch) | |
tree | df91899c274005adb02a7a8ca5d9e5609bc2d05b /drivers/gpu/drm/i915/intel_display.c | |
parent | 60b341b778cc2929df16c0a504c91621b3c6a4ad (diff) | |
parent | 290e55056ec3d25c72088628245d8cae037b30db (diff) |
Merge remote branch 'korg/drm-core-next' into drm-next-stage
* korg/drm-core-next:
drm/ttm: handle OOM in ttm_tt_swapout
drm/radeon/kms/atom: fix shr/shl ops
drm/kms: fix spelling of "CLOCK"
drm/kms: fix fb_changed = true else statement
drivers/gpu/drm/drm_fb_helper.c: don't use private implementation of atoi()
drm: switch all GEM/KMS ioctls to unlocked ioctl status.
Use drm_gem_object_[handle_]unreference_unlocked where possible
drm: introduce drm_gem_object_[handle_]unreference_unlocked
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index b27202d23ebc..c8fd15f146af 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -3553,11 +3553,10 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, | |||
3553 | intel_crtc->cursor_bo = bo; | 3553 | intel_crtc->cursor_bo = bo; |
3554 | 3554 | ||
3555 | return 0; | 3555 | return 0; |
3556 | fail: | ||
3557 | mutex_lock(&dev->struct_mutex); | ||
3558 | fail_locked: | 3556 | fail_locked: |
3559 | drm_gem_object_unreference(bo); | ||
3560 | mutex_unlock(&dev->struct_mutex); | 3557 | mutex_unlock(&dev->struct_mutex); |
3558 | fail: | ||
3559 | drm_gem_object_unreference_unlocked(bo); | ||
3561 | return ret; | 3560 | return ret; |
3562 | } | 3561 | } |
3563 | 3562 | ||
@@ -4476,9 +4475,7 @@ static void intel_user_framebuffer_destroy(struct drm_framebuffer *fb) | |||
4476 | intelfb_remove(dev, fb); | 4475 | intelfb_remove(dev, fb); |
4477 | 4476 | ||
4478 | drm_framebuffer_cleanup(fb); | 4477 | drm_framebuffer_cleanup(fb); |
4479 | mutex_lock(&dev->struct_mutex); | 4478 | drm_gem_object_unreference_unlocked(intel_fb->obj); |
4480 | drm_gem_object_unreference(intel_fb->obj); | ||
4481 | mutex_unlock(&dev->struct_mutex); | ||
4482 | 4479 | ||
4483 | kfree(intel_fb); | 4480 | kfree(intel_fb); |
4484 | } | 4481 | } |
@@ -4541,9 +4538,7 @@ intel_user_framebuffer_create(struct drm_device *dev, | |||
4541 | 4538 | ||
4542 | ret = intel_framebuffer_create(dev, mode_cmd, &fb, obj); | 4539 | ret = intel_framebuffer_create(dev, mode_cmd, &fb, obj); |
4543 | if (ret) { | 4540 | if (ret) { |
4544 | mutex_lock(&dev->struct_mutex); | 4541 | drm_gem_object_unreference_unlocked(obj); |
4545 | drm_gem_object_unreference(obj); | ||
4546 | mutex_unlock(&dev->struct_mutex); | ||
4547 | return NULL; | 4542 | return NULL; |
4548 | } | 4543 | } |
4549 | 4544 | ||