drm/amd/pm: only send GmiPwrDnControl msg on master die (v3)
Subsystems (3)
PATCH 1/1 drm/amd/pm: only send GmiPwrDnControl msg on master die (v3)
PMFW only returns 0 on master die and sends NACK back on other dies for the message.
v2: only send GmiPwrDnControl msg on master die instead of all dies.
v3: remove the pointer check for get_socket_id and get_die_id as they should be present on Aldebaran.
Signed-off-by Tao Zhou <[email protected]>
--- .../gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +12 -4
@@ -1625,10 +1625,18 @@ static int aldebaran_set_df_cstate(struct smu_context *smu,static int aldebaran_allow_xgmi_power_down (struct smu_context *smu,bool en) { -return smu_cmn_send_smc_msg_with_param (smu, - SMU_MSG_GmiPwrDnControl, - en ?0 :1 , -NULL ); +struct amdgpu_device *adev = smu->adev; + +/* The message only works on master die and NACK will be sent +back for other dies, only send it on master die */ +if (!adev->smuio.funcs->get_socket_id (adev) && + !adev->smuio.funcs->get_die_id (adev)) +return smu_cmn_send_smc_msg_with_param (smu, + SMU_MSG_GmiPwrDnControl, + en ?0 :1 , +NULL ); +else +return 0 ; } static const struct throttling_logging_label {
Signature · 1 line
2.17.1
Quoted 9 lines · Tao Zhou
PMFW only returns 0 on master die and sends NACK back on other dies for the message.
v2: only send GmiPwrDnControl msg on master die instead of all dies.
v3: remove the pointer check forget_socket_idandget_die_idas they should be present on Aldebaran.Signed-off-by Tao Zhou <[email protected]>
Reviewed-by Lijo Lazar <[email protected]>
Thanks,
Lijo
Quoted 32 lines
--- .../gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +12
-4@@ -1625,10 +1625,18 @@ static int aldebaran_set_df_cstate(struct smu_context *smu,static int aldebaran_allow_xgmi_power_down (struct smu_context *smu,bool en) { -return smu_cmn_send_smc_msg_with_param (smu, - SMU_MSG_GmiPwrDnControl, - en ?0 :1 , -NULL ); +struct amdgpu_device *adev = smu->adev; + +/* The message only works on master die and NACK will be sent +back for other dies, only send it on master die */ +if (!adev->smuio.funcs->get_socket_id (adev) && + !adev->smuio.funcs->get_die_id (adev)) +return smu_cmn_send_smc_msg_with_param (smu, + SMU_MSG_GmiPwrDnControl, + en ?0 :1 , +NULL ); +else +return 0 ; } static const struct throttling_logging_label {