[BUG] drm/radeon: locking problems with page_flip

Witold Baryluk baryluk at smp.if.uj.edu.pl
Wed Sep 14 08:36:19 PDT 2011


On 09-13 11:29, Michel Dänzer wrote:
> On Die, 2011-09-13 at 05:49 +0200, Witold Baryluk wrote: 
> > 
> > I yeasterday discovered pretty nasty issue in radeon / drm code,
> > and page_flip locking code on my ThinkPad T43.
> 
> Does the patch below fix the problem?
> 
> 
> From ed7cf809c4fb737fa486b24004ee47056bf0e797 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer at amd.com>
> Date: Thu, 8 Sep 2011 17:36:22 +0200
> Subject: [PATCH] drm/radeon: Unreference GEM object outside of spinlock
>  in page flip error path.
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> Should fix https://bugzilla.redhat.com/show_bug.cgi?id=726277 .
> 
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>  drivers/gpu/drm/radeon/radeon_display.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
> index 6cc17fb..6adb3e5 100644
> --- a/drivers/gpu/drm/radeon/radeon_display.c
> +++ b/drivers/gpu/drm/radeon/radeon_display.c
> @@ -473,8 +473,8 @@ pflip_cleanup:
>  	spin_lock_irqsave(&dev->event_lock, flags);
>  	radeon_crtc->unpin_work = NULL;
>  unlock_free:
> -	drm_gem_object_unreference_unlocked(old_radeon_fb->obj);
>  	spin_unlock_irqrestore(&dev->event_lock, flags);
> +	drm_gem_object_unreference_unlocked(old_radeon_fb->obj);
>  	radeon_fence_unref(&work->fence);
>  	kfree(work);
>  
> -- 
> 1.7.5.4

Hi,

unfortunetly I cannot reproduce problem with or without patch.
Will do more stress testing and wait until something happens.


-- 
Witold Baryluk
JID: witold.baryluk // jabster.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20110914/7e0c77cf/attachment-0001.pgp>


More information about the dri-devel mailing list