summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/soc21.c
diff options
context:
space:
mode:
authorJane Jian <Jane.Jian@amd.com>2022-08-22 15:15:32 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-09-01 15:12:00 -0400
commitc322b422ab0f7b3b15c0cdd3f2c534094eaefcef (patch)
tree2a9234f90f94fd3b03135389eb56aaa115333dc6 /drivers/gpu/drm/amd/amdgpu/soc21.c
parent72be7316587835e0c76dad472569453e902b562e (diff)
downloadlinux-stable-c322b422ab0f7b3b15c0cdd3f2c534094eaefcef.tar.gz
linux-stable-c322b422ab0f7b3b15c0cdd3f2c534094eaefcef.tar.bz2
linux-stable-c322b422ab0f7b3b15c0cdd3f2c534094eaefcef.zip
drm/amdgpu/vcn: Disable CG/PG for SRIOV
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/soc21.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/soc21.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c
index 34a267265971..a26c5723c46e 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: