summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2024-11-22 11:24:38 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-14 20:03:29 +0100
commite55d088edfcf4cbd7d40efd988edeeebd5023c57 (patch)
treeabf0e2a3d32be96a83f4e51377a732b31b63dc18
parent2e7bea50a9b78f66267eb7c4e0d11c6aaf3406a6 (diff)
downloadlinux-e55d088edfcf4cbd7d40efd988edeeebd5023c57.tar.gz
linux-e55d088edfcf4cbd7d40efd988edeeebd5023c57.tar.bz2
linux-e55d088edfcf4cbd7d40efd988edeeebd5023c57.zip
drm/amdgpu/hdp6.0: do a posting read when flushing HDP
commit abe1cbaec6cfe9fde609a15cd6a12c812282ce77 upstream. 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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c b/drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c
index 33736d361dd0..6948fe9956ce 100644
--- a/drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c
@@ -34,10 +34,12 @@
static void hdp_v6_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_v6_0_update_clock_gating(struct amdgpu_device *adev,