Signed-off-by: Tom St Denis <tom.stde...@amd.com>

(v2): Don't create iova file when iommu is disabled
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 0e5f78f3a97e..566b24bc06ce 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1902,6 +1902,10 @@ static int amdgpu_ttm_debugfs_init(struct amdgpu_device 
*adev)
        struct dentry *ent, *root = minor->debugfs_root;
 
        for (count = 0; count < ARRAY_SIZE(ttm_debugfs_entries); count++) {
+               if (ttm_debugfs_entries[count].domain == TTM_PL_SYSTEM) {
+                       if (!iommu_get_domain_for_dev(adev->dev))
+                               continue;
+               }
                ent = debugfs_create_file(
                                ttm_debugfs_entries[count].name,
                                S_IFREG | S_IRUGO, root,
-- 
2.12.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to