summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/amd/amdgpu/iceland_ih.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/amd/amdgpu/iceland_ih.c')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/iceland_ih.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/iceland_ih.c b/sys/dev/pci/drm/amd/amdgpu/iceland_ih.c
index aecad530b10..2c02ae69883 100644
--- a/sys/dev/pci/drm/amd/amdgpu/iceland_ih.c
+++ b/sys/dev/pci/drm/amd/amdgpu/iceland_ih.c
@@ -215,6 +215,11 @@ static u32 iceland_ih_get_wptr(struct amdgpu_device *adev,
tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 1);
WREG32(mmIH_RB_CNTL, tmp);
+ /* Unset the CLEAR_OVERFLOW bit immediately so new overflows
+ * can be detected.
+ */
+ tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 0);
+ WREG32(mmIH_RB_CNTL, tmp);
out:
return (wptr & ih->ptr_mask);