From c322b422ab0f7b3b15c0cdd3f2c534094eaefcef Mon Sep 17 00:00:00 2001 From: Jane Jian Date: Mon, 22 Aug 2022 15:15:32 +0800 Subject: [PATCH] drm/amdgpu/vcn: Disable CG/PG for SRIOV MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit For sriov, CG and MG are controlled from hypervisor side, no need to manage them again in ip init Acked-by: Christian König Signed-off-by: Jane Jian Reviewed-by: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc21.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c index 34a2672659714..a26c5723c46e2 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc21.c +++ b/drivers/gpu/drm/amd/amdgpu/soc21.c @@ -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: -- 2.30.2