linux/drivers/accel/amdxdna
Lizhi Hou 6b13cb8f48 accel/amdxdna: Fix runtime suspend deadlock when there is pending job
The runtime suspend callback drains the running job workqueue before
suspending the device. If a job is still executing and calls
pm_runtime_resume_and_get(), it can deadlock with the runtime suspend
path.

Fix this by moving pm_runtime_resume_and_get() from the job execution
routine to the job submission routine, ensuring the device is resumed
before the job is queued and avoiding the deadlock during runtime
suspend.

Fixes: 063db45183 ("accel/amdxdna: Enhance runtime power management")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260310180058.336348-1-lizhi.hou@amd.com
2026-03-10 11:46:40 -07:00
..
Kconfig
Makefile accel/amdxdna: Remove NPU2 support 2025-12-18 10:36:22 -08:00
TODO accel/amdxdna: Support firmware debug buffer 2025-10-20 09:07:12 -07:00
aie2_ctx.c accel/amdxdna: Fix runtime suspend deadlock when there is pending job 2026-03-10 11:46:40 -07:00
aie2_error.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
aie2_message.c accel/amdxdna: Split mailbox channel create function 2026-03-05 09:24:33 -08:00
aie2_msg_priv.h accel/amdxdna: Enable hardware context priority 2025-12-18 10:36:44 -08:00
aie2_pci.c accel/amdxdna: Split mailbox channel create function 2026-03-05 09:24:33 -08:00
aie2_pci.h accel/amdxdna: Fix NULL pointer dereference of mgmt_chann 2026-03-02 09:43:22 -08:00
aie2_pm.c accel/amdxdna: Fix dead lock for suspend and resume 2026-02-23 09:24:17 -08:00
aie2_psp.c accel/amdxdna: Poll MPNPU_PWAITMODE after requesting firmware suspend 2025-12-02 16:31:14 -08:00
aie2_smu.c accel/amdxdna: Fix incorrect DPM level after suspend/resume 2026-02-04 13:08:35 -08:00
aie2_solver.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
aie2_solver.h accel/amdxdna: Enhance power management settings 2024-12-16 15:50:32 -06:00
amdxdna_ctx.c accel/amdxdna: Fix runtime suspend deadlock when there is pending job 2026-03-10 11:46:40 -07:00
amdxdna_ctx.h accel/amdxdna: Fill invalid payload for failed command 2026-02-27 23:01:36 -08:00
amdxdna_error.h accel/amdxdna: Support getting last hardware error 2025-10-16 09:32:48 -07:00
amdxdna_gem.c accel/amdxdna: Remove buffer size check when creating command BO 2026-02-23 09:23:41 -08:00
amdxdna_gem.h accel/amdxdna: Support firmware debug buffer 2025-10-20 09:07:12 -07:00
amdxdna_mailbox.c accel/amdxdna: Split mailbox channel create function 2026-03-05 09:24:33 -08:00
amdxdna_mailbox.h accel/amdxdna: Split mailbox channel create function 2026-03-05 09:24:33 -08:00
amdxdna_mailbox_helper.c accel/amdxdna: Remove casting mailbox payload pointer 2025-01-13 14:21:39 -06:00
amdxdna_mailbox_helper.h accel/amdxdna: Add IOCTL parameter for telemetry data 2025-11-04 09:04:21 -08:00
amdxdna_pci_drv.c accel/amdxdna: Use a different name for latest firmware 2026-02-25 13:51:31 -08:00
amdxdna_pci_drv.h accel/amdxdna: Hold mm structure across iommu_sva_unbind_device() 2026-01-30 11:52:45 -08:00
amdxdna_pm.c accel/amdxdna: Fix dead lock for suspend and resume 2026-02-23 09:24:17 -08:00
amdxdna_pm.h accel/amdxdna: Fix dead lock for suspend and resume 2026-02-23 09:24:17 -08:00
amdxdna_sysfs.c accel/amdxdna: Add command execution 2024-11-22 11:43:27 -07:00
amdxdna_ubuf.c accel/amdxdna: Prevent ubuf size overflow 2026-02-23 09:24:21 -08:00
amdxdna_ubuf.h accel/amdxdna: Support user space allocated buffer 2025-07-22 08:34:29 -07:00
npu1_regs.c accel/amdxdna: Fix major version check on NPU1 platform 2026-03-04 12:05:02 -08:00
npu4_regs.c accel/amdxdna: Use a different name for latest firmware 2026-02-25 13:51:31 -08:00
npu5_regs.c accel/amdxdna: Use a different name for latest firmware 2026-02-25 13:51:31 -08:00
npu6_regs.c accel/amdxdna: Use a different name for latest firmware 2026-02-25 13:51:31 -08:00