All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests
@ 2019-05-02 13:16 Ramalingam C
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by flags Ramalingam C
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Ramalingam C @ 2019-05-02 13:16 UTC (permalink / raw)
  To: igt-dev, daniel.vetter, arkadiusz.hiler

This series adds tests for:
	1. content_type which is added for HDCP2.2.
	     Adds a new test for Type1.
	     Adds another test for Type1 -> Type0.
	2. teardown and rebuild of i915-mei interface.
	     Removes the mei_hdcp and reloads it and test for HDCP2.2.
	3. Test for SRM write and kernel validation
	4. Link Integrity check is converted as a separate subtest
	5. Subtest is added to test the uevent for HDCP state change.

Ramalingam C (8):
  kms_content_protection: Tests are defined by flags
  kms_content_protection: Link Integrity Check subtest
  kms_content_protection: Content type support
  kms_content_protection: test teardown and rebuild of I915-mei I/F
  kms_content_protection: test content type change
  kms_content_protection: uevent for HDCP status change
  kms_content_protection: SRM Testing
  DO NOT MERGE: CP in fast feedback list

 lib/igt_kms.c                         |   1 +
 lib/igt_kms.h                         |   1 +
 tests/intel-ci/fast-feedback.testlist |   3 +
 tests/kms_content_protection.c        | 357 ++++++++++++++++++++++++--
 4 files changed, 339 insertions(+), 23 deletions(-)

-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by flags
  2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
@ 2019-05-02 13:16 ` Ramalingam C
  2019-05-06  6:01   ` Shankar, Uma
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 2/8] kms_content_protection: Link Integrity Check subtest Ramalingam C
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Ramalingam C @ 2019-05-02 13:16 UTC (permalink / raw)
  To: igt-dev, daniel.vetter, arkadiusz.hiler

Considering increase of subtests for kms_content_protection, tests are
defined through flags.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/kms_content_protection.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index ae6ab497ea21..051a3dfec5ba 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -34,8 +34,11 @@ struct data {
 	int drm_fd;
 	igt_display_t display;
 	struct igt_fb red, green;
+	unsigned int cp_tests;
 } data;
 
+#define CP_DPMS					(1 << 0)
+
 #define CP_UNDESIRED				0
 #define CP_DESIRED				1
 #define CP_ENABLED				2
@@ -240,8 +243,7 @@ static void test_cp_lic(igt_output_t *output)
 }
 
 static void test_content_protection_on_output(igt_output_t *output,
-					      enum igt_commit_style s,
-					      bool dpms_test)
+					      enum igt_commit_style s)
 {
 	igt_display_t *display = &data.display;
 	igt_plane_t *primary;
@@ -265,7 +267,7 @@ static void test_content_protection_on_output(igt_output_t *output,
 		test_cp_enable_with_retry(output, s, 3);
 		test_cp_lic(output);
 
-		if (dpms_test) {
+		if (data.cp_tests & CP_DPMS) {
 			igt_pipe_set_prop_value(display, pipe,
 						IGT_CRTC_ACTIVE, 0);
 			igt_display_commit2(display, s);
@@ -324,7 +326,7 @@ static bool sink_hdcp_capable(igt_output_t *output)
 
 
 static void
-test_content_protection(enum igt_commit_style s, bool dpms_test)
+test_content_protection(enum igt_commit_style s)
 {
 	igt_display_t *display = &data.display;
 	igt_output_t *output;
@@ -341,7 +343,7 @@ test_content_protection(enum igt_commit_style s, bool dpms_test)
 			continue;
 		}
 
-		test_content_protection_on_output(output, s, dpms_test);
+		test_content_protection_on_output(output, s);
 		valid_tests++;
 	}
 
@@ -359,16 +361,17 @@ igt_main
 	}
 
 	igt_subtest("legacy")
-		test_content_protection(COMMIT_LEGACY, false);
+		test_content_protection(COMMIT_LEGACY);
 
 	igt_subtest("atomic") {
 		igt_require(data.display.is_atomic);
-		test_content_protection(COMMIT_ATOMIC, false);
+		test_content_protection(COMMIT_ATOMIC);
 	}
 
 	igt_subtest("atomic-dpms") {
 		igt_require(data.display.is_atomic);
-		test_content_protection(COMMIT_ATOMIC, true);
+		data.cp_tests = CP_DPMS;
+		test_content_protection(COMMIT_ATOMIC);
 	}
 
 	igt_fixture
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v6 2/8] kms_content_protection: Link Integrity Check subtest
  2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by flags Ramalingam C
@ 2019-05-02 13:16 ` Ramalingam C
  2019-05-06  6:07   ` Shankar, Uma
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 3/8] kms_content_protection: Content type support Ramalingam C
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Ramalingam C @ 2019-05-02 13:16 UTC (permalink / raw)
  To: igt-dev, daniel.vetter, arkadiusz.hiler

Existing Link integrity check test is moved into dedicated subtest.
This helps to reduced the execution time of other tests by removing the
repeated Link integrity check on every other tests.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/kms_content_protection.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 051a3dfec5ba..e3bb39f42ada 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -38,6 +38,7 @@ struct data {
 } data;
 
 #define CP_DPMS					(1 << 0)
+#define CP_LIC					(1 << 1)
 
 #define CP_UNDESIRED				0
 #define CP_DESIRED				1
@@ -265,7 +266,9 @@ static void test_content_protection_on_output(igt_output_t *output,
 
 		modeset_with_fb(pipe, output, s);
 		test_cp_enable_with_retry(output, s, 3);
-		test_cp_lic(output);
+
+		if (data.cp_tests & CP_LIC)
+			test_cp_lic(output);
 
 		if (data.cp_tests & CP_DPMS) {
 			igt_pipe_set_prop_value(display, pipe,
@@ -374,6 +377,12 @@ igt_main
 		test_content_protection(COMMIT_ATOMIC);
 	}
 
+	igt_subtest("LIC") {
+		igt_require(data.display.is_atomic);
+		data.cp_tests = CP_LIC;
+		test_content_protection(COMMIT_ATOMIC);
+	}
+
 	igt_fixture
 		igt_display_fini(&data.display);
 }
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v6 3/8] kms_content_protection: Content type support
  2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by flags Ramalingam C
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 2/8] kms_content_protection: Link Integrity Check subtest Ramalingam C
@ 2019-05-02 13:16 ` Ramalingam C
  2019-05-06 11:00   ` Shankar, Uma
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 4/8] kms_content_protection: test teardown and rebuild of I915-mei I/F Ramalingam C
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Ramalingam C @ 2019-05-02 13:16 UTC (permalink / raw)
  To: igt-dev, daniel.vetter, arkadiusz.hiler

Adds a connector property called "CP_Content_Type"

Content Type takes two values which classifies the content stream:
	Type 0: Stream that can be tranmitted on HDCP1.4/HDCP2.2
	Type 1: Stream that needs HDCP2.2 encryption only.

So when Type 1 is set KMD is forced to enable HDCP2.2 only.

For Type 0 request, Kernel chooses the highest capable HDCP version
(v2.2) first. If that fails, then it fall back to the next availble
version(v1.4) before abondoning HDCP autehntication attempts.

Please note content_type is allowed to be updated when "Content
Protection" is in UNDESIRED state.

v2:
  s/cp_content_type/content_ptotection_type [danvet]
v3:
  s/content_protection_type/HDCP Content Type [Pekka]
v4:
  Rebased

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 lib/igt_kms.c                  |  1 +
 lib/igt_kms.h                  |  1 +
 tests/kms_content_protection.c | 74 +++++++++++++++++++++++++++-------
 3 files changed, 62 insertions(+), 14 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index df9aafd24bf8..18f0556687de 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -222,6 +222,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
 	[IGT_CONNECTOR_BROADCAST_RGB] = "Broadcast RGB",
 	[IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
 	[IGT_CONNECTOR_VRR_CAPABLE] = "vrr_capable",
+	[IGT_CONNECTOR_HDCP_CONTENT_TYPE] = "HDCP Content Type",
 };
 
 /*
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 38bdc08f3d50..b1430a517305 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -123,6 +123,7 @@ enum igt_atomic_connector_properties {
        IGT_CONNECTOR_BROADCAST_RGB,
        IGT_CONNECTOR_CONTENT_PROTECTION,
        IGT_CONNECTOR_VRR_CAPABLE,
+       IGT_CONNECTOR_HDCP_CONTENT_TYPE,
        IGT_NUM_CONNECTOR_PROPS
 };
 
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index e3bb39f42ada..488c508b0bb0 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -44,6 +44,13 @@ struct data {
 #define CP_DESIRED				1
 #define CP_ENABLED				2
 
+/*
+ * HDCP_CONTENT_TYPE_0 can be handled on both HDCP1.4 and HDCP2.2. Where as
+ * HDCP_CONTENT_TYPE_1 can be handled only through HDCP2.2.
+ */
+#define HDCP_CONTENT_TYPE_0				0
+#define HDCP_CONTENT_TYPE_1				1
+
 #define LIC_PERIOD_MSEC				(4 * 1000)
 /* Kernel retry count=3, Max time per authentication allowed = 6Sec */
 #define KERNEL_AUTH_TIME_ALLOWED_MSEC		(3 *  6 * 1000)
@@ -159,7 +166,8 @@ static void modeset_with_fb(const enum pipe pipe, igt_output_t *output,
 	commit_display_and_wait_for_flip(s);
 }
 
-static bool test_cp_enable(igt_output_t *output, enum igt_commit_style s)
+static bool test_cp_enable(igt_output_t *output, enum igt_commit_style s,
+			   int content_type)
 {
 	igt_display_t *display = &data.display;
 	igt_plane_t *primary;
@@ -169,6 +177,10 @@ static bool test_cp_enable(igt_output_t *output, enum igt_commit_style s)
 
 	igt_output_set_prop_value(output,
 				  IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
+	if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
+		igt_output_set_prop_value(output,
+					  IGT_CONNECTOR_HDCP_CONTENT_TYPE,
+					  content_type);
 	igt_display_commit2(display, s);
 
 	ret = wait_for_prop_value(output, CP_ENABLED,
@@ -205,13 +217,14 @@ static void test_cp_disable(igt_output_t *output, enum igt_commit_style s)
 }
 
 static void test_cp_enable_with_retry(igt_output_t *output,
-				      enum igt_commit_style s, int retry)
+				      enum igt_commit_style s, int retry,
+				      int content_type)
 {
 	bool ret;
 
 	do {
 		test_cp_disable(output, s);
-		ret = test_cp_enable(output, s);
+		ret = test_cp_enable(output, s, content_type);
 
 		if (!ret && --retry)
 			igt_debug("Retry (%d/2) ...\n", 3 - retry);
@@ -244,7 +257,8 @@ static void test_cp_lic(igt_output_t *output)
 }
 
 static void test_content_protection_on_output(igt_output_t *output,
-					      enum igt_commit_style s)
+					      enum igt_commit_style s,
+					      int content_type)
 {
 	igt_display_t *display = &data.display;
 	igt_plane_t *primary;
@@ -265,7 +279,7 @@ static void test_content_protection_on_output(igt_output_t *output,
 			continue;
 
 		modeset_with_fb(pipe, output, s);
-		test_cp_enable_with_retry(output, s, 3);
+		test_cp_enable_with_retry(output, s, 3, content_type);
 
 		if (data.cp_tests & CP_LIC)
 			test_cp_lic(output);
@@ -282,7 +296,8 @@ static void test_content_protection_on_output(igt_output_t *output,
 			ret = wait_for_prop_value(output, CP_ENABLED,
 						  KERNEL_AUTH_TIME_ALLOWED_MSEC);
 			if (!ret)
-				test_cp_enable_with_retry(output, s, 2);
+				test_cp_enable_with_retry(output, s,
+							  2, content_type);
 		}
 
 		test_cp_disable(output, s);
@@ -309,7 +324,8 @@ static void __debugfs_read(int fd, const char *param, char *buf, int len)
 
 #define debugfs_read(fd, p, arr) __debugfs_read(fd, p, arr, sizeof(arr))
 
-#define MAX_SINK_HDCP_CAP_BUF_LEN	500
+#define MAX_SINK_HDCP_CAP_BUF_LEN	5000
+
 static bool sink_hdcp_capable(igt_output_t *output)
 {
 	char buf[MAX_SINK_HDCP_CAP_BUF_LEN];
@@ -327,9 +343,25 @@ static bool sink_hdcp_capable(igt_output_t *output)
 	return strstr(buf, "HDCP1.4");
 }
 
+static bool sink_hdcp2_capable(igt_output_t *output)
+{
+	char buf[MAX_SINK_HDCP_CAP_BUF_LEN];
+	int fd;
+
+	fd = igt_debugfs_connector_dir(data.drm_fd, output->name, O_RDONLY);
+	if (fd < 0)
+		return false;
+
+	debugfs_read(fd, "i915_hdcp_sink_capability", buf);
+	close(fd);
+
+	igt_debug("Sink capability: %s\n", buf);
+
+	return strstr(buf, "HDCP2.2");
+}
 
 static void
-test_content_protection(enum igt_commit_style s)
+test_content_protection(enum igt_commit_style s, int content_type)
 {
 	igt_display_t *display = &data.display;
 	igt_output_t *output;
@@ -339,14 +371,23 @@ test_content_protection(enum igt_commit_style s)
 		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
 			continue;
 
+		if (!output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE] &&
+		    content_type)
+			continue;
+
 		igt_info("CP Test execution on %s\n", output->name);
-		if (!sink_hdcp_capable(output)) {
+
+		if (content_type && !sink_hdcp2_capable(output)) {
+			igt_info("\tSkip %s (Sink has no HDCP2.2 support)\n",
+				 output->name);
+			continue;
+		} else if (!sink_hdcp_capable(output)) {
 			igt_info("\tSkip %s (Sink has no HDCP support)\n",
 				 output->name);
 			continue;
 		}
 
-		test_content_protection_on_output(output, s);
+		test_content_protection_on_output(output, s, content_type);
 		valid_tests++;
 	}
 
@@ -364,23 +405,28 @@ igt_main
 	}
 
 	igt_subtest("legacy")
-		test_content_protection(COMMIT_LEGACY);
+		test_content_protection(COMMIT_LEGACY, HDCP_CONTENT_TYPE_0);
 
 	igt_subtest("atomic") {
 		igt_require(data.display.is_atomic);
-		test_content_protection(COMMIT_ATOMIC);
+		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
 	}
 
 	igt_subtest("atomic-dpms") {
 		igt_require(data.display.is_atomic);
 		data.cp_tests = CP_DPMS;
-		test_content_protection(COMMIT_ATOMIC);
+		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
 	}
 
 	igt_subtest("LIC") {
 		igt_require(data.display.is_atomic);
 		data.cp_tests = CP_LIC;
-		test_content_protection(COMMIT_ATOMIC);
+		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
+	}
+
+	igt_subtest("type1") {
+		igt_require(data.display.is_atomic);
+		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_1);
 	}
 
 	igt_fixture
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v6 4/8] kms_content_protection: test teardown and rebuild of I915-mei I/F
  2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
                   ` (2 preceding siblings ...)
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 3/8] kms_content_protection: Content type support Ramalingam C
@ 2019-05-02 13:16 ` Ramalingam C
  2019-05-06 11:09   ` Shankar, Uma
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 5/8] kms_content_protection: test content type change Ramalingam C
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Ramalingam C @ 2019-05-02 13:16 UTC (permalink / raw)
  To: igt-dev, daniel.vetter, arkadiusz.hiler

To validate the teardown and rebuild of the interface between
I915 and mei hdcp this subtest execute the below sequence:
	1. Test HDCP2.2 Type 1 (expected to pass)
	2. Unload the mei_hdcp
	3. Test HDCP2.2 Type 1 (expected to fail)
	2. Reload the mei_hdcp
	1. Test HDCP2.2 Type 1 (expected to pass)

v2:
  Rebased.
v3:
  Rebased.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/kms_content_protection.c | 44 ++++++++++++++++++++++++++++++----
 1 file changed, 39 insertions(+), 5 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 488c508b0bb0..6e9848cbd332 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -27,6 +27,7 @@
 #include "igt.h"
 #include "igt_sysfs.h"
 #include "igt_kms.h"
+#include "igt_kmod.h"
 
 IGT_TEST_DESCRIPTION("Test content protection (HDCP)");
 
@@ -37,8 +38,10 @@ struct data {
 	unsigned int cp_tests;
 } data;
 
+/* Test flags */
 #define CP_DPMS					(1 << 0)
 #define CP_LIC					(1 << 1)
+#define CP_MEI_RELOAD				(1 << 2)
 
 #define CP_UNDESIRED				0
 #define CP_DESIRED				1
@@ -218,7 +221,7 @@ static void test_cp_disable(igt_output_t *output, enum igt_commit_style s)
 
 static void test_cp_enable_with_retry(igt_output_t *output,
 				      enum igt_commit_style s, int retry,
-				      int content_type)
+				      int content_type, bool expect_failure)
 {
 	bool ret;
 
@@ -233,7 +236,12 @@ static void test_cp_enable_with_retry(igt_output_t *output,
 	if (!ret)
 		test_cp_disable(output, s);
 
-	igt_assert_f(ret, "Content Protection not enabled\n");
+	if (expect_failure)
+		igt_assert_f(!ret,
+			     "CP Enabled. Though it is expected to fail\n");
+	else
+		igt_assert_f(ret, "Content Protection not enabled\n");
+
 }
 
 static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
@@ -279,7 +287,23 @@ static void test_content_protection_on_output(igt_output_t *output,
 			continue;
 
 		modeset_with_fb(pipe, output, s);
-		test_cp_enable_with_retry(output, s, 3, content_type);
+		test_cp_enable_with_retry(output, s, 3, content_type, false);
+
+		if (data.cp_tests & CP_MEI_RELOAD) {
+			igt_assert_f(!igt_kmod_unload("mei_hdcp", 0),
+				     "mei_hdcp unload failed");
+
+			/* Expected to fail */
+			test_cp_enable_with_retry(output, s, 3,
+						  content_type, true);
+
+			igt_assert_f(!igt_kmod_load("mei_hdcp", NULL),
+				     "mei_hdcp load failed");
+
+			/* Expected to pass */
+			test_cp_enable_with_retry(output, s, 3,
+						  content_type, false);
+		}
 
 		if (data.cp_tests & CP_LIC)
 			test_cp_lic(output);
@@ -296,8 +320,8 @@ static void test_content_protection_on_output(igt_output_t *output,
 			ret = wait_for_prop_value(output, CP_ENABLED,
 						  KERNEL_AUTH_TIME_ALLOWED_MSEC);
 			if (!ret)
-				test_cp_enable_with_retry(output, s,
-							  2, content_type);
+				test_cp_enable_with_retry(output, s, 2,
+							  content_type, false);
 		}
 
 		test_cp_disable(output, s);
@@ -367,6 +391,10 @@ test_content_protection(enum igt_commit_style s, int content_type)
 	igt_output_t *output;
 	int valid_tests = 0;
 
+	if (data.cp_tests & CP_MEI_RELOAD)
+		igt_require_f(igt_kmod_is_loaded("mei_hdcp"),
+			      "mei_hdcp module is not loaded\n");
+
 	for_each_connected_output(display, output) {
 		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
 			continue;
@@ -429,6 +457,12 @@ igt_main
 		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_1);
 	}
 
+	igt_subtest("mei_interface") {
+		igt_require(data.display.is_atomic);
+		data.cp_tests = CP_MEI_RELOAD;
+		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_1);
+	}
+
 	igt_fixture
 		igt_display_fini(&data.display);
 }
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v6 5/8] kms_content_protection: test content type change
  2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
                   ` (3 preceding siblings ...)
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 4/8] kms_content_protection: test teardown and rebuild of I915-mei I/F Ramalingam C
@ 2019-05-02 13:16 ` Ramalingam C
  2019-05-06 11:25   ` Shankar, Uma
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 6/8] kms_content_protection: uevent for HDCP status change Ramalingam C
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Ramalingam C @ 2019-05-02 13:16 UTC (permalink / raw)
  To: igt-dev, daniel.vetter, arkadiusz.hiler

Testing the content type change when the content protection already
enabled.

v2:
  Rebased.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/kms_content_protection.c | 41 +++++++++++++++++++++++++---------
 1 file changed, 31 insertions(+), 10 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 6e9848cbd332..148aba92888c 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -42,6 +42,7 @@ struct data {
 #define CP_DPMS					(1 << 0)
 #define CP_LIC					(1 << 1)
 #define CP_MEI_RELOAD				(1 << 2)
+#define CP_TYPE_CHANGE				(1 << 3)
 
 #define CP_UNDESIRED				0
 #define CP_DESIRED				1
@@ -170,7 +171,7 @@ static void modeset_with_fb(const enum pipe pipe, igt_output_t *output,
 }
 
 static bool test_cp_enable(igt_output_t *output, enum igt_commit_style s,
-			   int content_type)
+			   int content_type, bool type_change)
 {
 	igt_display_t *display = &data.display;
 	igt_plane_t *primary;
@@ -178,8 +179,11 @@ static bool test_cp_enable(igt_output_t *output, enum igt_commit_style s,
 
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 
-	igt_output_set_prop_value(output,
-				  IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
+	if (!type_change)
+		igt_output_set_prop_value(output,
+					  IGT_CONNECTOR_CONTENT_PROTECTION,
+					  CP_DESIRED);
+
 	if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
 		igt_output_set_prop_value(output,
 					  IGT_CONNECTOR_HDCP_CONTENT_TYPE,
@@ -221,13 +225,17 @@ static void test_cp_disable(igt_output_t *output, enum igt_commit_style s)
 
 static void test_cp_enable_with_retry(igt_output_t *output,
 				      enum igt_commit_style s, int retry,
-				      int content_type, bool expect_failure)
+				      int content_type, bool expect_failure,
+				      bool type_change)
 {
+	int retry_orig = retry;
 	bool ret;
 
 	do {
-		test_cp_disable(output, s);
-		ret = test_cp_enable(output, s, content_type);
+		if (!type_change || retry_orig != retry)
+			test_cp_disable(output, s);
+
+		ret = test_cp_enable(output, s, content_type, type_change);
 
 		if (!ret && --retry)
 			igt_debug("Retry (%d/2) ...\n", 3 - retry);
@@ -287,7 +295,13 @@ static void test_content_protection_on_output(igt_output_t *output,
 			continue;
 
 		modeset_with_fb(pipe, output, s);
-		test_cp_enable_with_retry(output, s, 3, content_type, false);
+		test_cp_enable_with_retry(output, s, 3, content_type, false,
+					  false);
+		if (data.cp_tests & CP_TYPE_CHANGE &&
+		    content_type == HDCP_CONTENT_TYPE_1)
+			test_cp_enable_with_retry(output, s, 3,
+						  HDCP_CONTENT_TYPE_0, false,
+						  true);
 
 		if (data.cp_tests & CP_MEI_RELOAD) {
 			igt_assert_f(!igt_kmod_unload("mei_hdcp", 0),
@@ -295,14 +309,14 @@ static void test_content_protection_on_output(igt_output_t *output,
 
 			/* Expected to fail */
 			test_cp_enable_with_retry(output, s, 3,
-						  content_type, true);
+						  content_type, true, false);
 
 			igt_assert_f(!igt_kmod_load("mei_hdcp", NULL),
 				     "mei_hdcp load failed");
 
 			/* Expected to pass */
 			test_cp_enable_with_retry(output, s, 3,
-						  content_type, false);
+						  content_type, false, false);
 		}
 
 		if (data.cp_tests & CP_LIC)
@@ -321,7 +335,8 @@ static void test_content_protection_on_output(igt_output_t *output,
 						  KERNEL_AUTH_TIME_ALLOWED_MSEC);
 			if (!ret)
 				test_cp_enable_with_retry(output, s, 2,
-							  content_type, false);
+							  content_type, false,
+							  false);
 		}
 
 		test_cp_disable(output, s);
@@ -463,6 +478,12 @@ igt_main
 		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_1);
 	}
 
+	igt_subtest("content_type_change") {
+		igt_require(data.display.is_atomic);
+		data.cp_tests = CP_TYPE_CHANGE;
+		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_1);
+	}
+
 	igt_fixture
 		igt_display_fini(&data.display);
 }
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v6 6/8] kms_content_protection: uevent for HDCP status change
  2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
                   ` (4 preceding siblings ...)
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 5/8] kms_content_protection: test content type change Ramalingam C
@ 2019-05-02 13:16 ` Ramalingam C
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 7/8] kms_content_protection: SRM Testing Ramalingam C
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 21+ messages in thread
From: Ramalingam C @ 2019-05-02 13:16 UTC (permalink / raw)
  To: igt-dev, daniel.vetter, arkadiusz.hiler

To detect the HDCP status change we are reading the uevent sent with the
corresponding connector id and property id.

This avoids the polling of the property every mSec.

v2:
  Made it as subtest. Remaining tests will use polling. [Daniel]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/kms_content_protection.c | 162 ++++++++++++++++++++++++++++++++-
 1 file changed, 158 insertions(+), 4 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 148aba92888c..cc8abda48702 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -24,6 +24,9 @@
 
 #include <poll.h>
 #include <fcntl.h>
+#include <sys/epoll.h>
+#include <sys/stat.h>
+#include <libudev.h>
 #include "igt.h"
 #include "igt_sysfs.h"
 #include "igt_kms.h"
@@ -43,6 +46,7 @@ struct data {
 #define CP_LIC					(1 << 1)
 #define CP_MEI_RELOAD				(1 << 2)
 #define CP_TYPE_CHANGE				(1 << 3)
+#define CP_UEVENT				(1 << 4)
 
 #define CP_UNDESIRED				0
 #define CP_DESIRED				1
@@ -102,6 +106,138 @@ static int wait_flip_event(void)
 	return rc;
 }
 
+static bool hdcp_event(struct udev_monitor *uevent_monitor,
+		       struct udev *udev, uint32_t conn_id, uint32_t prop_id)
+{
+	struct udev_device *dev;
+	dev_t udev_devnum;
+	struct stat s;
+	const char *hotplug, *connector, *property;
+	bool ret = false;
+
+	dev = udev_monitor_receive_device(uevent_monitor);
+	if (!dev)
+		goto out;
+
+	udev_devnum = udev_device_get_devnum(dev);
+	fstat(data.display.drm_fd, &s);
+
+	hotplug = udev_device_get_property_value(dev, "HOTPLUG");
+	if (!(memcmp(&s.st_rdev, &udev_devnum, sizeof(dev_t)) == 0 &&
+	    hotplug && atoi(hotplug) == 1)) {
+		igt_debug("Not a Hotplug event\n");
+		goto out_dev;
+	}
+
+	connector = udev_device_get_property_value(dev, "CONNECTOR");
+	if (!(memcmp(&s.st_rdev, &udev_devnum, sizeof(dev_t)) == 0 &&
+	    connector && atoi(connector) == conn_id)) {
+		igt_debug("Not for connector id: %u\n", conn_id);
+		goto out_dev;
+	}
+
+	property = udev_device_get_property_value(dev, "PROPERTY");
+	if (!(memcmp(&s.st_rdev, &udev_devnum, sizeof(dev_t)) == 0 &&
+	    property && atoi(property) == prop_id)) {
+		igt_debug("Not for property id: %u\n", prop_id);
+		goto out_dev;
+	}
+	ret = true;
+
+out_dev:
+	udev_device_unref(dev);
+out:
+	return ret;
+}
+
+static void hdcp_udev_fini(struct udev_monitor *uevent_monitor,
+			   struct udev *udev)
+{
+	if (uevent_monitor)
+		udev_monitor_unref(uevent_monitor);
+	if (udev)
+		udev_unref(udev);
+}
+
+static int hdcp_udev_init(struct udev_monitor *uevent_monitor,
+			  struct udev *udev)
+{
+	int ret = -EINVAL;
+
+	udev = udev_new();
+	if (!udev) {
+		igt_info("failed to create udev object\n");
+		goto out;
+	}
+
+	uevent_monitor = udev_monitor_new_from_netlink(udev, "udev");
+	if (!uevent_monitor) {
+		igt_info("failed to create udev event monitor\n");
+		goto out;
+	}
+
+	ret = udev_monitor_filter_add_match_subsystem_devtype(uevent_monitor,
+							      "drm",
+							      "drm_minor");
+	if (ret < 0) {
+		igt_info("failed to filter for drm events\n");
+		goto out;
+	}
+
+	ret = udev_monitor_enable_receiving(uevent_monitor);
+	if (ret < 0) {
+		igt_info("failed to enable udev event reception\n");
+		goto out;
+	}
+
+	return udev_monitor_get_fd(uevent_monitor);
+
+out:
+	hdcp_udev_fini(uevent_monitor, udev);
+	return ret;
+}
+
+#define MAX_EVENTS	10
+static bool wait_for_hdcp_event(uint32_t conn_id, uint32_t prop_id,
+				uint32_t timeout_mSec)
+{
+
+	struct udev_monitor *uevent_monitor = NULL;
+	struct udev *udev = NULL;
+	int udev_fd, epoll_fd;
+	struct epoll_event event, events[MAX_EVENTS];
+	bool ret = false;
+
+	udev_fd = hdcp_udev_init(uevent_monitor, udev);
+	if (udev_fd < 0)
+		return false;
+
+	epoll_fd = epoll_create1(0);
+	if (epoll_fd == -1) {
+		igt_info("Failed to create epoll fd. %d\n", epoll_fd);
+		goto out_ep_create;
+	}
+
+	event.events = EPOLLIN | EPOLLERR;
+	event.data.fd = 0;
+
+	if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, udev_fd, &event))
+	{
+		igt_info("failed to fd into epoll\n");
+		goto out_ep_ctl;
+	}
+
+	if (epoll_wait(epoll_fd, events, MAX_EVENTS, timeout_mSec))
+		ret = hdcp_event(uevent_monitor, udev, conn_id, prop_id);
+
+out_ep_ctl:
+	if (close(epoll_fd))
+		igt_info("failed to close the epoll fd\n");
+out_ep_create:
+	hdcp_udev_fini(uevent_monitor, udev);
+	return ret;
+}
+
 static bool
 wait_for_prop_value(igt_output_t *output, uint64_t expected,
 		    uint32_t timeout_mSec)
@@ -109,13 +245,25 @@ wait_for_prop_value(igt_output_t *output, uint64_t expected,
 	uint64_t val;
 	int i;
 
-	for (i = 0; i < timeout_mSec; i++) {
-		val = igt_output_get_prop(output,
-					  IGT_CONNECTOR_CONTENT_PROTECTION);
+	if (data.cp_tests & CP_UEVENT) {
+		if (wait_for_hdcp_event(output->id,
+				output->props[IGT_CONNECTOR_CONTENT_PROTECTION],
+				timeout_mSec))
+			igt_debug("hdcp event received\n");
+
+		val = igt_output_get_prop(output, IGT_CONNECTOR_CONTENT_PROTECTION);
 		if (val == expected)
 			return true;
-		usleep(1000);
+	} else {
+		for (i = 0; i < timeout_mSec; i++) {
+			val = igt_output_get_prop(output,
+						  IGT_CONNECTOR_CONTENT_PROTECTION);
+			if (val == expected)
+				return true;
+			usleep(1000);
+		}
 	}
+
 	igt_info("prop_value mismatch %" PRId64 " != %" PRId64 "\n",
 		 val, expected);
 
@@ -484,6 +632,12 @@ igt_main
 		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_1);
 	}
 
+	igt_subtest("uevent") {
+		igt_require(data.display.is_atomic);
+		data.cp_tests = CP_UEVENT;
+		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
+	}
+
 	igt_fixture
 		igt_display_fini(&data.display);
 }
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v6 7/8] kms_content_protection: SRM Testing
  2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
                   ` (5 preceding siblings ...)
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 6/8] kms_content_protection: uevent for HDCP status change Ramalingam C
@ 2019-05-02 13:16 ` Ramalingam C
  2019-05-06 11:40   ` Shankar, Uma
  2019-05-16 11:35   ` Mun, Gwan-gyeong
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 8/8] DO NOT MERGE: CP in fast feedback list Ramalingam C
                   ` (2 subsequent siblings)
  9 siblings, 2 replies; 21+ messages in thread
From: Ramalingam C @ 2019-05-02 13:16 UTC (permalink / raw)
  To: igt-dev, daniel.vetter, arkadiusz.hiler

Since we dont any uAPI to retrieve the downstream's device's ksv,
we can't check the real revocation through SRM.

This test just writes the facsimile SRM into the /lib/firmware/
and check the kernel parsing of it by invoking the hdc authentication.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/kms_content_protection.c | 44 ++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index cc8abda48702..f440358c29c5 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -65,6 +65,12 @@ struct data {
 #define KERNEL_DISABLE_TIME_ALLOWED_MSEC	(1 * 1000)
 #define FLIP_EVENT_POLLING_TIMEOUT_MSEC		1000
 
+__u8 facsimile_srm[] = {
+	0x80, 0x0, 0x0, 0x05, 0x01, 0x0, 0x0, 0x36, 0x02, 0x51, 0x1E, 0xF2,
+	0x1A, 0xCD, 0xE7, 0x26, 0x97, 0xF4, 0x01, 0x97, 0x10, 0x19, 0x92, 0x53,
+	0xE9, 0xF0, 0x59, 0x95, 0xA3, 0x7A, 0x3B, 0xFE, 0xE0, 0x9C, 0x76, 0xDD,
+	0x83, 0xAA, 0xC2, 0x5B, 0x24, 0xB3, 0x36, 0x84, 0x94, 0x75, 0x34, 0xDB,
+	0x10, 0x9E, 0x3B, 0x23, 0x13, 0xD8, 0x7A, 0xC2, 0x30, 0x79, 0x84};
 
 static void flip_handler(int fd, unsigned int sequence, unsigned int tv_sec,
 			 unsigned int tv_usec, void *_data)
@@ -420,6 +426,26 @@ static void test_cp_lic(igt_output_t *output)
 	igt_assert_f(!ret, "Content Protection LIC Failed\n");
 }
 
+static bool write_srm_as_fw(const __u8 *srm, int len)
+{
+	int fd, ret, total = 0;
+
+	fd = open("/lib/firmware/display_hdcp_srm.bin", O_WRONLY | O_CREAT);
+	do {
+		ret = write(fd, srm + total, len - total);
+		if (ret < 0)
+			ret = -errno;
+		if (ret == -EINTR || ret == -EAGAIN)
+			continue;
+		if (ret <= 0)
+			break;
+		total += ret;
+	} while (total != len);
+	close(fd);
+
+	return total < len ? false : true;
+}
+
 static void test_content_protection_on_output(igt_output_t *output,
 					      enum igt_commit_style s,
 					      int content_type)
@@ -638,6 +664,24 @@ igt_main
 		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
 	}
 
+	/*
+	 *  Testing the revocation check through SRM needs a HDCP sink with
+	 *  programmable Ksvs or we need a uAPI from kernel to read the
+	 *  connected HDCP sink's Ksv. With that we would be able to add that
+	 *  Ksv into a SRM and send in for revocation check. Since we dont have
+	 *  either of these options, we test SRM writing from userspace and
+	 *  validation of the same at kernel. Something is better than nothing.
+	 */
+	igt_subtest("srm") {
+		bool ret;
+
+		igt_require(data.display.is_atomic);
+		ret = write_srm_as_fw((const __u8 *)facsimile_srm,
+				      sizeof(facsimile_srm));
+		igt_assert_f(ret, "SRM update failed");
+		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
+	}
+
 	igt_fixture
 		igt_display_fini(&data.display);
 }
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v6 8/8] DO NOT MERGE: CP in fast feedback list
  2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
                   ` (6 preceding siblings ...)
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 7/8] kms_content_protection: SRM Testing Ramalingam C
@ 2019-05-02 13:16 ` Ramalingam C
  2019-05-02 14:13 ` [igt-dev] ✓ Fi.CI.BAT: success for HDCP2.2 Tests (rev6) Patchwork
  2019-05-02 17:14 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  9 siblings, 0 replies; 21+ messages in thread
From: Ramalingam C @ 2019-05-02 13:16 UTC (permalink / raw)
  To: igt-dev, daniel.vetter, arkadiusz.hiler

For adding the HDCP tests into fastfeedback list

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 tests/intel-ci/fast-feedback.testlist | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index 40475b1ab361..7a6fd3b1058e 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -184,6 +184,9 @@ igt@kms_chamelium@hdmi-crc-fast
 igt@kms_chamelium@vga-hpd-fast
 igt@kms_chamelium@vga-edid-read
 igt@kms_chamelium@common-hpd-after-suspend
+igt@kms_content_protection@legacy
+igt@kms_content_protection@atomic
+igt@kms_content_protection@srm
 igt@kms_prop_blob@basic
 igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic
 igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for HDCP2.2 Tests (rev6)
  2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
                   ` (7 preceding siblings ...)
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 8/8] DO NOT MERGE: CP in fast feedback list Ramalingam C
@ 2019-05-02 14:13 ` Patchwork
  2019-05-02 17:14 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  9 siblings, 0 replies; 21+ messages in thread
From: Patchwork @ 2019-05-02 14:13 UTC (permalink / raw)
  To: Ramalingam C; +Cc: igt-dev

== Series Details ==

Series: HDCP2.2 Tests (rev6)
URL   : https://patchwork.freedesktop.org/series/57756/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6026 -> IGTPW_2939
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/57756/revisions/6/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_2939:

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_content_protection@srm} (NEW):
    - {fi-cml-u}:         NOTRUN -> [SKIP][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-cml-u/igt@kms_content_protection@srm.html
    - fi-cfl-8109u:       NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-cfl-8109u/igt@kms_content_protection@srm.html
    - fi-icl-y:           NOTRUN -> [SKIP][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-icl-y/igt@kms_content_protection@srm.html
    - fi-skl-lmem:        NOTRUN -> [FAIL][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-skl-lmem/igt@kms_content_protection@srm.html
    - fi-apl-guc:         NOTRUN -> [FAIL][5]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-apl-guc/igt@kms_content_protection@srm.html
    - fi-skl-gvtdvm:      NOTRUN -> [FAIL][6]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-skl-gvtdvm/igt@kms_content_protection@srm.html

  
New tests
---------

  New tests have been introduced between CI_DRM_6026 and IGTPW_2939:

### New IGT tests (1) ###

  * igt@kms_content_protection@srm:
    - Statuses : 4 fail(s) 5 pass(s) 33 skip(s)
    - Exec time: [0.0, 130.79] s

  

Known issues
------------

  Here are the changes found in IGTPW_2939 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload-with-fault-injection:
    - fi-skl-6770hq:      [PASS][7] -> [DMESG-WARN][8] ([fdo#108529]) +2 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/fi-skl-6770hq/igt@i915_module_load@reload-with-fault-injection.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-skl-6770hq/igt@i915_module_load@reload-with-fault-injection.html

  * igt@i915_selftest@live_hugepages:
    - fi-snb-2600:        [PASS][9] -> [INCOMPLETE][10] ([fdo#105411] / [fdo#110581])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/fi-snb-2600/igt@i915_selftest@live_hugepages.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-snb-2600/igt@i915_selftest@live_hugepages.html

  * igt@kms_flip@basic-flip-vs-dpms:
    - fi-skl-6770hq:      [PASS][11] -> [SKIP][12] ([fdo#109271]) +23 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/fi-skl-6770hq/igt@kms_flip@basic-flip-vs-dpms.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-skl-6770hq/igt@kms_flip@basic-flip-vs-dpms.html

  
#### Possible fixes ####

  * igt@amdgpu/amd_basic@userptr:
    - fi-kbl-8809g:       [DMESG-WARN][13] ([fdo#108965]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/fi-kbl-8809g/igt@amdgpu/amd_basic@userptr.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-kbl-8809g/igt@amdgpu/amd_basic@userptr.html

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-blb-e6850:       [INCOMPLETE][15] ([fdo#107718] / [fdo#110581]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108529]: https://bugs.freedesktop.org/show_bug.cgi?id=108529
  [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#110581]: https://bugs.freedesktop.org/show_bug.cgi?id=110581


Participating hosts (52 -> 46)
------------------------------

  Additional (1): fi-byt-j1900 
  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * IGT: IGT_4972 -> IGTPW_2939

  CI_DRM_6026: 2d2d8d3b9d8896c99c88307a881120885afd2ddb @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2939: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/
  IGT_4972: f052e49a43cc9704ea5f240df15dd9d3dfed68ab @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_content_protection@content_type_change
+igt@kms_content_protection@lic
+igt@kms_content_protection@mei_interface
+igt@kms_content_protection@srm
+igt@kms_content_protection@type1
+igt@kms_content_protection@uevent

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for HDCP2.2 Tests (rev6)
  2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
                   ` (8 preceding siblings ...)
  2019-05-02 14:13 ` [igt-dev] ✓ Fi.CI.BAT: success for HDCP2.2 Tests (rev6) Patchwork
@ 2019-05-02 17:14 ` Patchwork
  9 siblings, 0 replies; 21+ messages in thread
From: Patchwork @ 2019-05-02 17:14 UTC (permalink / raw)
  To: Ramalingam C; +Cc: igt-dev

== Series Details ==

Series: HDCP2.2 Tests (rev6)
URL   : https://patchwork.freedesktop.org/series/57756/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6026_full -> IGTPW_2939_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/57756/revisions/6/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_2939_full:

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_content_protection@srm} (NEW):
    - shard-apl:          NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-apl8/igt@kms_content_protection@srm.html

  * {igt@kms_content_protection@uevent} (NEW):
    - shard-kbl:          NOTRUN -> [FAIL][2] +2 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-kbl2/igt@kms_content_protection@uevent.html
    - shard-iclb:         NOTRUN -> [SKIP][3] +5 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-iclb3/igt@kms_content_protection@uevent.html

  
New tests
---------

  New tests have been introduced between CI_DRM_6026_full and IGTPW_2939_full:

### New IGT tests (6) ###

  * igt@kms_content_protection@content_type_change:
    - Statuses : 5 skip(s)
    - Exec time: [0.0] s

  * igt@kms_content_protection@lic:
    - Statuses : 1 fail(s) 4 skip(s)
    - Exec time: [0.0, 123.33] s

  * igt@kms_content_protection@mei_interface:
    - Statuses : 6 skip(s)
    - Exec time: [0.00] s

  * igt@kms_content_protection@srm:
    - Statuses : 2 fail(s) 4 skip(s)
    - Exec time: [0.00, 125.14] s

  * igt@kms_content_protection@type1:
    - Statuses : 6 skip(s)
    - Exec time: [0.0] s

  * igt@kms_content_protection@uevent:
    - Statuses : 1 fail(s) 4 skip(s)
    - Exec time: [0.0, 106.92] s

  

Known issues
------------

  Here are the changes found in IGTPW_2939_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_eio@unwedge-stress:
    - shard-snb:          [PASS][4] -> [FAIL][5] ([fdo#109661])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-snb5/igt@gem_eio@unwedge-stress.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-snb6/igt@gem_eio@unwedge-stress.html

  * igt@i915_pm_rpm@i2c:
    - shard-iclb:         [PASS][6] -> [FAIL][7] ([fdo#104097])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-iclb5/igt@i915_pm_rpm@i2c.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-iclb5/igt@i915_pm_rpm@i2c.html

  * igt@kms_color@pipe-c-degamma:
    - shard-glk:          [PASS][8] -> [FAIL][9] ([fdo#104782])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-glk4/igt@kms_color@pipe-c-degamma.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-glk2/igt@kms_color@pipe-c-degamma.html
    - shard-kbl:          [PASS][10] -> [FAIL][11] ([fdo#104782])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-kbl5/igt@kms_color@pipe-c-degamma.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-kbl1/igt@kms_color@pipe-c-degamma.html

  * igt@kms_cursor_edge_walk@pipe-a-256x256-left-edge:
    - shard-snb:          [PASS][12] -> [SKIP][13] ([fdo#109271] / [fdo#109278])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-snb2/igt@kms_cursor_edge_walk@pipe-a-256x256-left-edge.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-snb2/igt@kms_cursor_edge_walk@pipe-a-256x256-left-edge.html

  * igt@kms_flip@2x-flip-vs-expired-vblank:
    - shard-glk:          [PASS][14] -> [FAIL][15] ([fdo#105363])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-glk4/igt@kms_flip@2x-flip-vs-expired-vblank.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-glk1/igt@kms_flip@2x-flip-vs-expired-vblank.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite:
    - shard-iclb:         [PASS][16] -> [FAIL][17] ([fdo#103167])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
    - shard-apl:          [PASS][18] -> [DMESG-WARN][19] ([fdo#108566]) +1 similar issue
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-apl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-apl3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html

  * igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
    - shard-glk:          [PASS][20] -> [SKIP][21] ([fdo#109271] / [fdo#109278]) +1 similar issue
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-glk9/igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-glk8/igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping.html

  * igt@kms_psr@no_drrs:
    - shard-iclb:         [PASS][22] -> [FAIL][23] ([fdo#108341])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-iclb6/igt@kms_psr@no_drrs.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-iclb1/igt@kms_psr@no_drrs.html

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         [PASS][24] -> [SKIP][25] ([fdo#109441]) +2 similar issues
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-iclb8/igt@kms_psr@psr2_sprite_plane_move.html

  * igt@perf_pmu@rc6-runtime-pm-long:
    - shard-iclb:         [PASS][26] -> [FAIL][27] ([fdo#105010])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-iclb7/igt@perf_pmu@rc6-runtime-pm-long.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-iclb7/igt@perf_pmu@rc6-runtime-pm-long.html

  
#### Possible fixes ####

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-glk:          [FAIL][28] ([fdo#102887] / [fdo#105363]) -> [PASS][29]
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-glk5/igt@kms_flip@flip-vs-expired-vblank.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-glk7/igt@kms_flip@flip-vs-expired-vblank.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move:
    - shard-glk:          [FAIL][30] ([fdo#103167]) -> [PASS][31]
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-glk2/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-glk9/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
    - shard-iclb:         [FAIL][32] ([fdo#103167]) -> [PASS][33] +2 similar issues
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
    - shard-apl:          [DMESG-WARN][34] ([fdo#108566]) -> [PASS][35] +4 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-apl7/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-apl7/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html

  * igt@kms_plane_scaling@pipe-a-scaler-with-rotation:
    - shard-glk:          [SKIP][36] ([fdo#109271] / [fdo#109278]) -> [PASS][37]
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-glk2/igt@kms_plane_scaling@pipe-a-scaler-with-rotation.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-glk9/igt@kms_plane_scaling@pipe-a-scaler-with-rotation.html

  * igt@kms_psr@psr2_cursor_plane_onoff:
    - shard-iclb:         [SKIP][38] ([fdo#109441]) -> [PASS][39] +2 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-iclb7/igt@kms_psr@psr2_cursor_plane_onoff.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][40] ([fdo#99912]) -> [PASS][41]
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-apl2/igt@kms_setmode@basic.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-apl1/igt@kms_setmode@basic.html
    - shard-kbl:          [FAIL][42] ([fdo#99912]) -> [PASS][43]
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/shard-kbl5/igt@kms_setmode@basic.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/shard-kbl4/igt@kms_setmode@basic.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#104097]: https://bugs.freedesktop.org/show_bug.cgi?id=104097
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (10 -> 6)
------------------------------

  Missing    (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005 


Build changes
-------------

  * IGT: IGT_4972 -> IGTPW_2939
  * Piglit: piglit_4509 -> None

  CI_DRM_6026: 2d2d8d3b9d8896c99c88307a881120885afd2ddb @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2939: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/
  IGT_4972: f052e49a43cc9704ea5f240df15dd9d3dfed68ab @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2939/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by flags
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by flags Ramalingam C
@ 2019-05-06  6:01   ` Shankar, Uma
  2019-05-06  6:26     ` Ramalingam C
  0 siblings, 1 reply; 21+ messages in thread
From: Shankar, Uma @ 2019-05-06  6:01 UTC (permalink / raw)
  To: C, Ramalingam, igt-dev, Vetter, Daniel, Hiler, Arkadiusz



>-----Original Message-----
>From: igt-dev [mailto:igt-dev-bounces@lists.freedesktop.org] On Behalf Of
>Ramalingam C
>Sent: Thursday, May 2, 2019 6:46 PM
>To: igt-dev@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>; Hiler,
>Arkadiusz <arkadiusz.hiler@intel.com>
>Subject: [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by
>flags
>
>Considering increase of subtests for kms_content_protection, tests are defined
>through flags.
>
>Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>---
> tests/kms_content_protection.c | 19 +++++++++++--------
> 1 file changed, 11 insertions(+), 8 deletions(-)
>
>diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c index
>ae6ab497ea21..051a3dfec5ba 100644
>--- a/tests/kms_content_protection.c
>+++ b/tests/kms_content_protection.c
>@@ -34,8 +34,11 @@ struct data {
> 	int drm_fd;
> 	igt_display_t display;
> 	struct igt_fb red, green;
>+	unsigned int cp_tests;
> } data;
>
>+#define CP_DPMS					(1 << 0)
>+
> #define CP_UNDESIRED				0
> #define CP_DESIRED				1
> #define CP_ENABLED				2
>@@ -240,8 +243,7 @@ static void test_cp_lic(igt_output_t *output)  }
>
> static void test_content_protection_on_output(igt_output_t *output,
>-					      enum igt_commit_style s,
>-					      bool dpms_test)
>+					      enum igt_commit_style s)
> {
> 	igt_display_t *display = &data.display;
> 	igt_plane_t *primary;
>@@ -265,7 +267,7 @@ static void test_content_protection_on_output(igt_output_t
>*output,
> 		test_cp_enable_with_retry(output, s, 3);
> 		test_cp_lic(output);
>
>-		if (dpms_test) {
>+		if (data.cp_tests & CP_DPMS) {
> 			igt_pipe_set_prop_value(display, pipe,
> 						IGT_CRTC_ACTIVE, 0);
> 			igt_display_commit2(display, s);
>@@ -324,7 +326,7 @@ static bool sink_hdcp_capable(igt_output_t *output)
>
>
> static void
>-test_content_protection(enum igt_commit_style s, bool dpms_test)
>+test_content_protection(enum igt_commit_style s)
> {
> 	igt_display_t *display = &data.display;
> 	igt_output_t *output;
>@@ -341,7 +343,7 @@ test_content_protection(enum igt_commit_style s, bool
>dpms_test)
> 			continue;
> 		}
>
>-		test_content_protection_on_output(output, s, dpms_test);
>+		test_content_protection_on_output(output, s);
> 		valid_tests++;
> 	}
>
>@@ -359,16 +361,17 @@ igt_main
> 	}
>
> 	igt_subtest("legacy")
>-		test_content_protection(COMMIT_LEGACY, false);
>+		test_content_protection(COMMIT_LEGACY);
>
> 	igt_subtest("atomic") {
> 		igt_require(data.display.is_atomic);
>-		test_content_protection(COMMIT_ATOMIC, false);
>+		test_content_protection(COMMIT_ATOMIC);
> 	}
>
> 	igt_subtest("atomic-dpms") {
> 		igt_require(data.display.is_atomic);
>-		test_content_protection(COMMIT_ATOMIC, true);
>+		data.cp_tests = CP_DPMS;

Not quite sure, but should we not reset this flag after the test so that data_cp.tests
have a clean slate for any other subtest to be executed later.


>+		test_content_protection(COMMIT_ATOMIC);
> 	}
>
> 	igt_fixture
>--
>2.19.1
>
>_______________________________________________
>igt-dev mailing list
>igt-dev@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v6 2/8] kms_content_protection: Link Integrity Check subtest
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 2/8] kms_content_protection: Link Integrity Check subtest Ramalingam C
@ 2019-05-06  6:07   ` Shankar, Uma
  2019-05-06  6:27     ` Ramalingam C
  0 siblings, 1 reply; 21+ messages in thread
From: Shankar, Uma @ 2019-05-06  6:07 UTC (permalink / raw)
  To: C, Ramalingam, igt-dev, Vetter, Daniel, Hiler, Arkadiusz



>-----Original Message-----
>From: igt-dev [mailto:igt-dev-bounces@lists.freedesktop.org] On Behalf Of
>Ramalingam C
>Sent: Thursday, May 2, 2019 6:46 PM
>To: igt-dev@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>; Hiler,
>Arkadiusz <arkadiusz.hiler@intel.com>
>Subject: [igt-dev] [PATCH i-g-t v6 2/8] kms_content_protection: Link Integrity Check
>subtest
>
>Existing Link integrity check test is moved into dedicated subtest.
>This helps to reduced the execution time of other tests by removing the repeated Link

s/reduced/reduce

>integrity check on every other tests.
>
>Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>---
> tests/kms_content_protection.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
>diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c index
>051a3dfec5ba..e3bb39f42ada 100644
>--- a/tests/kms_content_protection.c
>+++ b/tests/kms_content_protection.c
>@@ -38,6 +38,7 @@ struct data {
> } data;
>
> #define CP_DPMS					(1 << 0)
>+#define CP_LIC					(1 << 1)
>
> #define CP_UNDESIRED				0
> #define CP_DESIRED				1
>@@ -265,7 +266,9 @@ static void test_content_protection_on_output(igt_output_t
>*output,
>
> 		modeset_with_fb(pipe, output, s);
> 		test_cp_enable_with_retry(output, s, 3);
>-		test_cp_lic(output);
>+
>+		if (data.cp_tests & CP_LIC)
>+			test_cp_lic(output);
>
> 		if (data.cp_tests & CP_DPMS) {
> 			igt_pipe_set_prop_value(display, pipe, @@ -374,6 +377,12
>@@ igt_main
> 		test_content_protection(COMMIT_ATOMIC);
> 	}
>
>+	igt_subtest("LIC") {
>+		igt_require(data.display.is_atomic);
>+		data.cp_tests = CP_LIC;
>+		test_content_protection(COMMIT_ATOMIC);
>+	}

Same comment as on earlier patch, should we not reset this flag after test.

>+
> 	igt_fixture
> 		igt_display_fini(&data.display);
> }
>--
>2.19.1
>
>_______________________________________________
>igt-dev mailing list
>igt-dev@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by flags
  2019-05-06  6:01   ` Shankar, Uma
@ 2019-05-06  6:26     ` Ramalingam C
  2019-05-06  9:53       ` Shankar, Uma
  0 siblings, 1 reply; 21+ messages in thread
From: Ramalingam C @ 2019-05-06  6:26 UTC (permalink / raw)
  To: Shankar, Uma; +Cc: igt-dev, Vetter, Daniel

On 2019-05-06 at 11:31:28 +0530, Shankar, Uma wrote:
> 
> 
> >-----Original Message-----
> >From: igt-dev [mailto:igt-dev-bounces@lists.freedesktop.org] On Behalf Of
> >Ramalingam C
> >Sent: Thursday, May 2, 2019 6:46 PM
> >To: igt-dev@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>; Hiler,
> >Arkadiusz <arkadiusz.hiler@intel.com>
> >Subject: [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by
> >flags
> >
> >Considering increase of subtests for kms_content_protection, tests are defined
> >through flags.
> >
> >Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> >Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >---
> > tests/kms_content_protection.c | 19 +++++++++++--------
> > 1 file changed, 11 insertions(+), 8 deletions(-)
> >
> >diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c index
> >ae6ab497ea21..051a3dfec5ba 100644
> >--- a/tests/kms_content_protection.c
> >+++ b/tests/kms_content_protection.c
> >@@ -34,8 +34,11 @@ struct data {
> > 	int drm_fd;
> > 	igt_display_t display;
> > 	struct igt_fb red, green;
> >+	unsigned int cp_tests;
> > } data;
> >
> >+#define CP_DPMS					(1 << 0)
> >+
> > #define CP_UNDESIRED				0
> > #define CP_DESIRED				1
> > #define CP_ENABLED				2
> >@@ -240,8 +243,7 @@ static void test_cp_lic(igt_output_t *output)  }
> >
> > static void test_content_protection_on_output(igt_output_t *output,
> >-					      enum igt_commit_style s,
> >-					      bool dpms_test)
> >+					      enum igt_commit_style s)
> > {
> > 	igt_display_t *display = &data.display;
> > 	igt_plane_t *primary;
> >@@ -265,7 +267,7 @@ static void test_content_protection_on_output(igt_output_t
> >*output,
> > 		test_cp_enable_with_retry(output, s, 3);
> > 		test_cp_lic(output);
> >
> >-		if (dpms_test) {
> >+		if (data.cp_tests & CP_DPMS) {
> > 			igt_pipe_set_prop_value(display, pipe,
> > 						IGT_CRTC_ACTIVE, 0);
> > 			igt_display_commit2(display, s);
> >@@ -324,7 +326,7 @@ static bool sink_hdcp_capable(igt_output_t *output)
> >
> >
> > static void
> >-test_content_protection(enum igt_commit_style s, bool dpms_test)
> >+test_content_protection(enum igt_commit_style s)
> > {
> > 	igt_display_t *display = &data.display;
> > 	igt_output_t *output;
> >@@ -341,7 +343,7 @@ test_content_protection(enum igt_commit_style s, bool
> >dpms_test)
> > 			continue;
> > 		}
> >
> >-		test_content_protection_on_output(output, s, dpms_test);
> >+		test_content_protection_on_output(output, s);
> > 		valid_tests++;
> > 	}
> >
> >@@ -359,16 +361,17 @@ igt_main
> > 	}
> >
> > 	igt_subtest("legacy")
> >-		test_content_protection(COMMIT_LEGACY, false);
> >+		test_content_protection(COMMIT_LEGACY);
> >
> > 	igt_subtest("atomic") {
> > 		igt_require(data.display.is_atomic);
> >-		test_content_protection(COMMIT_ATOMIC, false);
> >+		test_content_protection(COMMIT_ATOMIC);
> > 	}
> >
> > 	igt_subtest("atomic-dpms") {
> > 		igt_require(data.display.is_atomic);
> >-		test_content_protection(COMMIT_ATOMIC, true);
> >+		data.cp_tests = CP_DPMS;
> 
> Not quite sure, but should we not reset this flag after the test so that data_cp.tests
> have a clean slate for any other subtest to be executed later.

Before the next test we are always assigning the required flags than
editing the exiting one. So resetting the flag is not required.

-Ram
> 
> 
> >+		test_content_protection(COMMIT_ATOMIC);
> > 	}
> >
> > 	igt_fixture
> >--
> >2.19.1
> >
> >_______________________________________________
> >igt-dev mailing list
> >igt-dev@lists.freedesktop.org
> >https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v6 2/8] kms_content_protection: Link Integrity Check subtest
  2019-05-06  6:07   ` Shankar, Uma
@ 2019-05-06  6:27     ` Ramalingam C
  0 siblings, 0 replies; 21+ messages in thread
From: Ramalingam C @ 2019-05-06  6:27 UTC (permalink / raw)
  To: Shankar, Uma; +Cc: igt-dev, Vetter, Daniel

On 2019-05-06 at 11:37:25 +0530, Shankar, Uma wrote:
> 
> 
> >-----Original Message-----
> >From: igt-dev [mailto:igt-dev-bounces@lists.freedesktop.org] On Behalf Of
> >Ramalingam C
> >Sent: Thursday, May 2, 2019 6:46 PM
> >To: igt-dev@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>; Hiler,
> >Arkadiusz <arkadiusz.hiler@intel.com>
> >Subject: [igt-dev] [PATCH i-g-t v6 2/8] kms_content_protection: Link Integrity Check
> >subtest
> >
> >Existing Link integrity check test is moved into dedicated subtest.
> >This helps to reduced the execution time of other tests by removing the repeated Link
> 
> s/reduced/reduce
Will fix the Typo.

> 
> >integrity check on every other tests.
> >
> >Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> >Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >---
> > tests/kms_content_protection.c | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> >diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c index
> >051a3dfec5ba..e3bb39f42ada 100644
> >--- a/tests/kms_content_protection.c
> >+++ b/tests/kms_content_protection.c
> >@@ -38,6 +38,7 @@ struct data {
> > } data;
> >
> > #define CP_DPMS					(1 << 0)
> >+#define CP_LIC					(1 << 1)
> >
> > #define CP_UNDESIRED				0
> > #define CP_DESIRED				1
> >@@ -265,7 +266,9 @@ static void test_content_protection_on_output(igt_output_t
> >*output,
> >
> > 		modeset_with_fb(pipe, output, s);
> > 		test_cp_enable_with_retry(output, s, 3);
> >-		test_cp_lic(output);
> >+
> >+		if (data.cp_tests & CP_LIC)
> >+			test_cp_lic(output);
> >
> > 		if (data.cp_tests & CP_DPMS) {
> > 			igt_pipe_set_prop_value(display, pipe, @@ -374,6 +377,12
> >@@ igt_main
> > 		test_content_protection(COMMIT_ATOMIC);
> > 	}
> >
> >+	igt_subtest("LIC") {
> >+		igt_require(data.display.is_atomic);
> >+		data.cp_tests = CP_LIC;
> >+		test_content_protection(COMMIT_ATOMIC);
> >+	}
> 
> Same comment as on earlier patch, should we not reset this flag after test.
Resetting the flag is not required as the next subtest is assigning the
required flag than editing it.

-Ram
> 
> >+
> > 	igt_fixture
> > 		igt_display_fini(&data.display);
> > }
> >--
> >2.19.1
> >
> >_______________________________________________
> >igt-dev mailing list
> >igt-dev@lists.freedesktop.org
> >https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by flags
  2019-05-06  6:26     ` Ramalingam C
@ 2019-05-06  9:53       ` Shankar, Uma
  0 siblings, 0 replies; 21+ messages in thread
From: Shankar, Uma @ 2019-05-06  9:53 UTC (permalink / raw)
  To: C, Ramalingam; +Cc: igt-dev, Vetter, Daniel



>-----Original Message-----
>From: C, Ramalingam
>Sent: Monday, May 6, 2019 11:56 AM
>To: Shankar, Uma <uma.shankar@intel.com>
>Cc: igt-dev@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>; Hiler,
>Arkadiusz <arkadiusz.hiler@intel.com>
>Subject: Re: [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined
>by flags
>
>On 2019-05-06 at 11:31:28 +0530, Shankar, Uma wrote:
>>
>>
>> >-----Original Message-----
>> >From: igt-dev [mailto:igt-dev-bounces@lists.freedesktop.org] On
>> >Behalf Of Ramalingam C
>> >Sent: Thursday, May 2, 2019 6:46 PM
>> >To: igt-dev@lists.freedesktop.org; Vetter, Daniel
>> ><daniel.vetter@intel.com>; Hiler, Arkadiusz
>> ><arkadiusz.hiler@intel.com>
>> >Subject: [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests
>> >are defined by flags
>> >
>> >Considering increase of subtests for kms_content_protection, tests
>> >are defined through flags.
>> >
>> >Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> >Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>> >---
>> > tests/kms_content_protection.c | 19 +++++++++++--------
>> > 1 file changed, 11 insertions(+), 8 deletions(-)
>> >
>> >diff --git a/tests/kms_content_protection.c
>> >b/tests/kms_content_protection.c index ae6ab497ea21..051a3dfec5ba
>> >100644
>> >--- a/tests/kms_content_protection.c
>> >+++ b/tests/kms_content_protection.c
>> >@@ -34,8 +34,11 @@ struct data {
>> > 	int drm_fd;
>> > 	igt_display_t display;
>> > 	struct igt_fb red, green;
>> >+	unsigned int cp_tests;
>> > } data;
>> >
>> >+#define CP_DPMS					(1 << 0)
>> >+
>> > #define CP_UNDESIRED				0
>> > #define CP_DESIRED				1
>> > #define CP_ENABLED				2
>> >@@ -240,8 +243,7 @@ static void test_cp_lic(igt_output_t *output)  }
>> >
>> > static void test_content_protection_on_output(igt_output_t *output,
>> >-					      enum igt_commit_style s,
>> >-					      bool dpms_test)
>> >+					      enum igt_commit_style s)
>> > {
>> > 	igt_display_t *display = &data.display;
>> > 	igt_plane_t *primary;
>> >@@ -265,7 +267,7 @@ static void
>> >test_content_protection_on_output(igt_output_t
>> >*output,
>> > 		test_cp_enable_with_retry(output, s, 3);
>> > 		test_cp_lic(output);
>> >
>> >-		if (dpms_test) {
>> >+		if (data.cp_tests & CP_DPMS) {
>> > 			igt_pipe_set_prop_value(display, pipe,
>> > 						IGT_CRTC_ACTIVE, 0);
>> > 			igt_display_commit2(display, s);
>> >@@ -324,7 +326,7 @@ static bool sink_hdcp_capable(igt_output_t
>> >*output)
>> >
>> >
>> > static void
>> >-test_content_protection(enum igt_commit_style s, bool dpms_test)
>> >+test_content_protection(enum igt_commit_style s)
>> > {
>> > 	igt_display_t *display = &data.display;
>> > 	igt_output_t *output;
>> >@@ -341,7 +343,7 @@ test_content_protection(enum igt_commit_style s,
>> >bool
>> >dpms_test)
>> > 			continue;
>> > 		}
>> >
>> >-		test_content_protection_on_output(output, s, dpms_test);
>> >+		test_content_protection_on_output(output, s);
>> > 		valid_tests++;
>> > 	}
>> >
>> >@@ -359,16 +361,17 @@ igt_main
>> > 	}
>> >
>> > 	igt_subtest("legacy")
>> >-		test_content_protection(COMMIT_LEGACY, false);
>> >+		test_content_protection(COMMIT_LEGACY);
>> >
>> > 	igt_subtest("atomic") {
>> > 		igt_require(data.display.is_atomic);
>> >-		test_content_protection(COMMIT_ATOMIC, false);
>> >+		test_content_protection(COMMIT_ATOMIC);
>> > 	}
>> >
>> > 	igt_subtest("atomic-dpms") {
>> > 		igt_require(data.display.is_atomic);
>> >-		test_content_protection(COMMIT_ATOMIC, true);
>> >+		data.cp_tests = CP_DPMS;
>>
>> Not quite sure, but should we not reset this flag after the test so
>> that data_cp.tests have a clean slate for any other subtest to be executed later.
>
>Before the next test we are always assigning the required flags than editing the
>exiting one. So resetting the flag is not required.

Yeah, tests above DPMS don't even touch these flags, so there may be a case where
someone adds a test which doesn't require a FLAG. I feel it's good to reset the setting
once the test is done. Anyways it's just a nit-pick, will leave it to you - no hard objections.

This is,
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

>-Ram
>>
>>
>> >+		test_content_protection(COMMIT_ATOMIC);
>> > 	}
>> >
>> > 	igt_fixture
>> >--
>> >2.19.1
>> >
>> >_______________________________________________
>> >igt-dev mailing list
>> >igt-dev@lists.freedesktop.org
>> >https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v6 3/8] kms_content_protection: Content type support
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 3/8] kms_content_protection: Content type support Ramalingam C
@ 2019-05-06 11:00   ` Shankar, Uma
  0 siblings, 0 replies; 21+ messages in thread
From: Shankar, Uma @ 2019-05-06 11:00 UTC (permalink / raw)
  To: C, Ramalingam, igt-dev, Vetter, Daniel, Hiler, Arkadiusz



>-----Original Message-----
>From: igt-dev [mailto:igt-dev-bounces@lists.freedesktop.org] On Behalf Of
>Ramalingam C
>Sent: Thursday, May 2, 2019 6:46 PM
>To: igt-dev@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>; Hiler,
>Arkadiusz <arkadiusz.hiler@intel.com>
>Subject: [igt-dev] [PATCH i-g-t v6 3/8] kms_content_protection: Content type support
>
>Adds a connector property called "CP_Content_Type"
>
>Content Type takes two values which classifies the content stream:
>	Type 0: Stream that can be tranmitted on HDCP1.4/HDCP2.2

Typo here.

>	Type 1: Stream that needs HDCP2.2 encryption only.
>
>So when Type 1 is set KMD is forced to enable HDCP2.2 only.
>
>For Type 0 request, Kernel chooses the highest capable HDCP version
>(v2.2) first. If that fails, then it fall back to the next availble

Typo in available.

>version(v1.4) before abondoning HDCP autehntication attempts.

Fix the typos here.

>
>Please note content_type is allowed to be updated when "Content Protection" is in
>UNDESIRED state.
>
>v2:
>  s/cp_content_type/content_ptotection_type [danvet]

Typo in protection.

Rest of the core changes look good. With the above fixed:
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

>v3:
>  s/content_protection_type/HDCP Content Type [Pekka]
>v4:
>  Rebased
>
>Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>---
> lib/igt_kms.c                  |  1 +
> lib/igt_kms.h                  |  1 +
> tests/kms_content_protection.c | 74 +++++++++++++++++++++++++++-------
> 3 files changed, 62 insertions(+), 14 deletions(-)
>
>diff --git a/lib/igt_kms.c b/lib/igt_kms.c index df9aafd24bf8..18f0556687de 100644
>--- a/lib/igt_kms.c
>+++ b/lib/igt_kms.c
>@@ -222,6 +222,7 @@ const char * const
>igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
> 	[IGT_CONNECTOR_BROADCAST_RGB] = "Broadcast RGB",
> 	[IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
> 	[IGT_CONNECTOR_VRR_CAPABLE] = "vrr_capable",
>+	[IGT_CONNECTOR_HDCP_CONTENT_TYPE] = "HDCP Content Type",
> };
>
> /*
>diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 38bdc08f3d50..b1430a517305 100644
>--- a/lib/igt_kms.h
>+++ b/lib/igt_kms.h
>@@ -123,6 +123,7 @@ enum igt_atomic_connector_properties {
>        IGT_CONNECTOR_BROADCAST_RGB,
>        IGT_CONNECTOR_CONTENT_PROTECTION,
>        IGT_CONNECTOR_VRR_CAPABLE,
>+       IGT_CONNECTOR_HDCP_CONTENT_TYPE,

Fix Alignment.

>        IGT_NUM_CONNECTOR_PROPS
> };
>
>diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c index
>e3bb39f42ada..488c508b0bb0 100644
>--- a/tests/kms_content_protection.c
>+++ b/tests/kms_content_protection.c
>@@ -44,6 +44,13 @@ struct data {
> #define CP_DESIRED				1
> #define CP_ENABLED				2
>
>+/*
>+ * HDCP_CONTENT_TYPE_0 can be handled on both HDCP1.4 and HDCP2.2.
>+Where as
>+ * HDCP_CONTENT_TYPE_1 can be handled only through HDCP2.2.
>+ */
>+#define HDCP_CONTENT_TYPE_0				0
>+#define HDCP_CONTENT_TYPE_1				1
>+
> #define LIC_PERIOD_MSEC				(4 * 1000)
> /* Kernel retry count=3, Max time per authentication allowed = 6Sec */
> #define KERNEL_AUTH_TIME_ALLOWED_MSEC		(3 *  6 * 1000)
>@@ -159,7 +166,8 @@ static void modeset_with_fb(const enum pipe pipe,
>igt_output_t *output,
> 	commit_display_and_wait_for_flip(s);
> }
>
>-static bool test_cp_enable(igt_output_t *output, enum igt_commit_style s)
>+static bool test_cp_enable(igt_output_t *output, enum igt_commit_style s,
>+			   int content_type)
> {
> 	igt_display_t *display = &data.display;
> 	igt_plane_t *primary;
>@@ -169,6 +177,10 @@ static bool test_cp_enable(igt_output_t *output, enum
>igt_commit_style s)
>
> 	igt_output_set_prop_value(output,
> 				  IGT_CONNECTOR_CONTENT_PROTECTION,
>CP_DESIRED);
>+	if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
>+		igt_output_set_prop_value(output,
>+					  IGT_CONNECTOR_HDCP_CONTENT_TYPE,
>+					  content_type);
> 	igt_display_commit2(display, s);
>
> 	ret = wait_for_prop_value(output, CP_ENABLED, @@ -205,13 +217,14 @@
>static void test_cp_disable(igt_output_t *output, enum igt_commit_style s)  }
>
> static void test_cp_enable_with_retry(igt_output_t *output,
>-				      enum igt_commit_style s, int retry)
>+				      enum igt_commit_style s, int retry,
>+				      int content_type)
> {
> 	bool ret;
>
> 	do {
> 		test_cp_disable(output, s);
>-		ret = test_cp_enable(output, s);
>+		ret = test_cp_enable(output, s, content_type);
>
> 		if (!ret && --retry)
> 			igt_debug("Retry (%d/2) ...\n", 3 - retry); @@ -244,7 +257,8
>@@ static void test_cp_lic(igt_output_t *output)  }
>
> static void test_content_protection_on_output(igt_output_t *output,
>-					      enum igt_commit_style s)
>+					      enum igt_commit_style s,
>+					      int content_type)
> {
> 	igt_display_t *display = &data.display;
> 	igt_plane_t *primary;
>@@ -265,7 +279,7 @@ static void test_content_protection_on_output(igt_output_t
>*output,
> 			continue;
>
> 		modeset_with_fb(pipe, output, s);
>-		test_cp_enable_with_retry(output, s, 3);
>+		test_cp_enable_with_retry(output, s, 3, content_type);
>
> 		if (data.cp_tests & CP_LIC)
> 			test_cp_lic(output);
>@@ -282,7 +296,8 @@ static void test_content_protection_on_output(igt_output_t
>*output,
> 			ret = wait_for_prop_value(output, CP_ENABLED,
>
>KERNEL_AUTH_TIME_ALLOWED_MSEC);
> 			if (!ret)
>-				test_cp_enable_with_retry(output, s, 2);
>+				test_cp_enable_with_retry(output, s,
>+							  2, content_type);
> 		}
>
> 		test_cp_disable(output, s);
>@@ -309,7 +324,8 @@ static void __debugfs_read(int fd, const char *param, char
>*buf, int len)
>
> #define debugfs_read(fd, p, arr) __debugfs_read(fd, p, arr, sizeof(arr))
>
>-#define MAX_SINK_HDCP_CAP_BUF_LEN	500
>+#define MAX_SINK_HDCP_CAP_BUF_LEN	5000
>+
> static bool sink_hdcp_capable(igt_output_t *output)  {
> 	char buf[MAX_SINK_HDCP_CAP_BUF_LEN];
>@@ -327,9 +343,25 @@ static bool sink_hdcp_capable(igt_output_t *output)
> 	return strstr(buf, "HDCP1.4");
> }
>
>+static bool sink_hdcp2_capable(igt_output_t *output) {
>+	char buf[MAX_SINK_HDCP_CAP_BUF_LEN];
>+	int fd;
>+
>+	fd = igt_debugfs_connector_dir(data.drm_fd, output->name, O_RDONLY);
>+	if (fd < 0)
>+		return false;
>+
>+	debugfs_read(fd, "i915_hdcp_sink_capability", buf);
>+	close(fd);
>+
>+	igt_debug("Sink capability: %s\n", buf);
>+
>+	return strstr(buf, "HDCP2.2");
>+}
>
> static void
>-test_content_protection(enum igt_commit_style s)
>+test_content_protection(enum igt_commit_style s, int content_type)
> {
> 	igt_display_t *display = &data.display;
> 	igt_output_t *output;
>@@ -339,14 +371,23 @@ test_content_protection(enum igt_commit_style s)
> 		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
> 			continue;
>
>+		if (!output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE] &&
>+		    content_type)
>+			continue;
>+
> 		igt_info("CP Test execution on %s\n", output->name);
>-		if (!sink_hdcp_capable(output)) {
>+
>+		if (content_type && !sink_hdcp2_capable(output)) {
>+			igt_info("\tSkip %s (Sink has no HDCP2.2 support)\n",
>+				 output->name);
>+			continue;
>+		} else if (!sink_hdcp_capable(output)) {
> 			igt_info("\tSkip %s (Sink has no HDCP support)\n",
> 				 output->name);
> 			continue;
> 		}
>
>-		test_content_protection_on_output(output, s);
>+		test_content_protection_on_output(output, s, content_type);
> 		valid_tests++;
> 	}
>
>@@ -364,23 +405,28 @@ igt_main
> 	}
>
> 	igt_subtest("legacy")
>-		test_content_protection(COMMIT_LEGACY);
>+		test_content_protection(COMMIT_LEGACY,
>HDCP_CONTENT_TYPE_0);
>
> 	igt_subtest("atomic") {
> 		igt_require(data.display.is_atomic);
>-		test_content_protection(COMMIT_ATOMIC);
>+		test_content_protection(COMMIT_ATOMIC,
>HDCP_CONTENT_TYPE_0);
> 	}
>
> 	igt_subtest("atomic-dpms") {
> 		igt_require(data.display.is_atomic);
> 		data.cp_tests = CP_DPMS;
>-		test_content_protection(COMMIT_ATOMIC);
>+		test_content_protection(COMMIT_ATOMIC,
>HDCP_CONTENT_TYPE_0);
> 	}
>
> 	igt_subtest("LIC") {
> 		igt_require(data.display.is_atomic);
> 		data.cp_tests = CP_LIC;
>-		test_content_protection(COMMIT_ATOMIC);
>+		test_content_protection(COMMIT_ATOMIC,
>HDCP_CONTENT_TYPE_0);
>+	}
>+
>+	igt_subtest("type1") {
>+		igt_require(data.display.is_atomic);
>+		test_content_protection(COMMIT_ATOMIC,
>HDCP_CONTENT_TYPE_1);
> 	}
>
> 	igt_fixture
>--
>2.19.1
>
>_______________________________________________
>igt-dev mailing list
>igt-dev@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v6 4/8] kms_content_protection: test teardown and rebuild of I915-mei I/F
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 4/8] kms_content_protection: test teardown and rebuild of I915-mei I/F Ramalingam C
@ 2019-05-06 11:09   ` Shankar, Uma
  0 siblings, 0 replies; 21+ messages in thread
From: Shankar, Uma @ 2019-05-06 11:09 UTC (permalink / raw)
  To: C, Ramalingam, igt-dev, Vetter, Daniel, Hiler, Arkadiusz



>-----Original Message-----
>From: igt-dev [mailto:igt-dev-bounces@lists.freedesktop.org] On Behalf Of
>Ramalingam C
>Sent: Thursday, May 2, 2019 6:46 PM
>To: igt-dev@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>; Hiler,
>Arkadiusz <arkadiusz.hiler@intel.com>
>Subject: [igt-dev] [PATCH i-g-t v6 4/8] kms_content_protection: test teardown and
>rebuild of I915-mei I/F
>
>To validate the teardown and rebuild of the interface between
>I915 and mei hdcp this subtest execute the below sequence:
>	1. Test HDCP2.2 Type 1 (expected to pass)
>	2. Unload the mei_hdcp
>	3. Test HDCP2.2 Type 1 (expected to fail)
>	2. Reload the mei_hdcp
>	1. Test HDCP2.2 Type 1 (expected to pass)

Changes look good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

>v2:
>  Rebased.
>v3:
>  Rebased.
>
>Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>---
> tests/kms_content_protection.c | 44 ++++++++++++++++++++++++++++++----
> 1 file changed, 39 insertions(+), 5 deletions(-)
>
>diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c index
>488c508b0bb0..6e9848cbd332 100644
>--- a/tests/kms_content_protection.c
>+++ b/tests/kms_content_protection.c
>@@ -27,6 +27,7 @@
> #include "igt.h"
> #include "igt_sysfs.h"
> #include "igt_kms.h"
>+#include "igt_kmod.h"
>
> IGT_TEST_DESCRIPTION("Test content protection (HDCP)");
>
>@@ -37,8 +38,10 @@ struct data {
> 	unsigned int cp_tests;
> } data;
>
>+/* Test flags */
> #define CP_DPMS					(1 << 0)
> #define CP_LIC					(1 << 1)
>+#define CP_MEI_RELOAD				(1 << 2)
>
> #define CP_UNDESIRED				0
> #define CP_DESIRED				1
>@@ -218,7 +221,7 @@ static void test_cp_disable(igt_output_t *output, enum
>igt_commit_style s)
>
> static void test_cp_enable_with_retry(igt_output_t *output,
> 				      enum igt_commit_style s, int retry,
>-				      int content_type)
>+				      int content_type, bool expect_failure)
> {
> 	bool ret;
>
>@@ -233,7 +236,12 @@ static void test_cp_enable_with_retry(igt_output_t *output,
> 	if (!ret)
> 		test_cp_disable(output, s);
>
>-	igt_assert_f(ret, "Content Protection not enabled\n");
>+	if (expect_failure)
>+		igt_assert_f(!ret,
>+			     "CP Enabled. Though it is expected to fail\n");
>+	else
>+		igt_assert_f(ret, "Content Protection not enabled\n");
>+
> }
>
> static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe) @@ -279,7
>+287,23 @@ static void test_content_protection_on_output(igt_output_t *output,
> 			continue;
>
> 		modeset_with_fb(pipe, output, s);
>-		test_cp_enable_with_retry(output, s, 3, content_type);
>+		test_cp_enable_with_retry(output, s, 3, content_type, false);
>+
>+		if (data.cp_tests & CP_MEI_RELOAD) {
>+			igt_assert_f(!igt_kmod_unload("mei_hdcp", 0),
>+				     "mei_hdcp unload failed");
>+
>+			/* Expected to fail */
>+			test_cp_enable_with_retry(output, s, 3,
>+						  content_type, true);
>+
>+			igt_assert_f(!igt_kmod_load("mei_hdcp", NULL),
>+				     "mei_hdcp load failed");
>+
>+			/* Expected to pass */
>+			test_cp_enable_with_retry(output, s, 3,
>+						  content_type, false);
>+		}
>
> 		if (data.cp_tests & CP_LIC)
> 			test_cp_lic(output);
>@@ -296,8 +320,8 @@ static void test_content_protection_on_output(igt_output_t
>*output,
> 			ret = wait_for_prop_value(output, CP_ENABLED,
>
>KERNEL_AUTH_TIME_ALLOWED_MSEC);
> 			if (!ret)
>-				test_cp_enable_with_retry(output, s,
>-							  2, content_type);
>+				test_cp_enable_with_retry(output, s, 2,
>+							  content_type, false);
> 		}
>
> 		test_cp_disable(output, s);
>@@ -367,6 +391,10 @@ test_content_protection(enum igt_commit_style s, int
>content_type)
> 	igt_output_t *output;
> 	int valid_tests = 0;
>
>+	if (data.cp_tests & CP_MEI_RELOAD)
>+		igt_require_f(igt_kmod_is_loaded("mei_hdcp"),
>+			      "mei_hdcp module is not loaded\n");
>+
> 	for_each_connected_output(display, output) {
> 		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
> 			continue;
>@@ -429,6 +457,12 @@ igt_main
> 		test_content_protection(COMMIT_ATOMIC,
>HDCP_CONTENT_TYPE_1);
> 	}
>
>+	igt_subtest("mei_interface") {
>+		igt_require(data.display.is_atomic);
>+		data.cp_tests = CP_MEI_RELOAD;
>+		test_content_protection(COMMIT_ATOMIC,
>HDCP_CONTENT_TYPE_1);
>+	}
>+
> 	igt_fixture
> 		igt_display_fini(&data.display);
> }
>--
>2.19.1
>
>_______________________________________________
>igt-dev mailing list
>igt-dev@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v6 5/8] kms_content_protection: test content type change
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 5/8] kms_content_protection: test content type change Ramalingam C
@ 2019-05-06 11:25   ` Shankar, Uma
  0 siblings, 0 replies; 21+ messages in thread
From: Shankar, Uma @ 2019-05-06 11:25 UTC (permalink / raw)
  To: C, Ramalingam, igt-dev, Vetter, Daniel, Hiler, Arkadiusz



>-----Original Message-----
>From: igt-dev [mailto:igt-dev-bounces@lists.freedesktop.org] On Behalf Of
>Ramalingam C
>Sent: Thursday, May 2, 2019 6:46 PM
>To: igt-dev@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>; Hiler,
>Arkadiusz <arkadiusz.hiler@intel.com>
>Subject: [igt-dev] [PATCH i-g-t v6 5/8] kms_content_protection: test content type
>change
>
>Testing the content type change when the content protection already enabled.
>
>v2:
>  Rebased.
>
>Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>---
> tests/kms_content_protection.c | 41 +++++++++++++++++++++++++---------
> 1 file changed, 31 insertions(+), 10 deletions(-)
>
>diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c index
>6e9848cbd332..148aba92888c 100644
>--- a/tests/kms_content_protection.c
>+++ b/tests/kms_content_protection.c
>@@ -42,6 +42,7 @@ struct data {
> #define CP_DPMS					(1 << 0)
> #define CP_LIC					(1 << 1)
> #define CP_MEI_RELOAD				(1 << 2)
>+#define CP_TYPE_CHANGE				(1 << 3)
>
> #define CP_UNDESIRED				0
> #define CP_DESIRED				1
>@@ -170,7 +171,7 @@ static void modeset_with_fb(const enum pipe pipe,
>igt_output_t *output,  }
>
> static bool test_cp_enable(igt_output_t *output, enum igt_commit_style s,
>-			   int content_type)
>+			   int content_type, bool type_change)
> {
> 	igt_display_t *display = &data.display;
> 	igt_plane_t *primary;
>@@ -178,8 +179,11 @@ static bool test_cp_enable(igt_output_t *output, enum
>igt_commit_style s,
>
> 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
>
>-	igt_output_set_prop_value(output,
>-				  IGT_CONNECTOR_CONTENT_PROTECTION,
>CP_DESIRED);
>+	if (!type_change)
>+		igt_output_set_prop_value(output,
>+
>IGT_CONNECTOR_CONTENT_PROTECTION,
>+					  CP_DESIRED);
>+
> 	if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
> 		igt_output_set_prop_value(output,
> 					  IGT_CONNECTOR_HDCP_CONTENT_TYPE,
>@@ -221,13 +225,17 @@ static void test_cp_disable(igt_output_t *output, enum
>igt_commit_style s)
>
> static void test_cp_enable_with_retry(igt_output_t *output,
> 				      enum igt_commit_style s, int retry,
>-				      int content_type, bool expect_failure)
>+				      int content_type, bool expect_failure,
>+				      bool type_change)
> {
>+	int retry_orig = retry;
> 	bool ret;
>
> 	do {
>-		test_cp_disable(output, s);
>-		ret = test_cp_enable(output, s, content_type);
>+		if (!type_change || retry_orig != retry)
>+			test_cp_disable(output, s);
>+
>+		ret = test_cp_enable(output, s, content_type, type_change);
>
> 		if (!ret && --retry)
> 			igt_debug("Retry (%d/2) ...\n", 3 - retry); @@ -287,7 +295,13
>@@ static void test_content_protection_on_output(igt_output_t *output,
> 			continue;
>
> 		modeset_with_fb(pipe, output, s);
>-		test_cp_enable_with_retry(output, s, 3, content_type, false);
>+		test_cp_enable_with_retry(output, s, 3, content_type, false,
>+					  false);
>+		if (data.cp_tests & CP_TYPE_CHANGE &&
>+		    content_type == HDCP_CONTENT_TYPE_1)

I don’t think we need to check for content_type here as its always set as TYPE_1 when we set the
flag in subtest or do you expect this to change ?

>+			test_cp_enable_with_retry(output, s, 3,
>+						  HDCP_CONTENT_TYPE_0, false,
>+						  true);
>
> 		if (data.cp_tests & CP_MEI_RELOAD) {
> 			igt_assert_f(!igt_kmod_unload("mei_hdcp", 0), @@ -295,14
>+309,14 @@ static void test_content_protection_on_output(igt_output_t *output,
>
> 			/* Expected to fail */
> 			test_cp_enable_with_retry(output, s, 3,
>-						  content_type, true);
>+						  content_type, true, false);
>
> 			igt_assert_f(!igt_kmod_load("mei_hdcp", NULL),
> 				     "mei_hdcp load failed");
>
> 			/* Expected to pass */
> 			test_cp_enable_with_retry(output, s, 3,
>-						  content_type, false);
>+						  content_type, false, false);
> 		}
>
> 		if (data.cp_tests & CP_LIC)
>@@ -321,7 +335,8 @@ static void test_content_protection_on_output(igt_output_t
>*output,
>
>KERNEL_AUTH_TIME_ALLOWED_MSEC);
> 			if (!ret)
> 				test_cp_enable_with_retry(output, s, 2,
>-							  content_type, false);
>+							  content_type, false,
>+							  false);
> 		}
>
> 		test_cp_disable(output, s);
>@@ -463,6 +478,12 @@ igt_main
> 		test_content_protection(COMMIT_ATOMIC,
>HDCP_CONTENT_TYPE_1);
> 	}
>
>+	igt_subtest("content_type_change") {
>+		igt_require(data.display.is_atomic);
>+		data.cp_tests = CP_TYPE_CHANGE;
>+		test_content_protection(COMMIT_ATOMIC,
>HDCP_CONTENT_TYPE_1);
>+	}
>+
> 	igt_fixture
> 		igt_display_fini(&data.display);
> }
>--
>2.19.1
>
>_______________________________________________
>igt-dev mailing list
>igt-dev@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v6 7/8] kms_content_protection: SRM Testing
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 7/8] kms_content_protection: SRM Testing Ramalingam C
@ 2019-05-06 11:40   ` Shankar, Uma
  2019-05-16 11:35   ` Mun, Gwan-gyeong
  1 sibling, 0 replies; 21+ messages in thread
From: Shankar, Uma @ 2019-05-06 11:40 UTC (permalink / raw)
  To: C, Ramalingam, igt-dev, Vetter, Daniel, Hiler, Arkadiusz



>-----Original Message-----
>From: igt-dev [mailto:igt-dev-bounces@lists.freedesktop.org] On Behalf Of
>Ramalingam C
>Sent: Thursday, May 2, 2019 6:46 PM
>To: igt-dev@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>; Hiler,
>Arkadiusz <arkadiusz.hiler@intel.com>
>Subject: [igt-dev] [PATCH i-g-t v6 7/8] kms_content_protection: SRM Testing
>
>Since we dont any uAPI to retrieve the downstream's device's ksv, we can't check the

Change "don't" to "Don’t' have."

>real revocation through SRM.
>
>This test just writes the facsimile SRM into the /lib/firmware/ and check the kernel
>parsing of it by invoking the hdc authentication.

Typo in hdcp

With above fixed:
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

>
>Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>---
> tests/kms_content_protection.c | 44 ++++++++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
>diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c index
>cc8abda48702..f440358c29c5 100644
>--- a/tests/kms_content_protection.c
>+++ b/tests/kms_content_protection.c
>@@ -65,6 +65,12 @@ struct data {
> #define KERNEL_DISABLE_TIME_ALLOWED_MSEC	(1 * 1000)
> #define FLIP_EVENT_POLLING_TIMEOUT_MSEC		1000
>
>+__u8 facsimile_srm[] = {
>+	0x80, 0x0, 0x0, 0x05, 0x01, 0x0, 0x0, 0x36, 0x02, 0x51, 0x1E, 0xF2,
>+	0x1A, 0xCD, 0xE7, 0x26, 0x97, 0xF4, 0x01, 0x97, 0x10, 0x19, 0x92, 0x53,
>+	0xE9, 0xF0, 0x59, 0x95, 0xA3, 0x7A, 0x3B, 0xFE, 0xE0, 0x9C, 0x76, 0xDD,
>+	0x83, 0xAA, 0xC2, 0x5B, 0x24, 0xB3, 0x36, 0x84, 0x94, 0x75, 0x34, 0xDB,
>+	0x10, 0x9E, 0x3B, 0x23, 0x13, 0xD8, 0x7A, 0xC2, 0x30, 0x79, 0x84};
>
> static void flip_handler(int fd, unsigned int sequence, unsigned int tv_sec,
> 			 unsigned int tv_usec, void *_data)
>@@ -420,6 +426,26 @@ static void test_cp_lic(igt_output_t *output)
> 	igt_assert_f(!ret, "Content Protection LIC Failed\n");  }
>
>+static bool write_srm_as_fw(const __u8 *srm, int len) {
>+	int fd, ret, total = 0;
>+
>+	fd = open("/lib/firmware/display_hdcp_srm.bin", O_WRONLY | O_CREAT);
>+	do {
>+		ret = write(fd, srm + total, len - total);
>+		if (ret < 0)
>+			ret = -errno;
>+		if (ret == -EINTR || ret == -EAGAIN)
>+			continue;
>+		if (ret <= 0)
>+			break;
>+		total += ret;
>+	} while (total != len);
>+	close(fd);
>+
>+	return total < len ? false : true;
>+}
>+
> static void test_content_protection_on_output(igt_output_t *output,
> 					      enum igt_commit_style s,
> 					      int content_type)
>@@ -638,6 +664,24 @@ igt_main
> 		test_content_protection(COMMIT_ATOMIC,
>HDCP_CONTENT_TYPE_0);
> 	}
>
>+	/*
>+	 *  Testing the revocation check through SRM needs a HDCP sink with
>+	 *  programmable Ksvs or we need a uAPI from kernel to read the
>+	 *  connected HDCP sink's Ksv. With that we would be able to add that
>+	 *  Ksv into a SRM and send in for revocation check. Since we dont have
>+	 *  either of these options, we test SRM writing from userspace and
>+	 *  validation of the same at kernel. Something is better than nothing.
>+	 */
>+	igt_subtest("srm") {
>+		bool ret;
>+
>+		igt_require(data.display.is_atomic);
>+		ret = write_srm_as_fw((const __u8 *)facsimile_srm,
>+				      sizeof(facsimile_srm));
>+		igt_assert_f(ret, "SRM update failed");
>+		test_content_protection(COMMIT_ATOMIC,
>HDCP_CONTENT_TYPE_0);
>+	}
>+
> 	igt_fixture
> 		igt_display_fini(&data.display);
> }
>--
>2.19.1
>
>_______________________________________________
>igt-dev mailing list
>igt-dev@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v6 7/8] kms_content_protection: SRM Testing
  2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 7/8] kms_content_protection: SRM Testing Ramalingam C
  2019-05-06 11:40   ` Shankar, Uma
@ 2019-05-16 11:35   ` Mun, Gwan-gyeong
  1 sibling, 0 replies; 21+ messages in thread
From: Mun, Gwan-gyeong @ 2019-05-16 11:35 UTC (permalink / raw)
  To: Hiler, Arkadiusz, igt-dev, Vetter, Daniel, C, Ramalingam

On Thu, 2019-05-02 at 18:46 +0530, Ramalingam C wrote:
> Since we dont any uAPI to retrieve the downstream's device's ksv,
> we can't check the real revocation through SRM.
> 
> This test just writes the facsimile SRM into the /lib/firmware/
> and check the kernel parsing of it by invoking the hdc
> authentication.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  tests/kms_content_protection.c | 44
> ++++++++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
> 
> diff --git a/tests/kms_content_protection.c
> b/tests/kms_content_protection.c
> index cc8abda48702..f440358c29c5 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -65,6 +65,12 @@ struct data {
>  #define KERNEL_DISABLE_TIME_ALLOWED_MSEC	(1 * 1000)
>  #define FLIP_EVENT_POLLING_TIMEOUT_MSEC		1000
>  
> +__u8 facsimile_srm[] = {
> +	0x80, 0x0, 0x0, 0x05, 0x01, 0x0, 0x0, 0x36, 0x02, 0x51, 0x1E,
> 0xF2,
> +	0x1A, 0xCD, 0xE7, 0x26, 0x97, 0xF4, 0x01, 0x97, 0x10, 0x19,
> 0x92, 0x53,
> +	0xE9, 0xF0, 0x59, 0x95, 0xA3, 0x7A, 0x3B, 0xFE, 0xE0, 0x9C,
> 0x76, 0xDD,
> +	0x83, 0xAA, 0xC2, 0x5B, 0x24, 0xB3, 0x36, 0x84, 0x94, 0x75,
> 0x34, 0xDB,
> +	0x10, 0x9E, 0x3B, 0x23, 0x13, 0xD8, 0x7A, 0xC2, 0x30, 0x79,
> 0x84};
>  
>  static void flip_handler(int fd, unsigned int sequence, unsigned int
> tv_sec,
>  			 unsigned int tv_usec, void *_data)
> @@ -420,6 +426,26 @@ static void test_cp_lic(igt_output_t *output)
>  	igt_assert_f(!ret, "Content Protection LIC Failed\n");
>  }
>  
> +static bool write_srm_as_fw(const __u8 *srm, int len)
> +{
> +	int fd, ret, total = 0;
> +
> +	fd = open("/lib/firmware/display_hdcp_srm.bin", O_WRONLY |
> O_CREAT);
When I built it on Arch Linux, it shown below error message.

In file included from /usr/include/fcntl.h:328,
                 from ../tests/kms_content_protection.c:26:
In function ‘open’,
    inlined from ‘write_srm_as_fw.constprop’ at
../tests/kms_content_protection.c:435:7,
    inlined from ‘__real_main622’ at
../tests/kms_content_protection.c:687:9:
/usr/include/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’
declared with attribute error: open with O_CREAT or O_TMPFILE in second
argument needs 3 arguments
    __open_missing_mode ();
    ^~~~~~~~~~~~~~~~~~~~~~


> +	do {
> +		ret = write(fd, srm + total, len - total);
> +		if (ret < 0)
> +			ret = -errno;
> +		if (ret == -EINTR || ret == -EAGAIN)
> +			continue;
> +		if (ret <= 0)
> +			break;
> +		total += ret;
> +	} while (total != len);
> +	close(fd);
> +
> +	return total < len ? false : true;
> +}
> +
>  static void test_content_protection_on_output(igt_output_t *output,
>  					      enum igt_commit_style s,
>  					      int content_type)
> @@ -638,6 +664,24 @@ igt_main
>  		test_content_protection(COMMIT_ATOMIC,
> HDCP_CONTENT_TYPE_0);
>  	}
>  
> +	/*
> +	 *  Testing the revocation check through SRM needs a HDCP sink
> with
> +	 *  programmable Ksvs or we need a uAPI from kernel to read the
> +	 *  connected HDCP sink's Ksv. With that we would be able to
> add that
> +	 *  Ksv into a SRM and send in for revocation check. Since we
> dont have
> +	 *  either of these options, we test SRM writing from userspace
> and
> +	 *  validation of the same at kernel. Something is better than
> nothing.
> +	 */
> +	igt_subtest("srm") {
> +		bool ret;
> +
> +		igt_require(data.display.is_atomic);
> +		ret = write_srm_as_fw((const __u8 *)facsimile_srm,
> +				      sizeof(facsimile_srm));
> +		igt_assert_f(ret, "SRM update failed");
> +		test_content_protection(COMMIT_ATOMIC,
> HDCP_CONTENT_TYPE_0);
> +	}
> +
>  	igt_fixture
>  		igt_display_fini(&data.display);
>  }
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-05-16 11:35 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02 13:16 [igt-dev] [PATCH i-g-t v6 0/8] HDCP2.2 Tests Ramalingam C
2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 1/8] kms_content_protection: Tests are defined by flags Ramalingam C
2019-05-06  6:01   ` Shankar, Uma
2019-05-06  6:26     ` Ramalingam C
2019-05-06  9:53       ` Shankar, Uma
2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 2/8] kms_content_protection: Link Integrity Check subtest Ramalingam C
2019-05-06  6:07   ` Shankar, Uma
2019-05-06  6:27     ` Ramalingam C
2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 3/8] kms_content_protection: Content type support Ramalingam C
2019-05-06 11:00   ` Shankar, Uma
2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 4/8] kms_content_protection: test teardown and rebuild of I915-mei I/F Ramalingam C
2019-05-06 11:09   ` Shankar, Uma
2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 5/8] kms_content_protection: test content type change Ramalingam C
2019-05-06 11:25   ` Shankar, Uma
2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 6/8] kms_content_protection: uevent for HDCP status change Ramalingam C
2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 7/8] kms_content_protection: SRM Testing Ramalingam C
2019-05-06 11:40   ` Shankar, Uma
2019-05-16 11:35   ` Mun, Gwan-gyeong
2019-05-02 13:16 ` [igt-dev] [PATCH i-g-t v6 8/8] DO NOT MERGE: CP in fast feedback list Ramalingam C
2019-05-02 14:13 ` [igt-dev] ✓ Fi.CI.BAT: success for HDCP2.2 Tests (rev6) Patchwork
2019-05-02 17:14 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.