]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:24 +0000 (15:34 +0200)
commit399618a25c04b0066713ff517e1985cae82dd0ec
treef85a3870c9a7bac5f01f15e4ecf42418c9fa584b
parentcebc39a7b72529d53c306787ce53f6f0721bb311
drm/xe: Take ref to VM in delayed snapshot

[ Upstream commit 642dfc9d5964b26f66fa6c28ce2861e11f9232aa ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/xe/xe_lrc.c