drm/amdgpu/vcn2.5: fix the enc loop with hw fini
Subsystems (2)
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)
Signed-off-by Leo Liu <[email protected]>
--- 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
@@ -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]
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
Signed-off-by Leo Liu <[email protected]>--- 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@@ -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
James Zhu
Reviewed-byReviewed-by James Zhu <[email protected]>
Quoted 21 lines · Leo Liu
Fixes 9072c584 (drm/amdgpu: move JPEG2.5 out from VCN2.5)Signed-off-by Leo Liu <[email protected]>--- 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@@ -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