From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"Naladala, Ramanaidu" <ramanaidu.naladala@intel.com>
Subject: Re: [PATCH i-g-t] lib/igt_psr: Check sink status only when wanted
Date: Thu, 31 Oct 2024 09:23:43 +0000 [thread overview]
Message-ID: <33c0eed9de0896a133ddf9f71ec96543e8c64329.camel@intel.com> (raw)
In-Reply-To: <cc55b868-9a05-48df-a9a5-6bb2639e8286@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2566 bytes --]
On Wed, 2024-10-30 at 19:54 +0530, Naladala, Ramanaidu wrote:
Hi Jouni,
On 10/30/2024 12:28 PM, Jouni Högander wrote:
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 <jouni.hogander@intel.com><mailto:jouni.hogander@intel.com>
---
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));
LGTM,
Reviewed-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com><mailto:ramanaidu.naladala@intel.com>
Thank you Ramanaidu for checking my patch. This is now pushed to master.
BR,
Jouni Högander
[-- Attachment #2: Type: text/html, Size: 4159 bytes --]
next prev parent reply other threads:[~2024-10-31 9:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 6:58 [PATCH i-g-t] lib/igt_psr: Check sink status only when wanted Jouni Högander
2024-10-30 7:45 ` ✓ CI.xeBAT: success for " Patchwork
2024-10-30 7:46 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-10-30 9:25 ` ✗ CI.xeFULL: " Patchwork
2024-10-31 8:36 ` Hogander, Jouni
2024-10-30 12:16 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-30 14:24 ` [PATCH i-g-t] " Naladala, Ramanaidu
2024-10-31 9:23 ` Hogander, Jouni [this message]
2024-10-31 0:23 ` ✓ Fi.CI.IGT: success for " 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=33c0eed9de0896a133ddf9f71ec96543e8c64329.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=ramanaidu.naladala@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