kernel_samsung_a53x/drivers/gpu/drm/lima
Erico Nunes 0714225e67 drm/lima: fix shared irq handling on driver remove
[ Upstream commit a6683c690bbfd1f371510cb051e8fa49507f3f5e ]

lima uses a shared interrupt, so the interrupt handlers must be prepared
to be called at any time. At driver removal time, the clocks are
disabled early and the interrupts stay registered until the very end of
the remove process due to the devm usage.
This is potentially a bug as the interrupts access device registers
which assumes clocks are enabled. A crash can be triggered by removing
the driver in a kernel with CONFIG_DEBUG_SHIRQ enabled.
This patch frees the interrupts at each lima device finishing callback
so that the handlers are already unregistered by the time we fully
disable clocks.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240401224329.1228468-2-nunes.erico@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 14:19:39 +01:00
..
Kconfig
lima_bcast.c drm/lima: add mask irq callback to gp and pp 2024-11-19 14:19:07 +01:00
lima_bcast.h drm/lima: add mask irq callback to gp and pp 2024-11-19 14:19:07 +01:00
lima_ctx.c
lima_ctx.h
lima_devfreq.c
lima_devfreq.h
lima_device.c
lima_device.h
lima_dlbu.c
lima_dlbu.h
lima_drv.c
lima_drv.h
lima_dump.h
lima_gem.c drm/lima: fix a memleak in lima_heap_alloc 2024-11-19 08:44:51 +01:00
lima_gem.h
lima_gp.c drm/lima: fix shared irq handling on driver remove 2024-11-19 14:19:39 +01:00
lima_gp.h
lima_l2_cache.c
lima_l2_cache.h
lima_mmu.c drm/lima: fix shared irq handling on driver remove 2024-11-19 14:19:39 +01:00
lima_mmu.h
lima_pmu.c
lima_pmu.h
lima_pp.c drm/lima: fix shared irq handling on driver remove 2024-11-19 14:19:39 +01:00
lima_pp.h
lima_regs.h
lima_sched.c drm/lima: mask irqs in timeout path before hard reset 2024-11-19 14:19:07 +01:00
lima_sched.h drm/lima: add mask irq callback to gp and pp 2024-11-19 14:19:07 +01:00
lima_trace.c
lima_trace.h
lima_vm.c
lima_vm.h
Makefile