dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Christopher Healy <healych@amazon.com>,
	dri-devel@lists.freedesktop.org,
	Steven Price <steven.price@arm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH RFC 1/4] drm/panfrost: Provide a dummy show_fdinfo() implementation
Date: Mon, 9 Jan 2023 09:34:37 +0100	[thread overview]
Message-ID: <20230109093437.35ccf475@collabora.com> (raw)
In-Reply-To: <Y7btZUve7rDA/ctq@phenom.ffwll.local>

Hi Daniel,

On Thu, 5 Jan 2023 16:31:49 +0100
Daniel Vetter <daniel@ffwll.ch> wrote:

> On Wed, Jan 04, 2023 at 02:03:05PM +0100, Boris Brezillon wrote:
> > Provide a dummy show_fdinfo() implementation exposing drm-driver and
> > drm-client-id. More stats will be added soon.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > ---
> >  drivers/gpu/drm/panfrost/panfrost_drv.c | 17 ++++++++++++++++-
> >  1 file changed, 16 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> > index 2fa5afe21288..6ee43559fc14 100644
> > --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> > +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> > @@ -515,7 +515,22 @@ static const struct drm_ioctl_desc panfrost_drm_driver_ioctls[] = {
> >  	PANFROST_IOCTL(MADVISE,		madvise,	DRM_RENDER_ALLOW),
> >  };
> >  
> > -DEFINE_DRM_GEM_FOPS(panfrost_drm_driver_fops);
> > +static void panfrost_show_fdinfo(struct seq_file *m, struct file *f)
> > +{
> > +	struct drm_file *file = f->private_data;
> > +	struct panfrost_file_priv *panfrost_priv = file->driver_priv;
> > +
> > +	seq_printf(m, "drm-driver:\t%s\n", file->minor->dev->driver->name);
> > +	seq_printf(m, "drm-client-id:\t%llu\n", panfrost_priv->sched_entity[0].fence_context);  
> 
> I think at this point we really need to not just have a document that says
> what this should look like, but drm infrastructure with shared code.
> Drivers all inventing their fdinfo really doesn't seem like a great idea
> to me.

Okay. I'm just curious how far you want to go with this common
infrastructure? Are we talking about having a generic helper printing
the pretty generic drm-{driver,client-id} props and letting the driver
prints its driver specific properties, or do you also want to
standardize/automate printing of some drm-memory/drm-engine props too?

Regards,

Boris

  reply	other threads:[~2023-01-09  8:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04 13:03 [PATCH RFC 0/4] drm/panfrost: Expose memory usage stats through fdinfo Boris Brezillon
2023-01-04 13:03 ` [PATCH RFC 1/4] drm/panfrost: Provide a dummy show_fdinfo() implementation Boris Brezillon
2023-01-05 15:31   ` Daniel Vetter
2023-01-09  8:34     ` Boris Brezillon [this message]
2023-01-09 10:17       ` Daniel Vetter
2023-01-09 10:44         ` Boris Brezillon
2023-01-04 13:03 ` [PATCH RFC 2/4] drm/panfrost: Track BO resident size Boris Brezillon
2023-01-04 13:03 ` [PATCH RFC 3/4] drm/panfrost: Add a helper to retrieve MMU context stats Boris Brezillon
2023-01-04 13:03 ` [PATCH RFC 4/4] drm/panfrost: Expose some memory related stats through fdinfo Boris Brezillon
2023-01-23 11:18   ` Tvrtko Ursulin
2023-01-16 10:30 ` [PATCH RFC 0/4] drm/panfrost: Expose memory usage " Steven Price
2023-01-16 11:05   ` Boris Brezillon
2023-01-16 12:21     ` Steven Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230109093437.35ccf475@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=healych@amazon.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=steven.price@arm.com \
    --cc=tomeu.vizoso@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox