Skip to contentSkip to conversation

drm/amdgpu: remove the check for sessions being closed

PATCH In review Leo Liu 2 participants 2 messages Aug 3, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Leo Liu

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +2 -8
index c22b64e..bf59354 100644
@@ -1089,15 +1089,9 @@ static void amdgpu_uvd_idle_work_handler(struct work_struct *work)
 {
 	struct amdgpu_device *adev =
 		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);
-
-	for (i = 0; i < adev->uvd.max_handles; ++i)
-		if (atomic_read(&adev->uvd.handles[i]))
-			++handles;
-
-	if (fences == 0 && handles == 0) {
+	if (fences == 0) {
 		if (adev->pm.dpm_enabled) {
 			amdgpu_dpm_enable_uvd(adev, false);
 		} else {
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1470232699-2579-1-git-send-email-leo.liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 03.08.2016 um 15:58 schrieb Leo Liu:

Quoted 4 lines

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

Quoted 16 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 10 ++--------
  1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +1 -2
index c22b64e..bf59354 100644
@@ -1089,15 +1089,9 @@ static void amdgpu_uvd_idle_work_handler(struct work_struct *work)
  {
  	struct amdgpu_device *adev =
  		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);

drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c static void amdgpu_uvd_idle_work_handler(struct work_struct *work) · line 1097

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +1 -6
-
-	for (i = 0; i < adev->uvd.max_handles; ++i)
-		if (atomic_read(&adev->uvd.handles[i]))
-			++handles;
-
-	if (fences == 0 && handles == 0) {
+	if (fences == 0) {
  		if (adev->pm.dpm_enabled) {
  			amdgpu_dpm_enable_uvd(adev, false);
  		} else {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx