]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/gfx10: fix wptr reset in KGQ init
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Jan 2026 01:51:08 +0000 (20:51 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Jan 2026 17:27:10 +0000 (12:27 -0500)
wptr is a 64 bit value and we need to update the
full value, not just 32 bits. Align with what we
already do for KCQs.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jesse Zhang <jesse.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c

index 41bbedb8e157e2a8767cd32d8b103d5750f4fc58..1893ceeeb26c8280ccbe0269a53ced0e6ec1b2b0 100644 (file)
@@ -6880,7 +6880,7 @@ static int gfx_v10_0_kgq_init_queue(struct amdgpu_ring *ring, bool reset)
                        memcpy_toio(mqd, adev->gfx.me.mqd_backup[mqd_idx], sizeof(*mqd));
                /* reset the ring */
                ring->wptr = 0;
-               *ring->wptr_cpu_addr = 0;
+               atomic64_set((atomic64_t *)ring->wptr_cpu_addr, 0);
                amdgpu_ring_clear_ring(ring);
        }