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

Commit 713c0021 authored by Leo Liu's avatar Leo Liu Committed by Alex Deucher
Browse files

drm/amdgpu: remove the check for sessions being closed



This will make clock and power gated when no block decoded, for example
when paused during the playback.

Signed-off-by: default avatarLeo Liu <leo.liu@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f1037950
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -1089,15 +1089,9 @@ static void amdgpu_uvd_idle_work_handler(struct work_struct *work)
{
{
	struct amdgpu_device *adev =
	struct amdgpu_device *adev =
		container_of(work, struct amdgpu_device, uvd.idle_work.work);
		container_of(work, struct amdgpu_device, uvd.idle_work.work);
	unsigned i, fences, handles = 0;
	unsigned fences = amdgpu_fence_count_emitted(&adev->uvd.ring);


	fences = amdgpu_fence_count_emitted(&adev->uvd.ring);
	if (fences == 0) {

	for (i = 0; i < adev->uvd.max_handles; ++i)
		if (atomic_read(&adev->uvd.handles[i]))
			++handles;

	if (fences == 0 && handles == 0) {
		if (adev->pm.dpm_enabled) {
		if (adev->pm.dpm_enabled) {
			amdgpu_dpm_enable_uvd(adev, false);
			amdgpu_dpm_enable_uvd(adev, false);
		} else {
		} else {