]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amdgpu: Fix missing check pcie_p2p module param
authorBob Zhou <bob.zhou@amd.com>
Fri, 6 Sep 2024 09:48:20 +0000 (17:48 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Sep 2024 14:04:57 +0000 (10:04 -0400)
The module param pcie_p2p should be checked for kfd p2p feature, so add it.

Fixes: 75f0efbc4b3b ("drm/amdgpu: Take IOMMU remapping into account for p2p checks")
Signed-off-by: Bob Zhou <bob.zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index f4628412dac44b4dcf8ff3a29ae2b6fe01dd1548..afb643e03d3c1fa0242461f36087afffb7e499c6 100644 (file)
@@ -6189,7 +6189,7 @@ bool amdgpu_device_is_peer_accessible(struct amdgpu_device *adev,
                p2p_addressable = !(adev->gmc.aper_base & address_mask ||
                                     aper_limit & address_mask);
        }
-       return is_large_bar && p2p_access && p2p_addressable;
+       return pcie_p2p && is_large_bar && p2p_access && p2p_addressable;
 #else
        return false;
 #endif