[PATCH i-g-t] test/kms_content_protection: Add HDCP retry after LIC failure

Suraj Kandpal suraj.kandpal at intel.com
Wed Dec 18 09:18:26 UTC 2024


After LIC failure HDCP should be reenabled when retried in the
subsequent commits add function to re enable HDCP when LIC fails
in IGT.

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

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 04dff7a05..5b3e8f00f 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -373,21 +373,22 @@ static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
 	return true;
 }
 
-static void test_cp_lic(igt_output_t *output)
+static void test_cp_lic(igt_output_t *output,
+			enum igt_commit_style commit_style,
+			int content_type)
 {
 	bool ret;
-	uint64_t val;
 
 	/* Wait for 4Secs (min 2 cycles of Link Integrity Check) */
 	ret = wait_for_prop_value(output, CP_DESIRED, LIC_PERIOD_MSEC);
-	val = igt_output_get_prop(output,
-				  IGT_CONNECTOR_CONTENT_PROTECTION);
-	if (val == CP_DESIRED) {
+	if (ret) {
 		igt_debug("Link Integrity Check failed, waiting for reauthentication\n");
-		ret = wait_for_prop_value(output, CP_DESIRED, LIC_PERIOD_MSEC);
+		test_cp_enable_with_retry(output, commit_style, 3,
+					  content_type, false, false);
+	} else {
+		igt_assert_f(!ret, "Content Protection LIC Failed\n");
 	}
 
-	igt_assert_f(!ret, "Content Protection LIC Failed\n");
 }
 
 static bool write_srm_as_fw(const __u8 *srm, int len)
@@ -452,7 +453,7 @@ static void test_content_protection_on_output(igt_output_t *output,
 	}
 
 	if (data.cp_tests & CP_LIC)
-		test_cp_lic(output);
+		test_cp_lic(output, commit_style, content_type);
 
 	if (data.cp_tests & CP_DPMS) {
 		igt_pipe_set_prop_value(display, pipe,
-- 
2.34.1



More information about the igt-dev mailing list