Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Naladala, Ramanaidu" <Ramanaidu.naladala@intel.com>
To: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] lib/igt_psr: Check sink status only when wanted
Date: Wed, 30 Oct 2024 19:54:33 +0530	[thread overview]
Message-ID: <cc55b868-9a05-48df-a9a5-6bb2639e8286@intel.com> (raw)
In-Reply-To: <20241030065827.2392745-1-jouni.hogander@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2095 bytes --]

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>
> ---
>   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>

[-- Attachment #2: Type: text/html, Size: 3532 bytes --]

  parent reply	other threads:[~2024-10-30 14:24 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 ` Naladala, Ramanaidu [this message]
2024-10-31  9:23   ` [PATCH i-g-t] " Hogander, Jouni
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=cc55b868-9a05-48df-a9a5-6bb2639e8286@intel.com \
    --to=ramanaidu.naladala@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