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

Commit 646e906d authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu: Take vcn encode rings into account in idle work



Take the encode rings into account in the idle work handler.

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4bd2c5dd
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -205,6 +205,11 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
	struct amdgpu_device *adev =
		container_of(work, struct amdgpu_device, vcn.idle_work.work);
	unsigned fences = amdgpu_fence_count_emitted(&adev->vcn.ring_dec);
	unsigned i;

	for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
		fences += amdgpu_fence_count_emitted(&adev->vcn.ring_enc[i]);
	}

	if (fences == 0) {
		if (adev->pm.dpm_enabled) {