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/vcn4.0.3: gate per-queue reset by PSP SOS program version

Add a PSP SOS firmware compatibility check before enabling VCN per-queue
reset on vcn_v4_0_3.

Per review, program check is sufficient: when PSP SOS program is 0x01,
require fw version >= 0x0036015f; otherwise allow per-queue reset.

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Jesse Zhang <Jesse.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Jesse Zhang and committed by
Alex Deucher
16df395a 6728daa2

+18 -1
+18 -1
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
··· 134 134 return 0; 135 135 } 136 136 137 + static bool vcn_v4_0_3_is_psp_fw_reset_supported(struct amdgpu_device *adev) 138 + { 139 + uint32_t fw_ver = adev->psp.sos.fw_version; 140 + uint32_t pgm = (fw_ver >> 8) & 0xFF; 141 + 142 + /* 143 + * FWDEV-159155: PSP SOS FW must be >= 0x0036015f for program 0x01 144 + * before enabling VCN per-queue reset. 145 + */ 146 + if (pgm == 1) 147 + return fw_ver >= 0x0036015f; 148 + 149 + return true; 150 + } 151 + 137 152 static int vcn_v4_0_3_late_init(struct amdgpu_ip_block *ip_block) 138 153 { 139 154 struct amdgpu_device *adev = ip_block->adev; ··· 156 141 adev->vcn.supported_reset = 157 142 amdgpu_get_soft_full_reset_mask(&adev->vcn.inst[0].ring_enc[0]); 158 143 159 - if (amdgpu_dpm_reset_vcn_is_supported(adev) && !amdgpu_sriov_vf(adev)) 144 + if (amdgpu_dpm_reset_vcn_is_supported(adev) && 145 + vcn_v4_0_3_is_psp_fw_reset_supported(adev) && 146 + !amdgpu_sriov_vf(adev)) 160 147 adev->vcn.supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE; 161 148 162 149 return 0;