Skip to content

Commit 8326193

Browse files
eemikhalexdeucher
authored andcommitted
drm/amdgpu/gfx8: reset compute ring wptr on the GPU on resume
Commit 42cdf6f ("drm/amdgpu/gfx8: always restore kcq MQDs") made the ring pointer always to be reset on resume from suspend. This caused compute rings to fail since the reset was done without also resetting it for the firmware. Reset wptr on the GPU to avoid a disconnect between the driver and firmware wptr. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3911 Fixes: 42cdf6f ("drm/amdgpu/gfx8: always restore kcq MQDs") Signed-off-by: Eeli Haapalainen <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 2becafc) Cc: [email protected]
1 parent 86790e3 commit 8326193

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4640,6 +4640,7 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)
46404640
memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation));
46414641
/* reset ring buffer */
46424642
ring->wptr = 0;
4643+
atomic64_set((atomic64_t *)ring->wptr_cpu_addr, 0);
46434644
amdgpu_ring_clear_ring(ring);
46444645
}
46454646
return 0;

0 commit comments

Comments
 (0)