aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorPhilip Yang <[email protected]>2021-12-07 02:10:52 +0000
committerAlex Deucher <[email protected]>2021-12-13 21:33:16 +0000
commit4a74c38cd67b3e74a1dacc76c7ac5c276bfdeab5 (patch)
tree204607b4e431e064b479e76e890f95e8de225c6d /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentDocumentation/gpu: Add amdgpu and dc glossary (diff)
downloadkernel-4a74c38cd67b3e74a1dacc76c7ac5c276bfdeab5.tar.gz
kernel-4a74c38cd67b3e74a1dacc76c7ac5c276bfdeab5.zip
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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 89278f17a70b..e701dedce344 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1097,6 +1097,8 @@ struct amdgpu_device {
struct amdgpu_reset_control *reset_cntl;
uint32_t ip_versions[MAX_HWIP][HWIP_MAX_INSTANCE];
+
+ bool ram_is_direct_mapped;
};
static inline struct amdgpu_device *drm_to_adev(struct drm_device *ddev)