From: Jim Bride <jim.bride@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH IGT 08/11] lib: Add igt_psr_print_status() and change tests to use it.
Date: Tue, 11 Jul 2017 15:48:33 -0700 [thread overview]
Message-ID: <1499813316-15038-9-git-send-email-jim.bride@linux.intel.com> (raw)
In-Reply-To: <1499813316-15038-1-git-send-email-jim.bride@linux.intel.com>
Signed-off-by: Jim Bride <jim.bride@linux.intel.com>
---
lib/igt_psr.c | 13 +++++++++++++
lib/igt_psr.h | 1 +
tests/kms_frontbuffer_tracking.c | 5 +----
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index d27c32a..8dda659 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -114,3 +114,16 @@ bool igt_psr_await_status(int fd, bool active)
{
return igt_wait(igt_psr_active(fd) == active, 5000, 1);
}
+
+/**
+ * igt_psr_print_status:
+ *
+ * Dumps the contents of i915_edp_psr_status from debugfs.
+ */
+void igt_psr_print_status(int fd)
+{
+ char buf[BUFSIZE];
+
+ igt_debugfs_read(fd, "i915_edp_psr_status", buf);
+ igt_info("PSR status:\n%s\n", buf);
+}
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index 3c355e0..d6db297 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -32,5 +32,6 @@ bool igt_psr_sink_support(int fd);
bool igt_psr_possible(int fd);
bool igt_psr_active(int fd);
bool igt_psr_await_status(int fd, bool active);
+void igt_psr_print_status(int fd);
#endif /* IGT_PSR_H */
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 4d20899..ee611b9 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -800,10 +800,7 @@ static void fbc_print_status(void)
static void psr_print_status(void)
{
- char buf[256];
-
- debugfs_read("i915_edp_psr_status", buf);
- igt_info("PSR status:\n%s\n", buf);
+ igt_psr_print_status(drm.fd);
}
static struct timespec fbc_get_last_action(void)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-07-11 22:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 22:48 [PATCH IGT 00/11] IGT PSR Fix-ups Jim Bride
2017-07-11 22:48 ` [PATCH IGT 01/11] tests/kms_psr_sink_crc: Change assert_or_manual() to a macro Jim Bride
2017-07-11 22:48 ` [PATCH IGT 02/11] tests/kms_frontbuffer_tracking: Fix multidraw subtest Jim Bride
2017-07-11 22:48 ` [PATCH IGT 03/11] tests/kms_frontbuffer_tracking: Remove unneeded HSW work-around Jim Bride
2017-07-12 19:07 ` Paulo Zanoni
2017-07-11 22:48 ` [PATCH IGT 04/11] lib: Add utility functions to enable and disable PSR Jim Bride
2017-07-11 22:48 ` [PATCH IGT 05/11] lib: Add library functions for PSR source and sink support Jim Bride
2017-07-11 22:48 ` [PATCH IGT 06/11] lib: Add function to return PSR active status Jim Bride
2017-07-11 22:48 ` [PATCH IGT 07/11] lib: Add igt_psr_await_status() and modify tests to use it Jim Bride
2017-07-11 22:48 ` Jim Bride [this message]
2017-07-11 22:48 ` [PATCH IGT 09/11] lib: Add igt_psr_valid_connector() and change " Jim Bride
2017-07-11 22:48 ` [PATCH IGT 10/11] lib: Add igt_psr_find_good_mode() and modify " Jim Bride
2017-07-11 22:48 ` [PATCH IGT 11/11] lib: Add igt_psr_get_sink_crc() and change " Jim Bride
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=1499813316-15038-9-git-send-email-jim.bride@linux.intel.com \
--to=jim.bride@linux.intel.com \
--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 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.