revert "drm/amdgpu/pm: add definition PPSMC_MSG_ResetSDMA2"
Subsystems (3)
PATCH 1/3 revert "drm/amdgpu/pm: add definition PPSMC_MSG_ResetSDMA2"
From: "[email protected]" <[email protected]>
pmfw now unifies PPSMC_MSG_ResetSDMA definitions for different devices. PPSMC_MSG_ResetSDMA2 is not needed.
--- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h | 1 - drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 +-- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 - 3 files changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h +0 -1
@@ -93,7 +93,6 @@#define PPSMC_MSG_SelectPLPDMode 0x40#define PPSMC_MSG_RmaDueToBadPageThreshold 0x43#define PPSMC_MSG_SelectPstatePolicy 0x44 -#define PPSMC_MSG_ResetSDMA2 0x45#define PPSMC_MSG_ResetSDMA 0x4D#define PPSMC_Message_Count 0x4E
drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h +1 -2
@@ -276,8 +276,7 @@__SMU_DUMMY_MAP (SelectPstatePolicy), \__SMU_DUMMY_MAP (MALLPowerController), \__SMU_DUMMY_MAP (MALLPowerState), \ -__SMU_DUMMY_MAP (ResetSDMA), \ -__SMU_DUMMY_MAP (ResetSDMA2), +__SMU_DUMMY_MAP (ResetSDMA), #undef __SMU_DUMMY_MAP#define __SMU_DUMMY_MAP (type) SMU_MSG_##type
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +0 -1
@@ -209,7 +209,6 @@ static const struct cmn2asic_msg_mapping smu_v13_0_6_message_map[SMU_MSG_MAX_COUMSG_MAP (RmaDueToBadPageThreshold, PPSMC_MSG_RmaDueToBadPageThreshold,0 ),MSG_MAP (SelectPstatePolicy, PPSMC_MSG_SelectPstatePolicy,0 ), MSG_MAP(ResetSDMA, PPSMC_MSG_ResetSDMA, 0), - MSG_MAP(ResetSDMA2, PPSMC_MSG_ResetSDMA2, 0), };// clang-format on
Signature · 1 line
2.25.1
PATCH 2/3 revert "drm/amdgpu/pm: Implement SDMA queue reset for different asic"
From: "[email protected]" <[email protected]>
pmfw unified PPSMC_MSG_ResetSDMA definitions for different devices. PPSMC_MSG_ResetSDMA2 is not needed.
--- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +8 -22
@@ -2743,31 +2743,17 @@ static int smu_v13_0_6_send_rma_reason(struct smu_context *smu)static int smu_v13_0_6_reset_sdma (struct smu_context *smu,uint32_t inst_mask) { -uint32_t smu_program; +struct amdgpu_device *adev = smu->adev;int ret =0 ; - smu_program = (smu->smc_fw_version >>24 ) &0xff ; -switch (amdgpu_ip_version (smu->adev,MP1_HWIP ,0 )) { -case IP_VERSION (13 ,0 ,6 ): -if (((smu_program ==7 ) && (smu->smc_fw_version >0x07550700 )) || - ((smu_program ==0 ) && (smu->smc_fw_version >0x00557700 ))) - ret =smu_cmn_send_smc_msg_with_param (smu, - SMU_MSG_ResetSDMA, inst_mask,NULL ); -else if ((smu_program ==4 ) && - (smu->smc_fw_version >0x4556e6c )) - ret =smu_cmn_send_smc_msg_with_param (smu, - SMU_MSG_ResetSDMA2, inst_mask,NULL ); -break ; -case IP_VERSION (13 ,0 ,14 ): -if ((smu_program ==5 ) && - (smu->smc_fw_version >0x05550f00 )) - ret =smu_cmn_send_smc_msg_with_param (smu, - SMU_MSG_ResetSDMA2, inst_mask,NULL ); -break ; -default : -break ; - } +/* the message is only valid on SMU 13.0.6 with pmfw 85.121.00 and above */ +if ((adev->flags &AMD_IS_APU ) || +amdgpu_ip_version (adev,MP1_HWIP ,0 ) !=IP_VERSION (13 ,0 ,6 ) || + smu->smc_fw_version <0x00557900 ) +return 0 ; + ret =smu_cmn_send_smc_msg_with_param (smu, + SMU_MSG_ResetSDMA, inst_mask,NULL );if (ret) dev_err(smu->adev->dev, "failed to send ResetSDMA event with mask 0x%x\n",
Signature · 1 line
2.25.1
PATCH 3/3 drm/amd/pm: Refactor SMU 13.0.6 SDMA reset firmware version checks
In reply to [email protected]From: "[email protected]" <[email protected]>
This patch refactors the firmware version checks in smu_v13_0_6_reset_sdma to support multiple SMU programs with different firmware version thresholds.
--- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +9 -5
@@ -2745,11 +2745,15 @@ static int smu_v13_0_6_reset_sdma(struct smu_context *smu, uint32_t inst_mask) {struct amdgpu_device *adev = smu->adev;int ret =0 ; - -/* the message is only valid on SMU 13.0.6 with pmfw 85.121.00 and above */ -if ((adev->flags &AMD_IS_APU ) || -amdgpu_ip_version (adev,MP1_HWIP ,0 ) !=IP_VERSION (13 ,0 ,6 ) || - smu->smc_fw_version <0x00557900 ) +uint32_t smu_program; + + smu_program = (smu->smc_fw_version >>24 ) &0xff ; +/* the message is only valid on SMU 13.0.6 with these pmfw and above */ +if (amdgpu_ip_version (adev,MP1_HWIP ,0 ) !=IP_VERSION (13 ,0 ,6 ) || + ((smu_program ==0 ) && (smu->smc_fw_version <0x00557900 )) || + ((smu_program ==4 ) && (smu->smc_fw_version <0x4556e00 )) || + ((smu_program ==5 ) && (smu->smc_fw_version <0x5551200 )) || + ((smu_program ==7 ) && (smu->smc_fw_version <0x7550700 )))return 0 ; ret = smu_cmn_send_smc_msg_with_param(smu,
Signature · 1 line
2.25.1
Re: [PATCH 3/3] drm/amd/pm: Refactor SMU 13.0.6 SDMA reset firmware version checks
Quoted 23 lines · On 1/15/2025 7:10 AM, [email protected] wrote:
From: "[email protected]" <[email protected]>
This patch refactors the firmware version checks in
smu_v13_0_6_reset_sdmato support multiple SMU programs with different firmware version thresholds.Signed-off-by Jesse Zhang <[email protected]>--- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +0
-5@@ -2745,11 +2745,15 @@ static int smu_v13_0_6_reset_sdma(struct smu_context *smu, uint32_t inst_mask) {struct amdgpu_device *adev = smu->adev;int ret =0 ; - -/* the message is only valid on SMU 13.0.6 with pmfw 85.121.00 and above */ -if ((adev->flags &AMD_IS_APU ) || -amdgpu_ip_version (adev,MP1_HWIP ,0 ) !=IP_VERSION (13 ,0 ,6 ) || - smu->smc_fw_version <0x00557900 )
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c static int smu_v13_0_6_reset_sdma(struct smu_context *smu, uint32_t inst_mask) · line 2757
Quoted 10 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +9
-0+uint32_t smu_program; + + smu_program = (smu->smc_fw_version >>24 ) &0xff ; +/* the message is only valid on SMU 13.0.6 with these pmfw and above */ +if (amdgpu_ip_version (adev,MP1_HWIP ,0 ) !=IP_VERSION (13 ,0 ,6 ) || + ((smu_program ==0 ) && (smu->smc_fw_version <0x00557900 )) || + ((smu_program ==4 ) && (smu->smc_fw_version <0x4556e00 )) || + ((smu_program ==5 ) && (smu->smc_fw_version <0x5551200 )) || + ((smu_program ==7 ) && (smu->smc_fw_version <0x7550700 )))return 0 ;
I think this should report error code for not supported rather than reporting a fake success.
Thanks,
Lijo
Quoted 2 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +0
-0ret = smu_cmn_send_smc_msg_with_param(smu,
RE: [PATCH 3/3] drm/amd/pm: Refactor SMU 13.0.6 SDMA reset firmware version checks
[AMD Official Use Only - AMD Internal Distribution Only]
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, January 15, 2025 4:23 PM
To: Zhang, Jesse(Jie) <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Huang, Tim <[email protected]>; Zhu, Jiadong <[email protected]>
Subject: Re: [PATCH 3/3] drm/amd/pm: Refactor SMU 13.0.6 SDMA reset firmware version checks
Quoted 24 lines · On 1/15/2025 7:10 AM, [email protected] wrote:
From: "[email protected]" <[email protected]>
This patch refactors the firmware version checks in
smu_v13_0_6_reset_sdmato support multiple SMU programs with different firmware version thresholds.Signed-off-by Jesse Zhang <[email protected]>--- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +0
-5@@ -2745,11 +2745,15 @@ static int smu_v13_0_6_reset_sdma(struct smu_context *smu, uint32_t inst_mask) {struct amdgpu_device *adev = smu->adev;int ret =0 ; - -/* the message is only valid on SMU 13.0.6 with pmfw 85.121.00 and above */ -if ((adev->flags &AMD_IS_APU ) || -amdgpu_ip_version (adev,MP1_HWIP ,0 ) !=IP_VERSION (13 ,0 ,6 ) || - smu->smc_fw_version <0x00557900 )
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c static int smu_v13_0_6_reset_sdma(struct · line 2757
Quoted 10 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +9
-0+uint32_t smu_program; + + smu_program = (smu->smc_fw_version >>24 ) &0xff ; +/* the message is only valid on SMU 13.0.6 with these pmfw and above */ +if (amdgpu_ip_version (adev,MP1_HWIP ,0 ) !=IP_VERSION (13 ,0 ,6 ) || + ((smu_program ==0 ) && (smu->smc_fw_version <0x00557900 )) || + ((smu_program ==4 ) && (smu->smc_fw_version <0x4556e00 )) || + ((smu_program ==5 ) && (smu->smc_fw_version <0x5551200 )) || + ((smu_program ==7 ) && (smu->smc_fw_version <0x7550700 )))return 0 ;
I think this should report error code for not supported rather than reporting a fake success. Thanks Lijo, will update.
Thanks
Jesse
Thanks,
Lijo
Quoted 2 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +0
-0ret = smu_cmn_send_smc_msg_with_param(smu,