Skip to contentSkip to conversation

drm/amdgpu/vce: take all rings into account for idle checks

PATCH In review Alex Deucher 2 participants 2 messages Sep 26, 2016 – Sep 27, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/vce: take all rings into account for idle checks

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +5 -2
index 121bd6e..3b03558 100644
@@ -305,9 +305,12 @@ static void amdgpu_vce_idle_work_handler(struct work_struct *work)
 {
 	struct amdgpu_device *adev =
 		container_of(work, struct amdgpu_device, vce.idle_work.work);
+	unsigned i, count = 0;
 
-	if ((amdgpu_fence_count_emitted(&adev->vce.ring[0]) == 0) &&
-	    (amdgpu_fence_count_emitted(&adev->vce.ring[1]) == 0)) {
+	for (i = 0; i < adev->vce.num_rings; i++)
+		count += amdgpu_fence_count_emitted(&adev->vce.ring[i]);
+
+	if (count == 0) {
 		if (adev->pm.dpm_enabled) {
 			amdgpu_dpm_enable_vce(adev, false);
 		} else {
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by
#2 lore raw
In reply to a message not in the archive

Am 26.09.2016 um 21:21 schrieb Alex Deucher:

Quoted 1 line
Quoted 13 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +1 -0
index 121bd6e..3b03558 100644
@@ -305,9 +305,12 @@ static void amdgpu_vce_idle_work_handler(struct work_struct *work)
  {
  	struct amdgpu_device *adev =
  		container_of(work, struct amdgpu_device, vce.idle_work.work);
+	unsigned i, count = 0;

drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c static void amdgpu_vce_idle_work_handler(struct work_struct *work) · line 316

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +4 -2
 
-	if ((amdgpu_fence_count_emitted(&adev->vce.ring[0]) == 0) &&
-	    (amdgpu_fence_count_emitted(&adev->vce.ring[1]) == 0)) {
+	for (i = 0; i < adev->vce.num_rings; i++)
+		count += amdgpu_fence_count_emitted(&adev->vce.ring[i]);
+
+	if (count == 0) {
  		if (adev->pm.dpm_enabled) {
  			amdgpu_dpm_enable_vce(adev, false);
  		} else {

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