drm/amdgpu: fix ring test failure issue during s3 in vce 3.0 (V2)
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix ring test failure issue during s3 in vce 3.0 (V2)
From: Louis Li <[email protected]>
[What]
vce ring test fails consistently during resume in s3 cycle, due to
mismatch read & write pointers.
On debug/analysis its found that rptr to be compared is not being
correctly updated/read, which leads to this failure.
Below is the failure signature:
[drm:amdgpu_vce_ring_test_ring] *ERROR* amdgpu: ring 12 test failed [drm:amdgpu_device_ip_resume_phase2] *ERROR* resume of IP block <vce_v3_0> failed -110 [drm:amdgpu_device_resume] *ERROR* amdgpu_device_ip_resume failed (-110).
[How]
fetch rptr appropriately, meaning move its read location further down in the code flow.
With this patch applied the s3 failure is no more seen for >5k s3 cycles, which otherwise is pretty consistent.
V2: remove reduntant fetch of rptr
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +3 -1
@@ -1072,7 +1072,7 @@ void amdgpu_vce_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,int amdgpu_vce_ring_test_ring (struct amdgpu_ring *ring) {struct amdgpu_device *adev = ring->adev; -uint32_t rptr =amdgpu_ring_get_rptr (ring); +uint32_t rptr;unsigned i;int r, timeout = adev->usec_timeout;
@@ -1084,6 +1084,8 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)if (r)return r; + rptr =amdgpu_ring_get_rptr (ring); +amdgpu_ring_write (ring,VCE_CMD_END );amdgpu_ring_commit (ring);
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): 1559637339-2124-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org
Christian König
Reviewed-byAm 04.06.19 um 10:36 schrieb S, Shirish:
Quoted 18 lines
From: Louis Li <[email protected]>
[What]
vce ring test fails consistently during resume in s3 cycle, due to
mismatch read & write pointers.
On debug/analysis its found that rptr to be compared is not being
correctly updated/read, which leads to this failure.
Below is the failure signature:
[drm:amdgpu_vce_ring_test_ring] *ERROR* amdgpu: ring 12 test failed [drm:amdgpu_device_ip_resume_phase2] *ERROR* resume of IP block <vce_v3_0> failed -110 [drm:amdgpu_device_resume] *ERROR*amdgpu_device_ip_resumefailed (-110).[How]
fetch rptr appropriately, meaning move its read location further down in the code flow.
With this patch applied the s3 failure is no more seen for >5k s3 cycles, which otherwise is pretty consistent.
Quoted 3 lines
V2: remove reduntant fetch of rptr
Signed-off-by Louis Li <[email protected]>
Who does the same patch for UVD and VCN? Exactly the same thing is wrong there as well.
Christian.
Quoted 18 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +1
-1@@ -1072,7 +1072,7 @@ void amdgpu_vce_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,int amdgpu_vce_ring_test_ring (struct amdgpu_ring *ring) {struct amdgpu_device *adev = ring->adev; -uint32_t rptr =amdgpu_ring_get_rptr (ring); +uint32_t rptr;unsigned i;int r, timeout = adev->usec_timeout;
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring) · line 1091
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +2
-0@@ -1084,6 +1084,8 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)if (r)return r; + rptr =amdgpu_ring_get_rptr (ring); +amdgpu_ring_write (ring,VCE_CMD_END );amdgpu_ring_commit (ring);
_______________________________________________
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): 1bcb4a94-313e-168f-18d4-311bd409f13a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
S, Shirish
Reviewed-by Christian KönigThanks Christian.
Have sent the patch for uvd & vcn.
(https://patchwork.freedesktop.org/patch/308575/)
Regards,
Shirish S
-----Original Message-----
From: Christian König <[email protected]>
Sent: Tuesday, June 4, 2019 4:38 PM
To: S, Shirish <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; [email protected]; Deng, Emily <[email protected]>; Liu, Leo <[email protected]>
Cc: [email protected]; Li, Ching-shih (Louis) <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: fix ring test failure issue during s3 in vce 3.0 (V2)
Am 04.06.19 um 10:36 schrieb S, Shirish:
Quoted 18 lines
From: Louis Li <[email protected]>
[What]
vce ring test fails consistently during resume in s3 cycle, due to
mismatch read & write pointers.
On debug/analysis its found that rptr to be compared is not being
correctly updated/read, which leads to this failure.
Below is the failure signature:
[drm:amdgpu_vce_ring_test_ring] *ERROR* amdgpu: ring 12 test failed [drm:amdgpu_device_ip_resume_phase2] *ERROR* resume of IP block <vce_v3_0> failed -110 [drm:amdgpu_device_resume] *ERROR*amdgpu_device_ip_resumefailed (-110).[How]
fetch rptr appropriately, meaning move its read location further down in the code flow.
With this patch applied the s3 failure is no more seen for >5k s3 cycles, which otherwise is pretty consistent.
Quoted 3 lines
V2: remove reduntant fetch of rptr
Signed-off-by Louis Li <[email protected]>
Who does the same patch for UVD and VCN? Exactly the same thing is wrong there as well.
Christian.
Quoted 19 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +1
-1@@ -1072,7 +1072,7 @@ void amdgpu_vce_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,int amdgpu_vce_ring_test_ring (struct amdgpu_ring *ring) {struct amdgpu_device *adev = ring->adev; -uint32_t rptr =amdgpu_ring_get_rptr (ring); +uint32_t rptr;unsigned i;int r, timeout = adev->usec_timeout;
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring) · line 1091
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +2
-0@@ -1084,6 +1084,8 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)if (r)return r; + rptr =amdgpu_ring_get_rptr (ring); +amdgpu_ring_write (ring,VCE_CMD_END );amdgpu_ring_commit (ring);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx