linux/drivers/gpu
Jesse.Zhang 96a86dcb5b drm/amdgpu: Fix circular locking in userq creation
A circular locking dependency was detected between the global
`adev->userq_mutex` and per-file `userq_mgr->userq_mutex` when
creating user queues. The issue occurs because:

1. `amdgpu_userq_suspend()` and `amdgpu_userq_resume` take `adev->userq_mutex` first, then
   `userq_mgr->userq_mutex`
2. While `amdgpu_userq_create()` takes them in reverse order

This patch resolves the issue by:
1. Moving the `adev->userq_mutex` lock earlier in `amdgpu_userq_create()`
   to cover the `amdgpu_userq_ensure_ev_fence()` call
2. Releasing it after we're done with both queue creation and the
   scheduling halt check

v2: remove unused adev->userq_mutex lock (Prike)

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Prike Liang <Prike.Liang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2025-05-14 11:29:38 -04:00
..
drm drm/amdgpu: Fix circular locking in userq creation 2025-05-14 11:29:38 -04:00
host1x gpu: host1x: Use for_each_available_child_of_node_scoped() 2025-05-07 18:09:30 +02:00
ipu-v3 gpu: ipu-v3 ipu-cpmem: Remove unused functions 2025-03-01 11:29:03 +02:00
nova-core Driver core updates for 6.15-rc1 2025-04-01 11:02:03 -07:00
trace
vga
Makefile gpu: nova-core: add initial driver stub 2025-03-09 19:24:27 +01:00