summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-02-24 12:54:51 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-02-24 12:54:51 +0000
commitba407b882916e56451696102351c9b59af3ed49b (patch)
tree548a6b4d862185f09c82dc4dfce9f1a05fc46241
parent6fbb06562f102d99a36e0de3342f67d101a3eb47 (diff)
drm/amd/pm: correct the sequence of sending gpu reset msg
From Yifan Zhang 3851046599c1907c956b126bac18c4b84bf6a16b in linux 5.15.y/5.15.25 9c4f59ea3f865693150edf0c91d1cc6b451360dd in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/dev/pci/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/sys/dev/pci/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
index a403657151b..0e1a843608e 100644
--- a/sys/dev/pci/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
+++ b/sys/dev/pci/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
@@ -291,14 +291,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");