drm/tidss: Fix issue in irq handling causing irq-flood issue
commit 44b6730ab53ef04944fbaf6da0e77397531517b7 upstream. It has been observed that sometimes DSS will trigger an interrupt and the top level interrupt (DISPC_IRQSTATUS) is not zero, but the VP and VID level interrupt-statuses are zero. As the top level irqstatus is supposed to tell whether we have VP/VID interrupts, the thinking of the driver authors was that this particular case could never happen. Thus the driver only clears the DISPC_IRQSTATUS bits which has corresponding interrupts in VP/VID status. So when this issue happens, the driver will not clear DISPC_IRQSTATUS, and we get an interrupt flood. It is unclear why the issue happens. It could be a race issue in the driver, but no such race has been found. It could also be an issue with the HW. However a similar case can be easily triggered by manually writing to DISPC_IRQSTATUS_RAW. This will forcibly set a bit in the DISPC_IRQSTATUS and trigger an interrupt, and as the driver never clears the bit, we get an interrupt flood. To fix the issue, always clear DISPC_IRQSTATUS. The concern with this solution is that if the top level irqstatus is the one that triggers the interrupt, always clearing DISPC_IRQSTATUS might leave some interrupts unhandled if VP/VID interrupt statuses have bits set. However, testing shows that if any of the irqstatuses is set (i.e. even if DISPC_IRQSTATUS == 0, but a VID irqstatus has a bit set), we will get an interrupt. Co-developed-by:Bin Liu <b-liu@ti.com> Signed-off-by:
Bin Liu <b-liu@ti.com> Co-developed-by:
Devarsh Thakkar <devarsht@ti.com> Signed-off-by:
Devarsh Thakkar <devarsht@ti.com> Co-developed-by:
Jonathan Cormier <jcormier@criticallink.com> Signed-off-by:
Jonathan Cormier <jcormier@criticallink.com> Fixes: 32a1795f ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Cc: stable@vger.kernel.org Tested-by:
Jonathan Cormier <jcormier@criticallink.com> Reviewed-by:
Aradhya Bhatia <aradhya.bhatia@linux.dev> Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241021-tidss-irq-fix-v1-1-82ddaec94e4a@ideasonboard.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
daf7fa8a
No related branches found
No related tags found
Please register or sign in to comment