diff options
author | Horace Chen <horace.chen@amd.com> | 2022-07-21 08:42:30 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-09-01 21:11:12 +0200 |
commit | d9d86d085fbc104ea73a7f6da0b1a6c4086b709a (patch) | |
tree | 77f68bd16723ef83a28630b334b5aa4a0ce9b8e4 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
parent | drm/amdgpu: enable WPTR_POLL_ENABLE for sriov on sdma_v6_0 (diff) | |
download | linux-d9d86d085fbc104ea73a7f6da0b1a6c4086b709a.tar.xz linux-d9d86d085fbc104ea73a7f6da0b1a6c4086b709a.zip |
drm/amdgpu: refine virtualization psp fw skip check
SR-IOV may need to load different firmwares for different ASIC inside
VF.
So create a new function in amdgpu_virt to check whether FW load needs
to be skipped.
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Horace Chen <horace.chen@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 5c331507a9a8..0ffa72f35d74 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -340,11 +340,12 @@ static int psp_init_sriov_microcode(struct psp_context *psp) ret = psp_init_cap_microcode(psp, "aldebaran"); ret &= psp_init_ta_microcode(psp, "aldebaran"); break; + case IP_VERSION(13, 0, 0): + break; default: BUG(); break; } - return ret; } @@ -2412,19 +2413,7 @@ static bool fw_load_skip_check(struct psp_context *psp, return true; if (amdgpu_sriov_vf(psp->adev) && - (ucode->ucode_id == AMDGPU_UCODE_ID_SDMA0 - || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA1 - || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA2 - || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA3 - || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA4 - || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA5 - || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA6 - || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA7 - || ucode->ucode_id == AMDGPU_UCODE_ID_RLC_G - || ucode->ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL - || ucode->ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM - || ucode->ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM - || ucode->ucode_id == AMDGPU_UCODE_ID_SMC)) + amdgpu_virt_fw_load_skip_check(psp->adev, ucode->ucode_id)) /*skip ucode loading in SRIOV VF */ return true; |