]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: Support pcie p2p dma as a fast interconnect
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 19 Dec 2025 11:33:12 +0000 (12:33 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 23 Dec 2025 09:00:48 +0000 (10:00 +0100)
commit2df55d9e66a2ad845286d15d865fa54117882b22
treee27ee9f1c41bfd20c5bd120ab625e0e73d80ef7b
parentdff547e137be2f36c6c4d77172a03a54a38230d3
drm/xe: Support pcie p2p dma as a fast interconnect

Mimic the dma-buf method using dma_[map|unmap]_resource to map
for pcie-p2p dma.

There's an ongoing area of work upstream to sort out how this best
should be done. One method proposed is to add an additional
pci_p2p_dma_pagemap aliasing the device_private pagemap and use
the corresponding pci_p2p_dma_pagemap page as input for
dma_map_page(). However, that would incur double the amount of
memory and latency to set up the drm_pagemap and given the huge
amount of memory present on modern GPUs, that would really not work.
Hence the simple approach used in this patch.

v2:
- Simplify xe_page_to_pcie(). (Matt Brost)

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20251219113320.183860-17-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/xe/xe_svm.c
drivers/gpu/drm/xe/xe_svm.h