All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v3 0/2] Add subtests for HDCP over MST
@ 2020-11-03  8:26 Karthik B S
  2020-11-03  8:26 ` [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests Karthik B S
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Karthik B S @ 2020-11-03  8:26 UTC (permalink / raw)
  To: igt-dev

Add subtests to verify content protection on MST set up.

Karthik B S (2):
  tests/kms_content_protection: Add MST subtests
  CI HAX: Add MST tests to fast feedback testlist

 tests/intel-ci/fast-feedback.testlist |   6 +
 tests/kms_content_protection.c        | 234 +++++++++++++++++++++++++-
 2 files changed, 239 insertions(+), 1 deletion(-)

-- 
2.22.0

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

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

* [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests
  2020-11-03  8:26 [igt-dev] [PATCH i-g-t v3 0/2] Add subtests for HDCP over MST Karthik B S
@ 2020-11-03  8:26 ` Karthik B S
  2020-11-10  9:41   ` Anshuman Gupta
  2020-11-10 13:45   ` Ramalingam C
  2020-11-03  8:26 ` [igt-dev] [PATCH i-g-t v3 2/2] CI HAX: Add MST tests to fast feedback testlist Karthik B S
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Karthik B S @ 2020-11-03  8:26 UTC (permalink / raw)
  To: igt-dev

Add subtests to verify content protection simultaneously on
multiple outputs on the same MST topology.

v3: -Remove the logging which are no longer required. (Anshuman)
    -Add logic to verify that CP is still enabled on other connectors
     while disabling it on one of the connectors. (Anshuman)

Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Karthik B S <karthik.b.s@intel.com>
---
 tests/kms_content_protection.c | 234 ++++++++++++++++++++++++++++++++-
 1 file changed, 233 insertions(+), 1 deletion(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 303ed418..cb895a72 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -42,6 +42,12 @@ struct data {
 	struct udev_monitor *uevent_monitor;
 } data;
 
+typedef struct {
+	float red;
+	float green;
+	float blue;
+} color_t;
+
 /* Test flags */
 #define CP_DPMS					(1 << 0)
 #define CP_LIC					(1 << 1)
@@ -457,6 +463,54 @@ static bool sink_hdcp2_capable(igt_output_t *output)
 
 	return strstr(buf, "HDCP2.2");
 }
+color_t red  = { 1.0f, 0.0f, 0.0f };
+color_t green  = { 0.0f, 0.1f, 0.0f };
+
+static void prepare_modeset_on_mst_output(igt_output_t *output, enum pipe pipe)
+{
+	drmModeConnectorPtr c = output->config.connector;
+	igt_display_t *display = &data.display;
+	drmModeModeInfo *mode;
+	igt_plane_t *primary;
+	int i;
+
+	mode = igt_output_get_mode(output);
+
+	/*
+	 * TODO: Add logic to use the highest possible modes on each output.
+	 * Currently using 2k modes by default on all the outputs.
+	 */
+	igt_debug("Before mode override: Output %s Mode hdisplay %d Mode vdisplay %d\n",
+		   output->name, mode->hdisplay, mode->vdisplay);
+
+	if (mode->hdisplay > 1920 && mode->vdisplay > 1080) {
+		for (i = 0; i < c->count_modes; i++) {
+			if (c->modes[i].hdisplay <= 1920 && c->modes[i].vdisplay <= 1080) {
+				mode = &c->modes[i];
+				igt_output_override_mode(output, mode);
+				break;
+			}
+		}
+	}
+
+	igt_debug("After mode overide: Output %s Mode hdisplay %d Mode vdisplay %d\n",
+		   output->name, mode->hdisplay, mode->vdisplay);
+
+	if (pipe % 2) {
+		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
+				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
+				    red.red, red.blue, red.green, &data.red);
+	} else {
+		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
+				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
+				    green.red, green.blue, green.green, &data.green);
+	}
+
+	igt_output_set_pipe(output, pipe);
+	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	igt_plane_set_fb(primary, NULL);
+	igt_plane_set_fb(primary, pipe % 2 ? &data.red : &data.green);
+}
 
 static void
 test_content_protection(enum igt_commit_style s, int content_type)
@@ -496,6 +550,162 @@ test_content_protection(enum igt_commit_style s, int content_type)
 	igt_require_f(valid_tests, "No connector found with HDCP capability\n");
 }
 
+static bool is_output_support_cp_capable(igt_output_t *output, int content_type)
+{
+		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
+			return false;
+
+		if (!output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE] &&
+		    content_type)
+			return false;
+
+		if (content_type && !sink_hdcp2_capable(output)) {
+			igt_info("\tSkip %s (Sink has no HDCP2.2 support)\n",
+				 output->name);
+			return false;
+		} else if (!sink_hdcp_capable(output)) {
+			igt_info("\tSkip %s (Sink has no HDCP support)\n",
+				 output->name);
+			return false;
+		}
+
+		return true;
+}
+
+static int parse_path_blob(char *blob_data)
+{
+	int connector_id;
+	char *encoder;
+
+	encoder = strtok(blob_data, ":");
+	igt_assert_f(!strcmp(encoder, "mst"), "PATH connector property expected to have 'mst'\n");
+
+	connector_id = atoi(strtok(NULL, "-"));
+
+	return connector_id;
+}
+
+static bool is_dp_mst_output(igt_output_t *output, int i)
+{
+	drmModePropertyBlobPtr path_blob = NULL;
+	uint64_t path_blob_id;
+	drmModeConnector *connector = output->config.connector;
+	struct kmstest_connector_config config;
+	const char *encoder;
+	int connector_id;
+	static int prev_connector_id;
+
+	kmstest_get_connector_config(data.drm_fd, output->config.connector->connector_id, -1, &config);
+	encoder = kmstest_encoder_type_str(config.encoder->encoder_type);
+
+	if (strcmp(encoder, "DP MST"))
+		return false;
+
+	igt_assert(kmstest_get_property(data.drm_fd, connector->connector_id,
+		   DRM_MODE_OBJECT_CONNECTOR, "PATH", NULL,
+		   &path_blob_id, NULL));
+
+	igt_assert(path_blob = drmModeGetPropertyBlob(data.drm_fd, path_blob_id));
+
+	connector_id = parse_path_blob((char *) path_blob->data);
+
+	/* Check if all the MST outputs are in the same topology */
+	if (i == 0) {
+		prev_connector_id = connector_id;
+	} else {
+		if (connector_id != prev_connector_id)
+			return false;
+	}
+
+	drmModeFreePropertyBlob(path_blob);
+
+	return true;
+}
+
+static void
+test_content_protection_mst(int content_type)
+{
+	igt_display_t *display = &data.display;
+	igt_output_t *output;
+	int valid_outputs = 0, ret, count, max_pipe = 0, i;
+	enum pipe pipe;
+	igt_output_t *mst_output[IGT_MAX_PIPES];
+
+	for_each_connected_output(display, output) {
+		if (!is_dp_mst_output(output, valid_outputs))
+			continue;
+
+		if (!is_output_support_cp_capable(output, content_type))
+			continue;
+
+		mst_output[valid_outputs] = output;
+		valid_outputs++;
+	}
+
+	igt_require_f(valid_outputs > 1, "No DP MST set up with >= 2 outputs found in a single topology\n");
+
+	for_each_pipe(display, pipe)
+		max_pipe++;
+
+	if (valid_outputs > max_pipe)
+		valid_outputs = max_pipe;
+
+	pipe = PIPE_A;
+
+	for (count = 0; count < valid_outputs; count++) {
+		igt_assert_f(igt_pipe_connector_valid(pipe, mst_output[count]), "Output-pipe combination invalid\n");
+
+		prepare_modeset_on_mst_output(mst_output[count], pipe);
+		pipe++;
+	}
+
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
+	for (count = 0; count < valid_outputs; count++) {
+		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
+
+		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
+			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
+	}
+
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
+	for (count = 0; count < valid_outputs; count++) {
+		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
+		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
+		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
+
+		if (data.cp_tests & CP_LIC)
+			test_cp_lic(mst_output[count]);
+	}
+
+	for (count = 0; count < valid_outputs; count++) {
+		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
+		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
+		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
+
+		igt_debug("CP Prop being UNDESIRED on %s\n", mst_output[count]->name);
+		test_cp_disable(mst_output[count], COMMIT_ATOMIC);
+
+		/* CP is expected to be still enabled on other outputs*/
+		for (i = 0; i < valid_outputs; i++) {
+			if (i == count)
+				continue;
+
+			igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[i]->name);
+			ret = wait_for_prop_value(mst_output[i], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
+			igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[i]->name);
+		}
+
+		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
+
+		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
+			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
+	}
+}
+
 static void test_content_protection_cleanup(void)
 {
 	igt_display_t *display = &data.display;
@@ -511,7 +721,7 @@ static void test_content_protection_cleanup(void)
 		if (val == CP_UNDESIRED)
 			continue;
 
-		igt_info("CP Prop being UNDESIRED on %s\n", output->name);
+		igt_debug("CP Prop being UNDESIRED on %s\n", output->name);
 		test_cp_disable(output, COMMIT_ATOMIC);
 	}
 }
@@ -592,6 +802,28 @@ igt_main
 		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
 	}
 
+	igt_describe("Test Content protection over DP MST");
+	igt_subtest("dp-mst-type-0") {
+		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
+	}
+
+	igt_describe("Test Content protection over DP MST with LIC");
+	igt_subtest("dp-mst-lic-type-0") {
+		data.cp_tests = CP_LIC;
+		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
+	}
+
+	igt_describe("Test Content protection over DP MST");
+	igt_subtest("dp-mst-type-1") {
+		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
+	}
+
+	igt_describe("Test Content protection over DP MST with LIC");
+	igt_subtest("dp-mst-lic-type-1") {
+		data.cp_tests = CP_LIC;
+		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
+	}
+
 	igt_fixture {
 		test_content_protection_cleanup();
 		igt_display_fini(&data.display);
-- 
2.22.0

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

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

* [igt-dev] [PATCH i-g-t v3 2/2] CI HAX: Add MST tests to fast feedback testlist
  2020-11-03  8:26 [igt-dev] [PATCH i-g-t v3 0/2] Add subtests for HDCP over MST Karthik B S
  2020-11-03  8:26 ` [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests Karthik B S
@ 2020-11-03  8:26 ` Karthik B S
  2020-11-03 11:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Add subtests for HDCP over MST (rev2) Patchwork
  2020-11-03 17:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  3 siblings, 0 replies; 10+ messages in thread
From: Karthik B S @ 2020-11-03  8:26 UTC (permalink / raw)
  To: igt-dev

Add the MST subtests to the fast feedback test list as
shards TGL does not have HDCP panels.

v3: -Fix Typo. (Petri)

Signed-off-by: Karthik B S <karthik.b.s@intel.com>
---
 tests/intel-ci/fast-feedback.testlist | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index 83722f83..e4c1c335 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -155,6 +155,12 @@ igt@vgem_basic@mmap
 igt@vgem_basic@second-client
 igt@vgem_basic@sysfs
 
+# HAX: Temporary addition to the fast-feedback list as shards doesnt have MST setup.
+igt@kms_content_protection@dp-mst-type-0
+igt@kms_content_protection@dp-mst-lic-type-0
+igt@kms_content_protection@dp-mst-type-1
+igt@kms_content_protection@dp-mst-lic-type-1
+
 # All tests that do module unloading and reloading are executed last.
 # They will sometimes reveal issues of earlier tests leaving the
 # driver in a broken state that is not otherwise noticed in that test.
-- 
2.22.0

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for Add subtests for HDCP over MST (rev2)
  2020-11-03  8:26 [igt-dev] [PATCH i-g-t v3 0/2] Add subtests for HDCP over MST Karthik B S
  2020-11-03  8:26 ` [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests Karthik B S
  2020-11-03  8:26 ` [igt-dev] [PATCH i-g-t v3 2/2] CI HAX: Add MST tests to fast feedback testlist Karthik B S
@ 2020-11-03 11:22 ` Patchwork
  2020-11-03 17:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  3 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2020-11-03 11:22 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 6605 bytes --]

== Series Details ==

Series: Add subtests for HDCP over MST (rev2)
URL   : https://patchwork.freedesktop.org/series/82987/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9251 -> IGTPW_5121
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/index.html

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_content_protection@dp-mst-lic-type-0} (NEW):
    - fi-tgl-u2:          NOTRUN -> [SKIP][1] +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-tgl-u2/igt@kms_content_protection@dp-mst-lic-type-0.html
    - {fi-ehl-1}:         NOTRUN -> [SKIP][2] +3 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-ehl-1/igt@kms_content_protection@dp-mst-lic-type-0.html

  * {igt@kms_content_protection@dp-mst-lic-type-1} (NEW):
    - fi-cml-u2:          NOTRUN -> [SKIP][3] +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-cml-u2/igt@kms_content_protection@dp-mst-lic-type-1.html
    - fi-icl-y:           NOTRUN -> [SKIP][4] +3 similar issues
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-icl-y/igt@kms_content_protection@dp-mst-lic-type-1.html
    - fi-cml-s:           NOTRUN -> [SKIP][5] +3 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-cml-s/igt@kms_content_protection@dp-mst-lic-type-1.html

  * {igt@kms_content_protection@dp-mst-type-0} (NEW):
    - {fi-tgl-dsi}:       NOTRUN -> [SKIP][6] +3 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-tgl-dsi/igt@kms_content_protection@dp-mst-type-0.html

  * {igt@kms_content_protection@dp-mst-type-1} (NEW):
    - fi-icl-u2:          NOTRUN -> [SKIP][7] +3 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-icl-u2/igt@kms_content_protection@dp-mst-type-1.html

  
New tests
---------

  New tests have been introduced between CI_DRM_9251 and IGTPW_5121:

### New IGT tests (4) ###

  * igt@kms_content_protection@dp-mst-lic-type-0:
    - Statuses : 37 skip(s)
    - Exec time: [0.0, 0.01] s

  * igt@kms_content_protection@dp-mst-lic-type-1:
    - Statuses : 37 skip(s)
    - Exec time: [0.0, 0.00] s

  * igt@kms_content_protection@dp-mst-type-0:
    - Statuses : 37 skip(s)
    - Exec time: [0.0, 0.00] s

  * igt@kms_content_protection@dp-mst-type-1:
    - Statuses : 37 skip(s)
    - Exec time: [0.0, 0.00] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@core_hotunplug@unbind-rebind:
    - fi-blb-e6850:       [PASS][8] -> [INCOMPLETE][9] ([i915#2540])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/fi-blb-e6850/igt@core_hotunplug@unbind-rebind.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-blb-e6850/igt@core_hotunplug@unbind-rebind.html

  * igt@i915_module_load@reload:
    - fi-icl-u2:          [PASS][10] -> [DMESG-WARN][11] ([i915#1982])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/fi-icl-u2/igt@i915_module_load@reload.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-icl-u2/igt@i915_module_load@reload.html

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-bsw-kefka:       [PASS][12] -> [DMESG-WARN][13] ([i915#1982])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/fi-bsw-kefka/igt@i915_pm_rpm@basic-pci-d3-state.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-bsw-kefka/igt@i915_pm_rpm@basic-pci-d3-state.html

  
#### Possible fixes ####

  * igt@kms_busy@basic@modeset:
    - {fi-tgl-dsi}:       [DMESG-WARN][14] ([i915#1982]) -> [PASS][15] +1 similar issue
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/fi-tgl-dsi/igt@kms_busy@basic@modeset.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-tgl-dsi/igt@kms_busy@basic@modeset.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-apl-guc:         [DMESG-WARN][16] ([i915#1635] / [i915#1982]) -> [PASS][17]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/fi-apl-guc/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-apl-guc/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
    - fi-icl-u2:          [DMESG-WARN][18] ([i915#1982]) -> [PASS][19] +1 similar issue
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/fi-icl-u2/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-icl-u2/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a:
    - {fi-tgl-dsi}:       [DMESG-WARN][20] ([i915#402]) -> [PASS][21]
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/fi-tgl-dsi/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/fi-tgl-dsi/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a.html

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

  [i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2540]: https://gitlab.freedesktop.org/drm/intel/issues/2540
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402


Participating hosts (43 -> 39)
------------------------------

  Missing    (4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5830 -> IGTPW_5121

  CI-20190529: 20190529
  CI_DRM_9251: ed79ec92754cf19d3cc924fce8ab915e541d5761 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5121: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/index.html
  IGT_5830: 12d370cb57e0cfcb781c87ad9e15e68b17a1f41f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_content_protection@dp-mst-lic-type-0
+igt@kms_content_protection@dp-mst-lic-type-1
+igt@kms_content_protection@dp-mst-type-0
+igt@kms_content_protection@dp-mst-type-1

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/index.html

[-- Attachment #1.2: Type: text/html, Size: 7979 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for Add subtests for HDCP over MST (rev2)
  2020-11-03  8:26 [igt-dev] [PATCH i-g-t v3 0/2] Add subtests for HDCP over MST Karthik B S
                   ` (2 preceding siblings ...)
  2020-11-03 11:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Add subtests for HDCP over MST (rev2) Patchwork
@ 2020-11-03 17:39 ` Patchwork
  3 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2020-11-03 17:39 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 26051 bytes --]

== Series Details ==

Series: Add subtests for HDCP over MST (rev2)
URL   : https://patchwork.freedesktop.org/series/82987/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9251_full -> IGTPW_5121_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_5121_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_5121_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/index.html

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_content_protection@dp-mst-lic-type-1} (NEW):
    - shard-iclb:         NOTRUN -> [SKIP][1] +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb4/igt@kms_content_protection@dp-mst-lic-type-1.html

  * {igt@kms_content_protection@dp-mst-type-0} (NEW):
    - shard-tglb:         NOTRUN -> [SKIP][2] +3 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb5/igt@kms_content_protection@dp-mst-type-0.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-tglb:         [PASS][3] -> [FAIL][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  
#### Warnings ####

  * igt@runner@aborted:
    - shard-tglb:         [FAIL][5] ([i915#2439]) -> [FAIL][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb3/igt@runner@aborted.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb6/igt@runner@aborted.html

  
New tests
---------

  New tests have been introduced between CI_DRM_9251_full and IGTPW_5121_full:

### New IGT tests (4) ###

  * igt@kms_content_protection@dp-mst-lic-type-0:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_content_protection@dp-mst-lic-type-1:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_content_protection@dp-mst-type-0:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_content_protection@dp-mst-type-1:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@device_reset@unbind-reset-rebind:
    - shard-glk:          [PASS][7] -> [INCOMPLETE][8] ([i915#2283])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-glk3/igt@device_reset@unbind-reset-rebind.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-glk3/igt@device_reset@unbind-reset-rebind.html
    - shard-apl:          [PASS][9] -> [INCOMPLETE][10] ([i915#1635] / [i915#2283])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-apl3/igt@device_reset@unbind-reset-rebind.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-apl8/igt@device_reset@unbind-reset-rebind.html
    - shard-kbl:          [PASS][11] -> [INCOMPLETE][12] ([i915#2283])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-kbl6/igt@device_reset@unbind-reset-rebind.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-kbl1/igt@device_reset@unbind-reset-rebind.html
    - shard-tglb:         [PASS][13] -> [INCOMPLETE][14] ([i915#1602] / [i915#750])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb6/igt@device_reset@unbind-reset-rebind.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb6/igt@device_reset@unbind-reset-rebind.html
    - shard-iclb:         [PASS][15] -> [INCOMPLETE][16] ([i915#2283])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb4/igt@device_reset@unbind-reset-rebind.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb8/igt@device_reset@unbind-reset-rebind.html

  * igt@gem_exec_parallel@engines@contexts:
    - shard-snb:          [PASS][17] -> [INCOMPLETE][18] ([i915#82])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-snb5/igt@gem_exec_parallel@engines@contexts.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-snb5/igt@gem_exec_parallel@engines@contexts.html

  * igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait:
    - shard-kbl:          [PASS][19] -> [SKIP][20] ([fdo#109271])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-kbl1/igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-kbl7/igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait.html
    - shard-glk:          [PASS][21] -> [SKIP][22] ([fdo#109271])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-glk9/igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-glk4/igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait.html
    - shard-apl:          [PASS][23] -> [SKIP][24] ([fdo#109271] / [i915#1635])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-apl3/igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-apl7/igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait.html

  * igt@kms_cursor_edge_walk@pipe-a-128x128-top-edge:
    - shard-glk:          [PASS][25] -> [DMESG-WARN][26] ([i915#1982]) +6 similar issues
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-glk9/igt@kms_cursor_edge_walk@pipe-a-128x128-top-edge.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-glk2/igt@kms_cursor_edge_walk@pipe-a-128x128-top-edge.html

  * igt@kms_cursor_legacy@flip-vs-cursor-crc-legacy:
    - shard-tglb:         [PASS][27] -> [FAIL][28] ([i915#2346])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb3/igt@kms_cursor_legacy@flip-vs-cursor-crc-legacy.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb6/igt@kms_cursor_legacy@flip-vs-cursor-crc-legacy.html

  * igt@kms_draw_crc@draw-method-rgb565-render-untiled:
    - shard-snb:          [PASS][29] -> [FAIL][30] ([i915#54])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-snb5/igt@kms_draw_crc@draw-method-rgb565-render-untiled.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-snb5/igt@kms_draw_crc@draw-method-rgb565-render-untiled.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@a-vga1:
    - shard-hsw:          [PASS][31] -> [DMESG-WARN][32] ([i915#1982]) +1 similar issue
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-hsw7/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-vga1.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-hsw1/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-vga1.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-render:
    - shard-glk:          [PASS][33] -> [FAIL][34] ([i915#49])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-glk1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-render.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-glk1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-render.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-gtt:
    - shard-tglb:         [PASS][35] -> [DMESG-WARN][36] ([i915#1982]) +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-gtt.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb8/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-gtt.html

  * igt@kms_plane@plane-position-covered-pipe-c-planes:
    - shard-apl:          [PASS][37] -> [FAIL][38] ([i915#1635] / [i915#247])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-apl8/igt@kms_plane@plane-position-covered-pipe-c-planes.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-apl7/igt@kms_plane@plane-position-covered-pipe-c-planes.html
    - shard-kbl:          [PASS][39] -> [FAIL][40] ([i915#247])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-kbl4/igt@kms_plane@plane-position-covered-pipe-c-planes.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-kbl4/igt@kms_plane@plane-position-covered-pipe-c-planes.html

  * igt@kms_psr@psr2_sprite_mmap_cpu:
    - shard-iclb:         [PASS][41] -> [SKIP][42] ([fdo#109441]) +1 similar issue
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb6/igt@kms_psr@psr2_sprite_mmap_cpu.html

  * igt@kms_universal_plane@universal-plane-gen9-features-pipe-a:
    - shard-kbl:          [PASS][43] -> [DMESG-WARN][44] ([i915#1982]) +4 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-kbl6/igt@kms_universal_plane@universal-plane-gen9-features-pipe-a.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-kbl2/igt@kms_universal_plane@universal-plane-gen9-features-pipe-a.html

  * igt@kms_vblank@pipe-c-wait-forked-busy-hang:
    - shard-apl:          [PASS][45] -> [DMESG-WARN][46] ([i915#1635] / [i915#1982]) +6 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-apl6/igt@kms_vblank@pipe-c-wait-forked-busy-hang.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-apl2/igt@kms_vblank@pipe-c-wait-forked-busy-hang.html

  * igt@perf@non-sampling-read-error:
    - shard-tglb:         [PASS][47] -> [SKIP][48] ([i915#1354])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb2/igt@perf@non-sampling-read-error.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb6/igt@perf@non-sampling-read-error.html
    - shard-apl:          [PASS][49] -> [SKIP][50] ([fdo#109271] / [i915#1354] / [i915#1635])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-apl7/igt@perf@non-sampling-read-error.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-apl7/igt@perf@non-sampling-read-error.html
    - shard-glk:          [PASS][51] -> [SKIP][52] ([fdo#109271] / [i915#1354])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-glk2/igt@perf@non-sampling-read-error.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-glk9/igt@perf@non-sampling-read-error.html
    - shard-hsw:          [PASS][53] -> [SKIP][54] ([fdo#109271]) +1 similar issue
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-hsw6/igt@perf@non-sampling-read-error.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-hsw2/igt@perf@non-sampling-read-error.html
    - shard-kbl:          [PASS][55] -> [SKIP][56] ([fdo#109271] / [i915#1354])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-kbl3/igt@perf@non-sampling-read-error.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-kbl4/igt@perf@non-sampling-read-error.html
    - shard-iclb:         [PASS][57] -> [SKIP][58] ([i915#1354])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb6/igt@perf@non-sampling-read-error.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb7/igt@perf@non-sampling-read-error.html

  
#### Possible fixes ####

  * igt@core_hotunplug@hotrebind-lateclose:
    - shard-iclb:         [DMESG-WARN][59] ([i915#1982]) -> [PASS][60] +1 similar issue
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb6/igt@core_hotunplug@hotrebind-lateclose.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb4/igt@core_hotunplug@hotrebind-lateclose.html

  * igt@gem_partial_pwrite_pread@writes-after-reads-uncached:
    - shard-hsw:          [FAIL][61] ([i915#1888] / [i915#2261]) -> [PASS][62]
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-hsw6/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-hsw4/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html

  * igt@i915_pm_rpm@pm-tiling:
    - shard-hsw:          [SKIP][63] ([fdo#109271]) -> [PASS][64] +2 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-hsw2/igt@i915_pm_rpm@pm-tiling.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-hsw2/igt@i915_pm_rpm@pm-tiling.html
    - shard-kbl:          [SKIP][65] ([fdo#109271]) -> [PASS][66] +1 similar issue
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-kbl3/igt@i915_pm_rpm@pm-tiling.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-kbl2/igt@i915_pm_rpm@pm-tiling.html
    - shard-apl:          [SKIP][67] ([fdo#109271] / [i915#1635]) -> [PASS][68] +1 similar issue
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-apl6/igt@i915_pm_rpm@pm-tiling.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-apl1/igt@i915_pm_rpm@pm-tiling.html
    - shard-glk:          [SKIP][69] ([fdo#109271]) -> [PASS][70] +1 similar issue
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-glk1/igt@i915_pm_rpm@pm-tiling.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-glk2/igt@i915_pm_rpm@pm-tiling.html
    - shard-iclb:         [SKIP][71] ([i915#579]) -> [PASS][72]
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb2/igt@i915_pm_rpm@pm-tiling.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb7/igt@i915_pm_rpm@pm-tiling.html

  * {igt@kms_async_flips@test-time-stamp}:
    - shard-apl:          [DMESG-WARN][73] ([i915#1635] / [i915#1982]) -> [PASS][74]
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-apl1/igt@kms_async_flips@test-time-stamp.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-apl2/igt@kms_async_flips@test-time-stamp.html

  * igt@kms_cursor_legacy@flip-vs-cursor-legacy:
    - shard-tglb:         [FAIL][75] ([i915#2346]) -> [PASS][76]
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb1/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb7/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html

  * igt@kms_draw_crc@draw-method-xrgb8888-render-untiled:
    - shard-glk:          [DMESG-WARN][77] ([i915#1982]) -> [PASS][78] +7 similar issues
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-glk2/igt@kms_draw_crc@draw-method-xrgb8888-render-untiled.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-glk2/igt@kms_draw_crc@draw-method-xrgb8888-render-untiled.html

  * igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@ab-hdmi-a1-hdmi-a2:
    - shard-glk:          [FAIL][79] ([i915#2122]) -> [PASS][80]
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-glk8/igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@ab-hdmi-a1-hdmi-a2.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-glk6/igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@ab-hdmi-a1-hdmi-a2.html

  * igt@kms_flip@dpms-vs-vblank-race@c-dp1:
    - shard-kbl:          [INCOMPLETE][81] -> [PASS][82]
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-kbl1/igt@kms_flip@dpms-vs-vblank-race@c-dp1.html
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-kbl6/igt@kms_flip@dpms-vs-vblank-race@c-dp1.html

  * igt@kms_flip@flip-vs-expired-vblank@a-edp1:
    - shard-tglb:         [FAIL][83] ([i915#2598]) -> [PASS][84] +1 similar issue
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb1/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb3/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html

  * igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2:
    - shard-glk:          [FAIL][85] ([i915#79]) -> [PASS][86]
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-glk6/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-glk7/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html

  * igt@kms_flip@flip-vs-suspend@c-hdmi-a1:
    - shard-hsw:          [INCOMPLETE][87] ([i915#2055]) -> [PASS][88]
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-hsw1/igt@kms_flip@flip-vs-suspend@c-hdmi-a1.html
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-hsw4/igt@kms_flip@flip-vs-suspend@c-hdmi-a1.html

  * igt@kms_flip_tiling@flip-x-tiled:
    - shard-kbl:          [DMESG-WARN][89] ([i915#1982]) -> [PASS][90] +1 similar issue
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-kbl2/igt@kms_flip_tiling@flip-x-tiled.html
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-kbl4/igt@kms_flip_tiling@flip-x-tiled.html

  * igt@kms_frontbuffer_tracking@psr-rgb565-draw-pwrite:
    - shard-tglb:         [DMESG-WARN][91] ([i915#1982]) -> [PASS][92] +1 similar issue
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb2/igt@kms_frontbuffer_tracking@psr-rgb565-draw-pwrite.html
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb2/igt@kms_frontbuffer_tracking@psr-rgb565-draw-pwrite.html

  * igt@kms_psr@psr2_cursor_plane_move:
    - shard-iclb:         [SKIP][93] ([fdo#109441]) -> [PASS][94] +2 similar issues
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb4/igt@kms_psr@psr2_cursor_plane_move.html
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html

  * igt@kms_psr@suspend:
    - shard-iclb:         [INCOMPLETE][95] ([i915#1185]) -> [PASS][96]
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb6/igt@kms_psr@suspend.html
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb8/igt@kms_psr@suspend.html

  * igt@perf@non-system-wide-paranoid:
    - shard-apl:          [SKIP][97] ([fdo#109271] / [i915#1354] / [i915#1635]) -> [PASS][98]
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-apl7/igt@perf@non-system-wide-paranoid.html
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-apl8/igt@perf@non-system-wide-paranoid.html
    - shard-glk:          [SKIP][99] ([fdo#109271] / [i915#1354]) -> [PASS][100]
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-glk2/igt@perf@non-system-wide-paranoid.html
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-glk4/igt@perf@non-system-wide-paranoid.html
    - shard-iclb:         [SKIP][101] ([i915#1354]) -> [PASS][102]
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb6/igt@perf@non-system-wide-paranoid.html
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb6/igt@perf@non-system-wide-paranoid.html
    - shard-kbl:          [SKIP][103] ([fdo#109271] / [i915#1354]) -> [PASS][104]
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-kbl3/igt@perf@non-system-wide-paranoid.html
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-kbl1/igt@perf@non-system-wide-paranoid.html
    - shard-tglb:         [SKIP][105] ([i915#1354]) -> [PASS][106]
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb2/igt@perf@non-system-wide-paranoid.html
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb8/igt@perf@non-system-wide-paranoid.html

  * igt@sysfs_heartbeat_interval@mixed@rcs0:
    - shard-kbl:          [INCOMPLETE][107] ([i915#1731]) -> [PASS][108]
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-kbl6/igt@sysfs_heartbeat_interval@mixed@rcs0.html
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-kbl7/igt@sysfs_heartbeat_interval@mixed@rcs0.html

  
#### Warnings ####

  * igt@device_reset@unbind-reset-rebind:
    - shard-hsw:          [WARN][109] ([i915#2283]) -> [INCOMPLETE][110] ([i915#2283])
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-hsw4/igt@device_reset@unbind-reset-rebind.html
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-hsw5/igt@device_reset@unbind-reset-rebind.html

  * igt@i915_pm_backlight@fade_with_suspend:
    - shard-tglb:         [INCOMPLETE][111] ([i915#1436] / [i915#456]) -> [DMESG-WARN][112] ([i915#2411])
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb3/igt@i915_pm_backlight@fade_with_suspend.html
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb7/igt@i915_pm_backlight@fade_with_suspend.html

  * igt@i915_pm_rpm@dpms-mode-unset-non-lpsp:
    - shard-iclb:         [SKIP][113] ([i915#579]) -> [SKIP][114] ([fdo#110892])
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb6/igt@i915_pm_rpm@dpms-mode-unset-non-lpsp.html
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb4/igt@i915_pm_rpm@dpms-mode-unset-non-lpsp.html

  * igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait:
    - shard-iclb:         [SKIP][115] ([fdo#110892]) -> [SKIP][116] ([i915#579])
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb5/igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait.html
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb2/igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait.html

  * igt@i915_pm_rpm@pm-tiling:
    - shard-tglb:         [SKIP][117] ([i915#579]) -> [DMESG-WARN][118] ([i915#2411])
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-tglb3/igt@i915_pm_rpm@pm-tiling.html
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-tglb5/igt@i915_pm_rpm@pm-tiling.html

  * igt@kms_content_protection@lic:
    - shard-apl:          [FAIL][119] ([fdo#110321] / [i915#1635]) -> [TIMEOUT][120] ([i915#1319] / [i915#1635])
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-apl4/igt@kms_content_protection@lic.html
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-apl8/igt@kms_content_protection@lic.html

  * igt@runner@aborted:
    - shard-iclb:         [FAIL][121] ([i915#1814] / [i915#483]) -> [FAIL][122] ([i915#2283] / [i915#483])
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9251/shard-iclb6/igt@runner@aborted.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/shard-iclb8/igt@runner@aborted.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
  [fdo#110892]: https://bugs.freedesktop.org/show_bug.cgi?id=110892
  [i915#1185]: https://gitlab.freedesktop.org/drm/intel/issues/1185
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#1354]: https://gitlab.freedesktop.org/drm/intel/issues/1354
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
  [i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
  [i915#1731]: https://gitlab.freedesktop.org/drm/intel/issues/1731
  [i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2055]: https://gitlab.freedesktop.org/drm/intel/issues/2055
  [i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
  [i915#2261]: https://gitlab.freedesktop.org/drm/intel/issues/2261
  [i915#2283]: https://gitlab.freedesktop.org/drm/intel/issues/2283
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
  [i915#2439]: https://gitlab.freedesktop.org/drm/intel/issues/2439
  [i915#247]: https://gitlab.freedesktop.org/drm/intel/issues/247
  [i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
  [i915#2598]: https://gitlab.freedesktop.org/drm/intel/issues/2598
  [i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
  [i915#483]: https://gitlab.freedesktop.org/drm/intel/issues/483
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#579]: https://gitlab.freedesktop.org/drm/intel/issues/579
  [i915#750]: https://gitlab.freedesktop.org/drm/intel/issues/750
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82


Participating hosts (11 -> 8)
------------------------------

  Missing    (3): pig-skl-6260u pig-glk-j5005 pig-icl-1065g7 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5830 -> IGTPW_5121
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_9251: ed79ec92754cf19d3cc924fce8ab915e541d5761 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5121: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5121/index.html
  IGT_5830: 12d370cb57e0cfcb781c87ad9e15e68b17a1f41f @ 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_5121/index.html

[-- Attachment #1.2: Type: text/html, Size: 31662 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* Re: [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests
  2020-11-03  8:26 ` [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests Karthik B S
@ 2020-11-10  9:41   ` Anshuman Gupta
  2020-11-11  9:51     ` Karthik B S
  2020-11-10 13:45   ` Ramalingam C
  1 sibling, 1 reply; 10+ messages in thread
From: Anshuman Gupta @ 2020-11-10  9:41 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev

On 2020-11-03 at 13:56:27 +0530, Karthik B S wrote:
> Add subtests to verify content protection simultaneously on
> multiple outputs on the same MST topology.
> 
> v3: -Remove the logging which are no longer required. (Anshuman)
>     -Add logic to verify that CP is still enabled on other connectors
>      while disabling it on one of the connectors. (Anshuman)
overall test content looks good to me, there are some comments below,
> 
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
> ---
>  tests/kms_content_protection.c | 234 ++++++++++++++++++++++++++++++++-
>  1 file changed, 233 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index 303ed418..cb895a72 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -42,6 +42,12 @@ struct data {
>  	struct udev_monitor *uevent_monitor;
>  } data;
>  
> +typedef struct {
> +	float red;
> +	float green;
> +	float blue;
> +} color_t;
> +
>  /* Test flags */
>  #define CP_DPMS					(1 << 0)
>  #define CP_LIC					(1 << 1)
> @@ -457,6 +463,54 @@ static bool sink_hdcp2_capable(igt_output_t *output)
>  
>  	return strstr(buf, "HDCP2.2");
>  }
> +color_t red  = { 1.0f, 0.0f, 0.0f };
> +color_t green  = { 0.0f, 0.1f, 0.0f };
> +
> +static void prepare_modeset_on_mst_output(igt_output_t *output, enum pipe pipe)
> +{
> +	drmModeConnectorPtr c = output->config.connector;
> +	igt_display_t *display = &data.display;
> +	drmModeModeInfo *mode;
> +	igt_plane_t *primary;
> +	int i;
> +
> +	mode = igt_output_get_mode(output);
> +
> +	/*
> +	 * TODO: Add logic to use the highest possible modes on each output.
> +	 * Currently using 2k modes by default on all the outputs.
> +	 */
> +	igt_debug("Before mode override: Output %s Mode hdisplay %d Mode vdisplay %d\n",
> +		   output->name, mode->hdisplay, mode->vdisplay);
> +
> +	if (mode->hdisplay > 1920 && mode->vdisplay > 1080) {
> +		for (i = 0; i < c->count_modes; i++) {
> +			if (c->modes[i].hdisplay <= 1920 && c->modes[i].vdisplay <= 1080) {
> +				mode = &c->modes[i];
> +				igt_output_override_mode(output, mode);
> +				break;
> +			}
> +		}
> +	}
> +
> +	igt_debug("After mode overide: Output %s Mode hdisplay %d Mode vdisplay %d\n",
> +		   output->name, mode->hdisplay, mode->vdisplay);
> +
> +	if (pipe % 2) {
> +		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
> +				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
> +				    red.red, red.blue, red.green, &data.red);
> +	} else {
> +		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
> +				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
> +				    green.red, green.blue, green.green, &data.green);
> +	}
> +
> +	igt_output_set_pipe(output, pipe);
> +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +	igt_plane_set_fb(primary, pipe % 2 ? &data.red : &data.green);
> +}
>  
>  static void
>  test_content_protection(enum igt_commit_style s, int content_type)
> @@ -496,6 +550,162 @@ test_content_protection(enum igt_commit_style s, int content_type)
>  	igt_require_f(valid_tests, "No connector found with HDCP capability\n");
>  }
>  
> +static bool is_output_support_cp_capable(igt_output_t *output, int content_type)
is_output_support_hdcp_capable suits more.
could please avoid code duplication of is_output_support_cp_capable() in test_content_protection().
> +{
> +		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
> +			return false;
> +
> +		if (!output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE] &&
> +		    content_type)
> +			return false;
> +
> +		if (content_type && !sink_hdcp2_capable(output)) {
> +			igt_info("\tSkip %s (Sink has no HDCP2.2 support)\n",
> +				 output->name);
> +			return false;
> +		} else if (!sink_hdcp_capable(output)) {
> +			igt_info("\tSkip %s (Sink has no HDCP support)\n",
> +				 output->name);
> +			return false;
> +		}
> +
> +		return true;
> +}
> +
> +static int parse_path_blob(char *blob_data)
> +{
> +	int connector_id;
> +	char *encoder;
> +
> +	encoder = strtok(blob_data, ":");
> +	igt_assert_f(!strcmp(encoder, "mst"), "PATH connector property expected to have 'mst'\n");
> +
> +	connector_id = atoi(strtok(NULL, "-"));
> +
> +	return connector_id;
> +}
> +
> +static bool is_dp_mst_output(igt_output_t *output, int i)
> +{
> +	drmModePropertyBlobPtr path_blob = NULL;
> +	uint64_t path_blob_id;
> +	drmModeConnector *connector = output->config.connector;
> +	struct kmstest_connector_config config;
> +	const char *encoder;
> +	int connector_id;
> +	static int prev_connector_id;
> +
> +	kmstest_get_connector_config(data.drm_fd, output->config.connector->connector_id, -1, &config);
> +	encoder = kmstest_encoder_type_str(config.encoder->encoder_type);
> +
> +	if (strcmp(encoder, "DP MST"))
> +		return false;
> +
> +	igt_assert(kmstest_get_property(data.drm_fd, connector->connector_id,
> +		   DRM_MODE_OBJECT_CONNECTOR, "PATH", NULL,
> +		   &path_blob_id, NULL));
> +
> +	igt_assert(path_blob = drmModeGetPropertyBlob(data.drm_fd, path_blob_id));
> +
> +	connector_id = parse_path_blob((char *) path_blob->data);
> +
> +	/* Check if all the MST outputs are in the same topology */
Add some comment like, we are discarding outputs of other DP MST topology.
We are testing only on outputs which topology we found out first.
> +	if (i == 0) {
> +		prev_connector_id = connector_id;
> +	} else {
> +		if (connector_id != prev_connector_id)
> +			return false;
> +	}
> +
> +	drmModeFreePropertyBlob(path_blob);
> +
> +	return true;
> +}
> +
> +static void
> +test_content_protection_mst(int content_type)
> +{
> +	igt_display_t *display = &data.display;
> +	igt_output_t *output;
> +	int valid_outputs = 0, ret, count, max_pipe = 0, i;
> +	enum pipe pipe;
> +	igt_output_t *mst_output[IGT_MAX_PIPES];
> +
> +	for_each_connected_output(display, output) {
> +		if (!is_dp_mst_output(output, valid_outputs))
> +			continue;
> +
> +		if (!is_output_support_cp_capable(output, content_type))
> +			continue;
> +
> +		mst_output[valid_outputs] = output;
> +		valid_outputs++;
> +	}
> +
> +	igt_require_f(valid_outputs > 1, "No DP MST set up with >= 2 outputs found in a single topology\n");
> +
> +	for_each_pipe(display, pipe)
> +		max_pipe++;
> +
> +	if (valid_outputs > max_pipe)
> +		valid_outputs = max_pipe;
> +
> +	pipe = PIPE_A;
> +
> +	for (count = 0; count < valid_outputs; count++) {
> +		igt_assert_f(igt_pipe_connector_valid(pipe, mst_output[count]), "Output-pipe combination invalid\n");
> +
> +		prepare_modeset_on_mst_output(mst_output[count], pipe);
> +		pipe++;
> +	}
> +
> +	igt_display_commit2(display, COMMIT_ATOMIC);
> +
> +	for (count = 0; count < valid_outputs; count++) {
> +		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
> +
> +		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
> +			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
> +	}
> +
> +	igt_display_commit2(display, COMMIT_ATOMIC);
> +
> +	for (count = 0; count < valid_outputs; count++) {
> +		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
> +		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
> +		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
> +
> +		if (data.cp_tests & CP_LIC)
> +			test_cp_lic(mst_output[count]);
> +	}
> +
> +	for (count = 0; count < valid_outputs; count++) {
> +		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
> +		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
> +		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
		I belive we don't reqire above HDCP check hunk, we want to disbale the HDCP and check it on other
		DP_MST outputs.
> +
> +		igt_debug("CP Prop being UNDESIRED on %s\n", mst_output[count]->name);
> +		test_cp_disable(mst_output[count], COMMIT_ATOMIC);
> +
> +		/* CP is expected to be still enabled on other outputs*/
> +		for (i = 0; i < valid_outputs; i++) {
> +			if (i == count)
> +				continue;
> +
> +			igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[i]->name);
> +			ret = wait_for_prop_value(mst_output[i], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
> +			igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[i]->name);
		Let's also check link on output on which HDCP enabled when HDCP was disabled other DP MST output
			if (data.cp_tests & CP_LIC)
				test_cp_lic(mst_output[count]);
> +		}
> +
> +		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
> +
> +		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
> +			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
> +
> +		igt_display_commit2(display, COMMIT_ATOMIC);
> +	}
> +}
> +
>  static void test_content_protection_cleanup(void)
>  {
>  	igt_display_t *display = &data.display;
> @@ -511,7 +721,7 @@ static void test_content_protection_cleanup(void)
>  		if (val == CP_UNDESIRED)
>  			continue;
>  
> -		igt_info("CP Prop being UNDESIRED on %s\n", output->name);
> +		igt_debug("CP Prop being UNDESIRED on %s\n", output->name);
This is unwanted change.
Thanks,
Anshuman Gupta.
>  		test_cp_disable(output, COMMIT_ATOMIC);
>  	}
>  }
> @@ -592,6 +802,28 @@ igt_main
>  		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
>  	}
>  
> +	igt_describe("Test Content protection over DP MST");
> +	igt_subtest("dp-mst-type-0") {
> +		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
> +	}
> +
> +	igt_describe("Test Content protection over DP MST with LIC");
> +	igt_subtest("dp-mst-lic-type-0") {
> +		data.cp_tests = CP_LIC;
> +		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
> +	}
> +
> +	igt_describe("Test Content protection over DP MST");
> +	igt_subtest("dp-mst-type-1") {
> +		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
> +	}
> +
> +	igt_describe("Test Content protection over DP MST with LIC");
> +	igt_subtest("dp-mst-lic-type-1") {
> +		data.cp_tests = CP_LIC;
> +		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
> +	}
> +
>  	igt_fixture {
>  		test_content_protection_cleanup();
>  		igt_display_fini(&data.display);
> -- 
> 2.22.0
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests
  2020-11-03  8:26 ` [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests Karthik B S
  2020-11-10  9:41   ` Anshuman Gupta
@ 2020-11-10 13:45   ` Ramalingam C
  2020-11-11 10:06     ` Karthik B S
  1 sibling, 1 reply; 10+ messages in thread
From: Ramalingam C @ 2020-11-10 13:45 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev

On 2020-11-03 at 13:56:27 +0530, Karthik B S wrote:
> Add subtests to verify content protection simultaneously on
> multiple outputs on the same MST topology.
> 
> v3: -Remove the logging which are no longer required. (Anshuman)
>     -Add logic to verify that CP is still enabled on other connectors
>      while disabling it on one of the connectors. (Anshuman)
> 
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
> ---
>  tests/kms_content_protection.c | 234 ++++++++++++++++++++++++++++++++-
>  1 file changed, 233 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index 303ed418..cb895a72 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -42,6 +42,12 @@ struct data {
>  	struct udev_monitor *uevent_monitor;
>  } data;
>  
> +typedef struct {
> +	float red;
> +	float green;
> +	float blue;
> +} color_t;
> +
>  /* Test flags */
>  #define CP_DPMS					(1 << 0)
>  #define CP_LIC					(1 << 1)
> @@ -457,6 +463,54 @@ static bool sink_hdcp2_capable(igt_output_t *output)
>  
>  	return strstr(buf, "HDCP2.2");
>  }
> +color_t red  = { 1.0f, 0.0f, 0.0f };
> +color_t green  = { 0.0f, 0.1f, 0.0f };
> +
> +static void prepare_modeset_on_mst_output(igt_output_t *output, enum pipe pipe)
> +{
> +	drmModeConnectorPtr c = output->config.connector;
> +	igt_display_t *display = &data.display;
> +	drmModeModeInfo *mode;
> +	igt_plane_t *primary;
> +	int i;
> +
> +	mode = igt_output_get_mode(output);
> +
> +	/*
> +	 * TODO: Add logic to use the highest possible modes on each output.
> +	 * Currently using 2k modes by default on all the outputs.
> +	 */
> +	igt_debug("Before mode override: Output %s Mode hdisplay %d Mode vdisplay %d\n",
> +		   output->name, mode->hdisplay, mode->vdisplay);
> +
> +	if (mode->hdisplay > 1920 && mode->vdisplay > 1080) {
> +		for (i = 0; i < c->count_modes; i++) {
> +			if (c->modes[i].hdisplay <= 1920 && c->modes[i].vdisplay <= 1080) {
> +				mode = &c->modes[i];
> +				igt_output_override_mode(output, mode);
> +				break;
> +			}
> +		}
> +	}
> +
> +	igt_debug("After mode overide: Output %s Mode hdisplay %d Mode vdisplay %d\n",
> +		   output->name, mode->hdisplay, mode->vdisplay);
> +
> +	if (pipe % 2) {
Bit lost here. What are we doing here? why red and green fbs are not
created together? and we can create a common inline function to create
data.{green, red} for both CP test on SSt and MST.
> +		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
> +				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
> +				    red.red, red.blue, red.green, &data.red);
> +	} else {
> +		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
> +				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
> +				    green.red, green.blue, green.green, &data.green);
> +	}
> +
> +	igt_output_set_pipe(output, pipe);
> +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +	igt_plane_set_fb(primary, pipe % 2 ? &data.red : &data.green);
> +}
>  
>  static void
>  test_content_protection(enum igt_commit_style s, int content_type)
> @@ -496,6 +550,162 @@ test_content_protection(enum igt_commit_style s, int content_type)
>  	igt_require_f(valid_tests, "No connector found with HDCP capability\n");
>  }
>  
> +static bool is_output_support_cp_capable(igt_output_t *output, int content_type)
output_cp_capable() might sound better!?
> +{
> +		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
> +			return false;
> +
> +		if (!output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE] &&
> +		    content_type)
> +			return false;
> +
> +		if (content_type && !sink_hdcp2_capable(output)) {
> +			igt_info("\tSkip %s (Sink has no HDCP2.2 support)\n",
> +				 output->name);
> +			return false;
> +		} else if (!sink_hdcp_capable(output)) {
> +			igt_info("\tSkip %s (Sink has no HDCP support)\n",
> +				 output->name);
> +			return false;
> +		}
> +
> +		return true;
> +}
> +
> +static int parse_path_blob(char *blob_data)
> +{
> +	int connector_id;
> +	char *encoder;
> +
> +	encoder = strtok(blob_data, ":");
> +	igt_assert_f(!strcmp(encoder, "mst"), "PATH connector property expected to have 'mst'\n");
> +
> +	connector_id = atoi(strtok(NULL, "-"));
> +
> +	return connector_id;
> +}
> +
> +static bool is_dp_mst_output(igt_output_t *output, int i)
output_is_dp_mst() might sound better!?. Just a suggestion.
> +{
> +	drmModePropertyBlobPtr path_blob = NULL;
> +	uint64_t path_blob_id;
> +	drmModeConnector *connector = output->config.connector;
> +	struct kmstest_connector_config config;
> +	const char *encoder;
> +	int connector_id;
> +	static int prev_connector_id;
> +
> +	kmstest_get_connector_config(data.drm_fd, output->config.connector->connector_id, -1, &config);
> +	encoder = kmstest_encoder_type_str(config.encoder->encoder_type);
> +
> +	if (strcmp(encoder, "DP MST"))
> +		return false;
> +
> +	igt_assert(kmstest_get_property(data.drm_fd, connector->connector_id,
> +		   DRM_MODE_OBJECT_CONNECTOR, "PATH", NULL,
> +		   &path_blob_id, NULL));
> +
> +	igt_assert(path_blob = drmModeGetPropertyBlob(data.drm_fd, path_blob_id));
> +
> +	connector_id = parse_path_blob((char *) path_blob->data);
> +
> +	/* Check if all the MST outputs are in the same topology */
> +	if (i == 0) {
> +		prev_connector_id = connector_id;
> +	} else {
> +		if (connector_id != prev_connector_id)
> +			return false;
> +	}
> +
> +	drmModeFreePropertyBlob(path_blob);
> +
> +	return true;
> +}
> +
> +static void
> +test_content_protection_mst(int content_type)
> +{
> +	igt_display_t *display = &data.display;
> +	igt_output_t *output;
> +	int valid_outputs = 0, ret, count, max_pipe = 0, i;
> +	enum pipe pipe;
> +	igt_output_t *mst_output[IGT_MAX_PIPES];
> +
> +	for_each_connected_output(display, output) {
> +		if (!is_dp_mst_output(output, valid_outputs))
> +			continue;
> +
> +		if (!is_output_support_cp_capable(output, content_type))
> +			continue;
> +
> +		mst_output[valid_outputs] = output;
> +		valid_outputs++;
> +	}
> +
> +	igt_require_f(valid_outputs > 1, "No DP MST set up with >= 2 outputs found in a single topology\n");
> +
> +	for_each_pipe(display, pipe)
> +		max_pipe++;
> +
> +	if (valid_outputs > max_pipe)
> +		valid_outputs = max_pipe;
> +
> +	pipe = PIPE_A;
> +
> +	for (count = 0; count < valid_outputs; count++) {
> +		igt_assert_f(igt_pipe_connector_valid(pipe, mst_output[count]), "Output-pipe combination invalid\n");
> +
> +		prepare_modeset_on_mst_output(mst_output[count], pipe);
> +		pipe++;
> +	}
> +
> +	igt_display_commit2(display, COMMIT_ATOMIC);
> +
> +	for (count = 0; count < valid_outputs; count++) {
> +		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
> +
> +		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
> +			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
> +	}
> +
> +	igt_display_commit2(display, COMMIT_ATOMIC);
> +
> +	for (count = 0; count < valid_outputs; count++) {
> +		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
Why do we need this? When it fails we have the assert note right?
> +		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
> +		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
Would be nice to see it as "not enabled on %s". Similarly on other
places.
> +
> +		if (data.cp_tests & CP_LIC)
> +			test_cp_lic(mst_output[count]);
There is a scope to save CI time here. check the LIC for all connectors
together after this for loop. you need test_cp_lic_on_mst
> +	}
> +
> +	for (count = 0; count < valid_outputs; count++) {
one iteration is sufficient. I guess. Why do we need this exercise on
all combination?
> +		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
> +		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
> +		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
> +
> +		igt_debug("CP Prop being UNDESIRED on %s\n", mst_output[count]->name);
> +		test_cp_disable(mst_output[count], COMMIT_ATOMIC);
> +
> +		/* CP is expected to be still enabled on other outputs*/
> +		for (i = 0; i < valid_outputs; i++) {
> +			if (i == count)
> +				continue;
> +
> +			igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[i]->name);
This debug also not required!?
> +			ret = wait_for_prop_value(mst_output[i], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
And here you need to check for non ENABLED state till the required time.

Ram
> +			igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[i]->name);
> +		}
> +
> +		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
> +
> +		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
> +			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
> +
> +		igt_display_commit2(display, COMMIT_ATOMIC);
> +	}
> +}
> +
>  static void test_content_protection_cleanup(void)
>  {
>  	igt_display_t *display = &data.display;
> @@ -511,7 +721,7 @@ static void test_content_protection_cleanup(void)
>  		if (val == CP_UNDESIRED)
>  			continue;
>  
> -		igt_info("CP Prop being UNDESIRED on %s\n", output->name);
> +		igt_debug("CP Prop being UNDESIRED on %s\n", output->name);
>  		test_cp_disable(output, COMMIT_ATOMIC);
>  	}
>  }
> @@ -592,6 +802,28 @@ igt_main
>  		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
>  	}
>  
> +	igt_describe("Test Content protection over DP MST");
> +	igt_subtest("dp-mst-type-0") {
> +		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
> +	}
> +
> +	igt_describe("Test Content protection over DP MST with LIC");
> +	igt_subtest("dp-mst-lic-type-0") {
> +		data.cp_tests = CP_LIC;
> +		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
> +	}
> +
> +	igt_describe("Test Content protection over DP MST");
> +	igt_subtest("dp-mst-type-1") {
> +		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
> +	}
> +
> +	igt_describe("Test Content protection over DP MST with LIC");
> +	igt_subtest("dp-mst-lic-type-1") {
> +		data.cp_tests = CP_LIC;
> +		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
> +	}
> +
>  	igt_fixture {
>  		test_content_protection_cleanup();
>  		igt_display_fini(&data.display);
> -- 
> 2.22.0
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests
  2020-11-10  9:41   ` Anshuman Gupta
@ 2020-11-11  9:51     ` Karthik B S
  0 siblings, 0 replies; 10+ messages in thread
From: Karthik B S @ 2020-11-11  9:51 UTC (permalink / raw)
  To: Anshuman Gupta; +Cc: igt-dev

On 11/10/2020 3:11 PM, Anshuman Gupta wrote:
> On 2020-11-03 at 13:56:27 +0530, Karthik B S wrote:
>> Add subtests to verify content protection simultaneously on
>> multiple outputs on the same MST topology.
>>
>> v3: -Remove the logging which are no longer required. (Anshuman)
>>      -Add logic to verify that CP is still enabled on other connectors
>>       while disabling it on one of the connectors. (Anshuman)
> overall test content looks good to me, there are some comments below,
Thanks for the review.
>> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
>> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
>> ---
>>   tests/kms_content_protection.c | 234 ++++++++++++++++++++++++++++++++-
>>   1 file changed, 233 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
>> index 303ed418..cb895a72 100644
>> --- a/tests/kms_content_protection.c
>> +++ b/tests/kms_content_protection.c
>> @@ -42,6 +42,12 @@ struct data {
>>   	struct udev_monitor *uevent_monitor;
>>   } data;
>>   
>> +typedef struct {
>> +	float red;
>> +	float green;
>> +	float blue;
>> +} color_t;
>> +
>>   /* Test flags */
>>   #define CP_DPMS					(1 << 0)
>>   #define CP_LIC					(1 << 1)
>> @@ -457,6 +463,54 @@ static bool sink_hdcp2_capable(igt_output_t *output)
>>   
>>   	return strstr(buf, "HDCP2.2");
>>   }
>> +color_t red  = { 1.0f, 0.0f, 0.0f };
>> +color_t green  = { 0.0f, 0.1f, 0.0f };
>> +
>> +static void prepare_modeset_on_mst_output(igt_output_t *output, enum pipe pipe)
>> +{
>> +	drmModeConnectorPtr c = output->config.connector;
>> +	igt_display_t *display = &data.display;
>> +	drmModeModeInfo *mode;
>> +	igt_plane_t *primary;
>> +	int i;
>> +
>> +	mode = igt_output_get_mode(output);
>> +
>> +	/*
>> +	 * TODO: Add logic to use the highest possible modes on each output.
>> +	 * Currently using 2k modes by default on all the outputs.
>> +	 */
>> +	igt_debug("Before mode override: Output %s Mode hdisplay %d Mode vdisplay %d\n",
>> +		   output->name, mode->hdisplay, mode->vdisplay);
>> +
>> +	if (mode->hdisplay > 1920 && mode->vdisplay > 1080) {
>> +		for (i = 0; i < c->count_modes; i++) {
>> +			if (c->modes[i].hdisplay <= 1920 && c->modes[i].vdisplay <= 1080) {
>> +				mode = &c->modes[i];
>> +				igt_output_override_mode(output, mode);
>> +				break;
>> +			}
>> +		}
>> +	}
>> +
>> +	igt_debug("After mode overide: Output %s Mode hdisplay %d Mode vdisplay %d\n",
>> +		   output->name, mode->hdisplay, mode->vdisplay);
>> +
>> +	if (pipe % 2) {
>> +		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
>> +				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
>> +				    red.red, red.blue, red.green, &data.red);
>> +	} else {
>> +		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
>> +				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
>> +				    green.red, green.blue, green.green, &data.green);
>> +	}
>> +
>> +	igt_output_set_pipe(output, pipe);
>> +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
>> +	igt_plane_set_fb(primary, NULL);
>> +	igt_plane_set_fb(primary, pipe % 2 ? &data.red : &data.green);
>> +}
>>   
>>   static void
>>   test_content_protection(enum igt_commit_style s, int content_type)
>> @@ -496,6 +550,162 @@ test_content_protection(enum igt_commit_style s, int content_type)
>>   	igt_require_f(valid_tests, "No connector found with HDCP capability\n");
>>   }
>>   
>> +static bool is_output_support_cp_capable(igt_output_t *output, int content_type)
> is_output_support_hdcp_capable suits more.
Sure, I'll update this.
> could please avoid code duplication of is_output_support_cp_capable() in test_content_protection().
Sure, I'll remove the code duplication.
>> +{
>> +		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
>> +			return false;
>> +
>> +		if (!output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE] &&
>> +		    content_type)
>> +			return false;
>> +
>> +		if (content_type && !sink_hdcp2_capable(output)) {
>> +			igt_info("\tSkip %s (Sink has no HDCP2.2 support)\n",
>> +				 output->name);
>> +			return false;
>> +		} else if (!sink_hdcp_capable(output)) {
>> +			igt_info("\tSkip %s (Sink has no HDCP support)\n",
>> +				 output->name);
>> +			return false;
>> +		}
>> +
>> +		return true;
>> +}
>> +
>> +static int parse_path_blob(char *blob_data)
>> +{
>> +	int connector_id;
>> +	char *encoder;
>> +
>> +	encoder = strtok(blob_data, ":");
>> +	igt_assert_f(!strcmp(encoder, "mst"), "PATH connector property expected to have 'mst'\n");
>> +
>> +	connector_id = atoi(strtok(NULL, "-"));
>> +
>> +	return connector_id;
>> +}
>> +
>> +static bool is_dp_mst_output(igt_output_t *output, int i)
>> +{
>> +	drmModePropertyBlobPtr path_blob = NULL;
>> +	uint64_t path_blob_id;
>> +	drmModeConnector *connector = output->config.connector;
>> +	struct kmstest_connector_config config;
>> +	const char *encoder;
>> +	int connector_id;
>> +	static int prev_connector_id;
>> +
>> +	kmstest_get_connector_config(data.drm_fd, output->config.connector->connector_id, -1, &config);
>> +	encoder = kmstest_encoder_type_str(config.encoder->encoder_type);
>> +
>> +	if (strcmp(encoder, "DP MST"))
>> +		return false;
>> +
>> +	igt_assert(kmstest_get_property(data.drm_fd, connector->connector_id,
>> +		   DRM_MODE_OBJECT_CONNECTOR, "PATH", NULL,
>> +		   &path_blob_id, NULL));
>> +
>> +	igt_assert(path_blob = drmModeGetPropertyBlob(data.drm_fd, path_blob_id));
>> +
>> +	connector_id = parse_path_blob((char *) path_blob->data);
>> +
>> +	/* Check if all the MST outputs are in the same topology */
> Add some comment like, we are discarding outputs of other DP MST topology.
> We are testing only on outputs which topology we found out first.
I will update this comment.
>> +	if (i == 0) {
>> +		prev_connector_id = connector_id;
>> +	} else {
>> +		if (connector_id != prev_connector_id)
>> +			return false;
>> +	}
>> +
>> +	drmModeFreePropertyBlob(path_blob);
>> +
>> +	return true;
>> +}
>> +
>> +static void
>> +test_content_protection_mst(int content_type)
>> +{
>> +	igt_display_t *display = &data.display;
>> +	igt_output_t *output;
>> +	int valid_outputs = 0, ret, count, max_pipe = 0, i;
>> +	enum pipe pipe;
>> +	igt_output_t *mst_output[IGT_MAX_PIPES];
>> +
>> +	for_each_connected_output(display, output) {
>> +		if (!is_dp_mst_output(output, valid_outputs))
>> +			continue;
>> +
>> +		if (!is_output_support_cp_capable(output, content_type))
>> +			continue;
>> +
>> +		mst_output[valid_outputs] = output;
>> +		valid_outputs++;
>> +	}
>> +
>> +	igt_require_f(valid_outputs > 1, "No DP MST set up with >= 2 outputs found in a single topology\n");
>> +
>> +	for_each_pipe(display, pipe)
>> +		max_pipe++;
>> +
>> +	if (valid_outputs > max_pipe)
>> +		valid_outputs = max_pipe;
>> +
>> +	pipe = PIPE_A;
>> +
>> +	for (count = 0; count < valid_outputs; count++) {
>> +		igt_assert_f(igt_pipe_connector_valid(pipe, mst_output[count]), "Output-pipe combination invalid\n");
>> +
>> +		prepare_modeset_on_mst_output(mst_output[count], pipe);
>> +		pipe++;
>> +	}
>> +
>> +	igt_display_commit2(display, COMMIT_ATOMIC);
>> +
>> +	for (count = 0; count < valid_outputs; count++) {
>> +		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
>> +
>> +		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
>> +			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
>> +	}
>> +
>> +	igt_display_commit2(display, COMMIT_ATOMIC);
>> +
>> +	for (count = 0; count < valid_outputs; count++) {
>> +		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
>> +		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
>> +		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
>> +
>> +		if (data.cp_tests & CP_LIC)
>> +			test_cp_lic(mst_output[count]);
>> +	}
>> +
>> +	for (count = 0; count < valid_outputs; count++) {
>> +		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
>> +		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
>> +		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
> 		I belive we don't reqire above HDCP check hunk, we want to disbale the HDCP and check it on other
> 		DP_MST outputs.
Sure, I'll remove this.
>> +
>> +		igt_debug("CP Prop being UNDESIRED on %s\n", mst_output[count]->name);
>> +		test_cp_disable(mst_output[count], COMMIT_ATOMIC);
>> +
>> +		/* CP is expected to be still enabled on other outputs*/
>> +		for (i = 0; i < valid_outputs; i++) {
>> +			if (i == count)
>> +				continue;
>> +
>> +			igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[i]->name);
>> +			ret = wait_for_prop_value(mst_output[i], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
>> +			igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[i]->name);
> 		Let's also check link on output on which HDCP enabled when HDCP was disabled other DP MST output
> 			if (data.cp_tests & CP_LIC)
> 				test_cp_lic(mst_output[count]);
I'll make this change.
>> +		}
>> +
>> +		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
>> +
>> +		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
>> +			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
>> +
>> +		igt_display_commit2(display, COMMIT_ATOMIC);
>> +	}
>> +}
>> +
>>   static void test_content_protection_cleanup(void)
>>   {
>>   	igt_display_t *display = &data.display;
>> @@ -511,7 +721,7 @@ static void test_content_protection_cleanup(void)
>>   		if (val == CP_UNDESIRED)
>>   			continue;
>>   
>> -		igt_info("CP Prop being UNDESIRED on %s\n", output->name);
>> +		igt_debug("CP Prop being UNDESIRED on %s\n", output->name);
> This is unwanted change.

I'll revert this.

Thanks,

Karthik.B.S

> Thanks,
> Anshuman Gupta.
>>   		test_cp_disable(output, COMMIT_ATOMIC);
>>   	}
>>   }
>> @@ -592,6 +802,28 @@ igt_main
>>   		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
>>   	}
>>   
>> +	igt_describe("Test Content protection over DP MST");
>> +	igt_subtest("dp-mst-type-0") {
>> +		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
>> +	}
>> +
>> +	igt_describe("Test Content protection over DP MST with LIC");
>> +	igt_subtest("dp-mst-lic-type-0") {
>> +		data.cp_tests = CP_LIC;
>> +		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
>> +	}
>> +
>> +	igt_describe("Test Content protection over DP MST");
>> +	igt_subtest("dp-mst-type-1") {
>> +		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
>> +	}
>> +
>> +	igt_describe("Test Content protection over DP MST with LIC");
>> +	igt_subtest("dp-mst-lic-type-1") {
>> +		data.cp_tests = CP_LIC;
>> +		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
>> +	}
>> +
>>   	igt_fixture {
>>   		test_content_protection_cleanup();
>>   		igt_display_fini(&data.display);
>> -- 
>> 2.22.0
>>

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

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

* Re: [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests
  2020-11-10 13:45   ` Ramalingam C
@ 2020-11-11 10:06     ` Karthik B S
  2020-11-23  5:46       ` Anshuman Gupta
  0 siblings, 1 reply; 10+ messages in thread
From: Karthik B S @ 2020-11-11 10:06 UTC (permalink / raw)
  To: Ramalingam C; +Cc: igt-dev

On 11/10/2020 7:15 PM, Ramalingam C wrote:
> On 2020-11-03 at 13:56:27 +0530, Karthik B S wrote:
>> Add subtests to verify content protection simultaneously on
>> multiple outputs on the same MST topology.
>>
>> v3: -Remove the logging which are no longer required. (Anshuman)
>>      -Add logic to verify that CP is still enabled on other connectors
>>       while disabling it on one of the connectors. (Anshuman)
>>
>> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
>> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
>> ---
>>   tests/kms_content_protection.c | 234 ++++++++++++++++++++++++++++++++-
>>   1 file changed, 233 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
>> index 303ed418..cb895a72 100644
>> --- a/tests/kms_content_protection.c
>> +++ b/tests/kms_content_protection.c
>> @@ -42,6 +42,12 @@ struct data {
>>   	struct udev_monitor *uevent_monitor;
>>   } data;
>>   
>> +typedef struct {
>> +	float red;
>> +	float green;
>> +	float blue;
>> +} color_t;
>> +
>>   /* Test flags */
>>   #define CP_DPMS					(1 << 0)
>>   #define CP_LIC					(1 << 1)
>> @@ -457,6 +463,54 @@ static bool sink_hdcp2_capable(igt_output_t *output)
>>   
>>   	return strstr(buf, "HDCP2.2");
>>   }
>> +color_t red  = { 1.0f, 0.0f, 0.0f };
>> +color_t green  = { 0.0f, 0.1f, 0.0f };
>> +
>> +static void prepare_modeset_on_mst_output(igt_output_t *output, enum pipe pipe)
>> +{
>> +	drmModeConnectorPtr c = output->config.connector;
>> +	igt_display_t *display = &data.display;
>> +	drmModeModeInfo *mode;
>> +	igt_plane_t *primary;
>> +	int i;
>> +
>> +	mode = igt_output_get_mode(output);
>> +
>> +	/*
>> +	 * TODO: Add logic to use the highest possible modes on each output.
>> +	 * Currently using 2k modes by default on all the outputs.
>> +	 */
>> +	igt_debug("Before mode override: Output %s Mode hdisplay %d Mode vdisplay %d\n",
>> +		   output->name, mode->hdisplay, mode->vdisplay);
>> +
>> +	if (mode->hdisplay > 1920 && mode->vdisplay > 1080) {
>> +		for (i = 0; i < c->count_modes; i++) {
>> +			if (c->modes[i].hdisplay <= 1920 && c->modes[i].vdisplay <= 1080) {
>> +				mode = &c->modes[i];
>> +				igt_output_override_mode(output, mode);
>> +				break;
>> +			}
>> +		}
>> +	}
>> +
>> +	igt_debug("After mode overide: Output %s Mode hdisplay %d Mode vdisplay %d\n",
>> +		   output->name, mode->hdisplay, mode->vdisplay);
>> +
>> +	if (pipe % 2) {
> Bit lost here. What are we doing here? why red and green fbs are not
> created together? and we can create a common inline function to create
> data.{green, red} for both CP test on SSt and MST.

Thanks for the review.

I will create a common function for creating the red and green fb and 
use it across the test.

>> +		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
>> +				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
>> +				    red.red, red.blue, red.green, &data.red);
>> +	} else {
>> +		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
>> +				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
>> +				    green.red, green.blue, green.green, &data.green);
>> +	}
>> +
>> +	igt_output_set_pipe(output, pipe);
>> +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
>> +	igt_plane_set_fb(primary, NULL);
>> +	igt_plane_set_fb(primary, pipe % 2 ? &data.red : &data.green);
>> +}
>>   
>>   static void
>>   test_content_protection(enum igt_commit_style s, int content_type)
>> @@ -496,6 +550,162 @@ test_content_protection(enum igt_commit_style s, int content_type)
>>   	igt_require_f(valid_tests, "No connector found with HDCP capability\n");
>>   }
>>   
>> +static bool is_output_support_cp_capable(igt_output_t *output, int content_type)
> output_cp_capable() might sound better!?
Sure, I'll update this.
>> +{
>> +		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
>> +			return false;
>> +
>> +		if (!output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE] &&
>> +		    content_type)
>> +			return false;
>> +
>> +		if (content_type && !sink_hdcp2_capable(output)) {
>> +			igt_info("\tSkip %s (Sink has no HDCP2.2 support)\n",
>> +				 output->name);
>> +			return false;
>> +		} else if (!sink_hdcp_capable(output)) {
>> +			igt_info("\tSkip %s (Sink has no HDCP support)\n",
>> +				 output->name);
>> +			return false;
>> +		}
>> +
>> +		return true;
>> +}
>> +
>> +static int parse_path_blob(char *blob_data)
>> +{
>> +	int connector_id;
>> +	char *encoder;
>> +
>> +	encoder = strtok(blob_data, ":");
>> +	igt_assert_f(!strcmp(encoder, "mst"), "PATH connector property expected to have 'mst'\n");
>> +
>> +	connector_id = atoi(strtok(NULL, "-"));
>> +
>> +	return connector_id;
>> +}
>> +
>> +static bool is_dp_mst_output(igt_output_t *output, int i)
> output_is_dp_mst() might sound better!?. Just a suggestion.
I will update this.
>> +{
>> +	drmModePropertyBlobPtr path_blob = NULL;
>> +	uint64_t path_blob_id;
>> +	drmModeConnector *connector = output->config.connector;
>> +	struct kmstest_connector_config config;
>> +	const char *encoder;
>> +	int connector_id;
>> +	static int prev_connector_id;
>> +
>> +	kmstest_get_connector_config(data.drm_fd, output->config.connector->connector_id, -1, &config);
>> +	encoder = kmstest_encoder_type_str(config.encoder->encoder_type);
>> +
>> +	if (strcmp(encoder, "DP MST"))
>> +		return false;
>> +
>> +	igt_assert(kmstest_get_property(data.drm_fd, connector->connector_id,
>> +		   DRM_MODE_OBJECT_CONNECTOR, "PATH", NULL,
>> +		   &path_blob_id, NULL));
>> +
>> +	igt_assert(path_blob = drmModeGetPropertyBlob(data.drm_fd, path_blob_id));
>> +
>> +	connector_id = parse_path_blob((char *) path_blob->data);
>> +
>> +	/* Check if all the MST outputs are in the same topology */
>> +	if (i == 0) {
>> +		prev_connector_id = connector_id;
>> +	} else {
>> +		if (connector_id != prev_connector_id)
>> +			return false;
>> +	}
>> +
>> +	drmModeFreePropertyBlob(path_blob);
>> +
>> +	return true;
>> +}
>> +
>> +static void
>> +test_content_protection_mst(int content_type)
>> +{
>> +	igt_display_t *display = &data.display;
>> +	igt_output_t *output;
>> +	int valid_outputs = 0, ret, count, max_pipe = 0, i;
>> +	enum pipe pipe;
>> +	igt_output_t *mst_output[IGT_MAX_PIPES];
>> +
>> +	for_each_connected_output(display, output) {
>> +		if (!is_dp_mst_output(output, valid_outputs))
>> +			continue;
>> +
>> +		if (!is_output_support_cp_capable(output, content_type))
>> +			continue;
>> +
>> +		mst_output[valid_outputs] = output;
>> +		valid_outputs++;
>> +	}
>> +
>> +	igt_require_f(valid_outputs > 1, "No DP MST set up with >= 2 outputs found in a single topology\n");
>> +
>> +	for_each_pipe(display, pipe)
>> +		max_pipe++;
>> +
>> +	if (valid_outputs > max_pipe)
>> +		valid_outputs = max_pipe;
>> +
>> +	pipe = PIPE_A;
>> +
>> +	for (count = 0; count < valid_outputs; count++) {
>> +		igt_assert_f(igt_pipe_connector_valid(pipe, mst_output[count]), "Output-pipe combination invalid\n");
>> +
>> +		prepare_modeset_on_mst_output(mst_output[count], pipe);
>> +		pipe++;
>> +	}
>> +
>> +	igt_display_commit2(display, COMMIT_ATOMIC);
>> +
>> +	for (count = 0; count < valid_outputs; count++) {
>> +		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
>> +
>> +		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
>> +			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
>> +	}
>> +
>> +	igt_display_commit2(display, COMMIT_ATOMIC);
>> +
>> +	for (count = 0; count < valid_outputs; count++) {
>> +		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
> Why do we need this? When it fails we have the assert note right?
I will remove this.
>> +		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
>> +		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
> Would be nice to see it as "not enabled on %s". Similarly on other
> places.
Sure, I'll update this.
>> +
>> +		if (data.cp_tests & CP_LIC)
>> +			test_cp_lic(mst_output[count]);
> There is a scope to save CI time here. check the LIC for all connectors
> together after this for loop. you need test_cp_lic_on_mst
I will add a new function for this after this for loop. So that we'll 
reduce the overall wait time.
>> +	}
>> +
>> +	for (count = 0; count < valid_outputs; count++) {
> one iteration is sufficient. I guess. Why do we need this exercise on
> all combination?

The idea is to have CP disabled on one of the outputs at a time and 
enabled on all others.

So it is redundant to check this on all combinations and one iterations 
covers?

>> +		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
>> +		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
>> +		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
>> +
>> +		igt_debug("CP Prop being UNDESIRED on %s\n", mst_output[count]->name);
>> +		test_cp_disable(mst_output[count], COMMIT_ATOMIC);
>> +
>> +		/* CP is expected to be still enabled on other outputs*/
>> +		for (i = 0; i < valid_outputs; i++) {
>> +			if (i == count)
>> +				continue;
>> +
>> +			igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[i]->name);
> This debug also not required!?
I'll remove this.
>> +			ret = wait_for_prop_value(mst_output[i], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
> And here you need to check for non ENABLED state till the required time.

Little confused here. All the outputs are expected to be enabled until 
we disable one of the them and verify this.

So this particular output is not expected to be disabled even initially 
right? Am I missing something here?

Should I have some different check here?

Thanks,

Karthik.B.S

>
> Ram
>> +			igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[i]->name);
>> +		}
>> +
>> +		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
>> +
>> +		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
>> +			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
>> +
>> +		igt_display_commit2(display, COMMIT_ATOMIC);
>> +	}
>> +}
>> +
>>   static void test_content_protection_cleanup(void)
>>   {
>>   	igt_display_t *display = &data.display;
>> @@ -511,7 +721,7 @@ static void test_content_protection_cleanup(void)
>>   		if (val == CP_UNDESIRED)
>>   			continue;
>>   
>> -		igt_info("CP Prop being UNDESIRED on %s\n", output->name);
>> +		igt_debug("CP Prop being UNDESIRED on %s\n", output->name);
>>   		test_cp_disable(output, COMMIT_ATOMIC);
>>   	}
>>   }
>> @@ -592,6 +802,28 @@ igt_main
>>   		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
>>   	}
>>   
>> +	igt_describe("Test Content protection over DP MST");
>> +	igt_subtest("dp-mst-type-0") {
>> +		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
>> +	}
>> +
>> +	igt_describe("Test Content protection over DP MST with LIC");
>> +	igt_subtest("dp-mst-lic-type-0") {
>> +		data.cp_tests = CP_LIC;
>> +		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
>> +	}
>> +
>> +	igt_describe("Test Content protection over DP MST");
>> +	igt_subtest("dp-mst-type-1") {
>> +		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
>> +	}
>> +
>> +	igt_describe("Test Content protection over DP MST with LIC");
>> +	igt_subtest("dp-mst-lic-type-1") {
>> +		data.cp_tests = CP_LIC;
>> +		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
>> +	}
>> +
>>   	igt_fixture {
>>   		test_content_protection_cleanup();
>>   		igt_display_fini(&data.display);
>> -- 
>> 2.22.0
>>

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

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

* Re: [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests
  2020-11-11 10:06     ` Karthik B S
@ 2020-11-23  5:46       ` Anshuman Gupta
  0 siblings, 0 replies; 10+ messages in thread
From: Anshuman Gupta @ 2020-11-23  5:46 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev

On 2020-11-11 at 15:36:59 +0530, Karthik B S wrote:
> On 11/10/2020 7:15 PM, Ramalingam C wrote:
> > On 2020-11-03 at 13:56:27 +0530, Karthik B S wrote:
> > > Add subtests to verify content protection simultaneously on
> > > multiple outputs on the same MST topology.
> > > 
> > > v3: -Remove the logging which are no longer required. (Anshuman)
> > >      -Add logic to verify that CP is still enabled on other connectors
> > >       while disabling it on one of the connectors. (Anshuman)
> > > 
> > > Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> > > Signed-off-by: Karthik B S <karthik.b.s@intel.com>
> > > ---
> > >   tests/kms_content_protection.c | 234 ++++++++++++++++++++++++++++++++-
> > >   1 file changed, 233 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> > > index 303ed418..cb895a72 100644
> > > --- a/tests/kms_content_protection.c
> > > +++ b/tests/kms_content_protection.c
> > > @@ -42,6 +42,12 @@ struct data {
> > >   	struct udev_monitor *uevent_monitor;
> > >   } data;
> > > +typedef struct {
> > > +	float red;
> > > +	float green;
> > > +	float blue;
> > > +} color_t;
> > > +
> > >   /* Test flags */
> > >   #define CP_DPMS					(1 << 0)
> > >   #define CP_LIC					(1 << 1)
> > > @@ -457,6 +463,54 @@ static bool sink_hdcp2_capable(igt_output_t *output)
> > >   	return strstr(buf, "HDCP2.2");
> > >   }
> > > +color_t red  = { 1.0f, 0.0f, 0.0f };
> > > +color_t green  = { 0.0f, 0.1f, 0.0f };
> > > +
> > > +static void prepare_modeset_on_mst_output(igt_output_t *output, enum pipe pipe)
> > > +{
> > > +	drmModeConnectorPtr c = output->config.connector;
> > > +	igt_display_t *display = &data.display;
> > > +	drmModeModeInfo *mode;
> > > +	igt_plane_t *primary;
> > > +	int i;
> > > +
> > > +	mode = igt_output_get_mode(output);
> > > +
> > > +	/*
> > > +	 * TODO: Add logic to use the highest possible modes on each output.
> > > +	 * Currently using 2k modes by default on all the outputs.
> > > +	 */
> > > +	igt_debug("Before mode override: Output %s Mode hdisplay %d Mode vdisplay %d\n",
> > > +		   output->name, mode->hdisplay, mode->vdisplay);
> > > +
> > > +	if (mode->hdisplay > 1920 && mode->vdisplay > 1080) {
> > > +		for (i = 0; i < c->count_modes; i++) {
> > > +			if (c->modes[i].hdisplay <= 1920 && c->modes[i].vdisplay <= 1080) {
> > > +				mode = &c->modes[i];
> > > +				igt_output_override_mode(output, mode);
> > > +				break;
> > > +			}
> > > +		}
> > > +	}
> > > +
> > > +	igt_debug("After mode overide: Output %s Mode hdisplay %d Mode vdisplay %d\n",
> > > +		   output->name, mode->hdisplay, mode->vdisplay);
> > > +
> > > +	if (pipe % 2) {
> > Bit lost here. What are we doing here? why red and green fbs are not
> > created together? and we can create a common inline function to create
> > data.{green, red} for both CP test on SSt and MST.
> 
> Thanks for the review.
> 
> I will create a common function for creating the red and green fb and use it
> across the test.
> 
> > > +		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
> > > +				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
> > > +				    red.red, red.blue, red.green, &data.red);
> > > +	} else {
> > > +		igt_create_color_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
> > > +				    DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
> > > +				    green.red, green.blue, green.green, &data.green);
> > > +	}
> > > +
> > > +	igt_output_set_pipe(output, pipe);
> > > +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > > +	igt_plane_set_fb(primary, NULL);
> > > +	igt_plane_set_fb(primary, pipe % 2 ? &data.red : &data.green);
> > > +}
> > >   static void
> > >   test_content_protection(enum igt_commit_style s, int content_type)
> > > @@ -496,6 +550,162 @@ test_content_protection(enum igt_commit_style s, int content_type)
> > >   	igt_require_f(valid_tests, "No connector found with HDCP capability\n");
> > >   }
> > > +static bool is_output_support_cp_capable(igt_output_t *output, int content_type)
> > output_cp_capable() might sound better!?
> Sure, I'll update this.
> > > +{
> > > +		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
> > > +			return false;
> > > +
> > > +		if (!output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE] &&
> > > +		    content_type)
> > > +			return false;
> > > +
> > > +		if (content_type && !sink_hdcp2_capable(output)) {
> > > +			igt_info("\tSkip %s (Sink has no HDCP2.2 support)\n",
> > > +				 output->name);
> > > +			return false;
> > > +		} else if (!sink_hdcp_capable(output)) {
> > > +			igt_info("\tSkip %s (Sink has no HDCP support)\n",
> > > +				 output->name);
> > > +			return false;
> > > +		}
> > > +
> > > +		return true;
> > > +}
> > > +
> > > +static int parse_path_blob(char *blob_data)
> > > +{
> > > +	int connector_id;
> > > +	char *encoder;
> > > +
> > > +	encoder = strtok(blob_data, ":");
> > > +	igt_assert_f(!strcmp(encoder, "mst"), "PATH connector property expected to have 'mst'\n");
> > > +
> > > +	connector_id = atoi(strtok(NULL, "-"));
> > > +
> > > +	return connector_id;
> > > +}
> > > +
> > > +static bool is_dp_mst_output(igt_output_t *output, int i)
> > output_is_dp_mst() might sound better!?. Just a suggestion.
> I will update this.
> > > +{
> > > +	drmModePropertyBlobPtr path_blob = NULL;
> > > +	uint64_t path_blob_id;
> > > +	drmModeConnector *connector = output->config.connector;
> > > +	struct kmstest_connector_config config;
> > > +	const char *encoder;
> > > +	int connector_id;
> > > +	static int prev_connector_id;
> > > +
> > > +	kmstest_get_connector_config(data.drm_fd, output->config.connector->connector_id, -1, &config);
> > > +	encoder = kmstest_encoder_type_str(config.encoder->encoder_type);
> > > +
> > > +	if (strcmp(encoder, "DP MST"))
> > > +		return false;
> > > +
> > > +	igt_assert(kmstest_get_property(data.drm_fd, connector->connector_id,
> > > +		   DRM_MODE_OBJECT_CONNECTOR, "PATH", NULL,
> > > +		   &path_blob_id, NULL));
> > > +
> > > +	igt_assert(path_blob = drmModeGetPropertyBlob(data.drm_fd, path_blob_id));
> > > +
> > > +	connector_id = parse_path_blob((char *) path_blob->data);
> > > +
> > > +	/* Check if all the MST outputs are in the same topology */
> > > +	if (i == 0) {
> > > +		prev_connector_id = connector_id;
> > > +	} else {
> > > +		if (connector_id != prev_connector_id)
> > > +			return false;
> > > +	}
> > > +
> > > +	drmModeFreePropertyBlob(path_blob);
> > > +
> > > +	return true;
> > > +}
> > > +
> > > +static void
> > > +test_content_protection_mst(int content_type)
> > > +{
> > > +	igt_display_t *display = &data.display;
> > > +	igt_output_t *output;
> > > +	int valid_outputs = 0, ret, count, max_pipe = 0, i;
> > > +	enum pipe pipe;
> > > +	igt_output_t *mst_output[IGT_MAX_PIPES];
> > > +
> > > +	for_each_connected_output(display, output) {
> > > +		if (!is_dp_mst_output(output, valid_outputs))
> > > +			continue;
> > > +
> > > +		if (!is_output_support_cp_capable(output, content_type))
> > > +			continue;
> > > +
> > > +		mst_output[valid_outputs] = output;
> > > +		valid_outputs++;
> > > +	}
> > > +
> > > +	igt_require_f(valid_outputs > 1, "No DP MST set up with >= 2 outputs found in a single topology\n");
> > > +
> > > +	for_each_pipe(display, pipe)
> > > +		max_pipe++;
> > > +
> > > +	if (valid_outputs > max_pipe)
> > > +		valid_outputs = max_pipe;
> > > +
> > > +	pipe = PIPE_A;
> > > +
> > > +	for (count = 0; count < valid_outputs; count++) {
> > > +		igt_assert_f(igt_pipe_connector_valid(pipe, mst_output[count]), "Output-pipe combination invalid\n");
> > > +
> > > +		prepare_modeset_on_mst_output(mst_output[count], pipe);
> > > +		pipe++;
> > > +	}
> > > +
> > > +	igt_display_commit2(display, COMMIT_ATOMIC);
> > > +
> > > +	for (count = 0; count < valid_outputs; count++) {
> > > +		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
> > > +
> > > +		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
> > > +			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
> > > +	}
> > > +
> > > +	igt_display_commit2(display, COMMIT_ATOMIC);
> > > +
> > > +	for (count = 0; count < valid_outputs; count++) {
> > > +		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
> > Why do we need this? When it fails we have the assert note right?
> I will remove this.
> > > +		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
> > > +		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
> > Would be nice to see it as "not enabled on %s". Similarly on other
> > places.
> Sure, I'll update this.
> > > +
> > > +		if (data.cp_tests & CP_LIC)
> > > +			test_cp_lic(mst_output[count]);
> > There is a scope to save CI time here. check the LIC for all connectors
> > together after this for loop. you need test_cp_lic_on_mst
> I will add a new function for this after this for loop. So that we'll reduce
> the overall wait time.
> > > +	}
> > > +
> > > +	for (count = 0; count < valid_outputs; count++) {
> > one iteration is sufficient. I guess. Why do we need this exercise on
> > all combination?
> 
> The idea is to have CP disabled on one of the outputs at a time and enabled
> on all others.
> 
> So it is redundant to check this on all combinations and one iterations
> covers?
IMO we do require to chekc all combination.
> 
> > > +		igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[count]->name);
> > > +		ret = wait_for_prop_value(mst_output[count], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
> > > +		igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[count]->name);
> > > +
> > > +		igt_debug("CP Prop being UNDESIRED on %s\n", mst_output[count]->name);
> > > +		test_cp_disable(mst_output[count], COMMIT_ATOMIC);
> > > +
> > > +		/* CP is expected to be still enabled on other outputs*/
> > > +		for (i = 0; i < valid_outputs; i++) {
> > > +			if (i == count)
> > > +				continue;
> > > +
> > > +			igt_debug("Test CP Prop to be ENABLED %s\n", mst_output[i]->name);
> > This debug also not required!?
> I'll remove this.
> > > +			ret = wait_for_prop_value(mst_output[i], CP_ENABLED, KERNEL_AUTH_TIME_ALLOWED_MSEC);
> > And here you need to check for non ENABLED state till the required time.
> 
> Little confused here. All the outputs are expected to be enabled until we
> disable one of the them and verify this.
I agrre on this, if we disable HDCP encryption on one stream, HDCP encryption shouldn't get disable
on other streams which has enables HDCP encryption. Here a output represents a stream.
Thanks,
Anshuman Gupta.  
> 
> So this particular output is not expected to be disabled even initially
> right? Am I missing something here?
> 
> Should I have some different check here?
> 
> Thanks,
> 
> Karthik.B.S
> 
> > 
> > Ram
> > > +			igt_assert_f(ret, "Content Protection not enabled output %s\n", mst_output[i]->name);
> > > +		}
> > > +
> > > +		igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
> > > +
> > > +		if (output->props[IGT_CONNECTOR_HDCP_CONTENT_TYPE])
> > > +			igt_output_set_prop_value(mst_output[count], IGT_CONNECTOR_HDCP_CONTENT_TYPE, content_type);
> > > +
> > > +		igt_display_commit2(display, COMMIT_ATOMIC);
> > > +	}
> > > +}
> > > +
> > >   static void test_content_protection_cleanup(void)
> > >   {
> > >   	igt_display_t *display = &data.display;
> > > @@ -511,7 +721,7 @@ static void test_content_protection_cleanup(void)
> > >   		if (val == CP_UNDESIRED)
> > >   			continue;
> > > -		igt_info("CP Prop being UNDESIRED on %s\n", output->name);
> > > +		igt_debug("CP Prop being UNDESIRED on %s\n", output->name);
> > >   		test_cp_disable(output, COMMIT_ATOMIC);
> > >   	}
> > >   }
> > > @@ -592,6 +802,28 @@ igt_main
> > >   		test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0);
> > >   	}
> > > +	igt_describe("Test Content protection over DP MST");
> > > +	igt_subtest("dp-mst-type-0") {
> > > +		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
> > > +	}
> > > +
> > > +	igt_describe("Test Content protection over DP MST with LIC");
> > > +	igt_subtest("dp-mst-lic-type-0") {
> > > +		data.cp_tests = CP_LIC;
> > > +		test_content_protection_mst(HDCP_CONTENT_TYPE_0);
> > > +	}
> > > +
> > > +	igt_describe("Test Content protection over DP MST");
> > > +	igt_subtest("dp-mst-type-1") {
> > > +		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
> > > +	}
> > > +
> > > +	igt_describe("Test Content protection over DP MST with LIC");
> > > +	igt_subtest("dp-mst-lic-type-1") {
> > > +		data.cp_tests = CP_LIC;
> > > +		test_content_protection_mst(HDCP_CONTENT_TYPE_1);
> > > +	}
> > > +
> > >   	igt_fixture {
> > >   		test_content_protection_cleanup();
> > >   		igt_display_fini(&data.display);
> > > -- 
> > > 2.22.0
> > > 
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2020-11-23  6:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03  8:26 [igt-dev] [PATCH i-g-t v3 0/2] Add subtests for HDCP over MST Karthik B S
2020-11-03  8:26 ` [igt-dev] [PATCH i-g-t v3 1/2] tests/kms_content_protection: Add MST subtests Karthik B S
2020-11-10  9:41   ` Anshuman Gupta
2020-11-11  9:51     ` Karthik B S
2020-11-10 13:45   ` Ramalingam C
2020-11-11 10:06     ` Karthik B S
2020-11-23  5:46       ` Anshuman Gupta
2020-11-03  8:26 ` [igt-dev] [PATCH i-g-t v3 2/2] CI HAX: Add MST tests to fast feedback testlist Karthik B S
2020-11-03 11:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Add subtests for HDCP over MST (rev2) Patchwork
2020-11-03 17:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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.