Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 808a934f authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu: handle vce pg flags properly



Don't attempt to start/stop the vce block if pg is disabled.

Reviewed-by: default avatarEric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b6df77fc
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -608,6 +608,9 @@ static int vce_v2_0_set_powergating_state(void *handle,
	 */
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;

	if (!(adev->pg_flags & AMDGPU_PG_SUPPORT_VCE))
		return 0;

	if (state == AMD_PG_STATE_GATE)
		/* XXX do we need a vce_v2_0_stop()? */
		return 0;
+3 −0
Original line number Diff line number Diff line
@@ -728,6 +728,9 @@ static int vce_v3_0_set_powergating_state(void *handle,
	 */
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;

	if (!(adev->pg_flags & AMDGPU_PG_SUPPORT_VCE))
		return 0;

	if (state == AMD_PG_STATE_GATE)
		/* XXX do we need a vce_v3_0_stop()? */
		return 0;