summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c
diff options
context:
space:
mode:
authorJingwen Chen <Jingwen.Chen2@amd.com>2020-09-18 12:43:49 +0300
committerAlex Deucher <alexander.deucher@amd.com>2020-09-25 23:54:00 +0300
commit162b786f0fdac97afe27879c9120ff59b383f8f3 (patch)
tree82b33c0dd8729aaa17b33e9dcbee903b4b15395c /drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c
parent7c67d74d101324bf75a671316b6d0d861788edc9 (diff)
downloadlinux-162b786f0fdac97afe27879c9120ff59b383f8f3.tar.xz
drm/amd: Skip not used microcode loading in SRIOV
smc, sdma, sos, ta and asd fw is not used in SRIOV. Skip them to accelerate sw_init for navi12. v2: skip above fw in SRIOV for vega10 and sienna_cichlid v3: directly skip psp fw loading in SRIOV Signed-off-by: Jingwen Chen <Jingwen.Chen2@amd.com> Reviewed-by: Emily.Deng <Emily.Deng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c')
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c
index 1e222c5d91a4..daf122f24f23 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c
@@ -209,11 +209,13 @@ static int vega10_smu_init(struct pp_hwmgr *hwmgr)
int ret;
struct cgs_firmware_info info = {0};
- ret = cgs_get_firmware_info(hwmgr->device,
- CGS_UCODE_ID_SMU,
- &info);
- if (ret || !info.kptr)
- return -EINVAL;
+ if (!amdgpu_sriov_vf((struct amdgpu_device *)hwmgr->adev)) {
+ ret = cgs_get_firmware_info(hwmgr->device,
+ CGS_UCODE_ID_SMU,
+ &info);
+ if (ret || !info.kptr)
+ return -EINVAL;
+ }
priv = kzalloc(sizeof(struct vega10_smumgr), GFP_KERNEL);