]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/pm: add GFXCLK/SCLK clocks level print support for APUs
authorPerry Yuan <Perry.Yuan@amd.com>
Thu, 28 Oct 2021 10:05:42 +0000 (06:05 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Nov 2021 04:04:51 +0000 (23:04 -0500)
commitd62a5e4d42accb62c7ec5eaa3be09ebe341a524e
tree8c16f472f0365c0736a801ea1cf4259ddcf47775
parent68267c6f5dd58ef76d989d63756384bdd71ef6f1
drm/amd/pm: add GFXCLK/SCLK clocks level print support for APUs

add support that allow the userspace tool like RGP to get the GFX clock
value at runtime, the fix follow the old way to show the min/current/max
clocks level for compatible consideration.

=== Test ===
$ cat /sys/class/drm/card0/device/pp_dpm_sclk
0: 200Mhz *
1: 1100Mhz
2: 1600Mhz

then run stress test on one APU system.
$ cat /sys/class/drm/card0/device/pp_dpm_sclk
0: 200Mhz
1: 1040Mhz *
2: 1600Mhz

The current GFXCLK value is updated at runtime.

BugLink: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5260
Reviewed-by: Huang Ray <Ray.Huang@amd.com>
Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.h