summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
diff options
context:
space:
mode:
authorSamir Dhume <samir.dhume@amd.com>2023-07-17 18:09:38 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-08-16 18:33:59 +0300
commitdd12b858c246b81f6ad6d616857f04f1db33a544 (patch)
treeee464c77eb0667a947deb2247cb88344bd9d1d84 /drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
parent0fc7d79b45f6fd5129c69cccc41385b09b5e63c1 (diff)
downloadlinux-dd12b858c246b81f6ad6d616857f04f1db33a544.tar.xz
drm/amdgpu/vcn: Skip vcn power-gating change for sriov
CG/PG is handled on the host side. Signed-off-by: Samir Dhume <samir.dhume@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
index 503cd26d3fdd..f85d18cd74ec 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
@@ -1536,6 +1536,15 @@ static int vcn_v4_0_3_set_powergating_state(void *handle,
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
int ret;
+ /* for SRIOV, guest should not control VCN Power-gating
+ * MMSCH FW should control Power-gating and clock-gating
+ * guest should avoid touching CGC and PG
+ */
+ if (amdgpu_sriov_vf(adev)) {
+ adev->vcn.cur_state = AMD_PG_STATE_UNGATE;
+ return 0;
+ }
+
if (state == adev->vcn.cur_state)
return 0;