Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu/pm: Implement SDMA queue reset for different asic

Implement sdma queue reset by SMU_MSG_ResetSDMA2

Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
Suggested-by: Tim Huang <tim.huang@amd.com>
Reviewed-by: Tim Huang <tim.huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Jesse Zhang and committed by
Alex Deucher
da5c9677 c8fd3a74

+22 -8
+22 -8
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
··· 2744 2744 2745 2745 static int smu_v13_0_6_reset_sdma(struct smu_context *smu, uint32_t inst_mask) 2746 2746 { 2747 - struct amdgpu_device *adev = smu->adev; 2747 + uint32_t smu_program; 2748 2748 int ret = 0; 2749 2749 2750 - /* the message is only valid on SMU 13.0.6 with pmfw 85.121.00 and above */ 2751 - if ((adev->flags & AMD_IS_APU) || 2752 - amdgpu_ip_version(adev, MP1_HWIP, 0) != IP_VERSION(13, 0, 6) || 2753 - smu->smc_fw_version < 0x00557900) 2754 - return 0; 2750 + smu_program = (smu->smc_fw_version >> 24) & 0xff; 2751 + switch (amdgpu_ip_version(smu->adev, MP1_HWIP, 0)) { 2752 + case IP_VERSION(13, 0, 6): 2753 + if (((smu_program == 7) && (smu->smc_fw_version > 0x07550700)) || 2754 + ((smu_program == 0) && (smu->smc_fw_version > 0x00557700))) 2755 + ret = smu_cmn_send_smc_msg_with_param(smu, 2756 + SMU_MSG_ResetSDMA, inst_mask, NULL); 2757 + else if ((smu_program == 4) && 2758 + (smu->smc_fw_version > 0x4556e6c)) 2759 + ret = smu_cmn_send_smc_msg_with_param(smu, 2760 + SMU_MSG_ResetSDMA2, inst_mask, NULL); 2761 + break; 2762 + case IP_VERSION(13, 0, 14): 2763 + if ((smu_program == 5) && 2764 + (smu->smc_fw_version > 0x05550f00)) 2765 + ret = smu_cmn_send_smc_msg_with_param(smu, 2766 + SMU_MSG_ResetSDMA2, inst_mask, NULL); 2767 + break; 2768 + default: 2769 + break; 2770 + } 2755 2771 2756 - ret = smu_cmn_send_smc_msg_with_param(smu, 2757 - SMU_MSG_ResetSDMA, inst_mask, NULL); 2758 2772 if (ret) 2759 2773 dev_err(smu->adev->dev, 2760 2774 "failed to send ResetSDMA event with mask 0x%x\n",