Skip to content

Commit 228ad2a

Browse files
eemikhgregkh
authored andcommitted
drm/amdgpu/gfx8: reset compute ring wptr on the GPU on resume
commit 8326193 upstream. 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 <eeli.haapalainen@protonmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 2becafc) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 21e649b commit 228ad2a

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
@@ -4652,6 +4652,7 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)
46524652
memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation));
46534653
/* reset ring buffer */
46544654
ring->wptr = 0;
4655+
atomic64_set((atomic64_t *)ring->wptr_cpu_addr, 0);
46554656
amdgpu_ring_clear_ring(ring);
46564657
}
46574658
return 0;

0 commit comments

Comments
 (0)