drm/amd/pm: support ss metrics read for smu11
authorSathishkumar S <sathishkumar.sundararaju@amd.com>
Wed, 4 May 2022 06:38:18 +0000 (12:08 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 May 2022 14:02:57 +0000 (10:02 -0400)
commitd6810d7dfaec516c046bf06e676d0539b96e69f6
treec61dc77303d94049ee68ac6ef58f117ac34eecb7
parent87b5ab28efe39134d2549273c8e15c113a95507d
drm/amd/pm: support ss metrics read for smu11

support reading smartshift apu and dgpu power for smu11 based asic

v2: add new version of SmuMetrics and make calculation more readable (Lijo)
v3: avoid calculations that result in -ve values and skip related checks
v4: use the current power limit on dGPU and exclude smu 11_0_7 (Lijo)
v5: remove redundant code (Lijo)

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_sienna_cichlid.h
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c