From: bugzilla-daemon@freedesktop.org Subject: [Bug 106500] GPU Recovery + DC deadlock Date: Mon, 14 May 2018 22:30:37 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1835097775==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C2126E124 for ; Mon, 14 May 2018 22:30:37 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1835097775== Content-Type: multipart/alternative; boundary="15263370370.2D801C4B3.2628" Content-Transfer-Encoding: 7bit --15263370370.2D801C4B3.2628 Date: Mon, 14 May 2018 22:30:37 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D106500 --- Comment #3 from Andrey Grodzovsky --- (In reply to Bas Nieuwenhuizen from comment #2) > Created attachment 139568 [details] > dmesg after trying 139562 >=20 > I tried the patch and as expected we do not deadlock at the original plac= es > since we don't call those anymore. But I get garbage on my display (possi= bly > expected due to loss of VRAM), can't switch VT and stopping X hangs X. >=20 > Furthermore I eventually still get stuck fence waits in dmesg (attached). >=20 > Furthermore, it seems the UVDF ringtest fails. I think indeed the garbage is due to VRAM lost, maybe we don't create a sha= dow BO for the display's BO. GPU reset fails due to UVD failure to resume and = SMU failure so I believe that why any further fence submission hangs. The pipe never recovers. Harry, check the patch I attached, no reason to call=20 drm_atomic_helper_resume/suspend explicitly from amdgpu_device_gpu_recover - First of all it's already being called from the display code from amd_ip_funcs.suspend/resume hooks. Second of all, the place in amdgpu_device_gpu_recover it's being called is wrong for GPU stalls since it is called BEFORE we cancel and force completi= on of all in flight jobs which are stuck on the GPU. So as Bas explained it wi= ll try to wait for fence in amdgpu_pm_compute_clocks but the pipe is hanged s= o we end up in deadlock. If we call the mode set AFTER forceful completion (as t= he patch makes happen) no deadlock will happen.=20=20 UVD/SMU failures require further debugging but I am on a different task at = the moment so maybe some one can pick this up... Do you remember why that code is there ? I think it's remains of old code. If you OK with this patch I will send it for review. Further --=20 You are receiving this mail because: You are the assignee for the bug.= --15263370370.2D801C4B3.2628 Date: Mon, 14 May 2018 22:30:37 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 3 on bug 10650= 0 from Andrey Grodzovsky
(In reply to Bas Nieuwenhuizen from comment #2)
> Created =
attachment 139568 [details]
> dmesg after trying 139562
>=20
> I tried the patch and as expected we do not deadlock at the original p=
laces
> since we don't call those anymore. But I get garbage on my display (po=
ssibly
> expected due to loss of VRAM), can't switch VT and stopping X hangs X.
>=20
> Furthermore I eventually still get stuck fence waits in dmesg (attache=
d).
>=20
> Furthermore, it seems the UVDF ringtest fails.

I think indeed the garbage is due to VRAM lost, maybe we don't create a sha=
dow
BO for the display's BO. GPU reset fails due to  UVD failure to resume and =
SMU
failure so I believe that why any further fence submission hangs. The pipe
never recovers.

Harry, check the patch I attached, no reason to call=20
drm_atomic_helper_resume/suspend explicitly from amdgpu_device_gpu_recover -
First of all it's already being called from the display code from
amd_ip_funcs.suspend/resume hooks.
Second of all, the place in amdgpu_device_gpu_recover it's being called is
wrong for GPU stalls since it is called BEFORE we cancel and force completi=
on
of all in flight jobs which are stuck on the GPU. So as Bas explained it wi=
ll
try to wait for fence  in amdgpu_pm_compute_clocks but the pipe is hanged s=
o we
end up in deadlock. If we call the mode set AFTER forceful completion (as t=
he
patch makes happen) no deadlock will happen.=20=20

UVD/SMU failures require further debugging but I am on a different task at =
the
moment so maybe some one can pick this up...
Do you remember why that code is there ? I think it's remains of old code.
If you OK with this patch I will send it for review.

Further


You are receiving this mail because:
  • You are the assignee for the bug.
= --15263370370.2D801C4B3.2628-- --===============1835097775== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1835097775==--