All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 0/4] Coverage for HDCP2.2 Phase II
@ 2019-02-26  7:23 Ramalingam C
  2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 1/4] kms_content_protection: Content type support Ramalingam C
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Ramalingam C @ 2019-02-26  7:23 UTC (permalink / raw)
  To: igt-dev, daniel.vetter

This series adds tests for:
	1. content_type which is added for HDCP2.2.
	     Adds a new test for Type1.
	2. teardown and rebuild of i915-mei interface.
	     Removes the mei_hdcp and reloads it and test for HDCP2.2.
	3. downstream info gathering and SRM revocation.
	     Retrieves the receivers ID from downstream_info
	     fabricates a SRM and test for the revocation of the device.

Ramalingam C (4):
  kms_content_protection: Content type support
  kms_content_protection: test teardown and rebuild of I915-mei I/F
  kms_content_protection: srm and downstream_info test
  DO NOT MERGE: CP in fast feedback list

 lib/igt_kms.c                         |   3 +
 lib/igt_kms.h                         |   3 +
 tests/intel-ci/fast-feedback.testlist |   3 +
 tests/kms_content_protection.c        | 292 ++++++++++++++++++++++++++++++++--
 4 files changed, 284 insertions(+), 17 deletions(-)

-- 
2.7.4

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

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

* [igt-dev] [PATCH i-g-t 1/4] kms_content_protection: Content type support
  2019-02-26  7:23 [igt-dev] [PATCH i-g-t 0/4] Coverage for HDCP2.2 Phase II Ramalingam C
@ 2019-02-26  7:23 ` Ramalingam C
  2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 2/4] kms_content_protection: test teardown and rebuild of I915-mei I/F Ramalingam C
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Ramalingam C @ 2019-02-26  7:23 UTC (permalink / raw)
  To: igt-dev, daniel.vetter

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 available
version(v1.4) before abondoning HDCP autehntication attempts.

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

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 lib/igt_kms.c                  |  1 +
 lib/igt_kms.h                  |  1 +
 tests/kms_content_protection.c | 72 ++++++++++++++++++++++++++++++++++--------
 3 files changed, 61 insertions(+), 13 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 85a911e11060..b3d1c3456157 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -199,6 +199,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_CP_CONTENT_TYPE] = "CP_Content_Type",
 };
 
 /*
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 679d4e84fab8..e152b6a2ed55 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_CP_CONTENT_TYPE,
        IGT_NUM_CONNECTOR_PROPS
 };
 
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 7fc8542e769a..00784e2a5f01 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -40,6 +40,13 @@ struct data {
 #define CP_DESIRED				1
 #define CP_ENABLED				2
 
+/*
+ * CP_TYPE_0 can be handled on both HDCP1.4 and HDCP2.2. Where as CP_TYPE_1
+ * can be handled only through HDCP2.2.
+ */
+#define CP_TYPE_0				0
+#define CP_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)
@@ -155,7 +162,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;
@@ -165,6 +173,9 @@ 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_CP_CONTENT_TYPE])
+		igt_output_set_prop_value(output, IGT_CONNECTOR_CP_CONTENT_TYPE,
+					  content_type);
 	igt_display_commit2(display, s);
 
 	ret = wait_for_prop_value(output, CP_ENABLED,
@@ -201,13 +212,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);
@@ -237,7 +249,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)
+					      bool dpms_test, int content_type)
 {
 	igt_display_t *display = &data.display;
 	igt_plane_t *primary;
@@ -258,7 +270,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);
 		test_cp_lic(output);
 
 		if (dpms_test) {
@@ -273,7 +285,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);
@@ -300,7 +313,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];
@@ -318,9 +332,26 @@ 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, bool dpms_test)
+test_content_protection(enum igt_commit_style s, bool dpms_test,
+			int content_type)
 {
 	igt_display_t *display = &data.display;
 	igt_output_t *output;
@@ -330,14 +361,24 @@ test_content_protection(enum igt_commit_style s, bool dpms_test)
 		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
 			continue;
 
+		if (!output->props[IGT_CONNECTOR_CP_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, dpms_test);
+		test_content_protection_on_output(output, s, dpms_test,
+						  content_type);
 		valid_tests++;
 	}
 
@@ -355,16 +396,21 @@ igt_main
 	}
 
 	igt_subtest("legacy")
-		test_content_protection(COMMIT_LEGACY, false);
+		test_content_protection(COMMIT_LEGACY, false, CP_TYPE_0);
 
 	igt_subtest("atomic") {
 		igt_require(data.display.is_atomic);
-		test_content_protection(COMMIT_ATOMIC, false);
+		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_0);
 	}
 
 	igt_subtest("atomic-dpms") {
 		igt_require(data.display.is_atomic);
-		test_content_protection(COMMIT_ATOMIC, true);
+		test_content_protection(COMMIT_ATOMIC, true, CP_TYPE_0);
+	}
+
+	igt_subtest("Type1") {
+		igt_require(data.display.is_atomic);
+		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_1);
 	}
 
 	igt_fixture
-- 
2.7.4

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

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

* [igt-dev] [PATCH i-g-t 2/4] kms_content_protection: test teardown and rebuild of I915-mei I/F
  2019-02-26  7:23 [igt-dev] [PATCH i-g-t 0/4] Coverage for HDCP2.2 Phase II Ramalingam C
  2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 1/4] kms_content_protection: Content type support Ramalingam C
@ 2019-02-26  7:23 ` Ramalingam C
  2019-02-27 10:22   ` C, Ramalingam
  2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 3/4] kms_content_protection: srm and downstream_info test Ramalingam C
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: Ramalingam C @ 2019-02-26  7:23 UTC (permalink / raw)
  To: igt-dev, daniel.vetter

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)

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 tests/kms_content_protection.c | 67 +++++++++++++++++++++++++++++++++---------
 1 file changed, 53 insertions(+), 14 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 00784e2a5f01..4563a6067a32 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)");
 
@@ -213,7 +214,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;
 
@@ -224,7 +225,12 @@ static void test_cp_enable_with_retry(igt_output_t *output,
 		if (!ret && --retry)
 			igt_debug("Retry (%d/2) ...\n", 3 - retry);
 	} while (retry && !ret);
-	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)
@@ -247,9 +253,10 @@ static void test_cp_lic(igt_output_t *output)
 	igt_assert_f(!ret, "Content Protection LIC Failed\n");
 }
 
-static void test_content_protection_on_output(igt_output_t *output,
-					      enum igt_commit_style s,
-					      bool dpms_test, int content_type)
+static void
+test_content_protection_on_output(igt_output_t *output, enum igt_commit_style s,
+				  bool dpms_test, int content_type,
+				  bool mei_reload_test)
 {
 	igt_display_t *display = &data.display;
 	igt_plane_t *primary;
@@ -270,7 +277,24 @@ 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 (mei_reload_test) {
+			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, false, 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, false);
+		}
+
 		test_cp_lic(output);
 
 		if (dpms_test) {
@@ -285,8 +309,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);
@@ -351,12 +375,16 @@ static bool sink_hdcp2_capable(igt_output_t *output)
 
 static void
 test_content_protection(enum igt_commit_style s, bool dpms_test,
-			int content_type)
+			int content_type, bool mei_reload_test)
 {
 	igt_display_t *display = &data.display;
 	igt_output_t *output;
 	int valid_tests = 0;
 
+	if (mei_reload_test)
+		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;
@@ -378,7 +406,8 @@ test_content_protection(enum igt_commit_style s, bool dpms_test,
 		}
 
 		test_content_protection_on_output(output, s, dpms_test,
-						  content_type);
+						  content_type,
+						  mei_reload_test);
 		valid_tests++;
 	}
 
@@ -396,21 +425,31 @@ igt_main
 	}
 
 	igt_subtest("legacy")
-		test_content_protection(COMMIT_LEGACY, false, CP_TYPE_0);
+		test_content_protection(COMMIT_LEGACY, false, CP_TYPE_0,
+					false);
 
 	igt_subtest("atomic") {
 		igt_require(data.display.is_atomic);
-		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_0);
+		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_0,
+					false);
 	}
 
 	igt_subtest("atomic-dpms") {
 		igt_require(data.display.is_atomic);
-		test_content_protection(COMMIT_ATOMIC, true, CP_TYPE_0);
+		test_content_protection(COMMIT_ATOMIC, true, CP_TYPE_0,
+					false);
 	}
 
 	igt_subtest("Type1") {
 		igt_require(data.display.is_atomic);
-		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_1);
+		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_1,
+					false);
+	}
+
+	igt_subtest("type1_mei_interface") {
+		igt_require(data.display.is_atomic);
+		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_1,
+					true);
 	}
 
 	igt_fixture
-- 
2.7.4

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

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

* [igt-dev] [PATCH i-g-t 3/4] kms_content_protection: srm and downstream_info test
  2019-02-26  7:23 [igt-dev] [PATCH i-g-t 0/4] Coverage for HDCP2.2 Phase II Ramalingam C
  2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 1/4] kms_content_protection: Content type support Ramalingam C
  2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 2/4] kms_content_protection: test teardown and rebuild of I915-mei I/F Ramalingam C
@ 2019-02-26  7:23 ` Ramalingam C
  2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 4/4] DO NOT MERGE: CP in fast feedback list Ramalingam C
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Ramalingam C @ 2019-02-26  7:23 UTC (permalink / raw)
  To: igt-dev, daniel.vetter

Retrieve the downstream info and use that to stitch a srm and
verify the revocation process.

Adds two more connector properties called CP_SRM and CP_Downstream_Info

SRM stitched here is polluted. Kernel trusts the userspace to validate
the SRM integrity through DCP signature. Actually this test exploits
that trust to test SRM and downstream_info features.

HDCP1.4 BKSV and HDCP2.2 receiver id of a HDCP sink is different. So we
need to force the KMD to use a single HDCP version across
downstream_info gathering and SRM setting and verifying teh revocation
process. So Type 1 is used.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 lib/igt_kms.c                  |   2 +
 lib/igt_kms.h                  |   2 +
 tests/kms_content_protection.c | 201 ++++++++++++++++++++++++++++++++++++++---
 3 files changed, 191 insertions(+), 14 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index b3d1c3456157..528cfe454816 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -200,6 +200,8 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
 	[IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
 	[IGT_CONNECTOR_VRR_CAPABLE] = "vrr_capable",
 	[IGT_CONNECTOR_CP_CONTENT_TYPE] = "CP_Content_Type",
+	[IGT_CONNECTOR_CP_SRM] = "CP_SRM",
+	[IGT_CONNECTOR_CP_DOWNSTREAM_INFO] = "CP_Downstream_Info",
 };
 
 /*
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index e152b6a2ed55..f7fb88d7e5e6 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -124,6 +124,8 @@ enum igt_atomic_connector_properties {
        IGT_CONNECTOR_CONTENT_PROTECTION,
        IGT_CONNECTOR_VRR_CAPABLE,
        IGT_CONNECTOR_CP_CONTENT_TYPE,
+       IGT_CONNECTOR_CP_SRM,
+       IGT_CONNECTOR_CP_DOWNSTREAM_INFO,
        IGT_NUM_CONNECTOR_PROPS
 };
 
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 4563a6067a32..c41e9684deb6 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -55,6 +55,109 @@ struct data {
 #define FLIP_EVENT_POLLING_TIMEOUT_MSEC		1000
 
 
+#define DRM_MODE_HDCP_KSV_LEN			5
+#define DRM_MODE_HDCP_MAX_DEVICE_CNT		127
+
+#define DRM_MODE_HDCP14_IN_FORCE		(1 << 0)
+#define DRM_MODE_HDCP22_IN_FORCE		(1 << 1)
+
+struct cp_downstream_info {
+	/* HDCP ver in force */
+	__u32 ver_in_force;
+	__u8 content_type;
+
+	/* KSV of immediate HDCP Sink. In Little-Endian Format. */
+	char bksv[DRM_MODE_HDCP_KSV_LEN];
+
+	/* Whether Immediate HDCP sink is a repeater? */
+	bool is_repeater;
+
+	/* Depth received from immediate downstream repeater */
+	__u8 depth;
+
+	/* Device count received from immediate downstream repeater */
+	__u32 device_count;
+
+	/*
+	 * Max buffer required to hold ksv list received from immediate
+	 * repeater. In this array first device_count * DRM_MODE_HDCP_KSV_LEN
+	 * will hold the valid ksv bytes.
+	 * If authentication specification is
+	 *      HDCP1.4 - each KSV's Bytes will be in Little-Endian format.
+	 *      HDCP2.2 - each KSV's Bytes will be in Big-Endian format.
+	 */
+	char ksv_list[DRM_MODE_HDCP_KSV_LEN * DRM_MODE_HDCP_MAX_DEVICE_CNT];
+};
+
+__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 parse_downstream_info(struct cp_downstream_info *ds_info)
+{
+	char *ksvs;
+	int i;
+
+	if (ds_info->ver_in_force & DRM_MODE_HDCP14_IN_FORCE)
+		igt_debug("HDCP1.4 is Enabled\n");
+	else if (ds_info->ver_in_force & DRM_MODE_HDCP22_IN_FORCE)
+		igt_debug("HDCP2.2 is Enabled. Type%d\n",
+			  ds_info->content_type & CP_TYPE_1 ? 1 : 0);
+	else
+		return;
+
+	igt_debug("\tReceiver ID: %#04x %#04x %#04x %#04x %#04x\n",
+		  ds_info->bksv[0] & 0xFF, ds_info->bksv[1] & 0xFF,
+		  ds_info->bksv[2] & 0xFF, ds_info->bksv[3] & 0xFF,
+		  ds_info->bksv[4] & 0xFF);
+
+	if (ds_info->is_repeater) {
+		igt_debug("\tHDCP sink is a Repeater\n");
+
+		igt_debug("\tDepth: %d, Device count: %d\n", ds_info->depth,
+			  ds_info->device_count);
+		ksvs = ds_info->ksv_list;
+
+		for (i = 0; i < ds_info->device_count; i++) {
+			igt_debug("\tksv-%d: %#04x %#04x %#04x %#04x %#04x\n", i,
+				  ksvs[0] & 0xFF, ksvs[1] & 0xFF,
+				  ksvs[2] & 0xFF, ksvs[3] & 0xFF,
+				  ksvs[4] & 0xFF);
+			ksvs += DRM_MODE_HDCP_KSV_LEN;
+		}
+	} else {
+		igt_debug("\tHDCP sink is a Receiver\n");
+	}
+}
+
+static void retrieve_downstream_info_prepare_srm(igt_output_t *output)
+{
+	drmModePropertyBlobRes *ds_info_prop = NULL;
+	uint64_t downstream_blob_id;
+	struct cp_downstream_info *ds_info;
+	int i;
+
+	igt_debug("CP_downstream_info property is attached\n");
+
+	downstream_blob_id =
+		igt_output_get_prop(output, IGT_CONNECTOR_CP_DOWNSTREAM_INFO);
+
+	igt_assert_f(downstream_blob_id, "Invalid downstream blob id\n");
+	ds_info_prop = drmModeGetPropertyBlob(data.drm_fd, downstream_blob_id);
+
+	igt_assert(ds_info_prop);
+	igt_assert_eq(ds_info_prop->length, sizeof(struct cp_downstream_info));
+	ds_info = ds_info_prop->data;
+
+	parse_downstream_info(ds_info);
+
+	for (i = 0; i < 5; i++)
+		facsimile_srm[i + 9] = ds_info->bksv[i];
+}
+
 static void flip_handler(int fd, unsigned int sequence, unsigned int tv_sec,
 			 unsigned int tv_usec, void *_data)
 {
@@ -164,7 +267,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 test_srm)
 {
 	igt_display_t *display = &data.display;
 	igt_plane_t *primary;
@@ -172,6 +275,25 @@ 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);
 
+	if (output->props[IGT_CONNECTOR_CP_SRM]) {
+		if (test_srm) {
+			igt_debug("CP_SRM property is updated with SRM\n");
+
+			/* Set SRM Blob to CR_SRM property */
+			igt_output_replace_prop_blob(output,
+						     IGT_CONNECTOR_CP_SRM,
+						     facsimile_srm,
+						     sizeof(facsimile_srm));
+		} else if (output->values[IGT_CONNECTOR_CP_SRM]) {
+			igt_debug("CP_SRM property is cleared\n");
+
+			/* Set SRM Blob to CR_SRM property */
+			igt_output_replace_prop_blob(output,
+						     IGT_CONNECTOR_CP_SRM,
+						     NULL, 0);
+		}
+	}
+
 	igt_output_set_prop_value(output,
 				  IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
 	if (output->props[IGT_CONNECTOR_CP_CONTENT_TYPE])
@@ -214,13 +336,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,
-				      int content_type, bool expect_failure)
+				      int content_type, bool expect_failure,
+				      bool test_srm)
 {
 	bool ret;
 
 	do {
 		test_cp_disable(output, s);
-		ret = test_cp_enable(output, s, content_type);
+		ret = test_cp_enable(output, s, content_type, test_srm);
 
 		if (!ret && --retry)
 			igt_debug("Retry (%d/2) ...\n", 3 - retry);
@@ -229,6 +352,9 @@ static void test_cp_enable_with_retry(igt_output_t *output,
 	if (expect_failure)
 		igt_assert_f(!ret,
 			     "CP Enabled. Though it is expected to fail\n");
+	else if (test_srm)
+		igt_assert_f(!ret,
+			     "CP Enabled. Though ID is revoked through SRM\n");
 	else
 		igt_assert_f(ret, "Content Protection not enabled\n");
 }
@@ -256,12 +382,12 @@ 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, int content_type,
-				  bool mei_reload_test)
+				  bool mei_reload_test, bool test_srm)
 {
 	igt_display_t *display = &data.display;
 	igt_plane_t *primary;
 	enum pipe pipe;
-	bool ret;
+	bool ret, srm_modified = false;
 
 	for_each_pipe(display, pipe) {
 		if (!igt_pipe_connector_valid(pipe, output))
@@ -276,8 +402,10 @@ test_content_protection_on_output(igt_output_t *output, enum igt_commit_style s,
 		if (!igt_pipe_is_free(display, pipe))
 			continue;
 
+		srm_modified = false;
 		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 (mei_reload_test) {
 			igt_assert_f(!igt_kmod_unload("mei_hdcp", 0),
@@ -297,6 +425,23 @@ test_content_protection_on_output(igt_output_t *output, enum igt_commit_style s,
 
 		test_cp_lic(output);
 
+		if (output->props[IGT_CONNECTOR_CP_DOWNSTREAM_INFO] &&
+		    output->props[IGT_CONNECTOR_CP_SRM] &&
+		    test_srm) {
+			retrieve_downstream_info_prepare_srm(output);
+			srm_modified = true;
+		}
+
+		if (test_srm && srm_modified) {
+			test_cp_disable(output, s);
+			test_cp_enable_with_retry(output, s, 3, content_type,
+						  false, test_srm);
+
+			/* Destroy the SRM Blob */
+			test_cp_enable_with_retry(output, s, 1, content_type,
+						  false, false);
+		}
+
 		if (dpms_test) {
 			igt_pipe_set_prop_value(display, pipe,
 						IGT_CRTC_ACTIVE, 0);
@@ -310,7 +455,8 @@ test_content_protection_on_output(igt_output_t *output, enum igt_commit_style s,
 						  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);
@@ -375,7 +521,8 @@ static bool sink_hdcp2_capable(igt_output_t *output)
 
 static void
 test_content_protection(enum igt_commit_style s, bool dpms_test,
-			int content_type, bool mei_reload_test)
+			int content_type, bool mei_reload_test,
+			bool test_srm)
 {
 	igt_display_t *display = &data.display;
 	igt_output_t *output;
@@ -407,7 +554,7 @@ test_content_protection(enum igt_commit_style s, bool dpms_test,
 
 		test_content_protection_on_output(output, s, dpms_test,
 						  content_type,
-						  mei_reload_test);
+						  mei_reload_test, test_srm);
 		valid_tests++;
 	}
 
@@ -426,30 +573,56 @@ igt_main
 
 	igt_subtest("legacy")
 		test_content_protection(COMMIT_LEGACY, false, CP_TYPE_0,
-					false);
+					false, false);
 
 	igt_subtest("atomic") {
 		igt_require(data.display.is_atomic);
 		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_0,
-					false);
+					false, false);
 	}
 
 	igt_subtest("atomic-dpms") {
 		igt_require(data.display.is_atomic);
 		test_content_protection(COMMIT_ATOMIC, true, CP_TYPE_0,
-					false);
+					false, false);
 	}
 
 	igt_subtest("Type1") {
 		igt_require(data.display.is_atomic);
 		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_1,
-					false);
+					false, false);
 	}
 
 	igt_subtest("type1_mei_interface") {
 		igt_require(data.display.is_atomic);
 		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_1,
-					true);
+					true, false);
+	}
+
+	/*
+	 * SRM subtest perform the HDCP authentication, and then retrieve the
+	 * receiver id through downstream info.
+	 *
+	 * Using the receiver ID, facsimile SRM table is modified with
+	 * receiver ID retrieved from the downstream info. After modification
+	 * SRM table is not intact as per DCP Signature.
+	 *
+	 * But Kernel believes userspace and doesn't verify the DCP signature.
+	 * So we can exploite that trust to test the SRM and downstream info
+	 * features.
+	 *
+	 * So when modified SRM is applied Authentication will fail due to
+	 * receiver ID revocation.
+	 *
+	 * And Kernel attempts HDCP2.2 always and on failure of it HDCP1.4
+	 * will be attempted. But their ID of the sink varies between 1.4 and
+	 * 2.2 versions. So we need to stick to one version. Hence HDCP2.2 is
+	 * chosen using Type 1.
+	 */
+	igt_subtest("srm") {
+		igt_require(data.display.is_atomic);
+		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_1,
+					false, true);
 	}
 
 	igt_fixture
-- 
2.7.4

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

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

* [igt-dev] [PATCH i-g-t 4/4] DO NOT MERGE: CP in fast feedback list
  2019-02-26  7:23 [igt-dev] [PATCH i-g-t 0/4] Coverage for HDCP2.2 Phase II Ramalingam C
                   ` (2 preceding siblings ...)
  2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 3/4] kms_content_protection: srm and downstream_info test Ramalingam C
@ 2019-02-26  7:23 ` Ramalingam C
  2019-02-26  8:15 ` [igt-dev] ✓ Fi.CI.BAT: success for Coverage for HDCP2.2 Phase II Patchwork
  2019-02-26  9:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 8+ messages in thread
From: Ramalingam C @ 2019-02-26  7:23 UTC (permalink / raw)
  To: igt-dev, daniel.vetter

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 a95d2e95c743..da1bbb9c1a7b 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -185,6 +185,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_cursor_legacy@basic-busy-flip-before-cursor-atomic
 igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy
 igt@kms_cursor_legacy@basic-flip-after-cursor-atomic
-- 
2.7.4

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for Coverage for HDCP2.2 Phase II
  2019-02-26  7:23 [igt-dev] [PATCH i-g-t 0/4] Coverage for HDCP2.2 Phase II Ramalingam C
                   ` (3 preceding siblings ...)
  2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 4/4] DO NOT MERGE: CP in fast feedback list Ramalingam C
@ 2019-02-26  8:15 ` Patchwork
  2019-02-26  9:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-02-26  8:15 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

Series: Coverage for HDCP2.2 Phase II
URL   : https://patchwork.freedesktop.org/series/57231/
State : success

== Summary ==

CI Bug Log - changes from IGT_4855 -> IGTPW_2521
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/57231/revisions/1/mbox/

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_content_protection@srm} (NEW):
    - {fi-icl-y}:         NOTRUN -> SKIP

  
New tests
---------

  New tests have been introduced between IGT_4855 and IGTPW_2521:

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

  * igt@kms_content_protection@srm:
    - Statuses : 37 skip(s)
    - Exec time: [0.0, 0.00] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-bsw-kefka:       PASS -> SKIP [fdo#109271]

  * igt@i915_pm_rpm@basic-rte:
    - fi-bsw-kefka:       PASS -> FAIL [fdo#108800]

  * igt@kms_content_protection@atomic:
    - fi-skl-gvtdvm:      NOTRUN -> FAIL [fdo#108597] / [fdo#108739] +1
    - fi-ivb-3520m:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-elk-e7500:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-whl-u:           NOTRUN -> SKIP [fdo#109271] +2
    - fi-cfl-8700k:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-pnv-d510:        NOTRUN -> SKIP [fdo#109271] +2
    - fi-snb-2520m:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-skl-guc:         NOTRUN -> SKIP [fdo#109271] +2
    - fi-hsw-peppy:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-apl-guc:         NOTRUN -> FAIL [fdo#108597] / [fdo#108739] +1

  * igt@kms_content_protection@legacy:
    - fi-cfl-guc:         NOTRUN -> SKIP [fdo#109271] +2
    - fi-bxt-j4205:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-kbl-r:           NOTRUN -> SKIP [fdo#109271] +2
    - fi-cfl-8109u:       NOTRUN -> FAIL [fdo#108739] +1
    - fi-kbl-guc:         NOTRUN -> SKIP [fdo#109271] +2
    - fi-bdw-gvtdvm:      NOTRUN -> SKIP [fdo#109271] +2
    - fi-gdg-551:         NOTRUN -> SKIP [fdo#109271] +2
    - fi-bwr-2160:        NOTRUN -> SKIP [fdo#109271] +2
    - fi-hsw-4770:        NOTRUN -> SKIP [fdo#109271] +2
    - fi-ivb-3770:        NOTRUN -> SKIP [fdo#109271] +2
    - fi-kbl-8809g:       NOTRUN -> SKIP [fdo#109271] +2

  * {igt@kms_content_protection@srm} (NEW):
    - fi-ilk-650:         NOTRUN -> SKIP [fdo#109271] +2
    - fi-bsw-n3050:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-bsw-kefka:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-hsw-4770r:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-cfl-8109u:       NOTRUN -> SKIP [fdo#109271]
    - fi-blb-e6850:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-kbl-7500u:       NOTRUN -> SKIP [fdo#109271]
    - fi-bdw-5557u:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-kbl-7567u:       NOTRUN -> SKIP [fdo#109271]
    - fi-skl-6600u:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-kbl-7560u:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-byt-j1900:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-apl-guc:         NOTRUN -> SKIP [fdo#109271]
    - fi-byt-n2820:       NOTRUN -> SKIP [fdo#109271] +2
    - fi-skl-6700k2:      NOTRUN -> SKIP [fdo#109271]
    - fi-skl-6260u:       NOTRUN -> SKIP [fdo#109271]
    - fi-skl-gvtdvm:      NOTRUN -> SKIP [fdo#109271]
    - fi-kbl-x1275:       NOTRUN -> SKIP [fdo#109271]

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
    - fi-cfl-8109u:       PASS -> FAIL [fdo#109495] +1

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-kbl-7500u:       DMESG-WARN [fdo#105128] / [fdo#107139] -> PASS

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

  [fdo#105128]: https://bugs.freedesktop.org/show_bug.cgi?id=105128
  [fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
  [fdo#108597]: https://bugs.freedesktop.org/show_bug.cgi?id=108597
  [fdo#108739]: https://bugs.freedesktop.org/show_bug.cgi?id=108739
  [fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109495]: https://bugs.freedesktop.org/show_bug.cgi?id=109495
  [fdo#109527]: https://bugs.freedesktop.org/show_bug.cgi?id=109527


Participating hosts (42 -> 38)
------------------------------

  Missing    (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-icl-u3 


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

    * IGT: IGT_4855 -> IGTPW_2521

  CI_DRM_5659: bffea990c63087245e8501df82fd45f24ce6ad1f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2521: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2521/
  IGT_4855: 7cc428962158ed4335d998a5cd447050d423e618 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_content_protection@srm
+igt@kms_content_protection@type1
+igt@kms_content_protection@type1_mei_interface

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for Coverage for HDCP2.2 Phase II
  2019-02-26  7:23 [igt-dev] [PATCH i-g-t 0/4] Coverage for HDCP2.2 Phase II Ramalingam C
                   ` (4 preceding siblings ...)
  2019-02-26  8:15 ` [igt-dev] ✓ Fi.CI.BAT: success for Coverage for HDCP2.2 Phase II Patchwork
@ 2019-02-26  9:49 ` Patchwork
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-02-26  9:49 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

Series: Coverage for HDCP2.2 Phase II
URL   : https://patchwork.freedesktop.org/series/57231/
State : success

== Summary ==

CI Bug Log - changes from IGT_4855_full -> IGTPW_2521_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/57231/revisions/1/mbox/

New tests
---------

  New tests have been introduced between IGT_4855_full and IGTPW_2521_full:

### New IGT tests (3) ###

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

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

  * igt@kms_content_protection@type1_mei_interface:
    - Statuses : 4 skip(s)
    - Exec time: [0.00, 0.04] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_param@non-root-set:
    - shard-apl:          PASS -> INCOMPLETE [fdo#103927]

  * igt@gem_eio@reset-stress:
    - shard-snb:          PASS -> FAIL [fdo#109661]

  * igt@gem_flink_basic@bad-open:
    - shard-snb:          PASS -> INCOMPLETE [fdo#105411]

  * igt@gem_wait@write-busy-bsd2:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +9

  * igt@kms_atomic_transition@3x-modeset-transitions-fencing:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_atomic_transition@6x-modeset-transitions:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
    - shard-kbl:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
    - shard-glk:          PASS -> FAIL [fdo#108145]

  * igt@kms_color@pipe-a-ctm-max:
    - shard-apl:          PASS -> FAIL [fdo#108147]

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-apl:          PASS -> FAIL [fdo#103191] / [fdo#103232]

  * igt@kms_cursor_crc@cursor-128x42-sliding:
    - shard-kbl:          PASS -> FAIL [fdo#103232]
    - shard-apl:          PASS -> FAIL [fdo#103232] +6

  * igt@kms_cursor_crc@cursor-64x21-onscreen:
    - shard-glk:          NOTRUN -> FAIL [fdo#103232]

  * igt@kms_cursor_crc@cursor-alpha-opaque:
    - shard-kbl:          PASS -> FAIL [fdo#109350]
    - shard-glk:          PASS -> FAIL [fdo#109350]

  * igt@kms_cursor_crc@cursor-size-change:
    - shard-glk:          PASS -> FAIL [fdo#103232]

  * igt@kms_draw_crc@draw-method-rgb565-mmap-gtt-ytiled:
    - shard-glk:          PASS -> FAIL [fdo#103184]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-apl:          PASS -> FAIL [fdo#103167] +3

  * igt@kms_frontbuffer_tracking@fbc-1p-rte:
    - shard-apl:          PASS -> FAIL [fdo#103167] / [fdo#105682]

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-mmap-cpu:
    - shard-glk:          PASS -> FAIL [fdo#103167] +11

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-blt:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +10

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          PASS -> INCOMPLETE [fdo#103665]

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-mmap-cpu:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +18

  * igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
    - shard-glk:          PASS -> FAIL [fdo#108948]

  * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
    - shard-glk:          PASS -> FAIL [fdo#103166] +8
    - shard-kbl:          PASS -> FAIL [fdo#103166]

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-apl:          PASS -> FAIL [fdo#103166] +5

  * igt@kms_psr@primary_blt:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +36

  * igt@kms_universal_plane@universal-plane-gen9-features-pipe-f:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2

  * igt@kms_vblank@pipe-a-ts-continuation-modeset:
    - shard-apl:          PASS -> FAIL [fdo#104894] +1

  * igt@prime_nv_pcopy@test3_2:
    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] +25

  
#### Possible fixes ####

  * igt@gem_eio@unwedge-stress:
    - shard-snb:          FAIL [fdo#109661] -> PASS

  * igt@kms_color@pipe-a-degamma:
    - shard-apl:          FAIL [fdo#104782] / [fdo#108145] -> PASS
    - shard-kbl:          FAIL [fdo#104782] / [fdo#108145] -> PASS

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-apl:          FAIL [fdo#103191] / [fdo#103232] -> PASS

  * igt@kms_cursor_crc@cursor-256x85-sliding:
    - shard-apl:          FAIL [fdo#103232] -> PASS +3

  * igt@kms_cursor_crc@cursor-64x64-sliding:
    - shard-kbl:          FAIL [fdo#103232] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
    - shard-apl:          FAIL [fdo#103167] -> PASS +2
    - shard-kbl:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
    - shard-glk:          FAIL [fdo#103167] -> PASS +1

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS +1

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
    - shard-glk:          FAIL [fdo#103166] -> PASS
    - shard-apl:          FAIL [fdo#103166] -> PASS +3

  * igt@kms_properties@crtc-properties-legacy:
    - shard-hsw:          INCOMPLETE [fdo#103540] -> PASS

  * igt@kms_universal_plane@universal-plane-pipe-b-functional:
    - shard-kbl:          FAIL [fdo#103166] -> PASS

  * igt@kms_vblank@pipe-b-ts-continuation-dpms-suspend:
    - shard-kbl:          FAIL [fdo#104894] -> PASS
    - shard-apl:          FAIL [fdo#104894] -> PASS

  * igt@perf_pmu@rc6:
    - shard-kbl:          SKIP [fdo#109271] -> PASS

  * igt@perf_pmu@rc6-runtime-pm-long:
    - shard-kbl:          FAIL [fdo#105010] -> PASS

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

  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
  [fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


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

    * IGT: IGT_4855 -> IGTPW_2521

  CI_DRM_5659: bffea990c63087245e8501df82fd45f24ce6ad1f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2521: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2521/
  IGT_4855: 7cc428962158ed4335d998a5cd447050d423e618 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t 2/4] kms_content_protection: test teardown and rebuild of I915-mei I/F
  2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 2/4] kms_content_protection: test teardown and rebuild of I915-mei I/F Ramalingam C
@ 2019-02-27 10:22   ` C, Ramalingam
  0 siblings, 0 replies; 8+ messages in thread
From: C, Ramalingam @ 2019-02-27 10:22 UTC (permalink / raw)
  To: igt-dev, daniel.vetter

danvet,

Are we meeting the expectation for the i915-mei interface testing...?

--Ram.

On 2/26/2019 12:53 PM, Ramalingam C wrote:
> 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)
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
>   tests/kms_content_protection.c | 67 +++++++++++++++++++++++++++++++++---------
>   1 file changed, 53 insertions(+), 14 deletions(-)
>
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index 00784e2a5f01..4563a6067a32 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)");
>   
> @@ -213,7 +214,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;
>   
> @@ -224,7 +225,12 @@ static void test_cp_enable_with_retry(igt_output_t *output,
>   		if (!ret && --retry)
>   			igt_debug("Retry (%d/2) ...\n", 3 - retry);
>   	} while (retry && !ret);
> -	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)
> @@ -247,9 +253,10 @@ static void test_cp_lic(igt_output_t *output)
>   	igt_assert_f(!ret, "Content Protection LIC Failed\n");
>   }
>   
> -static void test_content_protection_on_output(igt_output_t *output,
> -					      enum igt_commit_style s,
> -					      bool dpms_test, int content_type)
> +static void
> +test_content_protection_on_output(igt_output_t *output, enum igt_commit_style s,
> +				  bool dpms_test, int content_type,
> +				  bool mei_reload_test)
>   {
>   	igt_display_t *display = &data.display;
>   	igt_plane_t *primary;
> @@ -270,7 +277,24 @@ 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 (mei_reload_test) {
> +			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, false, 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, false);
> +		}
> +
>   		test_cp_lic(output);
>   
>   		if (dpms_test) {
> @@ -285,8 +309,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);
> @@ -351,12 +375,16 @@ static bool sink_hdcp2_capable(igt_output_t *output)
>   
>   static void
>   test_content_protection(enum igt_commit_style s, bool dpms_test,
> -			int content_type)
> +			int content_type, bool mei_reload_test)
>   {
>   	igt_display_t *display = &data.display;
>   	igt_output_t *output;
>   	int valid_tests = 0;
>   
> +	if (mei_reload_test)
> +		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;
> @@ -378,7 +406,8 @@ test_content_protection(enum igt_commit_style s, bool dpms_test,
>   		}
>   
>   		test_content_protection_on_output(output, s, dpms_test,
> -						  content_type);
> +						  content_type,
> +						  mei_reload_test);
>   		valid_tests++;
>   	}
>   
> @@ -396,21 +425,31 @@ igt_main
>   	}
>   
>   	igt_subtest("legacy")
> -		test_content_protection(COMMIT_LEGACY, false, CP_TYPE_0);
> +		test_content_protection(COMMIT_LEGACY, false, CP_TYPE_0,
> +					false);
>   
>   	igt_subtest("atomic") {
>   		igt_require(data.display.is_atomic);
> -		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_0);
> +		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_0,
> +					false);
>   	}
>   
>   	igt_subtest("atomic-dpms") {
>   		igt_require(data.display.is_atomic);
> -		test_content_protection(COMMIT_ATOMIC, true, CP_TYPE_0);
> +		test_content_protection(COMMIT_ATOMIC, true, CP_TYPE_0,
> +					false);
>   	}
>   
>   	igt_subtest("Type1") {
>   		igt_require(data.display.is_atomic);
> -		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_1);
> +		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_1,
> +					false);
> +	}
> +
> +	igt_subtest("type1_mei_interface") {
> +		igt_require(data.display.is_atomic);
> +		test_content_protection(COMMIT_ATOMIC, false, CP_TYPE_1,
> +					true);
>   	}
>   
>   	igt_fixture

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

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

end of thread, other threads:[~2019-02-27 10:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-26  7:23 [igt-dev] [PATCH i-g-t 0/4] Coverage for HDCP2.2 Phase II Ramalingam C
2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 1/4] kms_content_protection: Content type support Ramalingam C
2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 2/4] kms_content_protection: test teardown and rebuild of I915-mei I/F Ramalingam C
2019-02-27 10:22   ` C, Ramalingam
2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 3/4] kms_content_protection: srm and downstream_info test Ramalingam C
2019-02-26  7:23 ` [igt-dev] [PATCH i-g-t 4/4] DO NOT MERGE: CP in fast feedback list Ramalingam C
2019-02-26  8:15 ` [igt-dev] ✓ Fi.CI.BAT: success for Coverage for HDCP2.2 Phase II Patchwork
2019-02-26  9:49 ` [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.