Skip to content

Commit

Permalink
drm/amd/pm: correct the sequence of sending gpu reset msg
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Yifan Zhang authored and Alex Deucher committed Feb 14, 2022
1 parent f8f4e2a commit 9c4f59e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,9 @@ static int yellow_carp_post_smu_init(struct smu_context *smu)

static int yellow_carp_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");

Expand Down

0 comments on commit 9c4f59e

Please sign in to comment.