From 0e5323d7edb4c82dec154eda1707ce8434760433 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons <sjoerd@collabora.com> Date: Tue, 4 Mar 2025 12:03:00 +0100 Subject: [PATCH] [WIP] drm/panfrost: Set IOMMU_CACHE flag on page faults Suggested by Boris; Panfrost does not support uncached mappings, so also flag the pages that are mapped as response to a page fault as cached. TODO: * Merge with other patches from Ariel * Do a full CI run to check for regressions on G52 Signed-off-by: Sjoerd Simons <sjoerd@collabora.com> --- drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c index 078867aec3447..68f864d729b86 100644 --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c @@ -598,7 +598,7 @@ static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as, goto err_map; mmu_map_sg(pfdev, bomapping->mmu, addr, - IOMMU_WRITE | IOMMU_READ | IOMMU_NOEXEC, sgt); + IOMMU_WRITE | IOMMU_READ | IOMMU_CACHE | IOMMU_NOEXEC, sgt); bomapping->active = true; bo->heap_rss_size += SZ_2M; -- GitLab