Skip to contentSkip to conversation

drm/amdgpu/vcn2.5: fix the enc loop with hw fini

PATCH In review Leo Liu 2 participants 3 messages Nov 15, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Leo Liu

author
#0 lore raw

PATCH 1/1 drm/amdgpu/vcn2.5: fix the enc loop with hw fini

Fixes 9072c584 (drm/amdgpu: move JPEG2.5 out from VCN2.5)
---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +3 -3
index 451dc814d845..42d6b9f0553b 100644
@@ -268,7 +268,7 @@ static int vcn_v2_5_hw_fini(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 	struct amdgpu_ring *ring;
-	int i;
+	int i, j;
 
 	for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
 		if (adev->vcn.harvest_config & (1 << i))
@@ -280,8 +280,8 @@ static int vcn_v2_5_hw_fini(void *handle)
 
 		ring->sched.ready = false;
 
-		for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
-			ring = &adev->vcn.inst[i].ring_enc[i];
+		for (j = 0; j < adev->vcn.num_enc_rings; ++j) {
+			ring = &adev->vcn.inst[i].ring_enc[j];
 			ring->sched.ready = false;
 		}
 	}
Signature · 6 lines
2.17.1

_______________________________________________
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): [email protected]

author
#2 lore raw
Quoted 1 line · Leo Liu
Fixes 9072c584 (drm/amdgpu: move JPEG2.5 out from VCN2.5)

Just checked the bug was existing before the changes above.

Regards,

Leo

Quoted 20 lines
---
  drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +1 -1
index 451dc814d845..42d6b9f0553b 100644
@@ -268,7 +268,7 @@ static int vcn_v2_5_hw_fini(void *handle)
  {
  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
  	struct amdgpu_ring *ring;
-	int i;
+	int i, j;
 
  	for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
  		if (adev->vcn.harvest_config & (1 << i))

drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c static int vcn_v2_5_hw_fini(void *handle) · line 287

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +2 -2
@@ -280,8 +280,8 @@ static int vcn_v2_5_hw_fini(void *handle)
 
  		ring->sched.ready = false;
 
-		for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
-			ring = &adev->vcn.inst[i].ring_enc[i];
+		for (j = 0; j < adev->vcn.num_enc_rings; ++j) {
+			ring = &adev->vcn.inst[i].ring_enc[j];
  			ring->sched.ready = false;
  		}
  	}

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

Reviewed-by
#3 lore raw
In reply to a message not in the archive
Quoted 21 lines · Leo Liu
Fixes 9072c584 (drm/amdgpu: move JPEG2.5 out from VCN2.5)
---
  drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +1 -1
index 451dc814d845..42d6b9f0553b 100644
@@ -268,7 +268,7 @@ static int vcn_v2_5_hw_fini(void *handle)
  {
  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
  	struct amdgpu_ring *ring;
-	int i;
+	int i, j;
 
  	for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
  		if (adev->vcn.harvest_config & (1 << i))

drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c static int vcn_v2_5_hw_fini(void *handle) · line 287

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +2 -2
@@ -280,8 +280,8 @@ static int vcn_v2_5_hw_fini(void *handle)
 
  		ring->sched.ready = false;
 
-		for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
-			ring = &adev->vcn.inst[i].ring_enc[i];
+		for (j = 0; j < adev->vcn.num_enc_rings; ++j) {
+			ring = &adev->vcn.inst[i].ring_enc[j];
  			ring->sched.ready = false;
  		}
  	}

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