]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/xe: Take ref to VM in delayed snapshot
authorMatthew Brost <matthew.brost@intel.com>
Thu, 1 Aug 2024 15:41:16 +0000 (08:41 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 8 Aug 2024 17:48:01 +0000 (13:48 -0400)
commit642dfc9d5964b26f66fa6c28ce2861e11f9232aa
tree74ba247be3f043dca3b7c7ccc4c8a451d42a91dc
parentac3191c5cf47e2d5220a1ed7353a2e498a1f415e
drm/xe: Take ref to VM in delayed snapshot

Kernel BO's don't take a ref to the VM, we need the VM for the
delayed snapshot, so take a ref to the VM in delayed snapshot.

v2:
 - Check for lrc_bo before taking a VM ref (CI)
 - Check lrc_bo->vm before taking / dropping a VM ref (CI)
 - Drop VM in xe_lrc_snapshot_free
v5:
 - Fix commit message wording (Johnathan)

Fixes: 47058633d9c5 ("drm/xe: Move lrc snapshot capturing to xe_lrc.c")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240801154118.2547543-2-matthew.brost@intel.com
(cherry picked from commit c3bc97d2f102ddd5a8341eeb2dbae2a3e98bb46a)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_lrc.c