@@ -166,6 +166,8 @@ struct iommu_domain *etnaviv_iommu_domain_alloc(struct etnaviv_gpu *gpu)
return NULL;
domain->ops = &etnaviv_iommu_ops;
+ domain->geometry.aperture_start = GPU_MEM_START;
+ domain->geometry.aperture_end = GPU_MEM_START + PT_ENTRIES * SZ_4K;
ret = domain->ops->domain_init(domain);
if (ret)
@@ -109,7 +109,9 @@ struct etnaviv_iommu *etnaviv_iommu_new(struct drm_device *dev,
mmu->domain = domain;
mmu->dev = dev;
- drm_mm_init(&mmu->mm, 0x80000000, SZ_1G);
+ drm_mm_init(&mmu->mm, domain->geometry.aperture_start,
+ domain->geometry.aperture_end -
+ domain->geometry.aperture_start + 1);
iommu_set_fault_handler(domain, etnaviv_fault_handler, dev);