From: Jerome Glisse Date: Wed, 13 Jan 2010 11:32:36 +0000 (+0100) Subject: drm/radeon/kms: Do not unpin buffer in fb destruction X-Git-Tag: v2.6.33-rc6~27^2~9^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6398d42454ce1671b3422c34fd0f600c9c76c8b1;p=platform%2Fupstream%2Fkernel-adaptation-pc.git drm/radeon/kms: Do not unpin buffer in fb destruction It's not necessary to unpin buffer in fb destruction. pin/unpin need to be balanced and we don't pin in fb creation. We pin when an fb is associated to a crtc and unpin when the fb is disassociated from the crtc. Note: Maybe we should take reference on fb in set_base callback so fb doesn't disappear until it's unbind from ctrc. Signed-off-by: Jerome Glisse Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 47ceae9..49f3c69 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -668,7 +668,6 @@ static void radeon_user_framebuffer_destroy(struct drm_framebuffer *fb) radeonfb_remove(dev, fb); if (radeon_fb->obj) { - radeon_gem_object_unpin(radeon_fb->obj); mutex_lock(&dev->struct_mutex); drm_gem_object_unreference(radeon_fb->obj); mutex_unlock(&dev->struct_mutex);