Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] test/kms_content_protection: Account for reauthetication in LIC
@ 2024-11-28  9:14 Suraj Kandpal
  2024-11-28 10:04 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Suraj Kandpal @ 2024-11-28  9:14 UTC (permalink / raw)
  To: igt-dev; +Cc: Suraj Kandpal

During LIC the link may fail due to a variety of reasons but this
does not reflect a problem with HDCP. It becomes a problem only when
we are not able to recover from the Link Integrity Failure.
Add a check to see if CP property is CP_DESIRED and if so give it time
to reauthenticate and fail only if this reauthentication does not
happen.

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

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 59dca54df..aa88c6bc1 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -376,9 +376,15 @@ static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
 static void test_cp_lic(igt_output_t *output)
 {
 	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)
+		ret = wait_for_prop_value(output, CP_DESIRED, LIC_PERIOD_MSEC);
+
 	igt_assert_f(!ret, "Content Protection LIC Failed\n");
 }
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH i-g-t] test/kms_content_protection: Account for reauthetication in LIC
@ 2024-12-03  6:15 Suraj Kandpal
  2024-12-04  5:11 ` Reddy Guddati, Santhosh
  0 siblings, 1 reply; 7+ messages in thread
From: Suraj Kandpal @ 2024-12-03  6:15 UTC (permalink / raw)
  To: igt-dev; +Cc: santhosh.reddy.guddati, Suraj Kandpal

During LIC the link may fail due to a variety of reasons but this
does not reflect a problem with HDCP. It becomes a problem only when
we are not able to recover from the Link Integrity Failure.
Add a check to see if CP property is CP_DESIRED and if so give it time
to reauthenticate and fail only if this reauthentication does not
happen.

--v2
-Add debug statement [Santhosh]
-Add closes tag [Santhosh]

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3508
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 tests/kms_content_protection.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 59dca54df..04dff7a05 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -376,9 +376,17 @@ static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
 static void test_cp_lic(igt_output_t *output)
 {
 	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) {
+		igt_debug("Link Integrity Check failed, waiting for reauthentication\n");
+		ret = wait_for_prop_value(output, CP_DESIRED, LIC_PERIOD_MSEC);
+	}
+
 	igt_assert_f(!ret, "Content Protection LIC Failed\n");
 }
 
-- 
2.34.1


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

end of thread, other threads:[~2024-12-04  5:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-28  9:14 [PATCH i-g-t] test/kms_content_protection: Account for reauthetication in LIC Suraj Kandpal
2024-11-28 10:04 ` ✓ Xe.CI.BAT: success for " Patchwork
2024-11-28 10:19 ` ✗ i915.CI.BAT: failure " Patchwork
2024-11-28 11:06 ` ✗ Xe.CI.Full: " Patchwork
2024-12-03  4:41 ` [PATCH i-g-t] " Reddy Guddati, Santhosh
  -- strict thread matches above, loose matches on Subject: below --
2024-12-03  6:15 Suraj Kandpal
2024-12-04  5:11 ` Reddy Guddati, Santhosh

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