[PATCH i-g-t 3/3] test/kms_content_protection: Move color change code.

Thasleem, Mohammed mohammed.thasleem at intel.com
Thu Sep 12 11:18:33 UTC 2024



-----Original Message-----
From: Kandpal, Suraj <suraj.kandpal at intel.com> 
Sent: Thursday, September 12, 2024 1:26 PM
To: igt-dev at lists.freedesktop.org
Cc: Thasleem, Mohammed <mohammed.thasleem at intel.com>; B S, Karthik <karthik.b.s at intel.com>; B, Jeevan <jeevan.b at intel.com>; Kandpal, Suraj <suraj.kandpal at intel.com>
Subject: [PATCH i-g-t 3/3] test/kms_content_protection: Move color change code.
-->Remove "." from subject
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.

Signed-off-by: Suraj Kandpal <suraj.kandpal at 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);
	-->this function returns bool but we are storing at int...
 	--> we are not using this ret value further .... please check..
	
-	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



More information about the igt-dev mailing list