From: Christian Gmeiner <christian.gmeiner@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>,
Lucas Stach <l.stach@pengutronix.de>,
Russell King <linux+etnaviv@armlinux.org.uk>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
etnaviv@lists.freedesktop.org (moderated list:DRM DRIVERS FOR
VIVANTE GPU IP),
dri-devel@lists.freedesktop.org (open list:DRM DRIVERS FOR
VIVANTE GPU IP)
Subject: [PATCH v2 3/4] drm/etnaviv: show loadavg in debugfs
Date: Tue, 21 Jun 2022 09:20:49 +0200 [thread overview]
Message-ID: <20220621072050.76229-4-christian.gmeiner@gmail.com> (raw)
In-Reply-To: <20220621072050.76229-1-christian.gmeiner@gmail.com>
Might be helpful to see the loadavg in debugfs.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 202002ae75ee..113faff9b02e 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -926,7 +926,7 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m)
{
struct dma_debug debug;
u32 dma_lo, dma_hi, axi, idle;
- int ret;
+ int ret, i;
seq_printf(m, "%s Status:\n", dev_name(gpu->dev));
@@ -1044,6 +1044,16 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m)
if (idle & VIVS_HI_IDLE_STATE_AXI_LP)
seq_puts(m, "\t AXI low power mode\n");
+ seq_printf(m, "\tload:\n");
+ spin_lock_bh(&gpu->loadavg_spinlock);
+
+ for (i = 0; i < ARRAY_SIZE(etna_idle_module_names); i++)
+ seq_printf(m, "\t %s: %u%%\n",
+ etna_idle_module_names[i].name,
+ gpu->loadavg_percentage[i]);
+
+ spin_unlock_bh(&gpu->loadavg_spinlock);
+
if (gpu->identity.features & chipFeatures_DEBUG_MODE) {
u32 read0 = gpu_read(gpu, VIVS_MC_DEBUG_READ0);
u32 read1 = gpu_read(gpu, VIVS_MC_DEBUG_READ1);
--
2.36.1
next prev parent reply other threads:[~2022-06-21 7:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 7:20 [PATCH v2 0/4] Add support for GPU load values Christian Gmeiner
2022-06-21 7:20 ` [PATCH v2 1/4] drm/etnaviv: add simple moving average (SMA) Christian Gmeiner
2022-06-24 9:22 ` Lucas Stach
2022-07-02 11:41 ` Christian Gmeiner
2022-06-21 7:20 ` [PATCH v2 2/4] drm/etnaviv: add loadavg accounting Christian Gmeiner
2022-06-24 9:38 ` Lucas Stach
2022-07-02 11:53 ` Christian Gmeiner
2022-06-21 7:20 ` Christian Gmeiner [this message]
2022-06-21 7:20 ` [PATCH v2 4/4] drm/etnaviv: export loadavg via perfmon Christian Gmeiner
2022-06-24 9:44 ` Lucas Stach
2022-07-02 11:57 ` Christian Gmeiner
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=20220621072050.76229-4-christian.gmeiner@gmail.com \
--to=christian.gmeiner@gmail.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=l.stach@pengutronix.de \
--cc=linux+etnaviv@armlinux.org.uk \
--cc=linux-kernel@vger.kernel.org \
/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®