All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Maíra Canal" <mcanal@igalia.com>
To: Sidong Yang <sidong.yang@furiosa.ai>,
	Tomeu Vizoso <tomeu@tomeuvizoso.net>,
	Oded Gabbay <ogabbay@kernel.org>,
	Philipp Stanner <phasta@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Matthew Brost <matthew.brost@intel.com>,
	ckoenig.leichtzumerken@gmail.com
Cc: Tvrtko Ursulin <tursulin@ursulin.net>,
	Heiko Stuebner <heiko@sntech.de>,
	Gyeyoung Baek <gye976@gmail.com>,
	dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] accel/rocket: Report NPU usage through fdinfo
Date: Thu, 19 Nov 2026 09:31:54 -0300	[thread overview]
Message-ID: <3c5f7694-e6fe-477d-bfeb-a130c363f431@igalia.com> (raw)
In-Reply-To: <20261112171144.3151554-3-sidong.yang@furiosa.ai>

Hi Sidong,

On 12/11/26 14:11, Sidong Yang wrote:
> diff --git a/drivers/accel/rocket/rocket_drv.c b/drivers/accel/rocket/ 
> rocket_drv.c
> index 5d7805c41dc3..351be60b1228 100644
> --- a/drivers/accel/rocket/rocket_drv.c
> +++ b/drivers/accel/rocket/rocket_drv.c
> @@ -3,8 +3,10 @@
>   
>   #include <drm/drm_accel.h>
>   #include <drm/drm_drv.h>
> +#include <drm/drm_file.h>
>   #include <drm/drm_gem.h>
>   #include <drm/drm_ioctl.h>
> +#include <drm/drm_print.h>
>   #include <drm/rocket_accel.h>
>   #include <linux/clk.h>
>   #include <linux/err.h>
> @@ -139,7 +141,23 @@ static const struct drm_ioctl_desc rocket_drm_driver_ioctls[] = {
>   	ROCKET_IOCTL(FINI_BO, fini_bo),
>   };
>   
> -DEFINE_DRM_ACCEL_FOPS(rocket_accel_driver_fops);
> +static void rocket_show_fdinfo(struct drm_printer *p, struct drm_file 
> *file)
> +{
> + struct rocket_device *rdev = to_rocket_device(file->minor->dev);
> + struct rocket_file_priv *rocket_priv = file->driver_priv;
> +
> + drm_printf(p, "drm-engine-npu:\t%llu ns\n",
> + drm_sched_entity_get_runtime(&rocket_priv->sched_entity));
> + drm_printf(p, "drm-engine-capacity-npu:\t%u\n", rdev->max_cores);

Does it make sense to expose the capacity of a core that it's not
actually initialized and in use?

Best regards,
- Maíra

  parent reply	other threads:[~2026-11-19 12:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 17:11 [PATCH v5 0/2] accel/rocket: Report NPU usage through fdinfo Sidong Yang
2026-11-12 17:11 ` [PATCH v5 1/2] drm/sched: Add drm_sched_entity_get_runtime() Sidong Yang
2026-11-18 16:34   ` Tvrtko Ursulin
2026-11-18 17:13   ` Philipp Stanner
2026-11-18 17:39     ` Maíra Canal
2026-11-19  7:23       ` Philipp Stanner
2026-11-20  4:18         ` Sidong Yang
2026-11-12 17:11 ` [PATCH v5 2/2] accel/rocket: Report NPU usage through fdinfo Sidong Yang
2026-11-18 16:42   ` Tvrtko Ursulin
2026-11-19 12:31   ` Maíra Canal [this message]
2026-11-20  4:19     ` Sidong Yang

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=3c5f7694-e6fe-477d-bfeb-a130c363f431@igalia.com \
    --to=mcanal@igalia.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gye976@gmail.com \
    --cc=heiko@sntech.de \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.brost@intel.com \
    --cc=ogabbay@kernel.org \
    --cc=phasta@kernel.org \
    --cc=sidong.yang@furiosa.ai \
    --cc=tomeu@tomeuvizoso.net \
    --cc=tursulin@ursulin.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.