Skip to content

Commit

Permalink
drm/amdgpu: fix build failure by redefinition of p2p_access
Browse files Browse the repository at this point in the history
This is a typo when cherry-picking code to dkms branch, not checking
the code difference of p2p implementation between upstream and dkms
branch.

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
  • Loading branch information
Guchun Chen committed Sep 21, 2022
1 parent 9d4e3b4 commit 437f02c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -5588,9 +5588,9 @@ bool amdgpu_device_is_peer_accessible(struct amdgpu_device *adev,
adev->gmc.aper_base + adev->gmc.aper_size - 1;

#ifdef CONFIG_PCI_P2PDMA
bool p2p_access = !adev->gmc.xgmi.connected_to_cpu &&
!(pci_p2pdma_distance_many(adev->pdev,
&peer_adev->dev, 1, true) < 0);
p2p_access = !adev->gmc.xgmi.connected_to_cpu &&
!(pci_p2pdma_distance_many(adev->pdev,
&peer_adev->dev, 1, true) < 0);
#endif
return pcie_p2p && p2p_access && (adev->gmc.visible_vram_size &&
adev->gmc.real_vram_size == adev->gmc.visible_vram_size &&
Expand Down

0 comments on commit 437f02c

Please sign in to comment.