2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/gpu/drm/imagination
Alessio Belle d38376b3ee
drm/imagination: Fix kernel crash when hard resetting the GPU
The GPU hard reset sequence calls pm_runtime_force_suspend() and
pm_runtime_force_resume(), which according to their documentation should
only be used during system-wide PM transitions to sleep states.

The main issue though is that depending on some internal runtime PM
state as seen by pm_runtime_force_suspend() (whether the usage count is
<= 1), pm_runtime_force_resume() might not resume the device unless
needed. If that happens, the runtime PM resume callback
pvr_power_device_resume() is not called, the GPU clocks are not
re-enabled, and the kernel crashes on the next attempt to access GPU
registers as part of the power-on sequence.

Replace calls to pm_runtime_force_suspend() and
pm_runtime_force_resume() with direct calls to the driver's runtime PM
callbacks, pvr_power_device_suspend() and pvr_power_device_resume(),
to ensure clocks are re-enabled and avoid the kernel crash.

Fixes: cc1aeedb98 ("drm/imagination: Implement firmware infrastructure and META FW support")
Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Link: https://lore.kernel.org/r/20250624-fix-kernel-crash-gpu-hard-reset-v1-1-6d24810d72a6@imgtec.com
Cc: stable@vger.kernel.org
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
2025-07-04 16:32:10 +01:00
..
Kconfig
Makefile drm/imagination: Add RISC-V firmware processor support 2025-04-15 12:21:52 +01:00
pvr_ccb.c drm/imagination: Convert to use time_before macro 2024-08-30 15:17:03 +01:00
pvr_ccb.h
pvr_cccb.c
pvr_cccb.h
pvr_context.c drm for 6.13-rc1 2024-11-21 14:56:17 -08:00
pvr_context.h drm/imagination: Break an object reference loop 2024-11-04 09:41:38 +00:00
pvr_debugfs.c drm/imagination: loop counters moved to loop scope 2025-04-07 10:09:40 +01:00
pvr_debugfs.h
pvr_device_info.c
pvr_device_info.h
pvr_device.c drm/imagination: Add reset controller support for GPU initialization 2025-04-24 11:08:48 +01:00
pvr_device.h drm/imagination: Add reset controller support for GPU initialization 2025-04-24 11:08:48 +01:00
pvr_drv.c drm/imagination: Add support for TI AM68 GPU 2025-04-15 12:21:52 +01:00
pvr_drv.h drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
pvr_free_list.c drm/imagination: loop counters moved to loop scope 2025-04-07 10:09:40 +01:00
pvr_free_list.h
pvr_fw_info.h
pvr_fw_meta.c drm/imagination: Use callbacks for fw irq handling 2025-04-15 12:21:51 +01:00
pvr_fw_meta.h
pvr_fw_mips.c drm/imagination: Move ELF fw utils to common file 2025-04-15 12:21:52 +01:00
pvr_fw_mips.h drm/imagination: Ensure PVR_MIPS_PT_PAGE_COUNT is never zero 2024-04-29 12:31:28 +01:00
pvr_fw_riscv.c drm/imagination: Add RISC-V firmware processor support 2025-04-15 12:21:52 +01:00
pvr_fw_startstop.c drm/imagination: Add RISC-V firmware processor support 2025-04-15 12:21:52 +01:00
pvr_fw_startstop.h
pvr_fw_trace.c drm/imagination: avoid unused-const-variable warning 2025-04-24 10:51:55 +01:00
pvr_fw_trace.h drm/imagination: avoid unused-const-variable warning 2025-04-24 10:51:55 +01:00
pvr_fw_util.c drm/imagination: Move ELF fw utils to common file 2025-04-15 12:21:52 +01:00
pvr_fw.c drm/imagination: Add RISC-V firmware processor support 2025-04-15 12:21:52 +01:00
pvr_fw.h drm/imagination: Add RISC-V firmware processor support 2025-04-15 12:21:52 +01:00
pvr_gem.c drm/imagination: Use cached memory with dma_coherent 2025-04-15 12:21:52 +01:00
pvr_gem.h drm/imagination: Use cached memory with dma_coherent 2025-04-15 12:21:52 +01:00
pvr_hwrt.c drm/imagination: loop counters moved to loop scope 2025-04-07 10:09:40 +01:00
pvr_hwrt.h
pvr_job.c Merge drm/drm-fixes into drm-misc-fixes 2025-04-08 10:15:47 +02:00
pvr_job.h
pvr_mmu.c drm/imagination: Use cached memory with dma_coherent 2025-04-15 12:21:52 +01:00
pvr_mmu.h
pvr_params.c
pvr_params.h
pvr_power.c drm/imagination: Fix kernel crash when hard resetting the GPU 2025-07-04 16:32:10 +01:00
pvr_power.h drm/imagination: Add power domain control 2025-04-15 12:21:50 +01:00
pvr_queue.c Merge drm/drm-fixes into drm-misc-fixes 2025-04-08 10:15:47 +02:00
pvr_queue.h drm/imagination: avoid deadlock on fence release 2025-03-03 12:07:56 +00:00
pvr_rogue_cr_defs_client.h
pvr_rogue_cr_defs.h drm/imagination: Update register defs for newer GPUs 2025-04-15 12:21:50 +01:00
pvr_rogue_defs.h
pvr_rogue_fwif_check.h
pvr_rogue_fwif_client_check.h
pvr_rogue_fwif_client.h
pvr_rogue_fwif_common.h
pvr_rogue_fwif_dev_info.h
pvr_rogue_fwif_resetframework.h
pvr_rogue_fwif_sf.h
pvr_rogue_fwif_shared_check.h
pvr_rogue_fwif_shared.h
pvr_rogue_fwif_stream.h
pvr_rogue_fwif.h
pvr_rogue_heap_config.h
pvr_rogue_meta.h
pvr_rogue_mips_check.h
pvr_rogue_mips.h
pvr_rogue_mmu_defs.h
pvr_rogue_riscv.h drm/imagination: Add RISC-V firmware processor support 2025-04-15 12:21:52 +01:00
pvr_stream_defs.c
pvr_stream_defs.h
pvr_stream.c drm/imagination: loop counters moved to loop scope 2025-04-07 10:09:40 +01:00
pvr_stream.h
pvr_sync.c
pvr_sync.h
pvr_vm_mips.c drm/imagination: loop counters moved to loop scope 2025-04-07 10:09:40 +01:00
pvr_vm_mips.h
pvr_vm.c drm/imagination: Hold drm_gem_gpuva lock for unmap 2025-03-03 12:09:00 +00:00
pvr_vm.h drm/imagination: Hold drm_gem_gpuva lock for unmap 2025-03-03 12:09:00 +00:00