drm/amdgpu: fix ring test failure issue during s3 in vce 3.0

Submitted by Leo Liu on May 27, 2019, 1 p.m.


Message ID c2e96ff1-522f-4d1d-f312-9209a63e58ce@amd.com
State New
Headers show
Series "drm/amdgpu: fix ring test failure issue during s3 in vce 3.0" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Leo Liu May 27, 2019, 1 p.m.
On 5/27/19 3:42 AM, S, Shirish wrote:

From: Louis Li <Ching-shih.Li@amd.com><mailto:Ching-shih.Li@amd.com>

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).

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.

Signed-off-by: Louis Li <Ching-shih.Li@amd.com><mailto:Ching-shih.Li@amd.com>

 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 ++
 1 file changed, 2 insertions(+)

        uint32_t rptr = amdgpu_ring_get_rptr(ring);

Are you sure this is the root cause?


        amdgpu_ring_write(ring, VCE_CMD_END);

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index c021b11..92f9d46 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -1084,6 +1084,8 @@  int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)
        if (r)
                return r;

+       rptr = amdgpu_ring_get_rptr(ring);

The rptr update is there: