From: bugzilla-daemon@freedesktop.org Subject: [Bug 108493] Unigine Heaven at 4K crashes amdgpu and causes a GPU hang Date: Sat, 27 Oct 2018 05:32:20 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1832382176==" 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 B4F866E599 for ; Sat, 27 Oct 2018 05:32:20 +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 --===============1832382176== Content-Type: multipart/alternative; boundary="15406183400.7Cb2.10186" Content-Transfer-Encoding: 7bit --15406183400.7Cb2.10186 Date: Sat, 27 Oct 2018 05:32:20 +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=3D108493 --- Comment #9 from Timur Krist=C3=B3f --- I think I discovered a possible reason for this issue. If you look at the DDEBUG dumps, it says in several places: "This slot was corrupted in GPU memory". So I began to suspect something was wrong with the VRAM. After looking around a bit, I found that the amdgpu driver does not honor t= he voltage settings from the VBIOS, and sets the memory to use lower voltages instead. So basically the driver undervolts the VRAM without me asking to do so. I guess this might be considered a feature for some people. However, when I manually edit pp_od_clk_voltage to increase the OD_MCLK voltages, then the card begins to work in a stable manner and the GPU hang = is gone. (Or at the very least I haven't seen a hang yet, whereas previously it used to hang in less than a minute.) In my case, the VBIOS wants to set the MCLK voltages to 1000 mV at all frequencies, while amdgpu sets them to 750 mv, 800 mV, and 900mV. And it tu= rns out that 900 mV is just too low for my card at 1750 MHz. [root@timur-xps ~]# cat /sys/class/drm/card0/device/pp_od_clk_voltage=20 OD_SCLK: 0: 300MHz 750mV 1: 588MHz 765mV 2: 952MHz 900mV 3: 1041MHz 975mV 4: 1106MHz 1031mV 5: 1168MHz 1093mV 6: 1209MHz 1143mV 7: 1244MHz 1150mV OD_MCLK: 0: 300MHz 750mV 1: 1000MHz 800mV 2: 1750MHz 900mV OD_RANGE: SCLK: 300MHz 2000MHz MCLK: 300MHz 2250MHz VDDC: 750mV 1150mV [root@timur-xps ~]# cat /sys/kernel/debug/dri/0/amdgpu_vbios > mybios.rom [root@timur-xps ~]# pbec -i mybios.rom -s -r MEMORY_CLOCK ---- [DEFAULT] ATOM_MCLK_ENTRY Array ---- Entry: 0 Frequency: 300 MHz. Voltage:. 1000 MV Entry: 1 Frequency: 1000 MHz. Voltage:. 1000 MV Entry: 2 Frequency: 1750 MHz. Voltage:. 1000 MV ---- Here is some info about the VBIOS: [root@timur-xps ~]# cat /sys/class/drm/card0/device/subsystem_device 0xe343 [root@timur-xps ~]# cat /sys/class/drm/card0/device/subsystem_vendor 0x1da2 [root@timur-xps ~]# cat /sys/class/drm/card0/device/vbios_version 113-D00034-S07 --=20 You are receiving this mail because: You are the assignee for the bug.= --15406183400.7Cb2.10186 Date: Sat, 27 Oct 2018 05:32:20 +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 # 9 on bug 10849= 3 from Timur Krist=C3=B3f
I think I discovered a possible reason for this issue. If you =
look at the
DDEBUG dumps, it says in several places: "This slot was corrupted in G=
PU
memory". So I began to suspect something was wrong with the VRAM.

After looking around a bit, I found that the amdgpu driver does not honor t=
he
voltage settings from the VBIOS, and sets the memory to use lower voltages
instead. So basically the driver undervolts the VRAM without me asking to do
so. I guess this might be considered a feature for some people.

However, when I manually edit pp_od_clk_voltage to increase the OD_MCLK
voltages, then the card begins to work in a stable manner and the GPU hang =
is
gone. (Or at the very least I haven't seen a hang yet, whereas previously it
used to hang in less than a minute.)

In my case, the VBIOS wants to set the MCLK voltages to 1000 mV at all
frequencies, while amdgpu sets them to 750 mv, 800 mV, and 900mV. And it tu=
rns
out that 900 mV is just too low for my card at 1750 MHz.

[root@timur-xps ~]# cat /sys/class/drm/card0/device/pp_od_clk_voltage=20
OD_SCLK:
0:        300MHz        750mV
1:        588MHz        765mV
2:        952MHz        900mV
3:       1041MHz        975mV
4:       1106MHz       1031mV
5:       1168MHz       1093mV
6:       1209MHz       1143mV
7:       1244MHz       1150mV
OD_MCLK:
0:        300MHz        750mV
1:       1000MHz        800mV
2:       1750MHz        900mV
OD_RANGE:
SCLK:     300MHz       2000MHz
MCLK:     300MHz       2250MHz
VDDC:     750mV        1150mV
[root@timur-xps ~]# cat /sys/kernel/debug/dri/0/amdgpu_vbios > mybio=
s.rom
[root@timur-xps ~]# pbec -i mybios.rom -s -r MEMORY_CLOCK

----
[DEFAULT] ATOM_MCLK_ENTRY Array
----

Entry: 0
        Frequency: 300 MHz.
        Voltage:. 1000 MV
Entry: 1
        Frequency: 1000 MHz.
        Voltage:. 1000 MV
Entry: 2
        Frequency: 1750 MHz.
        Voltage:. 1000 MV
----


Here is some info about the VBIOS:

[root@timur-xps ~]# cat /sys/class/drm/card0/device/subsystem_device
0xe343
[root@timur-xps ~]# cat /sys/class/drm/card0/device/subsystem_vendor
0x1da2
[root@timur-xps ~]# cat /sys/class/drm/card0/device/vbios_version
113-D00034-S07


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