OpenCloudOS-Kernel/drivers/gpu/drm/lima
Erico Nunes 04d531b9a1 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-07-11 12:49:03 +02:00
..
Kconfig
Makefile
lima_bcast.c drm/lima: add mask irq callback to gp and pp 2024-06-27 13:49:03 +02:00
lima_bcast.h drm/lima: add mask irq callback to gp and pp 2024-06-27 13:49:03 +02:00
lima_ctx.c Revert "drm/lima: add usage counting method to ctx_mgr" 2023-04-05 08:40:47 +08:00
lima_ctx.h Revert "drm/lima: add usage counting method to ctx_mgr" 2023-04-05 08:40:47 +08:00
lima_devfreq.c drm/lima: Fix opp clkname setting in case of missing regulator 2022-11-14 19:08:21 +08:00
lima_devfreq.h
lima_device.c
lima_device.h Revert "drm/lima: allocate unique id per drm_file" 2023-04-05 08:40:06 +08:00
lima_dlbu.c
lima_dlbu.h
lima_drv.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
lima_drv.h Revert "drm/lima: allocate unique id per drm_file" 2023-04-05 08:40:06 +08:00
lima_dump.h
lima_gem.c drm/lima: fix a memleak in lima_heap_alloc 2024-03-26 18:19:43 -04:00
lima_gem.h
lima_gp.c drm/lima: fix shared irq handling on driver remove 2024-07-11 12:49:03 +02: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-07-11 12:49:03 +02:00
lima_mmu.h
lima_pmu.c
lima_pmu.h
lima_pp.c drm/lima: fix shared irq handling on driver remove 2024-07-11 12:49:03 +02:00
lima_pp.h
lima_regs.h
lima_sched.c drm/lima: mask irqs in timeout path before hard reset 2024-06-27 13:49:03 +02:00
lima_sched.h drm/lima: add mask irq callback to gp and pp 2024-06-27 13:49:03 +02:00
lima_trace.c
lima_trace.h
lima_vm.c
lima_vm.h