public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] overlay: Believe in 0MHz
Date: Thu, 28 Nov 2019 18:04:14 +0000	[thread overview]
Message-ID: <20191128180414.44846-1-chris@chris-wilson.co.uk> (raw)

Tvrtko proposed reporting 0MHz when idle, but the overlay didn't believe
that would be possible and stripped from its graphs!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 overlay/overlay.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/overlay/overlay.c b/overlay/overlay.c
index dd4fca29e..77302181c 100644
--- a/overlay/overlay.c
+++ b/overlay/overlay.c
@@ -599,10 +599,8 @@ static void show_gpu_freq(struct overlay_context *ctx, struct overlay_gpu_freq *
 	}
 
 	if (has_freq) {
-		if (gf->gpu_freq.current)
-			chart_add_sample(&gf->current, gf->gpu_freq.current);
-		if (gf->gpu_freq.request)
-			chart_add_sample(&gf->request, gf->gpu_freq.request);
+		chart_add_sample(&gf->current, gf->gpu_freq.current);
+		chart_add_sample(&gf->request, gf->gpu_freq.request);
 
 		chart_draw(&gf->request, ctx->cr);
 		chart_draw(&gf->current, ctx->cr);
@@ -647,9 +645,8 @@ static void show_gpu_freq(struct overlay_context *ctx, struct overlay_gpu_freq *
 		cairo_text_extents_t extents;
 
 		len = sprintf(buf, "Frequency: %dMHz", gf->gpu_freq.current);
-		if (gf->gpu_freq.request)
 		cairo_set_source_rgba(ctx->cr, 1, 1, 1, 1);
-			sprintf(buf + len, " (requested %dMHz)", gf->gpu_freq.request);
+		sprintf(buf + len, " (requested %dMHz)", gf->gpu_freq.request);
 		cairo_move_to(ctx->cr, PAD, y);
 		cairo_show_text(ctx->cr, buf);
 		y += 12;
-- 
2.24.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2019-11-28 18:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28 18:04 Chris Wilson [this message]
2019-11-28 18:52 ` [igt-dev] ✓ Fi.CI.BAT: success for overlay: Believe in 0MHz Patchwork
2019-11-29 11:37 ` [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin

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=20191128180414.44846-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.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