drm/amdgpu: Take IOMMU remapping into account for p2p checks
Subsystems (2)
PATCH v2 1/1 drm/amdgpu: Take IOMMU remapping into account for p2p checks
when trying to enable p2p the amdgpu_device_is_peer_accessible() checks the condition where address_mask overlaps the aper_base and hence returns 0, due to which the p2p disables for this platform
IOMMU should remap the BAR addresses so the device can access them. Hence check if iommu_remap and return true.
v2: (Alex)
- Fix as per review comments
- add new function amdgpu_device_check_iommu_remap to check if iommu remap
Signed-off-by Rahul Jain <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 46 +++++++++++++++++++--- 2 files changed, 42 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +2 -0
@@ -1138,6 +1138,8 @@ struct amdgpu_device {bool ram_is_direct_mapped; +bool iommu_remap; +struct list_head ras_list;struct ip_discovery_top *ip_top;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +40 -6
65 lines not on this page · raw message
Signature · 1 line
2.34.1