]> git.ipfire.org Git - thirdparty/linux.git/commit
accel/amdxdna: Fix runtime suspend deadlock when there is pending job
authorLizhi Hou <lizhi.hou@amd.com>
Tue, 10 Mar 2026 18:00:58 +0000 (11:00 -0700)
committerLizhi Hou <lizhi.hou@amd.com>
Tue, 10 Mar 2026 18:46:40 +0000 (11:46 -0700)
commit6b13cb8f48a42ddf6dd98865b673a82e37ff238b
treef9926db7954fda2d6ca25b06ad3500e998d30eb1
parent59bdbabccaa470ed94aae7d94a1229c7b0ff4681
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: 063db451832b ("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
drivers/accel/amdxdna/aie2_ctx.c
drivers/accel/amdxdna/amdxdna_ctx.c