diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/ih_v6_1.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c index 8fb05eae340a..b8da0fc29378 100644 --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c @@ -418,6 +418,13 @@ static u32 ih_v6_1_get_wptr(struct amdgpu_device *adev,  	tmp = RREG32_NO_KIQ(ih_regs->ih_rb_cntl);  	tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 1);  	WREG32_NO_KIQ(ih_regs->ih_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_NO_KIQ(ih_regs->ih_rb_cntl, tmp); +  out:  	return (wptr & ih->ptr_mask);  }  | 
