From: Daniel Vetter <daniel@ffwll.ch>
To: Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
freedreno@lists.freedesktop.org,
Boris Brezillon <boris.brezillon@collabora.com>,
Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
Christopher Healy <healych@amazon.com>,
Emil Velikov <emil.l.velikov@gmail.com>,
Rob Clark <robdclark@chromium.org>,
Lucas Stach <l.stach@pengutronix.de>,
Russell King <linux+etnaviv@armlinux.org.uk>,
Christian Gmeiner <christian.gmeiner@gmail.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
"moderated list:DRM DRIVERS FOR VIVANTE GPU IP"
<etnaviv@lists.freedesktop.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 5/7] drm/etnaviv: Switch to fdinfo helper
Date: Wed, 12 Apr 2023 09:59:55 +0200 [thread overview]
Message-ID: <ZDZk+8uWouvMtWle@phenom.ffwll.local> (raw)
In-Reply-To: <20230411225725.2032862-6-robdclark@gmail.com>
On Tue, Apr 11, 2023 at 03:56:10PM -0700, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
>
> Signed-off-by: Rob Clark <robdclark@chromium.org>
You're on an old tree, this got reverted. But I'm kinda wondering whether
another patch on top shouldn't just includ the drm_show_fdinfo in
DRM_GEM_FOPS macro ... There's really no good reasons for drivers to not
have this I think?
-Daniel
> ---
> drivers/gpu/drm/etnaviv/etnaviv_drv.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> index 44ca803237a5..170000d6af94 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> @@ -476,9 +476,8 @@ static const struct drm_ioctl_desc etnaviv_ioctls[] = {
> ETNA_IOCTL(PM_QUERY_SIG, pm_query_sig, DRM_RENDER_ALLOW),
> };
>
> -static void etnaviv_fop_show_fdinfo(struct seq_file *m, struct file *f)
> +static void etnaviv_fop_show_fdinfo(struct drm_printer *p, struct drm_file *file)
> {
> - struct drm_file *file = f->private_data;
> struct drm_device *dev = file->minor->dev;
> struct etnaviv_drm_private *priv = dev->dev_private;
> struct etnaviv_file_private *ctx = file->driver_priv;
> @@ -487,8 +486,6 @@ static void etnaviv_fop_show_fdinfo(struct seq_file *m, struct file *f)
> * For a description of the text output format used here, see
> * Documentation/gpu/drm-usage-stats.rst.
> */
> - seq_printf(m, "drm-driver:\t%s\n", dev->driver->name);
> - seq_printf(m, "drm-client-id:\t%u\n", ctx->id);
>
> for (int i = 0; i < ETNA_MAX_PIPES; i++) {
> struct etnaviv_gpu *gpu = priv->gpu[i];
> @@ -507,7 +504,7 @@ static void etnaviv_fop_show_fdinfo(struct seq_file *m, struct file *f)
> cur = snprintf(engine + cur, sizeof(engine) - cur,
> "%sNN", cur ? "/" : "");
>
> - seq_printf(m, "drm-engine-%s:\t%llu ns\n", engine,
> + drm_printf(p, "drm-engine-%s:\t%llu ns\n", engine,
> ctx->sched_entity[i].elapsed_ns);
> }
> }
> @@ -515,7 +512,7 @@ static void etnaviv_fop_show_fdinfo(struct seq_file *m, struct file *f)
> static const struct file_operations fops = {
> .owner = THIS_MODULE,
> DRM_GEM_FOPS,
> - .show_fdinfo = etnaviv_fop_show_fdinfo,
> + .show_fdinfo = drm_fop_show_fdinfo,
> };
>
> static const struct drm_driver etnaviv_drm_driver = {
> @@ -529,6 +526,7 @@ static const struct drm_driver etnaviv_drm_driver = {
> #ifdef CONFIG_DEBUG_FS
> .debugfs_init = etnaviv_debugfs_init,
> #endif
> + .show_fdinfo = etnaviv_fop_show_fdinfo,
> .ioctls = etnaviv_ioctls,
> .num_ioctls = DRM_ETNAVIV_NUM_IOCTLS,
> .fops = &fops,
> --
> 2.39.2
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2023-04-12 8:00 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 22:56 [PATCH v3 0/7] drm: fdinfo memory stats Rob Clark
2023-04-11 22:56 ` [PATCH v3 1/7] drm: Add common fdinfo helper Rob Clark
2023-04-12 7:55 ` Daniel Vetter
2023-04-11 22:56 ` [PATCH v3 2/7] drm/msm: Switch to " Rob Clark
2023-04-11 22:56 ` [PATCH v3 3/7] drm/amdgpu: " Rob Clark
2023-04-12 7:58 ` Daniel Vetter
2023-04-11 22:56 ` [PATCH v3 4/7] drm/i915: " Rob Clark
2023-04-12 12:32 ` Tvrtko Ursulin
2023-04-12 13:51 ` Daniel Vetter
2023-04-12 15:12 ` Tvrtko Ursulin
2023-04-12 18:13 ` Daniel Vetter
2023-04-11 22:56 ` [PATCH v3 5/7] drm/etnaviv: " Rob Clark
2023-04-12 7:59 ` Daniel Vetter [this message]
2023-04-12 22:18 ` Rob Clark
2023-04-11 22:56 ` [PATCH v3 6/7] drm: Add fdinfo memory stats Rob Clark
2023-04-12 8:01 ` Daniel Vetter
2023-04-12 14:42 ` Tvrtko Ursulin
2023-04-12 17:59 ` Rob Clark
2023-04-12 18:17 ` Daniel Vetter
2023-04-12 18:42 ` Rob Clark
2023-04-12 19:18 ` Daniel Vetter
2023-04-13 12:58 ` Tvrtko Ursulin
2023-04-13 13:27 ` Daniel Vetter
2023-04-13 16:40 ` Tvrtko Ursulin
2023-04-13 18:24 ` Rob Clark
2023-04-13 20:05 ` Daniel Vetter
2023-04-14 8:57 ` Tvrtko Ursulin
2023-04-14 9:07 ` Daniel Vetter
2023-04-14 10:12 ` Tvrtko Ursulin
2023-04-14 13:40 ` Rob Clark
2023-04-16 7:48 ` Daniel Vetter
2023-04-17 11:10 ` Tvrtko Ursulin
2023-04-17 13:42 ` Rob Clark
2023-04-17 14:04 ` Alex Deucher
2023-04-17 14:20 ` Tvrtko Ursulin
2023-04-17 16:12 ` Rob Clark
2023-04-13 15:47 ` Rob Clark
2023-04-13 16:45 ` Alex Deucher
2023-04-11 22:56 ` [PATCH v3 7/7] drm/msm: Add memory stats to fdinfo Rob Clark
2023-04-12 9:34 ` [PATCH v3 0/7] drm: fdinfo memory stats Christian König
2023-04-12 12:10 ` Tvrtko Ursulin
2023-04-12 12:22 ` Christian König
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=ZDZk+8uWouvMtWle@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=christian.gmeiner@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=etnaviv@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=healych@amazon.com \
--cc=l.stach@pengutronix.de \
--cc=linux+etnaviv@armlinux.org.uk \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=tvrtko.ursulin@linux.intel.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