]> git.ipfire.org Git - thirdparty/kernel/linux.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 16:36:43 +0000 (17:36 +0100)
commit425fe550fb513b567bd6d01f397d274092a9c274
treeb2073ff42deffb1ad26fbfb86c46b992d2502c55
parent5bf763e908bf795da4ad538d21c1ec41f8021f76
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
drivers/gpu/drm/xe/xe_bo.c