]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe: share bo dma-resv with backup object
authorMatthew Auld <matthew.auld@intel.com>
Wed, 16 Apr 2025 15:09:16 +0000 (16:09 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 23 Apr 2025 08:32:16 +0000 (09:32 +0100)
commite28647b677789b51b2de3e7934bb86dbd8e67fdf
tree3d4abcb6814e410d26e6fbbf5ff38f4c306ff1a4
parentc6a4d46ec1d714b8055d1f4121197f15a4a02c68
drm/xe: share bo dma-resv with backup object

We end up needing to grab both locks together anyway and keep them held
until we complete the copy or add the fence. Plus the backup_obj is
short lived and tied to the parent object, so seems reasonable to share
the same dma-resv. This will simplify the locking here, and in follow
up patches.

v2:
  - Hold reference to the parent bo to be sure the shared dma-resv can't
    go out of scope too soon. (Thomas)

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://lore.kernel.org/r/20250416150913.434369-7-matthew.auld@intel.com
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_bo_types.h