]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/pm: modify the fine grain tuning function for Renoir
authorXiaojian Du <Xiaojian.Du@amd.com>
Wed, 13 Jan 2021 10:05:15 +0000 (18:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Jan 2021 18:13:31 +0000 (13:13 -0500)
commit6130ba06716df04d94152a9279b1803e50640112
tree70eb301ab426f44ee2005dad62f15e5bd3802210
parenta1dd055d613c1aa6880fb04c739a2da34afa9f51
drm/amd/pm: modify the fine grain tuning function for Renoir

This patch is to modify the fine grain tuning function for Renoir.
The fine grain tuning function uses the sysfs node -- pp_od_clk_voltage
to config gfxclk. Meanwhile, another sysfs
node -- power_dpm_force_perfomance_level also affects the gfx clk.
It will cause confusion when these two sysfs nodes works
together.
It is risky to add two new flags to common smu struct, so
this patch uses the existing flag to make these two sysfs nodes works
separately. Only when power_dpm_force_perfomance_level is changed
to "manual" mode, the fine grain function will be started.
In other profile modes, including "auto", "high", "low", "profile_peak",
"profile_standard", "profile_min_sclk", "profile_min_mclk",
the fine grain tuning function will be shut down and the frequency range
of gfx will be restored the default value.

Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c
drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c