[PATCH v9 6/7] drm/panthor: Make MMU cache maintenance use FLUSH_CACHES command

Daniel Stone daniel at fooishbar.org
Fri Aug 8 10:50:27 UTC 2025


Hi Karunika,


On Thu, 7 Aug 2025 at 17:27, Karunika Choo <karunika.choo at arm.com> wrote:
> @@ -585,6 +615,9 @@ static int mmu_hw_do_operation_locked(struct panthor_device *ptdev, int as_nr,
>         if (op != AS_COMMAND_UNLOCK)
>                 lock_region(ptdev, as_nr, iova, size);
>
> +       if (op == AS_COMMAND_FLUSH_MEM || op == AS_COMMAND_FLUSH_PT)
> +               return mmu_hw_do_flush_on_gpu_ctrl(ptdev, as_nr, op);

Given that FLUSH_MEM and FLUSH_PT are the only ops which are ever
used, the below becomes dead code. Could you please just inline these,
so it's more clear what's actually going on? The (op !=
AS_COMMAND_UNLOCK) branch can also become unconditional, perhaps with
a WARN_ON() around unknown ops.

Cheers,
Daniel


More information about the dri-devel mailing list