aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
diff options
context:
space:
mode:
authorLijo Lazar <[email protected]>2022-09-21 12:24:59 +0000
committerAlex Deucher <[email protected]>2022-09-29 13:41:42 +0000
commitbb66ecbf122cc5ca52c569f0f84b5d1b2c00f6b9 (patch)
treea36b661b528ffd8e0b3f407b523ab375fa8417b2 /drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
parentdrm/amdgpu: Disable verbose for p2p dist calc (diff)
downloadkernel-bb66ecbf122cc5ca52c569f0f84b5d1b2c00f6b9.tar.gz
kernel-bb66ecbf122cc5ca52c569f0f84b5d1b2c00f6b9.zip
drm/amdgpu: Use simplified API for p2p dist calc
Use the simpified API that calculates distance between two devices. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Guchun Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
index 9e2a4c552a4a..7bd8e33b14be 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
@@ -58,7 +58,7 @@ static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf,
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
int r;
- if (pci_p2pdma_distance_many(adev->pdev, &attach->dev, 1, false) < 0)
+ if (pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
attach->peer2peer = false;
r = pm_runtime_get_sync(adev_to_drm(adev)->dev);