Skip to contentSkip to conversation

tests/kms_chamelium: Capture on type-c

PATCH In review Kunal Joshi 2 participants 6 messages Apr 23, 2020 – Apr 27, 2020

lore
Share & tools
lore
#0 lore raw

v3 cover tests/kms_chamelium: Capture on type-c

Chamelium uses HPD pulses to signal the need for a receiver reset using DPMS cycle.Some connectors (e.g. DP over TypeC) have limitations and will receive just a single such pulse and discard the rest. This lasts until we disable the mode completetly and only then reenable it.

Receiver reset is always required after we set a new mode, so let's disable the mode (reset_state() does that) before we switch to a new mode. With this we will get the HPD pulses reliably for each iteration over all the supoprted modes.

v2: Correction in code flow (Arek)

v3: Modified commit message. (Arek)

Kunal Joshi (2):
tests/kms_chamelium: Capture on type-c
HAX: Run in BAT

 tests/intel-ci/fast-feedback.testlist |  45 ++++++++++-
 tests/kms_chamelium.c                 | 110 +++++++++++++++++---------
 2 files changed, 118 insertions(+), 37 deletions(-)
Signature · 6 lines
2.25.1

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

PATCH v3 1/2 tests/kms_chamelium: Capture on type-c

Chamelium uses HPD pulses to signal the need for a receiver reset using DPMS cycle.Some connectors (e.g. DP over TypeC) have limitations and will receive just a single such pulse and discard the rest. This lasts until we disable the mode completetly and only then reenable it.

Receiver reset is always required after we set a new mode, so let's disable the mode (reset_state() does that) before we switch to a new mode. With this we will get the HPD pulses reliably for each iteration over all the supoprted modes.

v2: Correction in code flow (Arek)

v3: Modified commit message. (Arek)

Cc: Hiler Arkadiusz <[email protected]>
Cc: Imre Deak <[email protected]>
Issue: https://gitlab.freedesktop.org/drm/intel/issues/262

---
 tests/kms_chamelium.c | 110 ++++++++++++++++++++++++++++--------------
 1 file changed, 74 insertions(+), 36 deletions(-)
tests/kms_chamelium.c +74 -36
index 8b20bbbc..421a9006 100644
@@ -823,34 +823,53 @@ static void test_display_all_modes(data_t *data, struct chamelium_port *port,
 				   uint32_t fourcc, enum chamelium_check check,
 				   int count)
 {
-	igt_output_t *output;
-	igt_plane_t *primary;
-	drmModeConnector *connector;
 	bool bridge;
-	int i;
-
-	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);
-	igt_require(igt_plane_has_format_mod(primary, fourcc, LOCAL_DRM_FORMAT_MOD_NONE));
+	int i, count_modes;
 
 	if (check == CHAMELIUM_CHECK_ANALOG)
 		bridge = check_analog_bridge(data, port);
 
-	for (i = 0; i < connector->count_modes; i++) {
-		drmModeModeInfo *mode = &connector->modes[i];
+	i = 0;
+	do {
+		igt_output_t *output;
+		igt_plane_t *primary;
+		drmModeConnector *connector;
+		drmModeModeInfo *mode;
+
+		/*
+		 * let's reset state each mode so we will get the
+		 * HPD pulses realibably
+		 */
+		reset_state(data, port);
+
+		/*
+		 * modes may change due to mode pruining and link issues, so we
+		 * need to refresh the connector
+		 */
+		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);
+		igt_require(igt_plane_has_format_mod(primary, fourcc,
+			    LOCAL_DRM_FORMAT_MOD_NONE));
+
+		/* we may skip some modes due to above but that's ok */
+		count_modes = connector->count_modes;
+		if (i >= count_modes)
+			break;
+
+		mode = &connector->modes[i];
 
 		if (check == CHAMELIUM_CHECK_ANALOG && bridge &&
 		    prune_vga_mode(data, mode))
 			continue;
 
-		do_test_display(data, port, output, mode, fourcc, check, count);
-	}
-
-	drmModeFreeConnector(connector);
+		do_test_display(data, port, output, mode, fourcc, check,
+				count);
+		drmModeFreeConnector(connector);
+	} while (++i < count_modes);
 }
 
 static const char test_display_frame_dump_desc[] =
@@ -860,23 +879,43 @@ static const char test_display_frame_dump_desc[] =
 static void
 test_display_frame_dump(data_t *data, struct chamelium_port *port)
 {
-	igt_output_t *output;
-	igt_plane_t *primary;
-	struct igt_fb fb;
-	struct chamelium_frame_dump *frame;
-	drmModeModeInfo *mode;
-	drmModeConnector *connector;
-	int fb_id, i, j;
 
-	reset_state(data, port);
+	int i, count_modes;
 
-	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);
+	i = 0;
+	do {
+		igt_output_t *output;
+		igt_plane_t *primary;
+		struct igt_fb fb;
+		struct chamelium_frame_dump *frame;
+		drmModeModeInfo *mode;
+		drmModeConnector *connector;
+		int fb_id, j;
+
+		/*
+		 * let's reset state each mode so we will get the
+		 * HPD pulses realibably
+		 */
+		reset_state(data, port);
+
+		/*
+		 * modes may change due to mode pruining and link issues, so we
+		 * need to refresh the connector
+		 */
+		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);
+
+		/* we may skip some modes due to above but that's ok */
+		count_modes = connector->count_modes;
+		if (i >= count_modes)
+			break;
 
-	for (i = 0; i < connector->count_modes; i++) {
 		mode = &connector->modes[i];
+
 		fb_id = igt_create_color_pattern_fb(data->drm_fd,
 						    mode->hdisplay, mode->vdisplay,
 						    DRM_FORMAT_XRGB8888,
@@ -889,16 +928,15 @@ test_display_frame_dump(data_t *data, struct chamelium_port *port)
 		igt_debug("Reading frame dumps from Chamelium...\n");
 		chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 5);
 		for (j = 0; j < 5; j++) {
-			frame = chamelium_read_captured_frame(
-			    data->chamelium, j);
+			frame = chamelium_read_captured_frame(data->chamelium,
+							      j);
 			chamelium_assert_frame_eq(data->chamelium, frame, &fb);
 			chamelium_destroy_frame_dump(frame);
 		}
 
 		igt_remove_fb(data->drm_fd, &fb);
-	}
-
-	drmModeFreeConnector(connector);
+		drmModeFreeConnector(connector);
+	} while (++i < count_modes);
 }
 
 #define MODE_CLOCK_ACCURACY 0.05 /* 5% */
Signature · 6 lines
2.25.1

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

PATCH v3 2/2 HAX: Run in BAT

In reply to Kunal Joshi

Bat run

---
 tests/intel-ci/fast-feedback.testlist | 45 ++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)
tests/intel-ci/fast-feedback.testlist +44 -1
index 2ccad438..646003d9 100644
@@ -84,15 +84,58 @@ igt@kms_addfb_basic@unused-modifier
 igt@kms_addfb_basic@unused-offsets
 igt@kms_addfb_basic@unused-pitches
 igt@kms_busy@basic
+igt@kms_chamelium@dp-hpd
 igt@kms_chamelium@dp-hpd-fast
+igt@kms_chamelium@dp-hpd-enable-disable-mode
+igt@kms_chamelium@dp-hpd-with-enabled-mode
 igt@kms_chamelium@dp-edid-read
+igt@kms_chamelium@dp-hpd-after-suspend
+igt@kms_chamelium@dp-hpd-after-hibernate
+igt@kms_chamelium@dp-hpd-storm
+igt@kms_chamelium@dp-hpd-storm-disable
+igt@kms_chamelium@dp-edid-change-during-suspend
+igt@kms_chamelium@dp-edid-change-during-hibernate
+igt@kms_chamelium@dp-crc-single
 igt@kms_chamelium@dp-crc-fast
+igt@kms_chamelium@dp-crc-multiple
+igt@kms_chamelium@dp-frame-dump
+igt@kms_chamelium@dp-mode-timings
+igt@kms_chamelium@dp-audio
+igt@kms_chamelium@dp-audio-edid
+igt@kms_chamelium@hdmi-hpd
 igt@kms_chamelium@hdmi-hpd-fast
+igt@kms_chamelium@hdmi-hpd-enable-disable-mode
+igt@kms_chamelium@hdmi-hpd-with-enabled-mode
 igt@kms_chamelium@hdmi-edid-read
+igt@kms_chamelium@hdmi-hpd-after-suspend
+igt@kms_chamelium@hdmi-hpd-after-hibernate
+igt@kms_chamelium@hdmi-hpd-storm
+igt@kms_chamelium@hdmi-hpd-storm-disable
+igt@kms_chamelium@hdmi-edid-change-during-suspend
+igt@kms_chamelium@hdmi-edid-change-during-hibernate
+igt@kms_chamelium@hdmi-crc-single
 igt@kms_chamelium@hdmi-crc-fast
+igt@kms_chamelium@hdmi-crc-multiple
+igt@kms_chamelium@hdmi-crc-nonplanar-formats
+igt@kms_chamelium@hdmi-crc-planes-random
+igt@kms_chamelium@hdmi-cmp-planar-formats
+igt@kms_chamelium@hdmi-cmp-planes-random
+igt@kms_chamelium@hdmi-frame-dump
+igt@kms_chamelium@hdmi-mode-timings
+igt@kms_chamelium@hdmi-audio
+igt@kms_chamelium@hdmi-audio-edid
+igt@kms_chamelium@hdmi-aspect-ratio
+igt@kms_chamelium@vga-hpd
 igt@kms_chamelium@vga-hpd-fast
+igt@kms_chamelium@vga-hpd-enable-disable-mode
+igt@kms_chamelium@vga-hpd-with-enabled-mode
 igt@kms_chamelium@vga-edid-read
-igt@kms_chamelium@common-hpd-after-suspend
+igt@kms_chamelium@vga-hpd-after-suspend
+igt@kms_chamelium@vga-hpd-after-hibernate
+igt@kms_chamelium@vga-hpd-without-ddc
+igt@kms_chamelium@vga-frame-dump
+common-hpd-after-suspend
+common-hpd-after-hibernate
 igt@kms_prop_blob@basic
 igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic
 igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy
Signature · 6 lines
2.25.1

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

[igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_chamelium: Capture on type-c (rev3)

In reply to Kunal Joshi
== Series Details ==

== Series Details ==

Series: tests/kms_chamelium: Capture on type-c (rev3)
URL : https://patchwork.freedesktop.org/series/76004/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8350 -> IGTPW_4501
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_4501 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_4501, 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_4501/index.html

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_chamelium@dp-hpd-after-hibernate:
- fi-icl-u2: NOTRUN -> [FAIL][1] +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4501/fi-icl-u2/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@execlists:
- fi-tgl-y: [PASS][2] -> [INCOMPLETE][3] ([i915#1662])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8350/fi-tgl-y/igt@i915_selftest@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4501/fi-tgl-y/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_pm_rpm@module-reload:
- fi-kbl-x1275: [FAIL][4] ([i915#62]) -> [SKIP][5] ([fdo#109271])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8350/fi-kbl-x1275/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4501/fi-kbl-x1275/igt@[email protected]

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1662]: https://gitlab.freedesktop.org/drm/intel/issues/1662
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62

Participating hosts (48 -> 42)
------------------------------

Additional (1): fi-icl-dsi
Missing (7): fi-cml-u2 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7500u fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* IGT: IGT_5606 -> IGTPW_4501

CI-20190529: 20190529
CI_DRM_8350: 018bab6d1c4ac37bff9306384383fab59750e140 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4501: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4501/index.html
IGT_5606: 678afb3954bec6227c8762756a0ad6d9946d49b2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#4 lore raw

Re: [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_chamelium: Capture on type-c (rev3)

Quoted 80 lines · Patchwork

== Series Details ==

Series: tests/kms_chamelium: Capture on type-c (rev3)
URL : https://patchwork.freedesktop.org/series/76004/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8350 -> IGTPW_4501
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_4501 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_4501, 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_4501/index.html

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_chamelium@dp-hpd-after-hibernate:
- fi-icl-u2: NOTRUN -> [FAIL][1] +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4501/fi-icl-u2/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@execlists:
- fi-tgl-y: [PASS][2] -> [INCOMPLETE][3] ([i915#1662])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8350/fi-tgl-y/igt@i915_selftest@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4501/fi-tgl-y/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_pm_rpm@module-reload:
- fi-kbl-x1275: [FAIL][4] ([i915#62]) -> [SKIP][5] ([fdo#109271])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8350/fi-kbl-x1275/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4501/fi-kbl-x1275/igt@[email protected]

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1662]: https://gitlab.freedesktop.org/drm/intel/issues/1662
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62

Participating hosts (48 -> 42)
------------------------------

Additional (1): fi-icl-dsi
Missing (7): fi-cml-u2 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7500u fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* IGT: IGT_5606 -> IGTPW_4501

Quoted 8 lines

CI-20190529: 20190529
CI_DRM_8350: 018bab6d1c4ac37bff9306384383fab59750e140 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4501: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4501/index.html
IGT_5606: 678afb3954bec6227c8762756a0ad6d9946d49b2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

Tests unrelated to kms_chamelium can be considered as noise. Other than that failing of dp-hpd-after-hibernate is not related to change.
dp-crc-single which is failing is part of the change but still we do better as previously all tests which do chamelium_capture() were failing.
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_chamelium: Capture on type-c (rev4)

In reply to Kunal Joshi
== Series Details ==

== Series Details ==

Series: tests/kms_chamelium: Capture on type-c (rev4)
URL : https://patchwork.freedesktop.org/series/76004/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8351 -> IGTPW_4502
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_4502 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_4502, 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_4502/index.html

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@execlists:
- fi-cml-u2: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8351/fi-cml-u2/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4502/fi-cml-u2/igt@i915_selftest@[email protected]

* igt@kms_chamelium@dp-frame-dump:
- fi-icl-u2: NOTRUN -> [FAIL][3] +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4502/fi-icl-u2/igt@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* {igt@kms_chamelium@hdmi-hpd-with-enabled-mode}:
- fi-kbl-7500u: NOTRUN -> [DMESG-WARN][4]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4502/fi-kbl-7500u/igt@[email protected]

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

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

### IGT changes ###

#### Possible fixes ####

* igt@i915_selftest@live@gt_timelines:
- fi-bwr-2160: [INCOMPLETE][5] ([i915#489]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8351/fi-bwr-2160/igt@i915_selftest@live@gt_timelines.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4502/fi-bwr-2160/igt@i915_selftest@live@gt_timelines.html

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

[i915#489]: https://gitlab.freedesktop.org/drm/intel/issues/489

Participating hosts (50 -> 44)
------------------------------

Missing (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* IGT: IGT_5608 -> IGTPW_4502

CI-20190529: 20190529
CI_DRM_8351: 63580ab8ee4dc3b1b824be6637085ac6b2c8ba6d @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4502: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4502/index.html
IGT_5608: e7bcaf1dd251d454706c7cd64282f531aec50183 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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