public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/2] tests/kms_psr2_su: Print debugfs when skipping test
Date: Fri, 29 May 2020 18:16:13 -0700	[thread overview]
Message-ID: <20200530011613.45991-2-jose.souza@intel.com> (raw)
In-Reply-To: <20200530011613.45991-1-jose.souza@intel.com>

This tests is being sporadically skipped in CI as it is not due
"PSR sink not reliable: yes" lets print the i915_edp_psr_status to
find out the reason.
This can be reverted afterwards.

Reference: https://gitlab.freedesktop.org/drm/intel/-/issues/1911
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 lib/igt_psr.c       | 13 +++++++++++++
 lib/igt_psr.h       |  1 +
 tests/kms_psr2_su.c |  2 ++
 3 files changed, 16 insertions(+)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 956f6219c..8c2f4ce6c 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -229,3 +229,16 @@ bool psr2_wait_su(int debugfs_fd, uint16_t *num_su_blocks)
 {
 	return igt_wait(psr2_read_last_num_su_blocks_val(debugfs_fd, num_su_blocks), 40, 1);
 }
+
+void psr_print_debugfs(int debugfs_fd)
+{
+	char buf[PSR_STATUS_MAX_LEN];
+	int ret;
+
+	ret = igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
+				      sizeof(buf));
+	if (ret < 0)
+		return;
+
+	igt_debug("%s", buf);
+}
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index b2afb6119..8368ecb49 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -43,5 +43,6 @@ bool psr_enable(int device, int debugfs_fd, enum psr_mode);
 bool psr_disable(int device, int debugfs_fd);
 bool psr_sink_support(int device, int debugfs_fd, enum psr_mode mode);
 bool psr2_wait_su(int debugfs_fd, uint16_t *num_su_blocks);
+void psr_print_debugfs(int debugfs_fd);
 
 #endif
diff --git a/tests/kms_psr2_su.c b/tests/kms_psr2_su.c
index a834a96e3..0ee02fc8b 100644
--- a/tests/kms_psr2_su.c
+++ b/tests/kms_psr2_su.c
@@ -261,6 +261,8 @@ igt_main
 		prepare(&data);
 		r = psr_wait_entry(data.debugfs_fd, PSR_MODE_2);
 		cleanup(&data);
+		if (!r)
+			psr_print_debugfs(data.debugfs_fd);
 		igt_require_f(r, "PSR2 can not be enabled\n");
 
 		/* blocking timerfd */
-- 
2.26.2

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

  reply	other threads:[~2020-05-30  1:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-30  1:16 [igt-dev] [PATCH i-g-t 1/2] tests/kms_psr2_su: Read su blocks of frame 1 if frame 0 is 0 José Roberto de Souza
2020-05-30  1:16 ` José Roberto de Souza [this message]
2020-06-01  8:18   ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_psr2_su: Print debugfs when skipping test Petri Latvala
2020-06-01 16:46     ` Souza, Jose
2020-06-02 16:56       ` Mun, Gwan-gyeong
2020-06-02 17:11         ` Souza, Jose
2020-05-30  1:59 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_psr2_su: Read su blocks of frame 1 if frame 0 is 0 Patchwork
2020-05-30  6:30 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-06-02 16:40 ` [igt-dev] [PATCH i-g-t 1/2] " Mun, Gwan-gyeong

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=20200530011613.45991-2-jose.souza@intel.com \
    --to=jose.souza@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox