Commit a3f4275f authored by Alex Deucher's avatar Alex Deucher Committed by Wen Zhiwei
Browse files

drm/amdgpu/hdp6.0: do a posting read when flushing HDP

stable inclusion
from stable-v6.6.69
commit 14172f8e9485c8fb100a683469d9f5fbe3849ee8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBNEPJ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=14172f8e9485c8fb100a683469d9f5fbe3849ee8



--------------------------------

[ Upstream commit abe1cbaec6cfe9fde609a15cd6a12c812282ce77 ]

Need to read back to make sure the write goes through.

Cc: David Belanger <david.belanger@amd.com>
Reviewed-by: default avatarFrank Min <frank.min@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent 4d755764
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -31,11 +31,13 @@
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,
					 bool enable)