Commit dd12b858 authored by Samir Dhume's avatar Samir Dhume Committed by Alex Deucher
Browse files

drm/amdgpu/vcn: Skip vcn power-gating change for sriov



CG/PG is handled on the host side.

Signed-off-by: default avatarSamir Dhume <samir.dhume@amd.com>
Acked-by: default avatarLeo Liu <leo.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0fc7d79b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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;