summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm
diff options
context:
space:
mode:
authorYifan Zhang <yifan1.zhang@amd.com>2022-02-24 06:28:33 +0300
committerAlex Deucher <alexander.deucher@amd.com>2022-02-25 01:25:05 +0300
commit0bb319e7a1146e15f1919cfbffe44831c29e8f82 (patch)
tree2b2d759bdb5692f4ab74483de286513f758e1124 /drivers/gpu/drm/amd/pm
parent45f0ff404cc92cc97569333314b47e1654a0491a (diff)
downloadlinux-0bb319e7a1146e15f1919cfbffe44831c29e8f82.tar.xz
drm/amd/pm: fix mode2 reset fail for smu 13.0.5
SMU MSG index should be used as parameter. Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
index 093b9144464b..8ee5bcb60370 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
@@ -245,14 +245,9 @@ static int smu_v13_0_5_post_smu_init(struct smu_context *smu)
static int smu_v13_0_5_mode_reset(struct smu_context *smu, int type)
{
- int ret = 0, index = 0;
-
- index = smu_cmn_to_asic_specific_index(smu, CMN2ASIC_MAPPING_MSG,
- SMU_MSG_GfxDeviceDriverReset);
- if (index < 0)
- return index == -EACCES ? 0 : index;
+ int ret = 0;
- ret = smu_cmn_send_smc_msg_with_param(smu, (uint16_t)index, type, NULL);
+ ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GfxDeviceDriverReset, type, NULL);
if (ret)
dev_err(smu->adev->dev, "Failed to mode reset!\n");