drm/amd/pm: Fix clock reporting for SMUv13.0.6
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 24 Aug 2023 11:55:51 +0000 (17:25 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Sep 2023 16:23:47 +0000 (12:23 -0400)
commitcad2fb19bbfa6110e8ed71c07a33fb54d2104a0f
tree71d351297911147ef6ce5c44056990dd72b32b5f
parent4e8303cf2c4dd27374a16a8881ec1a1cd5baf86f
drm/amd/pm: Fix clock reporting for SMUv13.0.6

On SMU v13.0.6, effective clocks are reported by FW which won't exactly
match with DPM level. Report the current clock based on the values
matching closest to the effective clock. Also, when deep sleep is
applied to a clock, report it with a special level "S:" as in sample
clock levels below

S: 19Mhz *
0: 615Mhz
1: 800Mhz
2: 888Mhz
3: 1000Mhz

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c