]> www.infradead.org Git - users/willy/xarray.git/commit
drm/xe: Move VM dma-resv lock from xe_exec_queue_create to __xe_exec_queue_init
authorMatthew Brost <matthew.brost@intel.com>
Wed, 24 Jul 2024 15:28:31 +0000 (08:28 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 19 Aug 2024 14:39:04 +0000 (10:39 -0400)
commit7090d7fc969fcc9985d7e538cfcd8a69a5f9c616
treeac6430c92d018cef4f6999fb99d7f2686f975f7d
parentc621f70539cae731d9749c1900cd00bb70ea5c72
drm/xe: Move VM dma-resv lock from xe_exec_queue_create to __xe_exec_queue_init

The critical section which requires the VM dma-resv is the call
xe_lrc_create in __xe_exec_queue_init. Move this lock to
__xe_exec_queue_init holding it just around xe_lrc_create. Not only is
good practice, this also fixes a locking double of the VM dma-resv in
the error paths of __xe_exec_queue_init as xe_lrc_put tries to acquire
this too resulting in a deadlock.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240724152831.1848325-1-matthew.brost@intel.com
(cherry picked from commit 549dd786b61cd3db903f5d94d07fc5a89ccdbeb9)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_exec_queue.c