From: Boqun Feng <boqun@kernel.org>
To: amd-gfx@lists.freedesktop.org
Cc: "Mark Janes" <mjanes@netflix.com>,
"Kenneth Feng" <kenneth.feng@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Lijo Lazar" <lijo.lazar@amd.com>,
"Asad Kamal" <asad.kamal@amd.com>,
"Yang Wang" <kevinyang.wang@amd.com>,
"Priya Hosur" <Priya.Hosur@amd.com>, mythilam <mythilam@amd.com>,
"Mario Limonciello" <mario.limonciello@amd.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amd/pm: Fix incorrect avg vcn utilization in gpu_metrics
Date: Thu, 13 Aug 2026 14:36:08 -0700 [thread overview]
Message-ID: <an44yIv7WG7vqTqQ@tardis.local> (raw)
In-Reply-To: <20260805140227.44868-1-boqun@kernel.org>
On Wed, Aug 05, 2026 at 07:02:21AM -0700, Boqun Feng wrote:
> In a Strix Halo system, a >100 average_vcn_activity in gpu_metrics can
> be observed by running the following command:
>
> ffmpeg -hwaccel vappi -vappi_device /dev/dri/renderD128 -i \
> ~/sample-10s.mp4 -vf hwupload,scale_vappi=format=nv12 -c:v \
> h264_vappi /tmp/output.mp4
>
> This is incorrect because the value is supposed to be in [0-100] range.
>
> The cause of the issue is that the metrics.VcnActivity reported by
> smu_cmn_get_metrics_table() is a permyriad value instead of a percentage
> value (e.g. smu_v14_0_0_get_smu_metrics_data() has a division by 100 to
> report the vcn_busy_percent). Therefore fix this by applying the same
> division in smu_v14_0_0_get_gpu_metrics().
>
> Reported-by: Mark Janes <mjanes@netflix.com>
> Signed-off-by: Boqun Feng <boqun@kernel.org>
Ping?
Regards,
Boqun
> ---
> drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c
> index 568665265a13..1058338344b0 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c
> @@ -566,7 +566,8 @@ static ssize_t smu_v14_0_0_get_gpu_metrics(struct smu_context *smu,
> gpu_metrics->temperature_skin = metrics.SkinTemp;
>
> gpu_metrics->average_gfx_activity = metrics.GfxActivity;
> - gpu_metrics->average_vcn_activity = metrics.VcnActivity;
> + /* metrics.VcnActivity is permyriad, convert it to percentage. */
> + gpu_metrics->average_vcn_activity = metrics.VcnActivity / 100;
> memcpy(&gpu_metrics->average_ipu_activity[0],
> &metrics.IpuBusy[0],
> sizeof(uint16_t) * 8);
> --
> 2.50.1 (Apple Git-155)
>
next prev parent reply other threads:[~2026-08-13 21:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 14:02 Boqun Feng
2026-08-13 21:36 ` Boqun Feng [this message]
2026-08-13 22:01 ` Alex Deucher
2026-08-13 22:25 ` Boqun Feng
2026-08-14 0:51 ` Alex Deucher
2026-08-14 2:24 ` Boqun Feng
2026-08-14 3:23 ` Wang, Yang(Kevin)
2026-08-14 15:14 ` Umio-Yasuno - coelacanth_dream
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=an44yIv7WG7vqTqQ@tardis.local \
--to=boqun@kernel.org \
--cc=Priya.Hosur@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=asad.kamal@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kenneth.feng@amd.com \
--cc=kevinyang.wang@amd.com \
--cc=lijo.lazar@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mjanes@netflix.com \
--cc=mythilam@amd.com \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®