<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi Jouni,<br>
</p>
<div class="moz-cite-prefix">On 10/30/2024 12:28 PM, Jouni Högander
wrote:<br>
</div>
<blockquote type="cite" cite="mid:20241030065827.2392745-1-jouni.hogander@intel.com">
<pre wrap="" class="moz-quote-pre">Checking sink PSR status seems to be causing problems as it is performed
by reading dcpd status registers over AUX channel.
Generally having still possibility to check also sink status is a good idea
-> disable them by default and enabled if environment variable
IGT_PSR_SINK_STATUS_CHECKS is set.
Signed-off-by: Jouni Högander <a class="moz-txt-link-rfc2396E" href="mailto:jouni.hogander@intel.com"><jouni.hogander@intel.com></a>
---
lib/igt_psr.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 0eb002633..83c21e6ba 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -79,13 +79,21 @@ bool early_transport_check(int debugfs_fd)
return strstr(buf, "enabled (Early Transport)");
}
+static bool sink_status_checks(void)
+{
+ const char *env;
+
+ env = getenv("IGT_PSR_SINK_STATUS_CHECKS");
+
+ return env && atoi(env);
+}
+
static bool psr_active_check(int debugfs_fd, enum psr_mode mode, igt_output_t *output)
{
char debugfs_file[128] = {0};
char buf[PSR_STATUS_MAX_LEN];
drmModeConnector *c;
const char *state;
- const char *env;
bool active;
int ret;
@@ -116,8 +124,7 @@ static bool psr_active_check(int debugfs_fd, enum psr_mode mode, igt_output_t *o
active = strstr(buf, state);
- env = getenv("IGT_PANEL_REPLAY_IGNORE_SINK_STATUS");
- if (active && output && (!env || !atoi(env))) {
+ if (active && output && sink_status_checks()) {
active = psr_active_sink_check(debugfs_fd, output);
igt_assert_f(active, "PSR sink/source state mismatch\n");
}
@@ -351,6 +358,9 @@ void psr_sink_error_check(int debugfs_fd, enum psr_mode mode, igt_output_t *outp
char buf[PSR_STATUS_MAX_LEN];
int ret;
+ if (!sink_status_checks())
+ return;
+
sprintf(debugfs_file, "%s/i915_psr_sink_status", output->name);
ret = igt_debugfs_simple_read(debugfs_fd, debugfs_file, buf,
sizeof(buf));</pre>
</blockquote>
<pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; display: block; padding: 9.5px; margin: 0px 0px 10px; line-height: 14.3px; color: rgb(51, 51, 51); word-break: break-all; overflow-wrap: break-word; background-color: white; border: 0px; border-radius: 0px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">LGTM,
<span class="reviewed-by" style="box-sizing: border-box;">Reviewed-by: Naladala Ramanaidu <a class="moz-txt-link-rfc2396E" href="mailto:ramanaidu.naladala@intel.com"><ramanaidu.naladala@intel.com></a></span></pre>
<blockquote type="cite" cite="mid:20241030065827.2392745-1-jouni.hogander@intel.com">
<pre wrap="" class="moz-quote-pre">
</pre>
</blockquote>
</body>
</html>