OSDN Git Service

drm/amdgpu: Detect if amdgpu in IOMMU direct map mode
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 7 Dec 2021 02:10:52 +0000 (21:10 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Dec 2021 21:33:16 +0000 (16:33 -0500)
commit4a74c38cd67b3e74a1dacc76c7ac5c276bfdeab5
tree204607b4e431e064b479e76e890f95e8de225c6d
parenta723c6d0785acf9e4bf5b77167d6a0c32ecf8503
drm/amdgpu: Detect if amdgpu in IOMMU direct map mode

If host and amdgpu IOMMU is not enabled or IOMMU is pass through mode,
set adev->ram_is_direct_mapped flag which will be used to optimize
memory usage for multi GPU mappings.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c