From 6c339f37f1cd9b910f4c04b14079b1663b685c4d Mon Sep 17 00:00:00 2001 From: Evan Quan Date: Mon, 6 Jul 2020 16:11:31 +0800 Subject: drm/amd/powerplay: unify swSMU index to asic specific index mapping By this we can drop redundant code. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/smu_v12_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/drm/amd/powerplay/smu_v12_0.c') diff --git a/drivers/gpu/drm/amd/powerplay/smu_v12_0.c b/drivers/gpu/drm/amd/powerplay/smu_v12_0.c index 4e1b11d07438..05e3870c13d7 100644 --- a/drivers/gpu/drm/amd/powerplay/smu_v12_0.c +++ b/drivers/gpu/drm/amd/powerplay/smu_v12_0.c @@ -29,6 +29,7 @@ #include "smu_v12_0.h" #include "soc15_common.h" #include "atom.h" +#include "smu_cmn.h" #include "asic_reg/mp/mp_12_0_0_offset.h" #include "asic_reg/mp/mp_12_0_0_sh_mask.h" @@ -95,7 +96,9 @@ smu_v12_0_send_msg_with_param(struct smu_context *smu, struct amdgpu_device *adev = smu->adev; int ret = 0, index = 0; - index = smu_msg_get_index(smu, msg); + index = smu_cmn_to_asic_specific_index(smu, + CMN2ASIC_MAPPING_MSG, + msg); if (index < 0) return index; -- cgit