drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts for vega20_ih
authorVictor Lu <victorchengchi.lu@amd.com>
Thu, 18 Jul 2024 22:01:23 +0000 (18:01 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Oct 2024 21:50:40 +0000 (17:50 -0400)
commit8b22f048331dfd45fdfbf0efdfb1d43deff7518d
treea3028d75468fae17f1af260e11c02f2873cfbce4
parent0016e870542dc0a529e5ed97b628b6b727531e9b
drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts for vega20_ih

Port this change to vega20_ih.c:
commit afbf7955ff01 ("drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts")

Original commit message:
"Why:
Setting IH_RB_WPTR register to 0 will not clear the RB_OVERFLOW bit
if RB_ENABLE is not set.

How to fix:
Set WPTR_OVERFLOW_CLEAR bit after RB_ENABLE bit is set.
The RB_ENABLE bit is required to be set, together with
WPTR_OVERFLOW_ENABLE bit so that setting WPTR_OVERFLOW_CLEAR bit
would clear the RB_OVERFLOW."

Signed-off-by: Victor Lu <victorchengchi.lu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vega20_ih.c