diff options
| author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2026-11-11 11:09:29 +0100 |
|---|---|---|
| committer | Matthew Brost <matthew.brost@intel.com> | 2026-11-18 19:52:24 -0800 |
| commit | 22e05ee854e1bdacebcfa36ecd3f33ec80cf897a (patch) | |
| tree | 5e098793742a79708eb1e11c0e584de8e661ec83 /tools/perf/scripts/python/bin | |
| parent | 388cdd4571edff6942e7c794540b347b4c04ec2c (diff) | |
drm/xe/dma-buf: Validate BOs on export to charge the exporter
xe_gem_prime_export() calls ttm_bo_setup_export() to make sure the
exporter is charged for the memory backing an exported BO. However,
that only populates a TTM_PL_SYSTEM tt. A BO that has been evicted, or
that has deferred backing, will instead get its memory allocated when
the importer maps it. For p2p imports this happens through
xe_bo_validate() in xe_dma_buf_map(), so the importer, not the
exporter, is charged for the allocation.
Call xe_bo_validate() at export time instead, so that the BO is moved
into its preferred placement and the exporter is charged.
Do the purgeable checks and the validation in the same
xe_validation_guard() transaction, to avoid locking the BO twice.
The commit message and code was drafted using LLM.
Link: https://patchwork.freedesktop.org/patch/747480/?series=172524&rev=1
Fixes: 91494dee1091 ("xe: populate buffers before exporting them.")
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-xe@lists.freedesktop.org
Cc: stable@vger.kernel.org # v6.18+
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patch.msgid.link/20261111100929.2228-1-thomas.hellstrom@linux.intel.com
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
(cherry picked from commit 451162b9f6570d19da1c5944aa0a0e3e8f17773d)
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
