From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 101528] RX460 Memory clock stays high until card is "used" Date: Thu, 29 Jun 2017 19:48:40 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0065427393==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id D2BE46E6F1 for ; Thu, 29 Jun 2017 19:48:39 +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 --===============0065427393== Content-Type: multipart/alternative; boundary="14987657190.E10b63Ac.12570"; charset="UTF-8" --14987657190.E10b63Ac.12570 Date: Thu, 29 Jun 2017 19:48:39 +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=3D101528 --- Comment #2 from Alexander Tsoy --- I've added printing of some debug info into smu7_hwmgr.c and here what I get before GPU enters that state: [ 778.701843] AMDGPU: vblank_time_us: 630, switch_limit_us: 450=20=20=20= =20=20=20=20=20=20=20 [ 778.707608] AMDGPU: vblank_time_us: 630, switch_limit_us: 450=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 [ 778.713379] AMDGPU: disable_mclk_switching: 0, disable_mclk_switching_for_frame_lock: 0, info.display_count: 1, smu7_vblank_too_short: 0, mode_info.refresh_rate: 60 [ 778.748777] AMDGPU: vblank_time_us: 0, switch_limit_us: 450=20=20=20=20= =20=20=20 [ 778.754361] AMDGPU: vblank_time_us: 0, switch_limit_us: 450=20=20 [ 778.759951] AMDGPU: disable_mclk_switching: 1, disable_mclk_switching_for_frame_lock: 0, info.display_count: 1, smu7_vblank_too_short: 1, mode_info.refresh_rate: 0 For some reason if refresh_rate =3D 0 then vblank_time_us =3D 0. Shouldn't = the latter be 0xffffffff instead? So I guess the following commit is the culpri= t: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?= id=3D09be4a5219610a6fae3215d4f51f948d6f5d2609 and the following patch should fix (or workaround?) this issue: - if (vblank_time_us < switch_limit_us) + if (vblank_time_us && (vblank_time_us < switch_limit_us)) After applying it: [ 409.588673] AMDGPU: vblank_time_us: 630, switch_limit_us: 450 [ 409.594427] AMDGPU: vblank_time_us: 630, switch_limit_us: 450 [ 409.600182] AMDGPU: disable_mclk_switching: 0, disable_mclk_switching_for_frame_lock: 0, info.display_count: 1, smu7_vblank_too_short: 0, mode_info.refresh_rate: 60 [ 409.639750] AMDGPU: vblank_time_us: 0, switch_limit_us: 450 [ 409.645321] AMDGPU: vblank_time_us: 0, switch_limit_us: 450 [ 409.650917] AMDGPU: disable_mclk_switching: 0, disable_mclk_switching_for_frame_lock: 0, info.display_count: 1, smu7_vblank_too_short: 0, mode_info.refresh_rate: 0 $ cat /sys/class/drm/card0/device/pp_dpm_mclk 0: 150Mhz * 1: 300Mhz 2: 700Mhz 3: 1450Mhz --=20 You are receiving this mail because: You are the assignee for the bug.= --14987657190.E10b63Ac.12570 Date: Thu, 29 Jun 2017 19:48:39 +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 # 2 on bug 10152= 8 from Alexander Tsoy
I've added printing of some debug info into smu7_hwmgr.c and h=
ere what I get
before GPU enters that state:

[  778.701843] AMDGPU: vblank_time_us: 630, switch_limit_us: 450=20=20=20=
=20=20=20=20=20=20=20
[  778.707608] AMDGPU: vblank_time_us: 630, switch_limit_us: 450=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20
[  778.713379] AMDGPU: disable_mclk_switching: 0,
disable_mclk_switching_for_frame_lock: 0, info.display_count: 1,
smu7_vblank_too_short: 0, mode_info.refresh_rate: 60
[  778.748777] AMDGPU: vblank_time_us: 0, switch_limit_us: 450=20=20=20=20=
=20=20=20
[  778.754361] AMDGPU: vblank_time_us: 0, switch_limit_us: 450=20=20
[  778.759951] AMDGPU: disable_mclk_switching: 1,
disable_mclk_switching_for_frame_lock: 0, info.display_count: 1,
smu7_vblank_too_short: 1, mode_info.refresh_rate: 0

For some reason if refresh_rate =3D 0 then vblank_time_us =3D 0. Shouldn't =
the
latter be 0xffffffff instead? So I guess the following commit is the culpri=
t:
https://git.kerne=
l.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3D09be4a521961=
0a6fae3215d4f51f948d6f5d2609

and the following patch should fix (or workaround?) this issue:

- if (vblank_time_us < switch_limit_us)
+ if (vblank_time_us && (vblank_time_us < switch_limit_us))

After applying it:

[  409.588673] AMDGPU: vblank_time_us: 630, switch_limit_us: 450
[  409.594427] AMDGPU: vblank_time_us: 630, switch_limit_us: 450
[  409.600182] AMDGPU: disable_mclk_switching: 0,
disable_mclk_switching_for_frame_lock: 0, info.display_count: 1,
smu7_vblank_too_short: 0, mode_info.refresh_rate: 60
[  409.639750] AMDGPU: vblank_time_us: 0, switch_limit_us: 450
[  409.645321] AMDGPU: vblank_time_us: 0, switch_limit_us: 450
[  409.650917] AMDGPU: disable_mclk_switching: 0,
disable_mclk_switching_for_frame_lock: 0, info.display_count: 1,
smu7_vblank_too_short: 0, mode_info.refresh_rate: 0

$ cat /sys/class/drm/card0/device/pp_dpm_mclk
0: 150Mhz *
1: 300Mhz
2: 700Mhz
3: 1450Mhz


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