mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-08 22:16:29 -04:00
drm/panfrost: Set IOMMU_CACHE flag
Panfrost does not support uncached mappings, so flag them properly. Also flag the pages that are mapped as response to a page fault as cached. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com> Signed-off-by: Steven Price <steven.price@arm.com> Link: https://lore.kernel.org/r/20250324185801.168664-2-ariel.dalessandro@collabora.com
This commit is contained in:
committed by
Steven Price
parent
586831a417
commit
f91e534f4e
@@ -327,7 +327,7 @@ int panfrost_mmu_map(struct panfrost_gem_mapping *mapping)
|
||||
struct drm_gem_object *obj = &shmem->base;
|
||||
struct panfrost_device *pfdev = to_panfrost_device(obj->dev);
|
||||
struct sg_table *sgt;
|
||||
int prot = IOMMU_READ | IOMMU_WRITE;
|
||||
int prot = IOMMU_READ | IOMMU_WRITE | IOMMU_CACHE;
|
||||
|
||||
if (WARN_ON(mapping->active))
|
||||
return 0;
|
||||
@@ -528,7 +528,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;
|
||||
|
||||
Reference in New Issue
Block a user