]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Add check to prevent IH overflow
authorDefang Bo <bodefang@126.com>
Tue, 5 Jan 2021 16:06:39 +0000 (00:06 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Jan 2021 20:05:16 +0000 (15:05 -0500)
commit2c2a0be88c3d95e903b2b7b01c4b5f917814db0b
tree6bab3c2cc0e2cceb8db66c7a813c4ab265dbf006
parentc19c0df74e5e346a07663408482b0c89860d297d
drm/amdgpu: Add check to prevent IH overflow

Similar to commit <81ce6b9e81d6>("drm/amdgpu: fix IH overflow on Vega10 v2").
When an ring buffer overflow happens the appropriate bit is set in the WPTR
register which is also written back to memory. But clearing the bit in the
WPTR doesn't trigger another memory writeback.

So what can happen is that we end up processing the buffer overflow over and
over again because the bit is never cleared. Resulting in a random system
lockup because of an infinite loop in an interrupt handler.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Defang Bo <bodefang@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/cz_ih.c
drivers/gpu/drm/amd/amdgpu/iceland_ih.c
drivers/gpu/drm/amd/amdgpu/tonga_ih.c