Skip to contentSkip to conversation

Chamelium link-status test

PATCH In review Simon Ser 4 participants 9 messages Aug 13, 2019 – Aug 15, 2019 Library code

lore
Share & tools
lore

Simon Ser

author
#0 lore raw

cover Chamelium link-status test

This series adds a Chamelium link-status test for DisplayPort.

CC'ing Manasi since she's implemented the link-status code in the kernel.

Simon Ser (3):
lib/igt_chamelium: add chamelium_trigger_link_failure lib/igt_kms: add support for link-status tests/kms_chamelium: add a link-status test

 lib/igt_chamelium.c   |  15 +++++
 lib/igt_chamelium.h   |   3 +
 lib/igt_kms.c         |   1 +
 lib/igt_kms.h         |   1 +
 tests/kms_chamelium.c | 142 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 162 insertions(+)

--
2.22.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

author
#1 lore raw

PATCH 1/3 lib/igt_chamelium: add chamelium_trigger_link_failure

This new function triggers a link failure on the provided port. Another function called chamelium_supports_trigger_link_failure has been added to check whether the Chamelium board supports the new method.

Support for TriggerLinkFailure in Chamelium has been added in [1].

[1]: https://chromium.googlesource.com/chromiumos/platform/chameleon/+/44866c7bc2af44da1f7bac4e782d0ed6d7c1400a

---
 lib/igt_chamelium.c | 15 +++++++++++++++
 lib/igt_chamelium.h |  3 +++
 2 files changed, 18 insertions(+)
lib/igt_chamelium.c +15 -0
index 301e9d214dd1..076ee0578c9c 100644
@@ -1124,6 +1124,21 @@ int chamelium_get_captured_frame_count(struct chamelium *chamelium)
 	return ret;
 }
 
+bool chamelium_supports_trigger_link_failure(struct chamelium *chamelium)
+{
+	return chamelium_supports_method(chamelium, "TriggerLinkFailure");
+}
+
+/**
+ * chamelium_trigger_link_failure: trigger a link failure on the provided port.
+ */
+void chamelium_trigger_link_failure(struct chamelium *chamelium,
+				    struct chamelium_port *port)
+{
+	xmlrpc_DECREF(chamelium_rpc(chamelium, port, "TriggerLinkFailure",
+				    "(i)", port->id));
+}
+
 bool chamelium_has_audio_support(struct chamelium *chamelium,
 				 struct chamelium_port *port)
 {
lib/igt_chamelium.h +3 -0
index b6b7eb4436f8..3f6b1b21cbfc 100644
@@ -141,6 +141,9 @@ void chamelium_start_capture(struct chamelium *chamelium,
 void chamelium_stop_capture(struct chamelium *chamelium, int frame_count);
 void chamelium_capture(struct chamelium *chamelium, struct chamelium_port *port,
 		       int x, int y, int w, int h, int frame_count);
+bool chamelium_supports_trigger_link_failure(struct chamelium *chamelium);
+void chamelium_trigger_link_failure(struct chamelium *chamelium,
+				    struct chamelium_port *port);
 bool chamelium_has_audio_support(struct chamelium *chamelium,
 				 struct chamelium_port *port);
 void chamelium_get_audio_channel_mapping(struct chamelium *chamelium,
Signature · 6 lines
2.22.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#3 lore raw

PATCH 2/3 lib/igt_kms: add support for link-status

In reply to Simon Ser

This patch simply adds link-status to our list of properties.

---
 lib/igt_kms.c | 1 +
 lib/igt_kms.h | 1 +
 2 files changed, 2 insertions(+)
lib/igt_kms.c +1 -0
index b0169f73b752..eb9cdd953c98 100644
@@ -414,6 +414,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
 	[IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
 	[IGT_CONNECTOR_VRR_CAPABLE] = "vrr_capable",
 	[IGT_CONNECTOR_HDCP_CONTENT_TYPE] = "HDCP Content Type",
+	[IGT_CONNECTOR_LINK_STATUS] = "link-status",
 };
 
 /*
lib/igt_kms.h +1 -0
index c0dcb6f2a9ff..e48891e1aedc 100644
@@ -124,6 +124,7 @@ enum igt_atomic_connector_properties {
        IGT_CONNECTOR_CONTENT_PROTECTION,
        IGT_CONNECTOR_VRR_CAPABLE,
        IGT_CONNECTOR_HDCP_CONTENT_TYPE,
+       IGT_CONNECTOR_LINK_STATUS,
        IGT_NUM_CONNECTOR_PROPS
 };
 
Signature · 6 lines
2.22.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#5 lore raw

PATCH 3/3 tests/kms_chamelium: add a link-status test

In reply to Simon Ser

This test first checks that on normal hotplug, the link-status property is set to GOOD. It then triggers a link failure, checks that the property is updated to BAD. Checks are performed to make sure the new mode list is a subset of the previous one. After that, a new modeset is performed if necessary and the link-status property is set back to GOOD.

This whole dance is repeated until we reach fallback modes.

---
 tests/kms_chamelium.c | 142 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 142 insertions(+)
tests/kms_chamelium.c +142 -0
index b7d30a2d0f55..bef4d6d3bbd8 100644
@@ -539,6 +539,145 @@ enable_output(data_t *data,
 	drmModeFreeConnector(connector);
 }
 
+static bool find_mode(const drmModeModeInfo *list, size_t list_len,
+		      const drmModeModeInfo *mode)
+{
+	size_t i;
+
+	for (i = 0; i < list_len; i++) {
+		if (memcmp(&list[i], mode, sizeof(*mode)) == 0) {
+			return true;
+		}
+	}
+
+	return false;
+}
+
+static void check_modes_subset(const drmModeModeInfo *prev, size_t prev_len,
+			       const drmModeModeInfo *cur, size_t cur_len)
+{
+	size_t i;
+
+	for (i = 0; i < cur_len; i++) {
+		igt_assert_f(find_mode(prev, prev_len, &cur[i]),
+			     "Got new mode %s after link status failure\n",
+			     cur[i].name);
+	}
+
+	igt_assert(cur_len <= prev_len); /* safety net */
+	igt_debug("New mode list contains %zu less modes\n",
+		  prev_len - cur_len);
+}
+
+static bool are_fallback_modes(const drmModeModeInfo *modes, size_t modes_len)
+{
+	igt_assert(modes_len > 0);
+
+	return modes[0].hdisplay <= 1024 && modes[0].vdisplay <= 768;
+}
+
+static void
+test_link_status(data_t *data, struct chamelium_port *port)
+{
+	drmModeConnector *connector;
+	igt_output_t *output;
+	igt_plane_t *primary;
+	drmModeModeInfo *prev_modes;
+	size_t prev_modes_len;
+	drmModeModeInfo mode = {0};
+	uint32_t link_status_id;
+	uint64_t link_status;
+	bool has_prop;
+	unsigned int fb_id = 0;
+	struct igt_fb fb;
+	struct udev_monitor *mon;
+
+	igt_require(chamelium_supports_trigger_link_failure(data->chamelium));
+
+	reset_state(data, port);
+
+	output = prepare_output(data, port, TEST_EDID_BASE);
+	connector = chamelium_port_get_connector(data->chamelium, port, false);
+	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	igt_assert(primary);
+
+	has_prop = kmstest_get_property(data->drm_fd, connector->connector_id,
+					DRM_MODE_OBJECT_CONNECTOR,
+					"link-status", &link_status_id,
+					&link_status, NULL);
+	igt_require(has_prop);
+	igt_assert_f(link_status == DRM_MODE_LINK_STATUS_GOOD,
+		     "Expected link status to be %d initially, got %"PRIu64"\n",
+		     DRM_MODE_LINK_STATUS_GOOD, link_status);
+
+	igt_debug("Connector has %d modes\n", connector->count_modes);
+	prev_modes_len = connector->count_modes;
+	prev_modes = malloc(prev_modes_len * sizeof(drmModeModeInfo));
+	memcpy(prev_modes, connector->modes,
+	       prev_modes_len * sizeof(drmModeModeInfo));
+
+	mon = igt_watch_hotplug();
+
+	while (1) {
+		if (link_status == DRM_MODE_LINK_STATUS_BAD) {
+			igt_output_set_prop_value(output,
+						  IGT_CONNECTOR_LINK_STATUS,
+						  DRM_MODE_LINK_STATUS_GOOD);
+		}
+
+		if (memcmp(&connector->modes[0], &mode, sizeof(mode)) != 0) {
+			igt_assert(connector->count_modes > 0);
+			mode = connector->modes[0];
+			igt_debug("Modesetting with %s\n", mode.name);
+			if (fb_id > 0)
+				igt_remove_fb(data->drm_fd, &fb);
+			fb_id = igt_create_color_pattern_fb(data->drm_fd,
+							    mode.hdisplay,
+							    mode.vdisplay,
+							    DRM_FORMAT_XRGB8888,
+							    LOCAL_DRM_FORMAT_MOD_NONE,
+							    0, 0, 0, &fb);
+			igt_assert(fb_id > 0);
+			enable_output(data, port, output, &mode, &fb);
+		} else {
+			igt_display_commit2(&data->display, COMMIT_ATOMIC);
+		}
+
+		igt_debug("Triggering link failure\n");
+		chamelium_trigger_link_failure(data->chamelium, port);
+
+		igt_assert(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT));
+		igt_assert_eq(reprobe_connector(data, port),
+			      DRM_MODE_CONNECTED);
+
+		igt_flush_hotplugs(mon);
+
+		drmModeFreeConnector(connector);
+		connector = chamelium_port_get_connector(data->chamelium, port,
+							 false);
+		link_status = igt_output_get_prop(output, IGT_CONNECTOR_LINK_STATUS);
+		igt_assert_f(link_status == DRM_MODE_LINK_STATUS_BAD,
+			     "Expected link status to be %d after link failure, "
+			     "got %"PRIu64"\n",
+			     DRM_MODE_LINK_STATUS_BAD, link_status);
+		check_modes_subset(prev_modes, prev_modes_len,
+				   connector->modes, connector->count_modes);
+		prev_modes_len = connector->count_modes;
+		memcpy(prev_modes, connector->modes,
+		       connector->count_modes * sizeof(drmModeModeInfo));
+
+		if (are_fallback_modes(connector->modes, connector->count_modes)) {
+			igt_debug("Reached fallback modes\n");
+			break;
+		}
+	}
+
+	igt_cleanup_hotplug(mon);
+	igt_remove_fb(data->drm_fd, &fb);
+	free(prev_modes);
+	drmModeFreeConnector(connector);
+}
+
 static void chamelium_paint_xr24_pattern(uint32_t *data,
 					 size_t width, size_t height,
 					 size_t stride, size_t block_size)
@@ -2234,6 +2373,9 @@ igt_main
 			test_hpd_storm_disable(&data, port,
 					       HPD_STORM_PULSE_INTERVAL_DP);
 
+		connector_subtest("dp-link-status", DisplayPort)
+			test_link_status(&data, port);
+
 		connector_subtest("dp-edid-change-during-suspend", DisplayPort)
 			test_suspend_resume_edid_change(&data, port,
 							SUSPEND_STATE_MEM,
Signature · 6 lines
2.22.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#7 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for Chamelium link-status test

In reply to Simon Ser
== Series Details ==

== Series Details ==

Series: Chamelium link-status test
URL : https://patchwork.freedesktop.org/series/65132/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6696 -> IGTPW_3340
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_requests:
- fi-byt-j1900: [PASS][1] -> [INCOMPLETE][2] ([fdo#102657])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/fi-byt-j1900/igt@i915_selftest@live_requests.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/fi-byt-j1900/igt@i915_selftest@live_requests.html

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][3] -> [FAIL][4] ([fdo#109485])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@debugfs_test@read_all_entries:
- fi-ilk-650: [DMESG-WARN][5] ([fdo#106387]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/fi-ilk-650/igt@debugfs_test@read_all_entries.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/fi-ilk-650/igt@debugfs_test@read_all_entries.html

* igt@gem_exec_basic@basic-all:
- fi-icl-u3: [DMESG-WARN][7] ([fdo#107724]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/fi-icl-u3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/fi-icl-u3/igt@[email protected]

* igt@i915_selftest@live_reset:
- {fi-icl-dsi}: [INCOMPLETE][9] ([fdo#107713]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/fi-icl-dsi/igt@i915_selftest@live_reset.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/fi-icl-dsi/igt@i915_selftest@live_reset.html

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: [FAIL][11] ([fdo#103167]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/fi-icl-u3/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/fi-icl-u3/igt@[email protected]
- fi-icl-u2: [FAIL][13] ([fdo#103167]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/fi-icl-u2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/fi-icl-u2/igt@[email protected]

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

[fdo#102657]: https://bugs.freedesktop.org/show_bug.cgi?id=102657
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#106387]: https://bugs.freedesktop.org/show_bug.cgi?id=106387
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485

Participating hosts (55 -> 47)
------------------------------

Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* IGT: IGT_5130 -> IGTPW_3340

CI-20190529: 20190529
CI_DRM_6696: e9dffb84ec534faeafbcd7029ab6b58f3a3bc01e @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3340: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/
IGT_5130: 2180b639872f81318ebe2bbe4349ca463e755568 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

+igt@kms_chamelium@dp-link-status

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v1 2/3
#4 lore raw

Re: [igt-dev] [PATCH i-g-t 2/3] lib/igt_kms: add support for link-status

In reply to Simon Ser
Quoted 3 lines · Simon Ser

This patch simply adds link-status to our list of properties.

This looks good to me,

Manasi

Quoted 32 lines
---
 lib/igt_kms.c | 1 +
 lib/igt_kms.h | 1 +
 2 files changed, 2 insertions(+)
lib/igt_kms.c +1 -0
index b0169f73b752..eb9cdd953c98 100644
@@ -414,6 +414,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
 	[IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
 	[IGT_CONNECTOR_VRR_CAPABLE] = "vrr_capable",
 	[IGT_CONNECTOR_HDCP_CONTENT_TYPE] = "HDCP Content Type",
+	[IGT_CONNECTOR_LINK_STATUS] = "link-status",
 };
 
 /*
lib/igt_kms.h +1 -0
index c0dcb6f2a9ff..e48891e1aedc 100644
@@ -124,6 +124,7 @@ enum igt_atomic_connector_properties {
        IGT_CONNECTOR_CONTENT_PROTECTION,
        IGT_CONNECTOR_VRR_CAPABLE,
        IGT_CONNECTOR_HDCP_CONTENT_TYPE,
+       IGT_CONNECTOR_LINK_STATUS,
        IGT_NUM_CONNECTOR_PROPS
 };
 
Signature · 1 line
2.22.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v1 3/3
#6 lore raw

Re: [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a link-status test

In reply to Simon Ser

This is a really good link training algorithm test using Chamellium so that now it will get tested without DPR 120 and for every CI run.
Thanks Simon for writing this one. Great work!

Regards
Manasi

Quoted 176 lines · Simon Ser

This test first checks that on normal hotplug, the link-status property is set to GOOD. It then triggers a link failure, checks that the property is updated to BAD. Checks are performed to make sure the new mode list is a subset of the previous one. After that, a new modeset is performed if necessary and the link-status property is set back to GOOD.

This whole dance is repeated until we reach fallback modes.

---
 tests/kms_chamelium.c | 142 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 142 insertions(+)
tests/kms_chamelium.c +142 -0
index b7d30a2d0f55..bef4d6d3bbd8 100644
@@ -539,6 +539,145 @@ enable_output(data_t *data,
 	drmModeFreeConnector(connector);
 }
 
+static bool find_mode(const drmModeModeInfo *list, size_t list_len,
+		      const drmModeModeInfo *mode)
+{
+	size_t i;
+
+	for (i = 0; i < list_len; i++) {
+		if (memcmp(&list[i], mode, sizeof(*mode)) == 0) {
+			return true;
+		}
+	}
+
+	return false;
+}
+
+static void check_modes_subset(const drmModeModeInfo *prev, size_t prev_len,
+			       const drmModeModeInfo *cur, size_t cur_len)
+{
+	size_t i;
+
+	for (i = 0; i < cur_len; i++) {
+		igt_assert_f(find_mode(prev, prev_len, &cur[i]),
+			     "Got new mode %s after link status failure\n",
+			     cur[i].name);
+	}
+
+	igt_assert(cur_len <= prev_len); /* safety net */
+	igt_debug("New mode list contains %zu less modes\n",
+		  prev_len - cur_len);
+}
+
+static bool are_fallback_modes(const drmModeModeInfo *modes, size_t modes_len)
+{
+	igt_assert(modes_len > 0);
+
+	return modes[0].hdisplay <= 1024 && modes[0].vdisplay <= 768;
+}
+
+static void
+test_link_status(data_t *data, struct chamelium_port *port)
+{
+	drmModeConnector *connector;
+	igt_output_t *output;
+	igt_plane_t *primary;
+	drmModeModeInfo *prev_modes;
+	size_t prev_modes_len;
+	drmModeModeInfo mode = {0};
+	uint32_t link_status_id;
+	uint64_t link_status;
+	bool has_prop;
+	unsigned int fb_id = 0;
+	struct igt_fb fb;
+	struct udev_monitor *mon;
+
+	igt_require(chamelium_supports_trigger_link_failure(data->chamelium));
+
+	reset_state(data, port);
+
+	output = prepare_output(data, port, TEST_EDID_BASE);
+	connector = chamelium_port_get_connector(data->chamelium, port, false);
+	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	igt_assert(primary);
+
+	has_prop = kmstest_get_property(data->drm_fd, connector->connector_id,
+					DRM_MODE_OBJECT_CONNECTOR,
+					"link-status", &link_status_id,
+					&link_status, NULL);
+	igt_require(has_prop);
+	igt_assert_f(link_status == DRM_MODE_LINK_STATUS_GOOD,
+		     "Expected link status to be %d initially, got %"PRIu64"\n",
+		     DRM_MODE_LINK_STATUS_GOOD, link_status);
+
+	igt_debug("Connector has %d modes\n", connector->count_modes);
+	prev_modes_len = connector->count_modes;
+	prev_modes = malloc(prev_modes_len * sizeof(drmModeModeInfo));
+	memcpy(prev_modes, connector->modes,
+	       prev_modes_len * sizeof(drmModeModeInfo));
+
+	mon = igt_watch_hotplug();
+
+	while (1) {
+		if (link_status == DRM_MODE_LINK_STATUS_BAD) {
+			igt_output_set_prop_value(output,
+						  IGT_CONNECTOR_LINK_STATUS,
+						  DRM_MODE_LINK_STATUS_GOOD);
+		}
+
+		if (memcmp(&connector->modes[0], &mode, sizeof(mode)) != 0) {
+			igt_assert(connector->count_modes > 0);
+			mode = connector->modes[0];
+			igt_debug("Modesetting with %s\n", mode.name);
+			if (fb_id > 0)
+				igt_remove_fb(data->drm_fd, &fb);
+			fb_id = igt_create_color_pattern_fb(data->drm_fd,
+							    mode.hdisplay,
+							    mode.vdisplay,
+							    DRM_FORMAT_XRGB8888,
+							    LOCAL_DRM_FORMAT_MOD_NONE,
+							    0, 0, 0, &fb);
+			igt_assert(fb_id > 0);
+			enable_output(data, port, output, &mode, &fb);
+		} else {
+			igt_display_commit2(&data->display, COMMIT_ATOMIC);
+		}
+
+		igt_debug("Triggering link failure\n");
+		chamelium_trigger_link_failure(data->chamelium, port);
+
+		igt_assert(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT));
+		igt_assert_eq(reprobe_connector(data, port),
+			      DRM_MODE_CONNECTED);
+
+		igt_flush_hotplugs(mon);
+
+		drmModeFreeConnector(connector);
+		connector = chamelium_port_get_connector(data->chamelium, port,
+							 false);
+		link_status = igt_output_get_prop(output, IGT_CONNECTOR_LINK_STATUS);
+		igt_assert_f(link_status == DRM_MODE_LINK_STATUS_BAD,
+			     "Expected link status to be %d after link failure, "
+			     "got %"PRIu64"\n",
+			     DRM_MODE_LINK_STATUS_BAD, link_status);
+		check_modes_subset(prev_modes, prev_modes_len,
+				   connector->modes, connector->count_modes);
+		prev_modes_len = connector->count_modes;
+		memcpy(prev_modes, connector->modes,
+		       connector->count_modes * sizeof(drmModeModeInfo));
+
+		if (are_fallback_modes(connector->modes, connector->count_modes)) {
+			igt_debug("Reached fallback modes\n");
+			break;
+		}
+	}
+
+	igt_cleanup_hotplug(mon);
+	igt_remove_fb(data->drm_fd, &fb);
+	free(prev_modes);
+	drmModeFreeConnector(connector);
+}
+
 static void chamelium_paint_xr24_pattern(uint32_t *data,
 					 size_t width, size_t height,
 					 size_t stride, size_t block_size)
@@ -2234,6 +2373,9 @@ igt_main
 			test_hpd_storm_disable(&data, port,
 					       HPD_STORM_PULSE_INTERVAL_DP);
 
+		connector_subtest("dp-link-status", DisplayPort)
+			test_link_status(&data, port);
+
 		connector_subtest("dp-edid-change-during-suspend", DisplayPort)
 			test_suspend_resume_edid_change(&data, port,
 							SUSPEND_STATE_MEM,
Signature · 1 line
2.22.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#8 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for Chamelium link-status test

In reply to Simon Ser
== Series Details ==

== Series Details ==

Series: Chamelium link-status test
URL : https://patchwork.freedesktop.org/series/65132/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6696_full -> IGTPW_3340_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

New tests
---------

New tests have been introduced between CI_DRM_6696_full and IGTPW_3340_full:

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

* igt@kms_chamelium@dp-link-status:
- Statuses : 6 skip(s)
- Exec time: [0.0] s

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@deep-bsd:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#111325]) +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-iclb7/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-iclb2/igt@[email protected]

* igt@gem_exec_schedule@independent-bsd1:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276]) +14 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-iclb4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-iclb3/igt@[email protected]

* igt@gem_tiled_swapping@non-threaded:
- shard-glk: [PASS][5] -> [DMESG-WARN][6] ([fdo#108686])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-glk9/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-glk5/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-snb: [PASS][7] -> [SKIP][8] ([fdo#109271])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-snb1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-snb5/igt@[email protected]

* igt@i915_suspend@fence-restore-untiled:
- shard-apl: [PASS][9] -> [DMESG-WARN][10] ([fdo#108566]) +7 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-apl5/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-apl1/igt@[email protected]

* igt@kms_busy@basic-modeset-b:
- shard-iclb: [PASS][11] -> [INCOMPLETE][12] ([fdo#107713])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-iclb8/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-iclb4/igt@[email protected]

* igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions:
- shard-hsw: [PASS][13] -> [FAIL][14] ([fdo#103355])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-hsw5/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-hsw6/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank:
- shard-glk: [PASS][15] -> [FAIL][16] ([fdo#105363])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-glk7/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-glk5/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-hsw: [PASS][17] -> [INCOMPLETE][18] ([fdo#103540])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-hsw5/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-hsw4/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- shard-iclb: [PASS][19] -> [FAIL][20] ([fdo#103167]) +5 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-iclb8/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-iclb7/igt@[email protected]

* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109441]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-iclb8/igt@kms_psr@psr2_cursor_plane_onoff.html

* igt@perf_pmu@rc6:
- shard-kbl: [PASS][23] -> [SKIP][24] ([fdo#109271])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-kbl3/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-kbl7/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_schedule@fifo-vebox:
- shard-hsw: [FAIL][25] -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-hsw1/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-hsw6/igt@[email protected]

* igt@gem_exec_schedule@independent-blt:
- shard-hsw: [FAIL][27] ([fdo#111374]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-hsw1/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-hsw6/igt@[email protected]

* igt@gem_exec_schedule@preempt-other-bsd1:
- shard-iclb: [SKIP][29] ([fdo#109276]) -> [PASS][30] +22 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-iclb3/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-iclb4/igt@[email protected]

* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [SKIP][31] ([fdo#111325]) -> [PASS][32] +4 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-iclb1/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-iclb7/igt@[email protected]

* igt@i915_suspend@debugfs-reader:
- shard-apl: [DMESG-WARN][33] ([fdo#108566]) -> [PASS][34] +5 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-apl7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-apl8/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-alpha-opaque:
- shard-kbl: [FAIL][35] ([fdo#103232]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-kbl6/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-kbl4/igt@[email protected]
- shard-apl: [FAIL][37] ([fdo#103232]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-apl7/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-apl1/igt@[email protected]
- shard-glk: [FAIL][39] ([fdo#103232]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-glk9/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-glk4/igt@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank:
- shard-glk: [FAIL][41] ([fdo#105363]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-glk1/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-glk6/igt@[email protected]

* igt@kms_flip@flip-vs-blocking-wf-vblank:
- shard-apl: [INCOMPLETE][43] ([fdo#103927]) -> [PASS][44] +1 similar issue
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-apl6/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-apl4/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu:
- shard-kbl: [FAIL][45] ([fdo#103167]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-kbl7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu.html
- shard-apl: [FAIL][47] ([fdo#103167]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-apl2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-apl8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu.html

* igt@kms_frontbuffer_tracking@fbc-stridechange:
- shard-iclb: [FAIL][49] ([fdo#103167]) -> [PASS][50] +3 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-iclb7/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-iclb1/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-kbl: [INCOMPLETE][51] ([fdo#103665]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-kbl1/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-kbl2/igt@[email protected]

* igt@kms_psr2_su@page_flip:
- shard-iclb: [SKIP][53] ([fdo#109642] / [fdo#111068]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-iclb1/igt@kms_psr2_su@page_flip.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-iclb2/igt@kms_psr2_su@page_flip.html

* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [SKIP][55] ([fdo#109441]) -> [PASS][56] +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6696/shard-iclb4/igt@kms_psr@psr2_cursor_mmap_cpu.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111374]: https://bugs.freedesktop.org/show_bug.cgi?id=111374

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

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

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

* CI: CI-20190529 -> None
* IGT: IGT_5130 -> IGTPW_3340
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_6696: e9dffb84ec534faeafbcd7029ab6b58f3a3bc01e @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3340: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3340/
IGT_5130: 2180b639872f81318ebe2bbe4349ca463e755568 @ 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_3340/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v1 1/3
#2 lore raw

Re: [igt-dev] [PATCH i-g-t 1/3] lib/igt_chamelium: add chamelium_trigger_link_failure

In reply to Simon Ser
Quoted 9 lines · Simon Ser

This new function triggers a link failure on the provided port. Another function called chamelium_supports_trigger_link_failure has been added to check whether the Chamelium board supports the new method.

Support for TriggerLinkFailure in Chamelium has been added in [1].

[1]: https://chromium.googlesource.com/chromiumos/platform/chameleon/+/44866c7bc2af44da1f7bac4e782d0ed6d7c1400a

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev