Re: [PATCH 1/3] drm/panthor: Don't invalidate OTHER caches
From: Liviu Dudau
Date: Fri Oct 16 2026 - 06:39:59 EST
On Thu, Sep 24, 2026 at 02:30:43PM +0200, Boris Brezillon wrote:
> 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@xxxxxxxxxxxxx>
Reviewed-by: Liviu Dudau <liviu.dudau@xxxxxxx>
Best regards,
Liviu
> ---
> drivers/gpu/drm/panthor/panthor_mmu.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/panthor/panthor_mmu.c
> index 9f63a048df61..7e98084b9a1e 100644
> --- a/drivers/gpu/drm/panthor/panthor_mmu.c
> +++ b/drivers/gpu/drm/panthor/panthor_mmu.c
> @@ -634,7 +634,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;
>
> @@ -1841,8 +1841,7 @@ static void panthor_vm_unlock_region(struct panthor_vm *vm)
> * 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)
>
> --
> 2.55.0
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯