]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu/hdp7.0: do a posting read when flushing HDP
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Nov 2024 08:05:24 +0000 (16:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Dec 2024 23:05:04 +0000 (18:05 -0500)
Need to read back to make sure the write goes through.

Cc: David Belanger <david.belanger@amd.com>
Reviewed-by: Frank Min <frank.min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c

index 1c99bb09e2a129d75e470cbd60ef12eb3982cf39..63820329f67eb6ed22ebc133e2197a9d9f69b77e 100644 (file)
 static void hdp_v7_0_flush_hdp(struct amdgpu_device *adev,
                                struct amdgpu_ring *ring)
 {
-       if (!ring || !ring->funcs->emit_wreg)
+       if (!ring || !ring->funcs->emit_wreg) {
                WREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0);
-       else
+               RREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2);
+       } else {
                amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0);
+       }
 }
 
 static void hdp_v7_0_update_clock_gating(struct amdgpu_device *adev,