Re: [PATCH v12 03/15] drm/panfrost: Move debugfs initialisation to relevant subsystems
From: Adrián Larumbe
Date: Mon Oct 05 2026 - 20:51:45 EST
On 2026-10-02 15:10:07+01:00, Steven Price wrote:
> On 29/09/2026 04:44, Adrián Larumbe wrote:
>
> > Because debugfs knobs are a device interface, and also the different knobs
> > deal with specific subsystems, it's best to move their initialisations away
> > from panfrost_drv.c and into the subsystem they provide information about.
> >
> > Reviewed-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
> > Signed-off-by: Adrián Larumbe <adrian.larumbe@xxxxxxxxxxxxx>
> > ---
> > drivers/gpu/drm/panfrost/panfrost_device.c | 8 ++
> > drivers/gpu/drm/panfrost/panfrost_device.h | 4 +
> > drivers/gpu/drm/panfrost/panfrost_drv.c | 129 +----------------------------
> > drivers/gpu/drm/panfrost/panfrost_gem.c | 29 ++++++-
> > drivers/gpu/drm/panfrost/panfrost_gem.h | 3 +-
> > drivers/gpu/drm/panfrost/panfrost_job.c | 99 ++++++++++++++++++++++
> > drivers/gpu/drm/panfrost/panfrost_job.h | 4 +
> > 7 files changed, 144 insertions(+), 132 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> > index c1a2e93a2b9b..5bf528f41278 100644
> > --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> > +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> > @@ -561,3 +561,11 @@ EXPORT_GPL_DEV_PM_OPS(panfrost_pm_ops) = {
> > RUNTIME_PM_OPS(panfrost_device_runtime_suspend, panfrost_device_runtime_resume, NULL)
> > SYSTEM_SLEEP_PM_OPS(panfrost_device_suspend, panfrost_device_resume)
> > };
> > +
> > +#ifdef CONFIG_DEBUG_FS
> > +void panfrost_device_debugfs_init(struct drm_minor *minor)
> > +{
> > + panfrost_gem_debugfs_init(minor);
> > + panfrost_sched_debugfs_init(minor);
> > +}
> > +#endif // CONFIG_DEBUG_FS
>
> NIT: I'd usually try to avoid #ifdefs like this by making the header
> files define a no-op dummy inline function when !CONFIG_DEBUG_FS. It
> saves polluting the code with a potentially large number of #ifdefs.
>
> But I have to admit this isn't too bad and a definite improvement, so
> it's up to you - either way:
>
> Reviewed-by: Steven Price <steven.price@xxxxxxx>
>
> Thanks,
> Steve
I see most libraries doing this and agree it would help at removing some clutter.
However, I think I'd rather take care of this in a future patch series.