diff options
| author | Boris Brezillon <boris.brezillon@collabora.com> | 2026-09-24 14:30:43 +0200 |
|---|---|---|
| committer | Liviu Dudau <liviu.dudau@arm.com> | 2026-10-16 13:20:23 +0100 |
| commit | b1bbfb6c0245cd35ad197d290e26ee1cdee467ff (patch) | |
| tree | 18b1cb86ef46f0e6652b432d3cdca5e43efe038a | |
| parent | 1b15fa434b4b49cdf276fc0bc88264605661fdf6 (diff) | |
| download | linux-next-b1bbfb6c0245cd35ad197d290e26ee1cdee467ff.tar.gz linux-next-b1bbfb6c0245cd35ad197d290e26ee1cdee467ff.zip | |
drm/panthor: Don't invalidate OTHER caches
Don't invalidate the OTHER caches (AKA L1 read-only caches) since
this seems to trip out the flush-elimination logic on v13, and it's not
needed in practice (can't leak other context data because of TLB
invalidation or corrupt physical pages returned to the system because
it's a RO cache).
It's also worth noting that the downstream driver has been avoid
OTHER caches invalidation from the start, and that we were doing
the same until atomic page table update was introduced.
Fixes: 6e2d3b3e8589 ("drm/panthor: Add support for atomic page table updates")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
[Update comment as suggested by sashiko]
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patch.msgid.link/20260924-panthor-mmu-fixes-v1-1-e25f9b106466@collabora.com
| -rw-r--r-- | drivers/gpu/drm/panthor/panthor_mmu.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/panthor/panthor_mmu.c index d75d575473da..dd7642872d59 100644 --- a/drivers/gpu/drm/panthor/panthor_mmu.c +++ b/drivers/gpu/drm/panthor/panthor_mmu.c @@ -630,7 +630,7 @@ static int panthor_mmu_as_disable(struct panthor_device *ptdev, u32 as_nr, /* Flush+invalidate RW caches, invalidate RO ones. */ ret = panthor_gpu_flush_caches(ptdev, CACHE_CLEAN | CACHE_INV, - CACHE_CLEAN | CACHE_INV, CACHE_INV); + CACHE_CLEAN | CACHE_INV, 0); if (ret) return ret; @@ -1832,13 +1832,12 @@ static void panthor_vm_unlock_region(struct panthor_vm *vm) if (vm->as.id >= 0) { int ret; - /* flush+invalidate RW caches and invalidate RO ones. + /* flush+invalidate RW caches. * TODO: See if we can use FLUSH_PA_RANGE when the physical * range is narrow enough and the HW supports it. */ ret = panthor_gpu_flush_caches(ptdev, CACHE_CLEAN | CACHE_INV, - CACHE_CLEAN | CACHE_INV, - CACHE_INV); + CACHE_CLEAN | CACHE_INV, 0); /* Unlock the region if the flush is effective. */ if (!ret) |
