Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jouni.hogander@intel.com, Jeevan B <jeevan.b@intel.com>
Subject: [PATCH i-g-t 1/2] lib/igt_psr: Added library functions for early trasport
Date: Wed, 12 Jun 2024 16:36:44 +0530	[thread overview]
Message-ID: <20240612110645.1110374-2-jeevan.b@intel.com> (raw)
In-Reply-To: <20240612110645.1110374-1-jeevan.b@intel.com>

Added helper functions to check sink support for early transport and
check early transport active check.

v2: Add early trasport for PR and PSR2.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 lib/igt_psr.c | 15 +++++++++++++++
 lib/igt_psr.h |  3 +++
 2 files changed, 18 insertions(+)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 6008b73a6..b1ca57201 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -53,6 +53,16 @@ bool selective_fetch_check(int debugfs_fd, igt_output_t *output)
 	return strstr(buf, "PSR2 selective fetch: enabled");
 }
 
+bool early_transport_check(int debugfs_fd)
+{
+	char buf[PSR_STATUS_MAX_LEN];
+
+	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
+				sizeof(buf));
+
+	return strstr(buf, "(Early Transport)");
+}
+
 static bool psr_active_check(int debugfs_fd, enum psr_mode mode, igt_output_t *output)
 {
 	char debugfs_file[128] = {0};
@@ -247,10 +257,15 @@ bool psr_sink_support(int device, int debugfs_fd, enum psr_mode mode, igt_output
 		       strstr(buf, "Sink support: yes [0x04]") ||
 		       (strstr(line, "PSR = yes") &&
 		       (strstr(line, "[0x03]") || strstr(line, "[0x04]")));
+	case PSR_MODE_2_ET:
+		return strstr(buf, "Sink support: yes [0x04]") &&
+		       (strstr(line, "PSR2 (Early Trasport)") || strstr(line, "[0x04]"));
 	case PR_MODE:
 		return strstr(line, "Panel Replay = yes, Panel Replay Selective Update = no");
 	case PR_MODE_SEL_FETCH:
 		return strstr(line, "Panel Replay = yes, Panel Replay Selective Update = yes");
+	case PR_MODE_SEL_FETCH_ET:
+		return strstr(line, "Panel Replay Selective Update enabled (Early Trasport)");
 	default:
 		igt_assert_f(false, "Invalid psr mode\n");
 		return false;
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index e8595fd8c..a7ebd0739 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -35,8 +35,10 @@ enum psr_mode {
 	PSR_MODE_1,
 	PSR_MODE_2,
 	PSR_MODE_2_SEL_FETCH,
+	PSR_MODE_2_ET,
 	PR_MODE,
 	PR_MODE_SEL_FETCH,
+	PR_MODE_SEL_FETCH_ET,
 	PSR_DISABLED,
 };
 
@@ -47,6 +49,7 @@ enum fbc_mode {
 
 bool psr_disabled_check(int debugfs_fd);
 bool selective_fetch_check(int debugfs_fd, igt_output_t *output);
+bool early_transport_check(int debugfs_fd);
 bool psr_wait_entry(int debugfs_fd, enum psr_mode mode, igt_output_t *output);
 bool psr_wait_update(int debugfs_fd, enum psr_mode mode, igt_output_t *output);
 bool psr_long_wait_update(int debugfs_fd, enum psr_mode mode, igt_output_t *output);
-- 
2.25.1


  reply	other threads:[~2024-06-12 10:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 11:06 [PATCH i-g-t 0/2] Early Transport Support Jeevan B
2024-06-12 11:06 ` Jeevan B [this message]
2024-06-13 10:24   ` [PATCH i-g-t 1/2] lib/igt_psr: Added library functions for early trasport Hogander, Jouni
2024-06-12 11:06 ` [PATCH i-g-t 2/2] tests/intel/kms_psr2_sf: Add checks for early transport Jeevan B
2024-06-13 10:41   ` Hogander, Jouni
2024-06-19 15:33     ` B, Jeevan
2024-06-12 12:31 ` ✓ CI.xeBAT: success for Early Transport Support (rev2) Patchwork
2024-06-12 12:43 ` ✓ Fi.CI.BAT: " Patchwork
2024-06-12 15:09 ` ✗ CI.xeFULL: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-06-24 18:15 [PATCH i-g-t 0/2] Early Transport Support Jeevan B
2024-06-24 18:15 ` [PATCH i-g-t 1/2] lib/igt_psr: Added library functions for early trasport Jeevan B
2024-06-25  8:44   ` Hogander, Jouni
2024-06-25 10:55   ` Saarinen, Jani
2024-06-24  9:19 [PATCH i-g-t 0/2] Early Transport Support Jeevan B
2024-06-24  9:19 ` [PATCH i-g-t 1/2] lib/igt_psr: Added library functions for early trasport Jeevan B
2024-06-20  4:33 [PATCH i-g-t 0/2] Early Transport Support Jeevan B
2024-06-20  4:33 ` [PATCH i-g-t 1/2] lib/igt_psr: Added library functions for early trasport Jeevan B
2024-06-20 14:05   ` Kamil Konieczny
2024-05-20  9:46 [PATCH i-g-t 0/2] Early Transport Support Jeevan B
2024-05-20  9:46 ` [PATCH i-g-t 1/2] lib/igt_psr: Added library functions for early trasport Jeevan B
2024-05-31  6:54   ` Hogander, Jouni

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=20240612110645.1110374-2-jeevan.b@intel.com \
    --to=jeevan.b@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jouni.hogander@intel.com \
    /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