Skip to content

Commit 9c4f59e

Browse files
yifancomalexdeucher
authored andcommitted
drm/amd/pm: correct the sequence of sending gpu reset msg
the 2nd parameter should be smu msg type rather than asic msg index. Fixes: 7d38d9d ("drm/amdgpu: add mode2 reset support for yellow carp") Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com> Acked-by: Aaron Liu <aaron.liu@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent f8f4e2a commit 9c4f59e

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,14 +282,9 @@ static int yellow_carp_post_smu_init(struct smu_context *smu)
282282

283283
static int yellow_carp_mode_reset(struct smu_context *smu, int type)
284284
{
285-
int ret = 0, index = 0;
286-
287-
index = smu_cmn_to_asic_specific_index(smu, CMN2ASIC_MAPPING_MSG,
288-
SMU_MSG_GfxDeviceDriverReset);
289-
if (index < 0)
290-
return index == -EACCES ? 0 : index;
285+
int ret = 0;
291286

292-
ret = smu_cmn_send_smc_msg_with_param(smu, (uint16_t)index, type, NULL);
287+
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GfxDeviceDriverReset, type, NULL);
293288
if (ret)
294289
dev_err(smu->adev->dev, "Failed to mode reset!\n");
295290

0 commit comments

Comments
 (0)