drm/amdgpu/vcn: Disable CG/PG for SRIOV
authorJane Jian <Jane.Jian@amd.com>
Mon, 22 Aug 2022 07:15:32 +0000 (15:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 1 Sep 2022 19:12:00 +0000 (15:12 -0400)
For sriov, CG and MG are controlled from hypervisor side,
no need to manage them again in ip init

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jane Jian <Jane.Jian@amd.com>
Reviewed-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/soc21.c

index 34a2672..a26c572 100644 (file)
@@ -637,6 +637,11 @@ static int soc21_common_early_init(void *handle)
                adev->pg_flags = AMD_PG_SUPPORT_VCN |
                        AMD_PG_SUPPORT_VCN_DPG |
                        AMD_PG_SUPPORT_JPEG;
+               if (amdgpu_sriov_vf(adev)) {
+                       /* hypervisor control CG and PG enablement */
+                       adev->cg_flags = 0;
+                       adev->pg_flags = 0;
+               }
                adev->external_rev_id = adev->rev_id + 0x20;
                break;
        default: