linux/drivers/accel
Lizhi Hou c8d2530791 accel/amdxdna: Fix deadlock on debug BO command timeout
Both amdxdna_hwctx_sync_debug_bo() and amdxdna_drm_config_hwctx_ioctl()
hold xdna->dev_lock while invoking backend operations. If the hardware
hangs, aie2_cmd_wait() blocks waiting for a firmware response. When the
DRM scheduler timeout expires, aie2_sched_job_timedout() is invoked to
reset the hardware. However, the timeout handler also attempts to acquire
dev_lock, resulting in a deadlock.

Avoid this by releasing dev_lock before waiting for the firmware
response and reacquiring it after the wait completes. This allows the
timeout handler to proceed with device recovery when a debug BO command
times out.

Fixes: 7ea0468380 ("accel/amdxdna: Support firmware debug buffer")
Reviewed-by: Max Zhen <max.zhen@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260707055732.479103-1-lizhi.hou@amd.com
History 2026-07-07 10:04:43 -07:00
..
amdxdna accel/amdxdna: Fix deadlock on debug BO command timeout 2026-07-07 10:04:43 -07:00
ethosu drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
habanalabs Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ivpu drm fixes for 7.2-rc1 2026-06-26 17:03:48 -07:00
qaic Linux 7.1-rc5 2026-05-28 09:58:36 +02:00
rocket drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
drm_accel.c drm: move drm based debugfs funcs to drm_debugfs.c 2025-07-04 15:58:22 +02:00
Kconfig accel: Add Arm Ethos-U NPU driver 2025-10-24 15:07:39 -05:00
Makefile accel: Add Arm Ethos-U NPU driver 2025-10-24 15:07:39 -05:00