Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms_vrr: Pull Panel Replay check before setting up output
@ 2025-07-14 10:28 Jeevan B
  2025-07-14 11:37 ` Naladala, Ramanaidu
  0 siblings, 1 reply; 6+ messages in thread
From: Jeevan B @ 2025-07-14 10:28 UTC (permalink / raw)
  To: igt-dev; +Cc: karthik.b.s, ramanaidu.naladala, Jeevan B

Adding the Panel Replay support check later in the test was causing
an invalid skip, since the test disables PSR/PR in output_constraint().
Move the check earlier to ensure correct capability detection and avoid
unintended skips.

Fixes: 7da0c57182cc ("tests/kms_vrr: Skip LOBF test if PR is not supported on sink")
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 tests/kms_vrr.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 9c2c4ac92..85a90bb25 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -960,6 +960,14 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
 		return false;
 	}
 
+	if (flags & TEST_LINK_OFF) {
+		if (!psr_sink_support(data->drm_fd,
+				      data->debugfs_fd, PR_MODE, NULL)) {
+			igt_info("LOBF not supported\n");
+			return false;
+		}
+	}
+
 	if (flags & TEST_LINK_OFF) {
 		if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) ||
 		    psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))
@@ -1051,11 +1059,6 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
 				continue;
 			}
 
-			if (flags == TEST_LINK_OFF)
-				igt_require_f(psr_sink_support(data->drm_fd,
-					      data->debugfs_fd, PR_MODE, output),
-					      "LOBF not supported");
-
 			igt_dynamic_f("pipe-%s-%s",
 				      kmstest_pipe_name(pipe), output->name)
 				test(data, pipe, output, flags);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH i-g-t] tests/kms_vrr: Pull Panel Replay check before setting up output
  2025-07-14 10:28 Jeevan B
@ 2025-07-14 11:37 ` Naladala, Ramanaidu
  2025-07-14 14:11   ` B, Jeevan
  0 siblings, 1 reply; 6+ messages in thread
From: Naladala, Ramanaidu @ 2025-07-14 11:37 UTC (permalink / raw)
  To: Jeevan B, igt-dev; +Cc: karthik.b.s

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

Hi Jeevan,

On 7/14/2025 3:58 PM, Jeevan B wrote:
> Adding the Panel Replay support check later in the test was causing
> an invalid skip, since the test disables PSR/PR in output_constraint().
> Move the check earlier to ensure correct capability detection and avoid
> unintended skips.
>
> Fixes: 7da0c57182cc ("tests/kms_vrr: Skip LOBF test if PR is not supported on sink")
> Signed-off-by: Jeevan B<jeevan.b@intel.com>
> ---
>   tests/kms_vrr.c | 13 ++++++++-----
>   1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
> index 9c2c4ac92..85a90bb25 100644
> --- a/tests/kms_vrr.c
> +++ b/tests/kms_vrr.c
> @@ -960,6 +960,14 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
>   		return false;
>   	}
>   
> +	if (flags & TEST_LINK_OFF) {
> +		if (!psr_sink_support(data->drm_fd,
> +				      data->debugfs_fd, PR_MODE, NULL)) {
> +			igt_info("LOBF not supported\n");
> +			return false;
> +		}
> +	}
> +

Consolidate TEST_LINK_OFF condition to avoid duplicated checks.

imho, This should be as below:
if (flags & TEST_LINK_OFF) {

igt_require_f(psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, 
NULL), "LOBF not supported");

if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) 
|| psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))

}

>   	if (flags & TEST_LINK_OFF) {
>   		if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) ||
>   		    psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))
> @@ -1051,11 +1059,6 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
>   				continue;
>   			}
>   
> -			if (flags == TEST_LINK_OFF)
> -				igt_require_f(psr_sink_support(data->drm_fd,
> -					      data->debugfs_fd, PR_MODE, output),
> -					      "LOBF not supported");
> -
>   			igt_dynamic_f("pipe-%s-%s",
>   				      kmstest_pipe_name(pipe), output->name)
>   				test(data, pipe, output, flags);

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH i-g-t] tests/kms_vrr: Pull Panel Replay check before setting up output
  2025-07-14 11:37 ` Naladala, Ramanaidu
@ 2025-07-14 14:11   ` B, Jeevan
  0 siblings, 0 replies; 6+ messages in thread
From: B, Jeevan @ 2025-07-14 14:11 UTC (permalink / raw)
  To: Naladala, Ramanaidu, igt-dev@lists.freedesktop.org; +Cc: B S, Karthik

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

Thanks for the review. I will change it and float the next revision.

From: Naladala, Ramanaidu <ramanaidu.naladala@intel.com>
Sent: Monday, July 14, 2025 5:07 PM
To: B, Jeevan <jeevan.b@intel.com>; igt-dev@lists.freedesktop.org
Cc: B S, Karthik <karthik.b.s@intel.com>
Subject: Re: [PATCH i-g-t] tests/kms_vrr: Pull Panel Replay check before setting up output


Hi Jeevan,
On 7/14/2025 3:58 PM, Jeevan B wrote:

Adding the Panel Replay support check later in the test was causing

an invalid skip, since the test disables PSR/PR in output_constraint().

Move the check earlier to ensure correct capability detection and avoid

unintended skips.



Fixes: 7da0c57182cc ("tests/kms_vrr: Skip LOBF test if PR is not supported on sink")

Signed-off-by: Jeevan B <jeevan.b@intel.com><mailto:jeevan.b@intel.com>

---

 tests/kms_vrr.c | 13 ++++++++-----

 1 file changed, 8 insertions(+), 5 deletions(-)



diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c

index 9c2c4ac92..85a90bb25 100644

--- a/tests/kms_vrr.c

+++ b/tests/kms_vrr.c

@@ -960,6 +960,14 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags

                return false;

         }



+        if (flags & TEST_LINK_OFF) {

+               if (!psr_sink_support(data->drm_fd,

+                                    data->debugfs_fd, PR_MODE, NULL)) {

+                       igt_info("LOBF not supported\n");

+                       return false;

+               }

+        }

+

Consolidate TEST_LINK_OFF condition to avoid duplicated checks.

imho, This should be as below:
if (flags & TEST_LINK_OFF) {

       igt_require_f(psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL), "LOBF not supported");

if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) || psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))

}



         if (flags & TEST_LINK_OFF) {

                if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) ||

                    psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))

@@ -1051,11 +1059,6 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)

                               continue;

                        }



-                       if (flags == TEST_LINK_OFF)

-                        igt_require_f(psr_sink_support(data->drm_fd,

-                                            data->debugfs_fd, PR_MODE, output),

-                                            "LOBF not supported");

-

                        igt_dynamic_f("pipe-%s-%s",

                                     kmstest_pipe_name(pipe), output->name)

                               test(data, pipe, output, flags);

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH i-g-t] tests/kms_vrr: Pull Panel Replay check before setting up output
@ 2025-07-14 14:52 Jeevan B
  0 siblings, 0 replies; 6+ messages in thread
From: Jeevan B @ 2025-07-14 14:52 UTC (permalink / raw)
  To: igt-dev; +Cc: ramanaidu.naladala, Jeevan B

Adding the Panel Replay support check later in the test was causing
an invalid skip, since the test disables PSR/PR in output_constraint().
Move the check earlier to ensure correct capability detection and avoid
unintended skips.

v2: Refactor TEST_LINK_OFF logic to avoid duplicate conditions.

Fixes: 7da0c57182cc ("tests/kms_vrr: Skip LOBF test if PR is not supported on sink")
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 tests/kms_vrr.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 9c2c4ac92..fc290203c 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -961,9 +961,17 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
 	}
 
 	if (flags & TEST_LINK_OFF) {
-		if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) ||
-		    psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))
-			psr_disable(data->drm_fd, data->debugfs_fd, NULL);
+		if (!psr_sink_support(data->drm_fd,
+				      data->debugfs_fd, PR_MODE, NULL)) {
+			igt_info("LOBF not supported\n");
+			return false;
+		}
+
+		if (flags & TEST_LINK_OFF) {
+			if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) ||
+			    psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))
+				psr_disable(data->drm_fd, data->debugfs_fd, NULL);
+		}
 	}
 
 	/* Reset output */
@@ -1051,11 +1059,6 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
 				continue;
 			}
 
-			if (flags == TEST_LINK_OFF)
-				igt_require_f(psr_sink_support(data->drm_fd,
-					      data->debugfs_fd, PR_MODE, output),
-					      "LOBF not supported");
-
 			igt_dynamic_f("pipe-%s-%s",
 				      kmstest_pipe_name(pipe), output->name)
 				test(data, pipe, output, flags);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH i-g-t] tests/kms_vrr: Pull Panel Replay check before setting up output
@ 2025-07-14 14:55 Jeevan B
  2025-07-14 15:31 ` Naladala, Ramanaidu
  0 siblings, 1 reply; 6+ messages in thread
From: Jeevan B @ 2025-07-14 14:55 UTC (permalink / raw)
  To: igt-dev; +Cc: ramanaidu.naladala, Jeevan B

Adding the Panel Replay support check later in the test was causing
an invalid skip, since the test disables PSR/PR in output_constraint().
Move the check earlier to ensure correct capability detection and avoid
unintended skips.

v2: Refactor TEST_LINK_OFF logic to avoid duplicate conditions.

Fixes: 7da0c57182cc ("tests/kms_vrr: Skip LOBF test if PR is not supported on sink")
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 tests/kms_vrr.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 9c2c4ac92..233143770 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -961,6 +961,12 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
 	}
 
 	if (flags & TEST_LINK_OFF) {
+		if (!psr_sink_support(data->drm_fd,
+				      data->debugfs_fd, PR_MODE, NULL)) {
+			igt_info("LOBF not supported\n");
+			return false;
+		}
+
 		if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) ||
 		    psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))
 			psr_disable(data->drm_fd, data->debugfs_fd, NULL);
@@ -1051,11 +1057,6 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
 				continue;
 			}
 
-			if (flags == TEST_LINK_OFF)
-				igt_require_f(psr_sink_support(data->drm_fd,
-					      data->debugfs_fd, PR_MODE, output),
-					      "LOBF not supported");
-
 			igt_dynamic_f("pipe-%s-%s",
 				      kmstest_pipe_name(pipe), output->name)
 				test(data, pipe, output, flags);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH i-g-t] tests/kms_vrr: Pull Panel Replay check before setting up output
  2025-07-14 14:55 Jeevan B
@ 2025-07-14 15:31 ` Naladala, Ramanaidu
  0 siblings, 0 replies; 6+ messages in thread
From: Naladala, Ramanaidu @ 2025-07-14 15:31 UTC (permalink / raw)
  To: Jeevan B, igt-dev

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

Hi Jee

On 7/14/2025 8:25 PM, Jeevan B wrote:
> Adding the Panel Replay support check later in the test was causing
> an invalid skip, since the test disables PSR/PR in output_constraint().
> Move the check earlier to ensure correct capability detection and avoid
> unintended skips.
>
> v2: Refactor TEST_LINK_OFF logic to avoid duplicate conditions.
>
> Fixes: 7da0c57182cc ("tests/kms_vrr: Skip LOBF test if PR is not supported on sink")
> Signed-off-by: Jeevan B<jeevan.b@intel.com>
> ---
>   tests/kms_vrr.c | 11 ++++++-----
>   1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
> index 9c2c4ac92..233143770 100644
> --- a/tests/kms_vrr.c
> +++ b/tests/kms_vrr.c
> @@ -961,6 +961,12 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
>   	}
>   
>   	if (flags & TEST_LINK_OFF) {
> +		if (!psr_sink_support(data->drm_fd,
> +				      data->debugfs_fd, PR_MODE, NULL)) {
> +			igt_info("LOBF not supported\n");
> +			return false;
> +		}
> +

LGTM,

Reviewed-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com>

>   		if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) ||
>   		    psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))
>   			psr_disable(data->drm_fd, data->debugfs_fd, NULL);
> @@ -1051,11 +1057,6 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
>   				continue;
>   			}
>   
> -			if (flags == TEST_LINK_OFF)
> -				igt_require_f(psr_sink_support(data->drm_fd,
> -					      data->debugfs_fd, PR_MODE, output),
> -					      "LOBF not supported");
> -
>   			igt_dynamic_f("pipe-%s-%s",
>   				      kmstest_pipe_name(pipe), output->name)
>   				test(data, pipe, output, flags);

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-07-14 15:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-14 14:52 [PATCH i-g-t] tests/kms_vrr: Pull Panel Replay check before setting up output Jeevan B
  -- strict thread matches above, loose matches on Subject: below --
2025-07-14 14:55 Jeevan B
2025-07-14 15:31 ` Naladala, Ramanaidu
2025-07-14 10:28 Jeevan B
2025-07-14 11:37 ` Naladala, Ramanaidu
2025-07-14 14:11   ` B, Jeevan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox