On Wed, 2 Sep 2026 16:44:24 +0100 Adrián Larumbe <[email protected]> wrote:
> On 01.09.2026 15:37, Boris Brezillon wrote: > > On Fri, 28 Aug 2026 21:56:54 +0100 > > Adrián Larumbe <[email protected]> wrote: > > > > > If the GPU and CPU are fully coherent, then there's no need to flush the > > > GPU caches after a perfcnt sample is made available. > > > > > > Signed-off-by: Adrián Larumbe <[email protected]> > > > --- > > > drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 5 ++++- > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c > > > b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c > > > index ffc77121070e..b3f71d7fd82a 100644 > > > --- a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c > > > +++ b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c > > > @@ -52,7 +52,10 @@ void panfrost_perfcnt_clean_cache_done(struct > > > panfrost_device *pfdev) > > > > > > void panfrost_perfcnt_sample_done(struct panfrost_device *pfdev) > > > { > > > - gpu_write(pfdev, GPU_CMD, GPU_CMD_CLEAN_CACHES); > > > + if (pfdev->features.selected_coherency != COHERENCY_ACE) > > > > I think ACE_LITE would allow us to skip the flush to, so > > I thought ACE_LITE means the GPU can snoop CPU caches but not the other way > round, so at the end of a > sample, we still have to flush GPU caches for the CPU to see counter data. You're absolutely right, sorry for the brainfart.
