Skip to content

Commit

Permalink
drm/amd/pm: check specific index for aldebaran
Browse files Browse the repository at this point in the history
[ Upstream commit 0ce8ef2 ]

Check for specific indexes that may be invalid values.

Signed-off-by: Jesse Zhang <[email protected]>
Reviewed-by: Yang Wang <[email protected]>
Reviewed-by: Tim Huang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Jie1zhang authored and gregkh committed Sep 8, 2024
1 parent 4ab720b commit d0230b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1931,7 +1931,8 @@ static int aldebaran_mode2_reset(struct smu_context *smu)

index = smu_cmn_to_asic_specific_index(smu, CMN2ASIC_MAPPING_MSG,
SMU_MSG_GfxDeviceDriverReset);

if (index < 0 )
return -EINVAL;
mutex_lock(&smu->message_lock);
if (smu_version >= 0x00441400) {
ret = smu_cmn_send_msg_without_waiting(smu, (uint16_t)index, SMU_RESET_MODE_2);
Expand Down

0 comments on commit d0230b3

Please sign in to comment.