linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: resolve s3 hang for r7340
@ 2022-03-28  4:05 Zhenneng Li
  2022-03-28  7:36 ` Paul Menzel
  0 siblings, 1 reply; 3+ messages in thread
From: Zhenneng Li @ 2022-03-28  4:05 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Christian König, Pan Xinhui, David Airlie, Daniel Vetter,
	Sumit Semwal, Andrey Grodzovsky, Evan Quan, Guchun Chen,
	Jack Zhang, Lijo Lazar, Kevin Wang, amd-gfx, dri-devel,
	linux-kernel, linux-media, linaro-mm-sig, Zhenneng Li

This is a workaround for s3 hang for r7340(amdgpu).
When we test s3 with r7340 on arm64 platform, graphics card will hang up,
the error message are as follows:
Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.599374][ 7] [  T291] amdgpu 0000:02:00.0: fb0: amdgpudrmfb frame buffer device
Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.612869][ 7] [  T291] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* late_init of IP block <si_dpm> failed -22
Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.623392][ 7] [  T291] amdgpu 0000:02:00.0: amdgpu_device_ip_late_init failed
Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.630696][ 7] [  T291] amdgpu 0000:02:00.0: Fatal error during GPU init
Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.637477][ 7] [  T291] [drm] amdgpu: finishing device.

Change-Id: I5048b3894c0ca9faf2f4847ddab61f9eb17b4823
Signed-off-by: Zhenneng Li <lizhenneng@kylinos.cn>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 3987ecb24ef4..1eced991b5b2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2903,6 +2903,8 @@ static void amdgpu_device_delayed_init_work_handler(struct work_struct *work)
 		container_of(work, struct amdgpu_device, delayed_init_work.work);
 	int r;
 
+	mdelay(1);
+
 	r = amdgpu_ib_ring_tests(adev);
 	if (r)
 		DRM_ERROR("ib ring test failed (%d).\n", r);
-- 
2.25.1


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

* Re: [PATCH] drm/amdgpu: resolve s3 hang for r7340
  2022-03-28  4:05 [PATCH] drm/amdgpu: resolve s3 hang for r7340 Zhenneng Li
@ 2022-03-28  7:36 ` Paul Menzel
  2022-03-28  7:38   ` Paul Menzel
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2022-03-28  7:36 UTC (permalink / raw)
  To: Zhenneng Li
  Cc: Alex Deucher, Andrey Grodzovsky, Jack Zhang, Lijo Lazar,
	Guchun Chen, David Airlie, Pan Xinhui, linux-kernel, amd-gfx,
	Sumit Semwal, linaro-mm-sig, dri-devel, Daniel Vetter,
	Kevin Wang, Evan Quan, Christian König, linux-media

Dear Zhenneng,


Thank you for your patch.

Am 28.03.22 um 06:05 schrieb Zhenneng Li:
> This is a workaround for s3 hang for r7340(amdgpu).

Is it hanging when resuming from S3? Maybe also use the line below for 
the commit message summary:

drm/amdgpu: Add 1 ms delay to init handler to fix s3 resume hang

Also, please add a space before the ( in “r7340(amdgpu)”.

> When we test s3 with r7340 on arm64 platform, graphics card will hang up,
> the error message are as follows:
> Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.599374][ 7] [  T291] amdgpu 0000:02:00.0: fb0: amdgpudrmfb frame buffer device
> Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.612869][ 7] [  T291] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* late_init of IP block <si_dpm> failed -22
> Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.623392][ 7] [  T291] amdgpu 0000:02:00.0: amdgpu_device_ip_late_init failed
> Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.630696][ 7] [  T291] amdgpu 0000:02:00.0: Fatal error during GPU init
> Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.637477][ 7] [  T291] [drm] amdgpu: finishing device.

The prefix in the beginning is not really needed. Only the stuff after 
`kernel: `.

Maybe also add the output of `lspci -nn -s …` for that r7340 device.

> Change-Id: I5048b3894c0ca9faf2f4847ddab61f9eb17b4823

Without the Gerrit instance this belongs to, the Change-Id is of no use 
in the public.

> Signed-off-by: Zhenneng Li <lizhenneng@kylinos.cn>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 3987ecb24ef4..1eced991b5b2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2903,6 +2903,8 @@ static void amdgpu_device_delayed_init_work_handler(struct work_struct *work)
>   		container_of(work, struct amdgpu_device, delayed_init_work.work);
>   	int r;
>   
> +	mdelay(1);
> +

Wow, I wonder how long it took you to find that workaround.

>   	r = amdgpu_ib_ring_tests(adev);
>   	if (r)
>   		DRM_ERROR("ib ring test failed (%d).\n", r);


Kind regards,

Paul

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

* Re: [PATCH] drm/amdgpu: resolve s3 hang for r7340
  2022-03-28  7:36 ` Paul Menzel
@ 2022-03-28  7:38   ` Paul Menzel
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2022-03-28  7:38 UTC (permalink / raw)
  To: Zhenneng Li
  Cc: Andrey Grodzovsky, Pan Xinhui, Guchun Chen, David Airlie,
	Lijo Lazar, linux-kernel, amd-gfx, Christian König,
	linaro-mm-sig, dri-devel, Daniel Vetter, Kevin Wang,
	Alex Deucher, Evan Quan, Sumit Semwal, linux-media

[Cc: -Jack Zhang (invalid address)

Am 28.03.22 um 09:36 schrieb Paul Menzel:
> Dear Zhenneng,
> 
> 
> Thank you for your patch.
> 
> Am 28.03.22 um 06:05 schrieb Zhenneng Li:
>> This is a workaround for s3 hang for r7340(amdgpu).
> 
> Is it hanging when resuming from S3? Maybe also use the line below for 
> the commit message summary:
> 
> drm/amdgpu: Add 1 ms delay to init handler to fix s3 resume hang
> 
> Also, please add a space before the ( in “r7340(amdgpu)”.
> 
>> When we test s3 with r7340 on arm64 platform, graphics card will hang up,
>> the error message are as follows:
>> Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.599374][ 7] [  T291] amdgpu 0000:02:00.0: fb0: amdgpudrmfb frame buffer device
>> Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.612869][ 7] [  T291] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* late_init of IP block <si_dpm> failed -22
>> Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.623392][ 7] [  T291] amdgpu 0000:02:00.0: amdgpu_device_ip_late_init failed
>> Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.630696][ 7] [  T291] amdgpu 0000:02:00.0: Fatal error during GPU init
>> Mar  4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [    1.637477][ 7] [  T291] [drm] amdgpu: finishing device.
> 
> The prefix in the beginning is not really needed. Only the stuff after 
> `kernel: `.
> 
> Maybe also add the output of `lspci -nn -s …` for that r7340 device.
> 
>> Change-Id: I5048b3894c0ca9faf2f4847ddab61f9eb17b4823
> 
> Without the Gerrit instance this belongs to, the Change-Id is of no use 
> in the public.
> 
>> Signed-off-by: Zhenneng Li <lizhenneng@kylinos.cn>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index 3987ecb24ef4..1eced991b5b2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -2903,6 +2903,8 @@ static void 
>> amdgpu_device_delayed_init_work_handler(struct work_struct *work)
>>           container_of(work, struct amdgpu_device, delayed_init_work.work);
>>       int r;
>> +    mdelay(1);
>> +
> 
> Wow, I wonder how long it took you to find that workaround.
> 
>>       r = amdgpu_ib_ring_tests(adev);
>>       if (r)
>>           DRM_ERROR("ib ring test failed (%d).\n", r);
> 
> 
> Kind regards,
> 
> Paul

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

end of thread, other threads:[~2022-03-28  7:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28  4:05 [PATCH] drm/amdgpu: resolve s3 hang for r7340 Zhenneng Li
2022-03-28  7:36 ` Paul Menzel
2022-03-28  7:38   ` Paul Menzel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).