From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Reduce fbc status spam.
Date: Thu, 15 Mar 2018 12:00:08 +0100 [thread overview]
Message-ID: <20180315110008.72082-1-maarten.lankhorst@linux.intel.com> (raw)
When FBC cannot be enabled in one of the tests, we get a lot of repeated
spam at DEBUG level, which overwrites any good debug level data that you
can hope to get out of the test.
When running at the debug level, output FBC info only if changed from last
time, so we don't get the repeated spam.
This makes the debug info from CI slightly more useful.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
tests/kms_frontbuffer_tracking.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 06b34ddb90b4..aa138d5ea13f 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -758,9 +758,20 @@ static int __debugfs_write(const char *param, char *buf, int len)
static bool fbc_is_enabled(int lvl)
{
char buf[128];
+ static char last_buf[128];
+ bool print = true;
debugfs_read("i915_fbc_status", buf);
- igt_log(IGT_LOG_DOMAIN, lvl, "fbc_is_enabled()?\n%s", buf);
+ if (lvl != IGT_LOG_DEBUG)
+ last_buf[0] = '\0';
+ else if (strcmp(last_buf, buf))
+ strcpy(last_buf, buf);
+ else
+ print = false;
+
+ if (print)
+ igt_log(IGT_LOG_DOMAIN, lvl, "fbc_is_enabled()?\n%s", buf);
+
return strstr(buf, "FBC enabled\n");
}
--
2.16.2
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2018-03-15 11:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 11:00 Maarten Lankhorst [this message]
2018-03-15 11:06 ` [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Reduce fbc status spam Chris Wilson
2018-03-15 11:26 ` [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Reduce fbc status spam, v2 Maarten Lankhorst
2018-03-15 11:33 ` Chris Wilson
2018-03-15 18:43 ` Maarten Lankhorst
2018-03-15 13:01 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_frontbuffer_tracking: Reduce fbc status spam. (rev2) Patchwork
2018-03-15 14:41 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2018-03-15 17:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20180315110008.72082-1-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=igt-dev@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 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.