Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc191515

Browse files
committed
drm/amdgpu: Query P2PDMA distance only if CONFIG_HSA_AMD_P2P is defined
CONFIG_HSA_AMD_P2P indicates the requirements that are needed for P2P DMAMappings. It is important to note that enabling CONFIG_HSA_AMD_P2P is anecessary but insufficient condition. It is possible to encounter runtimeerrors - e.g. CPU's do not support Inter-CPU transport of PCIe transactionpackets i.e. P2PDMA distance API may return errorSigned-off-by: Ramesh Errabolu <Ramesh.Errabolu@amd.com>Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
1 parent437f02c commitc191515

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎drivers/gpu/drm/amd/amdgpu/amdgpu_device.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5577,6 +5577,12 @@ static void amdgpu_device_get_pcie_info(struct amdgpu_device *adev)
55775577
* Return true if @peer_adev can access (DMA) @adev through the PCIe
55785578
* BAR, i.e. @adev is "large BAR" and the BAR matches the DMA mask of
55795579
* @peer_adev.
5580+
*
5581+
* @note: CONFIG_HSA_AMD_P2P indicates support for P2P DMA mappings. Query
5582+
* P2PDMA distance only if the kernel has all the prerequisites for P2P DMA
5583+
* support. Otherwise fall back to the less reliable legacy P2P support to
5584+
* avoid regressions.
5585+
*
55805586
*/
55815587
boolamdgpu_device_is_peer_accessible(structamdgpu_device*adev,
55825588
structamdgpu_device*peer_adev)
@@ -5587,7 +5593,7 @@ bool amdgpu_device_is_peer_accessible(struct amdgpu_device *adev,
55875593
resource_size_taper_limit=
55885594
adev->gmc.aper_base+adev->gmc.aper_size-1;
55895595

5590-
#ifdefCONFIG_PCI_P2PDMA
5596+
#ifdefCONFIG_HSA_AMD_P2P
55915597
p2p_access= !adev->gmc.xgmi.connected_to_cpu&&
55925598
!(pci_p2pdma_distance_many(adev->pdev,
55935599
&peer_adev->dev,1, true)<0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp