linux/drivers/gpu
Vitaly Prosyak 9dff2bb709 drm/amdgpu: disable peer-to-peer access for DCC-enabled GC12 VRAM surfaces
Certain multi-GPU configurations (especially GFX12) may hit
data corruption when a DCC-compressed VRAM surface is shared across GPUs
using peer-to-peer (P2P) DMA transfers.

Such surfaces rely on device-local metadata and cannot be safely accessed
through a remote GPU’s page tables. Attempting to import a DCC-enabled
surface through P2P leads to incorrect rendering or GPU faults.

This change disables P2P for DCC-enabled VRAM buffers that are contiguous
and allocated on GFX12+ hardware.  In these cases, the importer falls back
to the standard system-memory path, avoiding invalid access to compressed
surfaces.

Future work could consider optional migration (VRAM→System→VRAM) if a
performance regression is observed when `attach->peer2peer = false`.

Tested on:
 - Dual RX 9700 XT (Navi4x) setup
 - GNOME and Wayland compositor scenarios
 - Confirmed no corruption after disabling P2P under these conditions
v2: Remove check TTM_PL_VRAM & TTM_PL_FLAG_CONTIGUOUS.
v3: simplify for upsteam and fix ip version check (Alex)

Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2025-11-11 21:53:27 -05:00
..
drm drm/amdgpu: disable peer-to-peer access for DCC-enabled GC12 VRAM surfaces 2025-11-11 21:53:27 -05:00
host1x gpu: host1x: Use dev_err_probe() in probe path 2025-09-11 19:12:53 +02:00
ipu-v3
nova-core drm next for 6.18-rc1 2025-10-02 12:47:25 -07:00
trace gpu/trace: make TRACE_GPU_MEM configurable 2025-07-08 09:34:47 -07:00
vga vga_switcheroo: Use pci_is_display() 2025-07-17 15:30:13 -05:00
Makefile