[igt-dev] [PATCH i-g-t] tests/kms_content_protection: disable hdcp if uevent test fails

Ramalingam C ramalingam.c at intel.com
Tue Aug 13 03:59:06 UTC 2019


Though uevent test failed we can't assert there itself. we need to
disable the hdcp before exit.

Hence uevent failure is treated as hdcp enable failure and passed
to the caller to set the UNDESIRED to the property before exit..

Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111390
---
 tests/kms_content_protection.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index e676b60bf719..46473d8893a8 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -251,9 +251,12 @@ wait_for_prop_value(igt_output_t *output, uint64_t expected,
 	int i;
 
 	if (data.cp_tests & CP_UEVENT && expected != CP_UNDESIRED) {
-		igt_assert_f(wait_for_hdcp_event(output->id,
+		if (!wait_for_hdcp_event(output->id,
 			     output->props[IGT_CONNECTOR_CONTENT_PROTECTION],
-			     timeout_mSec), "uevent is not received");
+			     timeout_mSec)) {
+			igt_info("uevent is not received\n");
+			return false;
+		}
 
 		val = igt_output_get_prop(output,
 					  IGT_CONNECTOR_CONTENT_PROTECTION);
-- 
2.20.1



More information about the igt-dev mailing list