All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/radeon: Fix cleanup error path.
@ 2015-03-04 21:10 Jan Vesely
  2015-03-05  1:13 ` Jan Vesely
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Vesely @ 2015-03-04 21:10 UTC (permalink / raw
  To: dri-devel, Maarten Lankhorst, Michel Danzer

cleanup: target is called before fence_get
Fixes hangs on GPU reset on Turks GPU.

regression introduced by:
commit dd7cfd641228abb2669d8d047d5ec377b1835900
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Jan 21 13:07:31 2014 +0100

    drm/ttm: kill fence_lock
    
    No users are left, kill it off! :D
    Conversion to the reservation api is next on the list, after
    that the functionality can be restored with rcu.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>

CC: stable@vger.kernel.org
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94081
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
---
 drivers/gpu/drm/radeon/radeon_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 00ead8c..89a8c48 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -573,6 +573,7 @@ vblank_cleanup:
 	drm_vblank_put(crtc->dev, radeon_crtc->crtc_id);
 
 pflip_cleanup:
+	fence_put(work->fence);
 	if (unlikely(radeon_bo_reserve(new_rbo, false) != 0)) {
 		DRM_ERROR("failed to reserve new rbo in error path\n");
 		goto cleanup;
@@ -584,7 +585,6 @@ pflip_cleanup:
 
 cleanup:
 	drm_gem_object_unreference_unlocked(&work->old_rbo->gem_base);
-	fence_put(work->fence);
 	kfree(work);
 	return r;
 }
-- 
2.1.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] drm/radeon: Fix cleanup error path.
  2015-03-04 21:10 [PATCH 1/1] drm/radeon: Fix cleanup error path Jan Vesely
@ 2015-03-05  1:13 ` Jan Vesely
  2015-03-05 10:22   ` Maarten Lankhorst
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Vesely @ 2015-03-05  1:13 UTC (permalink / raw
  To: dri-devel; +Cc: Michel Danzer


[-- Attachment #1.1: Type: text/plain, Size: 1721 bytes --]

please ignore this patch, see bugzilla for details.

sorry for the noise.

On Wed, 2015-03-04 at 16:10 -0500, Jan Vesely wrote:
> cleanup: target is called before fence_get
> Fixes hangs on GPU reset on Turks GPU.
> 
> regression introduced by:
> commit dd7cfd641228abb2669d8d047d5ec377b1835900
> Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> Date:   Tue Jan 21 13:07:31 2014 +0100
> 
>     drm/ttm: kill fence_lock
>     
>     No users are left, kill it off! :D
>     Conversion to the reservation api is next on the list, after
>     that the functionality can be restored with rcu.
>     
>     Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> 
> CC: stable@vger.kernel.org
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94081
> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
> ---
>  drivers/gpu/drm/radeon/radeon_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
> index 00ead8c..89a8c48 100644
> --- a/drivers/gpu/drm/radeon/radeon_display.c
> +++ b/drivers/gpu/drm/radeon/radeon_display.c
> @@ -573,6 +573,7 @@ vblank_cleanup:
>  	drm_vblank_put(crtc->dev, radeon_crtc->crtc_id);
>  
>  pflip_cleanup:
> +	fence_put(work->fence);
>  	if (unlikely(radeon_bo_reserve(new_rbo, false) != 0)) {
>  		DRM_ERROR("failed to reserve new rbo in error path\n");
>  		goto cleanup;
> @@ -584,7 +585,6 @@ pflip_cleanup:
>  
>  cleanup:
>  	drm_gem_object_unreference_unlocked(&work->old_rbo->gem_base);
> -	fence_put(work->fence);
>  	kfree(work);
>  	return r;
>  }


-- 
Jan Vesely <jan.vesely@rutgers.edu>

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] drm/radeon: Fix cleanup error path.
  2015-03-05  1:13 ` Jan Vesely
@ 2015-03-05 10:22   ` Maarten Lankhorst
  2015-04-24 14:20     ` Jan Vesely
  0 siblings, 1 reply; 4+ messages in thread
From: Maarten Lankhorst @ 2015-03-05 10:22 UTC (permalink / raw
  To: Jan Vesely, dri-devel; +Cc: Michel Danzer

Hey,

On 05-03-15 02:13, Jan Vesely wrote:
> please ignore this patch, see bugzilla for details.
Just in case, can you try the patches from https://bugzilla.kernel.org/show_bug.cgi?id=90741 ?

~Maarten


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] drm/radeon: Fix cleanup error path.
  2015-03-05 10:22   ` Maarten Lankhorst
@ 2015-04-24 14:20     ` Jan Vesely
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Vesely @ 2015-04-24 14:20 UTC (permalink / raw
  To: Maarten Lankhorst; +Cc: Michel Danzer, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 961 bytes --]

Hi Maarten,

sorry for the delay, could not fit tests that freeze the machine into my
schedule. I found two patches at that bug. The first one (Use
fence_add/remove_callback) is already applied in 4.0. I tried the second
one (reshuffle evergreen_dma_fence_ring_emit), but it did not help.
However, on the very first attempt the GPU reset worked, so I think it's
just a race somewhere, maybe it has always been there and the changes
since 3.17 just upset the balance.

I'll try to get more details, but the machine occasionally has to run
days without reboot so testing kernels can be tricky.

regards,
Jan

On Thu, 2015-03-05 at 11:22 +0100, Maarten Lankhorst wrote:
> Hey,
> 
> On 05-03-15 02:13, Jan Vesely wrote:
> > please ignore this patch, see bugzilla for details.
> Just in case, can you try the patches from https://bugzilla.kernel.org/show_bug.cgi?id=90741 ?
> 
> ~Maarten
> 
> 


-- 
Jan Vesely <jan.vesely@rutgers.edu>

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-24 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-04 21:10 [PATCH 1/1] drm/radeon: Fix cleanup error path Jan Vesely
2015-03-05  1:13 ` Jan Vesely
2015-03-05 10:22   ` Maarten Lankhorst
2015-04-24 14:20     ` Jan Vesely

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.