]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe: Drop preempt-fences when destroying imported dma-bufs.
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 17 Dec 2025 09:34:41 +0000 (10:34 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 18 Dec 2025 17:12:16 +0000 (18:12 +0100)
commitfe3ccd24138fd391ae8e32289d492c85f67770fc
treebb418bb99133b285aeb6d9b9198e84edabe3c9d1
parent3767ca4166ad42fa9e34269efeaf9f15995cd92d
drm/xe: Drop preempt-fences when destroying imported dma-bufs.

When imported dma-bufs are destroyed, TTM is not fully
individualizing the dma-resv, but it *is* copying the fences that
need to be waited for before declaring idle. So in the case where
the bo->resv != bo->_resv we can still drop the preempt-fences, but
make sure we do that on bo->_resv which contains the fence-pointer
copy.

In the case where the copying fails, bo->_resv will typically not
contain any fences pointers at all, so there will be nothing to
drop. In that case, TTM would have ensured all fences that would
have been copied are signaled, including any remaining preempt
fences.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Fixes: fa0af721bd1f ("drm/ttm: test private resv obj on release/destroy")
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <stable@vger.kernel.org> # v6.16+
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Tested-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20251217093441.5073-1-thomas.hellstrom@linux.intel.com
(cherry picked from commit 425fe550fb513b567bd6d01f397d274092a9c274)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/xe_bo.c