Commit ffa453f0 authored by Changfeng's avatar Changfeng Committed by Alex Deucher

Revert "drm/amd/powerplay: drop unnecessary message support check"

The below 3 messages are not supported on Renoir
SMU_MSG_PrepareMp1ForShutdown
SMU_MSG_PrepareMp1ForUnload
SMU_MSG_PrepareMp1ForReset

It needs to revert patch:
drm/amd/powerplay: drop unnecessary message support check
to avoid set mp1 state fail during gpu reset on renoir.
Signed-off-by: default avatarchangfeng <Changfeng.Zhu@amd.com>
Reviewed-by: default avatarKenneth Feng <kenneth.feng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ee10e06e
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "sienna_cichlid_ppt.h" #include "sienna_cichlid_ppt.h"
#include "renoir_ppt.h" #include "renoir_ppt.h"
#include "amd_pcie.h" #include "amd_pcie.h"
#include "smu_cmn.h"
/* /*
* DO NOT use these for err/warn/info/debug messages. * DO NOT use these for err/warn/info/debug messages.
...@@ -1589,6 +1590,14 @@ int smu_set_mp1_state(struct smu_context *smu, ...@@ -1589,6 +1590,14 @@ int smu_set_mp1_state(struct smu_context *smu,
return 0; return 0;
} }
/* some asics may not support those messages */
if (smu_cmn_to_asic_specific_index(smu,
CMN2ASIC_MAPPING_MSG,
msg) < 0) {
mutex_unlock(&smu->mutex);
return 0;
}
ret = smu_send_smc_msg(smu, msg, NULL); ret = smu_send_smc_msg(smu, msg, NULL);
if (ret) if (ret)
dev_err(smu->adev->dev, "[PrepareMp1] Failed!\n"); dev_err(smu->adev->dev, "[PrepareMp1] Failed!\n");
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "amdgpu_smu.h" #include "amdgpu_smu.h"
#if defined(SWSMU_CODE_LAYER_L2) || defined(SWSMU_CODE_LAYER_L3) || defined(SWSMU_CODE_LAYER_L4) #if defined(SWSMU_CODE_LAYER_L1) || defined(SWSMU_CODE_LAYER_L2) || defined(SWSMU_CODE_LAYER_L3) || defined(SWSMU_CODE_LAYER_L4)
int smu_cmn_send_smc_msg_with_param(struct smu_context *smu, int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,
enum smu_message_type msg, enum smu_message_type msg,
uint32_t param, uint32_t param,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment