Skip to content

Commit 0cfce24

Browse files
Yiqing Yaoalexdeucher
authored andcommitted
drm/amdgpu: Clean up soc21 early init for SRIOV
Use virt_init_setting instead of per ip version setting. Signed-off-by: Yiqing Yao <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 9a1662f commit 0cfce24

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

drivers/gpu/drm/amd/amdgpu/soc21.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,6 @@ static int soc21_common_early_init(void *handle)
584584
AMD_PG_SUPPORT_JPEG |
585585
AMD_PG_SUPPORT_ATHUB |
586586
AMD_PG_SUPPORT_MMHUB;
587-
if (amdgpu_sriov_vf(adev)) {
588-
adev->cg_flags = 0;
589-
adev->pg_flags = 0;
590-
}
591587
adev->external_rev_id = adev->rev_id + 0x1; // TODO: need update
592588
break;
593589
case IP_VERSION(11, 0, 2):
@@ -645,18 +641,16 @@ static int soc21_common_early_init(void *handle)
645641
adev->pg_flags = AMD_PG_SUPPORT_VCN |
646642
AMD_PG_SUPPORT_VCN_DPG |
647643
AMD_PG_SUPPORT_JPEG;
648-
if (amdgpu_sriov_vf(adev)) {
649-
/* hypervisor control CG and PG enablement */
650-
adev->cg_flags = 0;
651-
adev->pg_flags = 0;
652-
}
653644
adev->external_rev_id = adev->rev_id + 0x20;
654645
break;
655646
default:
656647
/* FIXME: not supported yet */
657648
return -EINVAL;
658649
}
659650

651+
if (amdgpu_sriov_vf(adev))
652+
amdgpu_virt_init_setting(adev);
653+
660654
return 0;
661655
}
662656

0 commit comments

Comments
 (0)