<br><br><br>
<p>----</p><p><br></p><p><br></p><p><br></p><p><br><br><br>
</p><p><strong>主 题:</strong><span id="subject">Re: [PATCH] drm/amdgpu: resolve s3 hang for r7340</span>
<br><strong>日 期:</strong><span id="date">2022-03-28 15:38</span>
<br><strong>发件人:</strong><span id="from">Paul Menzel</span>
<br><strong>收件人:</strong><span id="to">Zhenneng Li</span>
</p><p><br>
</p><p>[Cc: -Jack Zhang (invalid address)<br><br>Am 28.03.22 um 09:36 schrieb Paul Menzel:<br>> Dear Zhenneng,<br>> <br>> <br>> Thank you for your patch.<br>> <br>> Am 28.03.22 um 06:05 schrieb Zhenneng Li:<br>>> This is a workaround for s3 hang for r7340(amdgpu).<br>> <br>> Is it hanging when resuming from S3? </p><p>Yes, this func is a delayed work after init graphics card.</p><p>> Maybe also use the line below for <br>> the commit message summary:<br>> <br>> drm/amdgpu: Add 1 ms delay to init handler to fix s3 resume hang<br>> <br>> Also, please add a space before the ( in “r7340(amdgpu)”.<br>> <br>>> When we test s3 with r7340 on arm64 platform, graphics card will hang up,<br>>> the error message are as follows:<br>>> Mar 4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [ 1.599374][ 7] [ T291] amdgpu 0000:02:00.0: fb0: amdgpudrmfb frame buffer device<br>>> 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<br>>> 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<br>>> Mar 4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [ 1.630696][ 7] [ T291] amdgpu 0000:02:00.0: Fatal error during GPU init<br>>> Mar 4 01:14:11 greatwall-GW-XXXXXX-XXX kernel: [ 1.637477][ 7] [ T291] [drm] amdgpu: finishing device.<br>> <br>> The prefix in the beginning is not really needed. Only the stuff after <br>> `kernel: `.<br>> <br>> Maybe also add the output of `lspci -nn -s …` for that r7340 device.<br>> <br>>> Change-Id: I5048b3894c0ca9faf2f4847ddab61f9eb17b4823<br>> <br>> Without the Gerrit instance this belongs to, the Change-Id is of no use <br>> in the public.<br>> <br>>> Signed-off-by: Zhenneng Li<lizhenneng@kylinos.cn><br>>> ---<br>>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++<br>>> 1 file changed, 2 insertions(+)<br>>><br>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c <br>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>>> index 3987ecb24ef4..1eced991b5b2 100644<br>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>>> @@ -2903,6 +2903,8 @@ static void <br>>> amdgpu_device_delayed_init_work_handler(struct work_struct *work)<br>>> container_of(work, struct amdgpu_device, delayed_init_work.work);<br>>> int r;<br>>> + mdelay(1);<br>>> +<br>> <br></lizhenneng@kylinos.cn></si_dpm></p><p><si_dpm><lizhenneng@kylinos.cn>> Wow, I wonder how long it took you to find that workaround.</lizhenneng@kylinos.cn></si_dpm></p><p>About 3 mouths, I try to add this delay work(amdgpu_device_delayed_init_work_handler) from 2000ms to 2500ms, or use mb() instead of mdelay(1), but it's useless, I don't know the reason,the occurrenct probability of this bug is one ten-thousandth, do you know the possible reasons?</p><p><si_dpm><lizhenneng@kylinos.cn>> <br>>> r = amdgpu_ib_ring_tests(adev);<br>>> if (r)<br>>> DRM_ERROR("ib ring test failed (%d).\n", r);<br>> <br>> <br>> Kind regards,<br>> <br>> Paul<br></lizhenneng@kylinos.cn></si_dpm></p>