Skip to contentSkip to conversation

drm/amd/amdgpu: Fix iova debugfs for non-iommu case (v2)

PATCH New Tom St Denis 1 participant 1 message Sep 19, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: Fix iova debugfs for non-iommu case (v2)

(v2): Don't create iova file when iommu is disabled

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +4 -0
index 0e5f78f3a97e..566b24bc06ce 100644
@@ -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,
Signature · 6 lines
2.12.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx