Re: [PATCH v2 7/7] drm/panfrost: Explicitly enable MMU interrupts at device init
From: Adrián Larumbe
Date: Tue Jun 16 2026 - 15:16:36 EST
On 05.06.2026 08:56, Boris Brezillon wrote:
> On Thu, 04 Jun 2026 18:35:26 +0100
> Adrián Larumbe <adrian.larumbe@xxxxxxxxxxxxx> wrote:
>
> > Because the device must be in a position to accept jobs between the time
> > drm_dev_register() is called and autosuspend first kicks in, there's a very
> > narrow window inbetween during which jobs targeting the tiler buffer
> > object would time out, since the device's PM status is 'Active', but no MMU
> > interrupts were enabled at device initialisation time.
> >
> > Signed-off-by: Adrián Larumbe <adrian.larumbe@xxxxxxxxxxxxx>
> > Fixes: 73e467f60acd ("drm/panfrost: Consolidate reset handling")
> > ---
> > drivers/gpu/drm/panfrost/panfrost_mmu.c | 11 +++++++++--
> > drivers/gpu/drm/panfrost/panfrost_mmu.h | 2 ++
> > 2 files changed, 11 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> > index 4a3162c3b659..0e1ad6256c2c 100644
> > --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
> > +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> > @@ -336,6 +336,12 @@ void panfrost_mmu_as_put(struct panfrost_device *pfdev, struct panfrost_mmu *mmu
> > WARN_ON(atomic_read(&mmu->as_count) < 0);
> > }
> >
> > +void panfrost_mmu_enable_interrupts(struct panfrost_device *pfdev)
> > +{
> > + mmu_write(pfdev, MMU_INT_CLEAR, ~0);
> > + mmu_write(pfdev, MMU_INT_MASK, ~0);
> > +}
> > +
> > void panfrost_mmu_reset(struct panfrost_device *pfdev)
> > {
> > struct panfrost_mmu *mmu, *mmu_tmp;
> > @@ -355,8 +361,7 @@ void panfrost_mmu_reset(struct panfrost_device *pfdev)
> >
> > spin_unlock(&pfdev->as_lock);
> >
> > - mmu_write(pfdev, MMU_INT_CLEAR, ~0);
> > - mmu_write(pfdev, MMU_INT_MASK, ~0);
> > + panfrost_mmu_enable_interrupts(pfdev);
> > }
> >
> > static size_t get_pgsize(u64 addr, size_t size, size_t *count)
> > @@ -970,6 +975,8 @@ int panfrost_mmu_init(struct panfrost_device *pfdev)
> > return err;
> > }
> >
> > + panfrost_mmu_enable_interrupts(pfdev);
> > +
> > return 0;
> > }
> >
> > diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.h b/drivers/gpu/drm/panfrost/panfrost_mmu.h
> > index 27c3c65ed074..3140eb4fea0f 100644
> > --- a/drivers/gpu/drm/panfrost/panfrost_mmu.h
> > +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.h
> > @@ -12,6 +12,8 @@ struct panfrost_mmu;
> > int panfrost_mmu_map(struct panfrost_gem_mapping *mapping);
> > void panfrost_mmu_unmap(struct panfrost_gem_mapping *mapping);
> >
> > +void panfrost_mmu_enable_interrupts(struct panfrost_device *pfdev);
>
> You don't need to expose this function, it's only used inside
> panfrost_mmu.c.
Will remove in the next revision.
> > +
> > int panfrost_mmu_init(struct panfrost_device *pfdev);
> > void panfrost_mmu_fini(struct panfrost_device *pfdev);
> > void panfrost_mmu_reset(struct panfrost_device *pfdev);
> >
Adrian Larumbe