Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Suraj Kandpal <suraj.kandpal@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: mohammed.thasleem@intel.com, karthik.b.s@intel.com,
	jeevan.b@intel.com, Suraj Kandpal <suraj.kandpal@intel.com>
Subject: [PATCH i-g-t 3/4] test/kms_content_protection: Move color change code
Date: Thu, 12 Sep 2024 19:04:20 +0530	[thread overview]
Message-ID: <20240912133421.718496-4-suraj.kandpal@intel.com> (raw)
In-Reply-To: <20240912133421.718496-1-suraj.kandpal@intel.com>

Move before screen color change to in the mst_cp_enable_retry
to make sure we display the correct color after every retry and to
make sure one of the monitors does not go to sleep in between
get_property waits.

--v2
-Fix commit subject [Thasleem]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 tests/kms_content_protection.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index c3771fad8..f17d9f2e8 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -667,7 +667,7 @@ test_mst_cp_enable_with_retry(igt_output_t *hdcp_mst_output[], int valid_outputs
 			      int retries, int content_type)
 {
 	igt_display_t *display = &data.display;
-	int retry_orig = retries, count;
+	int retry_orig = retries, count, i;
 	bool ret;
 
 	do {
@@ -693,8 +693,14 @@ test_mst_cp_enable_with_retry(igt_output_t *hdcp_mst_output[], int valid_outputs
 						  KERNEL_AUTH_TIME_ADDITIONAL_MSEC);
 
 		retries -= 1;
+
 		if (!ret || retries)
 			igt_debug("Retry %d/3\n", 3 - retries);
+
+		for (i = 0; i < valid_outputs; i++)
+			prepare_modeset_on_mst_output(hdcp_mst_output[i], ret);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
 	} while (retries && !ret);
 
 	igt_assert_f(ret, "Content Protection not enabled on MST outputs\n");
@@ -760,13 +766,6 @@ test_content_protection_mst(int content_type)
 
 	ret = test_mst_cp_enable_with_retry(hdcp_mst_output, valid_outputs, 2, content_type);
 
-	if (ret) {
-		for (i = 0; i < valid_outputs; i++)
-			prepare_modeset_on_mst_output(hdcp_mst_output[i], true);
-
-		igt_display_commit2(display, COMMIT_ATOMIC);
-	}
-
 	if (data.cp_tests & CP_LIC)
 		test_cp_lic_on_mst(hdcp_mst_output, valid_outputs, 0);
 
-- 
2.43.2


  parent reply	other threads:[~2024-09-12 13:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12 13:34 [PATCH i-g-t 0/4] HDCP MST LIC fixes Suraj Kandpal
2024-09-12 13:34 ` [PATCH i-g-t 1/4] test/kms_content_protection: Fix variable declaration Suraj Kandpal
2024-09-12 13:34 ` [PATCH i-g-t 2/4] tests/kms_content_protection: Print correct output Suraj Kandpal
2024-09-12 13:34 ` Suraj Kandpal [this message]
2024-09-12 13:59   ` [PATCH i-g-t 3/4] test/kms_content_protection: Move color change code Thasleem, Mohammed
2024-09-12 13:34 ` [PATCH i-g-t 4/4] tests/kms_content_protection: Make mst_cp_enable_with_retry() void Suraj Kandpal
2024-09-12 13:43   ` B, Jeevan
2024-09-12 14:04   ` Thasleem, Mohammed
2024-09-12 14:12 ` ✓ CI.xeBAT: success for HDCP MST LIC fixes (rev3) Patchwork
2024-09-12 14:14 ` ✓ Fi.CI.BAT: " Patchwork
2024-09-12 22:59 ` ✗ CI.xeFULL: failure " Patchwork
2024-09-13  2:39 ` ✗ Fi.CI.IGT: " Patchwork
2024-09-17  4:04   ` Kandpal, Suraj
2024-09-13 17:59 ` ✓ Fi.CI.IGT: success " 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=20240912133421.718496-4-suraj.kandpal@intel.com \
    --to=suraj.kandpal@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jeevan.b@intel.com \
    --cc=karthik.b.s@intel.com \
    --cc=mohammed.thasleem@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