* [igt-dev] [PATCH i-g-t 1/2] lib: Add support to connector path property
@ 2020-01-17 18:14 José Roberto de Souza
2020-01-17 18:14 ` [igt-dev] [PATCH i-g-t 2/2] tests: Add tests for DP MST José Roberto de Souza
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: José Roberto de Souza @ 2020-01-17 18:14 UTC (permalink / raw)
To: igt-dev
This property is set with the DP MST path of the connector.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
lib/igt_kms.c | 1 +
lib/igt_kms.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index d20daaad..b9bbc1a4 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -416,6 +416,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
[IGT_CONNECTOR_VRR_CAPABLE] = "vrr_capable",
[IGT_CONNECTOR_HDCP_CONTENT_TYPE] = "HDCP Content Type",
[IGT_CONNECTOR_LINK_STATUS] = "link-status",
+ [IGT_CONNECTOR_PATH] = "PATH",
};
/*
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 6c919e92..093a970a 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -125,6 +125,7 @@ enum igt_atomic_connector_properties {
IGT_CONNECTOR_VRR_CAPABLE,
IGT_CONNECTOR_HDCP_CONTENT_TYPE,
IGT_CONNECTOR_LINK_STATUS,
+ IGT_CONNECTOR_PATH,
IGT_NUM_CONNECTOR_PROPS
};
--
2.25.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests: Add tests for DP MST
2020-01-17 18:14 [igt-dev] [PATCH i-g-t 1/2] lib: Add support to connector path property José Roberto de Souza
@ 2020-01-17 18:14 ` José Roberto de Souza
2020-03-24 18:15 ` Ville Syrjälä
2020-01-17 20:35 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: Add support to connector path property Patchwork
2020-01-20 16:51 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: José Roberto de Souza @ 2020-01-17 18:14 UTC (permalink / raw)
To: igt-dev
Test DP MST corner cases.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
tests/Makefile.sources | 1 +
tests/kms_mst.c | 347 +++++++++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
3 files changed, 349 insertions(+)
create mode 100644 tests/kms_mst.c
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 806eb02d..68794ed3 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -59,6 +59,7 @@ TESTS_progs = \
kms_lease \
kms_legacy_colorkey \
kms_mmap_write_crc \
+ kms_mst \
kms_panel_fitting \
kms_pipe_b_c_ivb \
kms_pipe_crc_basic \
diff --git a/tests/kms_mst.c b/tests/kms_mst.c
new file mode 100644
index 00000000..7cc01417
--- /dev/null
+++ b/tests/kms_mst.c
@@ -0,0 +1,347 @@
+#include <ctype.h>
+#include <string.h>
+
+#include "igt.h"
+
+IGT_TEST_DESCRIPTION("Test DP MST corner cases.");
+/*
+ * It is testing only the first MST port found, to test multiple ports or force
+ * test in a specific port changes will be needed
+ */
+
+#define SQUARE_SIZE 100
+#define MAX_MST_OUTPUTS 3
+#define RESOLUTION_H 1920
+#define RESOLUTION_V 1080
+#define ANOTHER_RESOLUTION_H 1024
+#define ANOTHER_RESOLUTION_V 768
+
+typedef struct {
+ int drm_fd;
+ igt_display_t display;
+ igt_output_t *mst_output[MAX_MST_OUTPUTS];
+ struct igt_fb fb[MAX_MST_OUTPUTS];
+ uint8_t mst_connectors, prepared;
+} data_t;
+
+static drmModeModeInfo *find_mode(igt_output_t *output, uint16_t h, uint16_t v,
+ uint32_t *mode_clock)
+{
+ drmModeModeInfo *ret = NULL;
+ int i;
+
+ for (i = 0; i < output->config.connector->count_modes; i++) {
+ drmModeModeInfo *mode;
+
+ mode = &output->config.connector->modes[i];
+ if (mode->hdisplay != h ||
+ mode->vdisplay != v)
+ continue;
+
+ if (mode_clock && *mode_clock && mode->clock != *mode_clock)
+ continue;
+
+ if (mode_clock && !*mode_clock)
+ *mode_clock = mode->clock;
+
+ ret = mode;
+
+ break;
+ }
+
+ return ret;
+}
+
+static int16_t get_parent_conn_id(const char *mst_path)
+{
+ int i;
+ char buffer[6];
+
+ if (mst_path[0] != 'm' || mst_path[1] != 's' || mst_path[2] != 't' ||
+ mst_path[3] != ':')
+ return -1;
+
+ /* Unlikely to need more than 5 digits to represent a connector id */
+ for (i = 4; i < 9; i++) {
+ if (!isdigit(mst_path[i]))
+ break;
+ }
+
+ if (i == 4)
+ return -1;
+
+ i = i - 4;
+ memcpy(buffer, &mst_path[4], i);
+ buffer[i] = 0;
+ return atoi(buffer);
+}
+
+static void search_mst_outputs(data_t *data)
+{
+ igt_display_t *display = &data->display;
+ igt_output_t *output;
+ uint32_t clock = 0;
+ int16_t parent_conn = -1;
+
+ for_each_connected_output(display, output) {
+ drmModePropertyBlobPtr blob;
+ char mst_path_buffer[32];
+ drmModeModeInfo *mode;
+ uint64_t val;
+
+ igt_output_set_pipe(output, PIPE_NONE);
+
+ if (data->mst_connectors == MAX_MST_OUTPUTS)
+ continue;
+
+ if (!igt_output_has_prop(output, IGT_CONNECTOR_PATH)) {
+ igt_debug("\tno patch prop\n");
+ continue;
+ }
+
+ val = igt_output_get_prop(output, IGT_CONNECTOR_PATH);
+ blob = drmModeGetPropertyBlob(data->drm_fd, val);
+ strncpy(mst_path_buffer, (const char *)blob->data,
+ sizeof(mst_path_buffer) - 1);
+ drmModeFreePropertyBlob(blob);
+
+ if (parent_conn != -1) {
+ if (get_parent_conn_id(mst_path_buffer) != parent_conn)
+ continue;
+ } else {
+ parent_conn = get_parent_conn_id(mst_path_buffer);
+ igt_info("MST parent connector %i\n", parent_conn);
+ }
+
+ mode = find_mode(output, RESOLUTION_H, RESOLUTION_V, &clock);
+ if (!mode) {
+ igt_info("MST connector %s[%s] found but no compatible mode found\n",
+ output->name, mst_path_buffer);
+ continue;
+ }
+
+ igt_info("Added MST connector %s[%s]\n", output->name, mst_path_buffer);
+
+ igt_output_override_mode(output, mode);
+ data->mst_output[data->mst_connectors] = output;
+ data->mst_connectors++;
+ }
+
+ igt_require_f(data->mst_connectors, "No MST connector found\n");
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);
+}
+
+static void prepare(data_t *data, uint8_t n_outputs)
+{
+ igt_output_t *output;
+ uint8_t i;
+
+ for (i = 0; i < data->mst_connectors && i < n_outputs; i++) {
+ const drmModeModeInfo *mode;
+ igt_plane_t *primary;
+ double r, g, b;
+ cairo_t *cr;
+
+ output = data->mst_output[i];
+ mode = igt_output_get_mode(output);
+
+ igt_output_set_pipe(output, PIPE_A + i);
+
+ primary = igt_output_get_plane_type(output,
+ DRM_PLANE_TYPE_PRIMARY);
+ igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
+ DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
+ 1.0, 1.0, 1.0, &data->fb[i]);
+
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->fb[i]);
+
+ /* paint square in different color */
+ switch (i % 4) {
+ case 0:
+ r = 1.0;
+ g = b = 0.0;
+ break;
+ case 1:
+ g = 1.0;
+ r = b = 0.0;
+ break;
+ case 2:
+ b = 1.0;
+ r = g = 0.0;
+ break;
+ default:
+ case 4:
+ r = g = b = 0.0;
+ break;
+ }
+ igt_paint_color_alpha(cr, 0, 0, SQUARE_SIZE, SQUARE_SIZE,
+ r, g, b, 1.0);
+
+ igt_plane_set_fb(primary, &data->fb[i]);
+ igt_put_cairo_ctx(data->drm_fd, &data->fb[i], cr);
+ }
+
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);
+ data->prepared = n_outputs;
+}
+
+static void change_resolution(data_t *data, bool all)
+{
+ igt_output_t *output;
+ uint32_t clock = 0;
+ uint8_t i;
+
+ for (i = 0; i < data->mst_connectors; i++) {
+ drmModeModeInfo *mode;
+
+ output = data->mst_output[i];
+ if (output->pending_pipe == PIPE_NONE)
+ continue;
+
+ mode = find_mode(output, ANOTHER_RESOLUTION_H,
+ ANOTHER_RESOLUTION_V, &clock);
+ if (!mode) {
+ igt_info("New resolution not found on %s skipping it\n",
+ output->name);
+ igt_output_set_pipe(output, PIPE_NONE);
+ continue;
+ }
+
+ igt_output_override_mode(output, mode);
+
+ if (!all)
+ break;
+ }
+
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);
+}
+
+static void restore_resolution(data_t *data)
+{
+ igt_output_t *output;
+ uint32_t clock = 0;
+ uint8_t i;
+
+ for (i = 0; i < data->mst_connectors; i++) {
+ drmModeModeInfo *mode;
+
+ output = data->mst_output[i];
+ mode = find_mode(output, RESOLUTION_H, RESOLUTION_V, &clock);
+ /*
+ * No need to check because this mode was already found in
+ * search_mst_outputs()
+ */
+ igt_output_override_mode(output, mode);
+ /* Reenable any sink left off in change_resolution() */
+ igt_output_set_pipe(output, PIPE_A + i);
+ }
+
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);
+}
+
+static void cleanup(data_t *data)
+{
+ uint8_t i;
+
+ for (i = 0; i < data->prepared; i++) {
+ igt_output_t *output = data->mst_output[i];
+ igt_plane_t *primary;
+
+ primary = igt_output_get_plane_type(output,
+ DRM_PLANE_TYPE_PRIMARY);
+ igt_plane_set_fb(primary, NULL);
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
+
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
+ for (i = 0; i < data->prepared; i++)
+ igt_remove_fb(data->drm_fd, &data->fb[i]);
+}
+
+int main(int argc, char *argv[])
+{
+ data_t data = {};
+
+ igt_subtest_init_parse_opts(&argc, argv, "", NULL,
+ NULL, NULL, NULL);
+ igt_skip_on_simulation();
+
+ igt_fixture {
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ kmstest_set_vt_graphics_mode();
+
+ igt_display_require(&data.display, data.drm_fd);
+ search_mst_outputs(&data);
+ }
+
+ igt_describe("Enable all MST streams in the same port");
+ igt_subtest_f("all_enabled") {
+ prepare(&data, data.mst_connectors);
+ igt_debug_manual_check("all", "all streams enabled");
+ cleanup(&data);
+ }
+
+ igt_describe("Test change the master CRTC of the MST stream");
+ igt_subtest_f("change_master") {
+ enum pipe pipe;
+
+ igt_require(data.mst_connectors >= 2);
+
+ prepare(&data, 2);
+ igt_debug_manual_check("all", "dual output");
+
+ pipe = data.mst_output[0]->pending_pipe;
+ igt_output_set_pipe(data.mst_output[0], PIPE_NONE);
+ igt_display_commit2(&data.display, COMMIT_ATOMIC);
+ igt_debug_manual_check("all", "first MST stream disabled");
+
+ igt_output_set_pipe(data.mst_output[0], pipe);
+ igt_display_commit2(&data.display, COMMIT_ATOMIC);
+ igt_debug_manual_check("all", "dual output");
+
+ pipe = data.mst_output[1]->pending_pipe;
+ igt_output_set_pipe(data.mst_output[1], PIPE_NONE);
+ igt_display_commit2(&data.display, COMMIT_ATOMIC);
+ igt_debug_manual_check("all", "second MST stream disabled");
+
+ igt_output_set_pipe(data.mst_output[1], pipe);
+ igt_display_commit2(&data.display, COMMIT_ATOMIC);
+ igt_debug_manual_check("all", "dual output");
+
+ cleanup(&data);
+ }
+
+ igt_describe("Test change the resolution off all MST streams");
+ igt_subtest_f("change_resolution") {
+ prepare(&data, data.mst_connectors);
+ igt_debug_manual_check("all", "regular resolution in all streams");
+
+ change_resolution(&data, true);
+ igt_debug_manual_check("all", "new resolution set in compatible streams");
+
+ restore_resolution(&data);
+ igt_debug_manual_check("all", "regular resolution in all streams again");
+ cleanup(&data);
+ }
+
+ igt_describe("Test do a fullmodeset in the master CRTC of the MST stream");
+ igt_subtest_f("fullmodeset_master") {
+ prepare(&data, data.mst_connectors);
+ igt_debug_manual_check("all", "regular resolution in all streams");
+
+ change_resolution(&data, false);
+ igt_debug_manual_check("all", "new resolution in the first stream");
+
+ restore_resolution(&data);
+ igt_debug_manual_check("all", "regular resolution in all streams again");
+ cleanup(&data);
+ }
+
+ igt_fixture {
+ igt_display_reset(&data.display);
+ igt_display_fini(&data.display);
+ }
+
+ igt_exit();
+}
diff --git a/tests/meson.build b/tests/meson.build
index a79d22ba..a552301b 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -43,6 +43,7 @@ test_progs = [
'kms_lease',
'kms_legacy_colorkey',
'kms_mmap_write_crc',
+ 'kms_mst',
'kms_panel_fitting',
'kms_pipe_b_c_ivb',
'kms_pipe_crc_basic',
--
2.25.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: Add support to connector path property
2020-01-17 18:14 [igt-dev] [PATCH i-g-t 1/2] lib: Add support to connector path property José Roberto de Souza
2020-01-17 18:14 ` [igt-dev] [PATCH i-g-t 2/2] tests: Add tests for DP MST José Roberto de Souza
@ 2020-01-17 20:35 ` Patchwork
2020-01-20 16:51 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2020-01-17 20:35 UTC (permalink / raw)
To: José Roberto de Souza; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/2] lib: Add support to connector path property
URL : https://patchwork.freedesktop.org/series/72211/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7767 -> IGTPW_3936
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/index.html
Known issues
------------
Here are the changes found in IGTPW_3936 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_param@basic:
- fi-tgl-y: [PASS][1] -> [DMESG-WARN][2] ([i915#402]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/fi-tgl-y/igt@gem_ctx_param@basic.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/fi-tgl-y/igt@gem_ctx_param@basic.html
* igt@i915_selftest@live_blt:
- fi-byt-j1900: [PASS][3] -> [DMESG-FAIL][4] ([i915#725])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/fi-byt-j1900/igt@i915_selftest@live_blt.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/fi-byt-j1900/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_gt_heartbeat:
- fi-bsw-n3050: [PASS][5] -> [DMESG-FAIL][6] ([i915#541])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/fi-bsw-n3050/igt@i915_selftest@live_gt_heartbeat.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/fi-bsw-n3050/igt@i915_selftest@live_gt_heartbeat.html
#### Possible fixes ####
* igt@i915_getparams_basic@basic-subslice-total:
- fi-tgl-y: [DMESG-WARN][7] ([i915#402]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/fi-tgl-y/igt@i915_getparams_basic@basic-subslice-total.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/fi-tgl-y/igt@i915_getparams_basic@basic-subslice-total.html
* igt@i915_module_load@reload-with-fault-injection:
- fi-skl-6770hq: [DMESG-WARN][9] ([i915#889]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/fi-skl-6770hq/igt@i915_module_load@reload-with-fault-injection.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/fi-skl-6770hq/igt@i915_module_load@reload-with-fault-injection.html
* igt@i915_pm_rpm@module-reload:
- fi-skl-6600u: [DMESG-WARN][11] ([i915#889]) -> [PASS][12] +23 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/fi-skl-6600u/igt@i915_pm_rpm@module-reload.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/fi-skl-6600u/igt@i915_pm_rpm@module-reload.html
* igt@i915_selftest@live_blt:
- fi-hsw-4770: [DMESG-FAIL][13] ([i915#725]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/fi-hsw-4770/igt@i915_selftest@live_blt.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/fi-hsw-4770/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_gt_lrc:
- fi-skl-6600u: [DMESG-FAIL][15] ([i915#889]) -> [PASS][16] +7 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/fi-skl-6600u/igt@i915_selftest@live_gt_lrc.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/fi-skl-6600u/igt@i915_selftest@live_gt_lrc.html
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
[i915#889]: https://gitlab.freedesktop.org/drm/intel/issues/889
Participating hosts (44 -> 43)
------------------------------
Additional (3): fi-blb-e6850 fi-ivb-3770 fi-snb-2600
Missing (4): fi-byt-clapper fi-ilk-m540 fi-bsw-cyan fi-whl-u
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5371 -> IGTPW_3936
CI-20190529: 20190529
CI_DRM_7767: dc447e46590410adce9a6fc6b19dbf02f1ba4ab4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3936: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/index.html
IGT_5371: 1b2816124ec3dbd53b81725d39292f45d41d895b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@kms_mst@all_enabled
+igt@kms_mst@change_master
+igt@kms_mst@change_resolution
+igt@kms_mst@fullmodeset_master
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] lib: Add support to connector path property
2020-01-17 18:14 [igt-dev] [PATCH i-g-t 1/2] lib: Add support to connector path property José Roberto de Souza
2020-01-17 18:14 ` [igt-dev] [PATCH i-g-t 2/2] tests: Add tests for DP MST José Roberto de Souza
2020-01-17 20:35 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: Add support to connector path property Patchwork
@ 2020-01-20 16:51 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2020-01-20 16:51 UTC (permalink / raw)
To: José Roberto de Souza; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/2] lib: Add support to connector path property
URL : https://patchwork.freedesktop.org/series/72211/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7767_full -> IGTPW_3936_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_3936_full:
### IGT changes ###
#### Possible regressions ####
* {igt@kms_mst@fullmodeset_master} (NEW):
- shard-iclb: NOTRUN -> [SKIP][1] +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb2/igt@kms_mst@fullmodeset_master.html
New tests
---------
New tests have been introduced between CI_DRM_7767_full and IGTPW_3936_full:
### New IGT tests (4) ###
* igt@kms_mst@all_enabled:
- Statuses : 5 skip(s)
- Exec time: [0.0] s
* igt@kms_mst@change_master:
- Statuses : 6 skip(s)
- Exec time: [0.0] s
* igt@kms_mst@change_resolution:
- Statuses : 6 skip(s)
- Exec time: [0.0] s
* igt@kms_mst@fullmodeset_master:
- Statuses : 5 skip(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in IGTPW_3936_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_persistence@vcs0-mixed-process:
- shard-glk: [PASS][2] -> [FAIL][3] ([i915#679]) +1 similar issue
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-glk7/igt@gem_ctx_persistence@vcs0-mixed-process.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-glk5/igt@gem_ctx_persistence@vcs0-mixed-process.html
* igt@gem_ctx_persistence@vcs1-mixed-process:
- shard-iclb: [PASS][4] -> [SKIP][5] ([fdo#109276] / [fdo#112080]) +6 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb1/igt@gem_ctx_persistence@vcs1-mixed-process.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb8/igt@gem_ctx_persistence@vcs1-mixed-process.html
* igt@gem_eio@in-flight-contexts-10ms:
- shard-snb: [PASS][6] -> [FAIL][7] ([i915#490])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-snb6/igt@gem_eio@in-flight-contexts-10ms.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-snb5/igt@gem_eio@in-flight-contexts-10ms.html
* igt@gem_exec_balancer@hang:
- shard-iclb: [PASS][8] -> [INCOMPLETE][9] ([i915#140])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb6/igt@gem_exec_balancer@hang.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb4/igt@gem_exec_balancer@hang.html
* igt@gem_exec_schedule@preempt-bsd:
- shard-iclb: [PASS][10] -> [SKIP][11] ([fdo#112146]) +2 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb8/igt@gem_exec_schedule@preempt-bsd.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb4/igt@gem_exec_schedule@preempt-bsd.html
* igt@gem_persistent_relocs@forked-faulting-reloc-thrashing:
- shard-kbl: [PASS][12] -> [INCOMPLETE][13] ([fdo#103665] / [i915#530])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-kbl4/igt@gem_persistent_relocs@forked-faulting-reloc-thrashing.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-kbl4/igt@gem_persistent_relocs@forked-faulting-reloc-thrashing.html
* igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing:
- shard-apl: [PASS][14] -> [TIMEOUT][15] ([fdo#112271] / [i915#530]) +1 similar issue
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-apl1/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-apl4/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html
* igt@gem_persistent_relocs@forked-interruptible-thrash-inactive:
- shard-kbl: [PASS][16] -> [TIMEOUT][17] ([fdo#112271] / [i915#530]) +1 similar issue
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-kbl2/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-kbl3/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
* igt@i915_pm_rps@waitboost:
- shard-iclb: [PASS][18] -> [FAIL][19] ([i915#413])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb2/igt@i915_pm_rps@waitboost.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb2/igt@i915_pm_rps@waitboost.html
* igt@i915_suspend@forcewake:
- shard-kbl: [PASS][20] -> [DMESG-WARN][21] ([i915#180]) +4 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-kbl3/igt@i915_suspend@forcewake.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-kbl6/igt@i915_suspend@forcewake.html
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt:
- shard-snb: [PASS][22] -> [DMESG-WARN][23] ([i915#478])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-snb4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-snb2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: [PASS][24] -> [DMESG-WARN][25] ([i915#180]) +2 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-apl2/igt@kms_frontbuffer_tracking@fbc-suspend.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-apl1/igt@kms_frontbuffer_tracking@fbc-suspend.html
* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][26] -> [SKIP][27] ([fdo#109441]) +3 similar issues
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb1/igt@kms_psr@psr2_no_drrs.html
* igt@kms_vblank@pipe-b-ts-continuation-dpms-suspend:
- shard-kbl: [PASS][28] -> [DMESG-WARN][29] ([i915#56])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-kbl2/igt@kms_vblank@pipe-b-ts-continuation-dpms-suspend.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-kbl2/igt@kms_vblank@pipe-b-ts-continuation-dpms-suspend.html
* igt@perf_pmu@busy-no-semaphores-vcs1:
- shard-iclb: [PASS][30] -> [SKIP][31] ([fdo#112080]) +11 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb1/igt@perf_pmu@busy-no-semaphores-vcs1.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb6/igt@perf_pmu@busy-no-semaphores-vcs1.html
* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [PASS][32] -> [SKIP][33] ([fdo#109276]) +15 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb2/igt@prime_vgem@fence-wait-bsd2.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb6/igt@prime_vgem@fence-wait-bsd2.html
#### Possible fixes ####
* igt@gem_busy@busy-vcs1:
- shard-iclb: [SKIP][34] ([fdo#112080]) -> [PASS][35] +6 similar issues
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb6/igt@gem_busy@busy-vcs1.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb4/igt@gem_busy@busy-vcs1.html
* igt@gem_ctx_persistence@vcs1-queued:
- shard-iclb: [SKIP][36] ([fdo#109276] / [fdo#112080]) -> [PASS][37] +1 similar issue
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb5/igt@gem_ctx_persistence@vcs1-queued.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb4/igt@gem_ctx_persistence@vcs1-queued.html
* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][38] ([fdo#110854]) -> [PASS][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb5/igt@gem_exec_balancer@smoke.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb2/igt@gem_exec_balancer@smoke.html
* igt@gem_exec_schedule@pi-userfault-bsd:
- shard-iclb: [SKIP][40] ([i915#677]) -> [PASS][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb4/igt@gem_exec_schedule@pi-userfault-bsd.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb6/igt@gem_exec_schedule@pi-userfault-bsd.html
* igt@gem_exec_schedule@preempt-contexts-bsd2:
- shard-iclb: [SKIP][42] ([fdo#109276]) -> [PASS][43] +16 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb5/igt@gem_exec_schedule@preempt-contexts-bsd2.html
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb1/igt@gem_exec_schedule@preempt-contexts-bsd2.html
* igt@gem_exec_schedule@wide-bsd:
- shard-iclb: [SKIP][44] ([fdo#112146]) -> [PASS][45] +6 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb1/igt@gem_exec_schedule@wide-bsd.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb5/igt@gem_exec_schedule@wide-bsd.html
* igt@gem_exec_suspend@basic-s3:
- shard-kbl: [DMESG-WARN][46] ([i915#180]) -> [PASS][47] +2 similar issues
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-kbl2/igt@gem_exec_suspend@basic-s3.html
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-kbl2/igt@gem_exec_suspend@basic-s3.html
* igt@gem_persistent_relocs@forked-interruptible-thrashing:
- shard-kbl: [TIMEOUT][48] ([fdo#112271] / [i915#530]) -> [PASS][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-kbl1/igt@gem_persistent_relocs@forked-interruptible-thrashing.html
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-kbl2/igt@gem_persistent_relocs@forked-interruptible-thrashing.html
* igt@gem_persistent_relocs@forked-thrashing:
- shard-hsw: [INCOMPLETE][50] ([i915#530] / [i915#61]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-hsw5/igt@gem_persistent_relocs@forked-thrashing.html
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-hsw2/igt@gem_persistent_relocs@forked-thrashing.html
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-glk: [FAIL][52] ([i915#644]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-glk9/igt@gem_ppgtt@flink-and-close-vma-leak.html
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-glk4/igt@gem_ppgtt@flink-and-close-vma-leak.html
* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-snb: [DMESG-WARN][54] ([fdo#111870] / [i915#478]) -> [PASS][55] +1 similar issue
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-snb6/igt@gem_userptr_blits@sync-unmap-cycles.html
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-snb4/igt@gem_userptr_blits@sync-unmap-cycles.html
* igt@gen9_exec_parse@allowed-all:
- shard-glk: [DMESG-WARN][56] ([i915#716]) -> [PASS][57]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-glk4/igt@gen9_exec_parse@allowed-all.html
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-glk2/igt@gen9_exec_parse@allowed-all.html
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [FAIL][58] ([i915#454]) -> [PASS][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb4/igt@i915_pm_dc@dc6-psr.html
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb1/igt@i915_pm_dc@dc6-psr.html
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-msflip-blt:
- shard-glk: [FAIL][60] ([i915#49]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-glk1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-msflip-blt.html
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-glk4/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-msflip-blt.html
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [DMESG-WARN][62] ([i915#180]) -> [PASS][63] +1 similar issue
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-apl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-apl3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
* igt@kms_psr2_su@page_flip:
- shard-iclb: [SKIP][64] ([fdo#109642] / [fdo#111068]) -> [PASS][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb5/igt@kms_psr2_su@page_flip.html
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb2/igt@kms_psr2_su@page_flip.html
* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: [SKIP][66] ([fdo#109441]) -> [PASS][67] +1 similar issue
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-iclb4/igt@kms_psr@psr2_cursor_blt.html
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
#### Warnings ####
* igt@gem_eio@kms:
- shard-snb: [INCOMPLETE][68] ([i915#82]) -> [DMESG-WARN][69] ([i915#443] / [i915#444])
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-snb1/igt@gem_eio@kms.html
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-snb1/igt@gem_eio@kms.html
* igt@gem_userptr_blits@sync-unmap:
- shard-snb: [DMESG-WARN][70] ([fdo#111870] / [i915#478]) -> [DMESG-WARN][71] ([fdo#110789] / [fdo#111870] / [i915#478])
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7767/shard-snb4/igt@gem_userptr_blits@sync-unmap.html
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/shard-snb6/igt@gem_userptr_blits@sync-unmap.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[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#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#443]: https://gitlab.freedesktop.org/drm/intel/issues/443
[i915#444]: https://gitlab.freedesktop.org/drm/intel/issues/444
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#478]: https://gitlab.freedesktop.org/drm/intel/issues/478
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#490]: https://gitlab.freedesktop.org/drm/intel/issues/490
[i915#530]: https://gitlab.freedesktop.org/drm/intel/issues/530
[i915#56]: https://gitlab.freedesktop.org/drm/intel/issues/56
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#679]: https://gitlab.freedesktop.org/drm/intel/issues/679
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
Participating hosts (10 -> 8)
------------------------------
Missing (2): pig-skl-6260u pig-glk-j5005
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5371 -> IGTPW_3936
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_7767: dc447e46590410adce9a6fc6b19dbf02f1ba4ab4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3936: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3936/index.html
IGT_5371: 1b2816124ec3dbd53b81725d39292f45d41d895b @ 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_3936/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] tests: Add tests for DP MST
2020-01-17 18:14 ` [igt-dev] [PATCH i-g-t 2/2] tests: Add tests for DP MST José Roberto de Souza
@ 2020-03-24 18:15 ` Ville Syrjälä
0 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2020-03-24 18:15 UTC (permalink / raw)
To: José Roberto de Souza; +Cc: igt-dev
On Fri, Jan 17, 2020 at 10:14:18AM -0800, José Roberto de Souza wrote:
> Test DP MST corner cases.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
> tests/Makefile.sources | 1 +
> tests/kms_mst.c | 347 +++++++++++++++++++++++++++++++++++++++++
> tests/meson.build | 1 +
> 3 files changed, 349 insertions(+)
> create mode 100644 tests/kms_mst.c
>
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 806eb02d..68794ed3 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -59,6 +59,7 @@ TESTS_progs = \
> kms_lease \
> kms_legacy_colorkey \
> kms_mmap_write_crc \
> + kms_mst \
> kms_panel_fitting \
> kms_pipe_b_c_ivb \
> kms_pipe_crc_basic \
> diff --git a/tests/kms_mst.c b/tests/kms_mst.c
> new file mode 100644
> index 00000000..7cc01417
> --- /dev/null
> +++ b/tests/kms_mst.c
> @@ -0,0 +1,347 @@
> +#include <ctype.h>
> +#include <string.h>
> +
> +#include "igt.h"
> +
> +IGT_TEST_DESCRIPTION("Test DP MST corner cases.");
> +/*
> + * It is testing only the first MST port found, to test multiple ports or force
> + * test in a specific port changes will be needed
> + */
> +
> +#define SQUARE_SIZE 100
> +#define MAX_MST_OUTPUTS 3
> +#define RESOLUTION_H 1920
> +#define RESOLUTION_V 1080
> +#define ANOTHER_RESOLUTION_H 1024
> +#define ANOTHER_RESOLUTION_V 768
There a quite a lot of assumptions in this test. In genral I get
the feeling this should be more of a general "test all the modeset
combinations" type of thing. It would then get run for all kinds of
other cases with similar behaviour (eg. port sync).
In fact I wonder if something like kms_atomic_transitions doesn't
already hit these cases? I think that's pretty much what it's supposed
to do.
> +
> +typedef struct {
> + int drm_fd;
> + igt_display_t display;
> + igt_output_t *mst_output[MAX_MST_OUTPUTS];
> + struct igt_fb fb[MAX_MST_OUTPUTS];
> + uint8_t mst_connectors, prepared;
> +} data_t;
> +
> +static drmModeModeInfo *find_mode(igt_output_t *output, uint16_t h, uint16_t v,
> + uint32_t *mode_clock)
> +{
> + drmModeModeInfo *ret = NULL;
> + int i;
> +
> + for (i = 0; i < output->config.connector->count_modes; i++) {
> + drmModeModeInfo *mode;
> +
> + mode = &output->config.connector->modes[i];
> + if (mode->hdisplay != h ||
> + mode->vdisplay != v)
> + continue;
> +
> + if (mode_clock && *mode_clock && mode->clock != *mode_clock)
> + continue;
> +
> + if (mode_clock && !*mode_clock)
> + *mode_clock = mode->clock;
> +
> + ret = mode;
> +
> + break;
> + }
> +
> + return ret;
> +}
> +
> +static int16_t get_parent_conn_id(const char *mst_path)
> +{
> + int i;
> + char buffer[6];
> +
> + if (mst_path[0] != 'm' || mst_path[1] != 's' || mst_path[2] != 't' ||
> + mst_path[3] != ':')
> + return -1;
> +
> + /* Unlikely to need more than 5 digits to represent a connector id */
> + for (i = 4; i < 9; i++) {
> + if (!isdigit(mst_path[i]))
> + break;
> + }
> +
> + if (i == 4)
> + return -1;
> +
> + i = i - 4;
> + memcpy(buffer, &mst_path[4], i);
> + buffer[i] = 0;
> + return atoi(buffer);
> +}
> +
> +static void search_mst_outputs(data_t *data)
> +{
> + igt_display_t *display = &data->display;
> + igt_output_t *output;
> + uint32_t clock = 0;
> + int16_t parent_conn = -1;
> +
> + for_each_connected_output(display, output) {
> + drmModePropertyBlobPtr blob;
> + char mst_path_buffer[32];
> + drmModeModeInfo *mode;
> + uint64_t val;
> +
> + igt_output_set_pipe(output, PIPE_NONE);
> +
> + if (data->mst_connectors == MAX_MST_OUTPUTS)
> + continue;
> +
> + if (!igt_output_has_prop(output, IGT_CONNECTOR_PATH)) {
> + igt_debug("\tno patch prop\n");
> + continue;
> + }
> +
> + val = igt_output_get_prop(output, IGT_CONNECTOR_PATH);
> + blob = drmModeGetPropertyBlob(data->drm_fd, val);
> + strncpy(mst_path_buffer, (const char *)blob->data,
> + sizeof(mst_path_buffer) - 1);
> + drmModeFreePropertyBlob(blob);
> +
> + if (parent_conn != -1) {
> + if (get_parent_conn_id(mst_path_buffer) != parent_conn)
> + continue;
> + } else {
> + parent_conn = get_parent_conn_id(mst_path_buffer);
> + igt_info("MST parent connector %i\n", parent_conn);
> + }
> +
> + mode = find_mode(output, RESOLUTION_H, RESOLUTION_V, &clock);
> + if (!mode) {
> + igt_info("MST connector %s[%s] found but no compatible mode found\n",
> + output->name, mst_path_buffer);
> + continue;
> + }
> +
> + igt_info("Added MST connector %s[%s]\n", output->name, mst_path_buffer);
> +
> + igt_output_override_mode(output, mode);
> + data->mst_output[data->mst_connectors] = output;
> + data->mst_connectors++;
> + }
> +
> + igt_require_f(data->mst_connectors, "No MST connector found\n");
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +}
> +
> +static void prepare(data_t *data, uint8_t n_outputs)
> +{
> + igt_output_t *output;
> + uint8_t i;
> +
> + for (i = 0; i < data->mst_connectors && i < n_outputs; i++) {
> + const drmModeModeInfo *mode;
> + igt_plane_t *primary;
> + double r, g, b;
> + cairo_t *cr;
> +
> + output = data->mst_output[i];
> + mode = igt_output_get_mode(output);
> +
> + igt_output_set_pipe(output, PIPE_A + i);
> +
> + primary = igt_output_get_plane_type(output,
> + DRM_PLANE_TYPE_PRIMARY);
> + igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
> + DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
> + 1.0, 1.0, 1.0, &data->fb[i]);
> +
> + cr = igt_get_cairo_ctx(data->drm_fd, &data->fb[i]);
> +
> + /* paint square in different color */
> + switch (i % 4) {
> + case 0:
> + r = 1.0;
> + g = b = 0.0;
> + break;
> + case 1:
> + g = 1.0;
> + r = b = 0.0;
> + break;
> + case 2:
> + b = 1.0;
> + r = g = 0.0;
> + break;
> + default:
> + case 4:
> + r = g = b = 0.0;
> + break;
> + }
> + igt_paint_color_alpha(cr, 0, 0, SQUARE_SIZE, SQUARE_SIZE,
> + r, g, b, 1.0);
> +
> + igt_plane_set_fb(primary, &data->fb[i]);
> + igt_put_cairo_ctx(data->drm_fd, &data->fb[i], cr);
> + }
> +
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
> + data->prepared = n_outputs;
> +}
> +
> +static void change_resolution(data_t *data, bool all)
> +{
> + igt_output_t *output;
> + uint32_t clock = 0;
> + uint8_t i;
> +
> + for (i = 0; i < data->mst_connectors; i++) {
> + drmModeModeInfo *mode;
> +
> + output = data->mst_output[i];
> + if (output->pending_pipe == PIPE_NONE)
> + continue;
> +
> + mode = find_mode(output, ANOTHER_RESOLUTION_H,
> + ANOTHER_RESOLUTION_V, &clock);
> + if (!mode) {
> + igt_info("New resolution not found on %s skipping it\n",
> + output->name);
> + igt_output_set_pipe(output, PIPE_NONE);
> + continue;
> + }
> +
> + igt_output_override_mode(output, mode);
> +
> + if (!all)
> + break;
> + }
> +
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +}
> +
> +static void restore_resolution(data_t *data)
> +{
> + igt_output_t *output;
> + uint32_t clock = 0;
> + uint8_t i;
> +
> + for (i = 0; i < data->mst_connectors; i++) {
> + drmModeModeInfo *mode;
> +
> + output = data->mst_output[i];
> + mode = find_mode(output, RESOLUTION_H, RESOLUTION_V, &clock);
> + /*
> + * No need to check because this mode was already found in
> + * search_mst_outputs()
> + */
> + igt_output_override_mode(output, mode);
> + /* Reenable any sink left off in change_resolution() */
> + igt_output_set_pipe(output, PIPE_A + i);
> + }
> +
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +}
> +
> +static void cleanup(data_t *data)
> +{
> + uint8_t i;
> +
> + for (i = 0; i < data->prepared; i++) {
> + igt_output_t *output = data->mst_output[i];
> + igt_plane_t *primary;
> +
> + primary = igt_output_get_plane_type(output,
> + DRM_PLANE_TYPE_PRIMARY);
> + igt_plane_set_fb(primary, NULL);
> + igt_output_set_pipe(output, PIPE_NONE);
> + }
> +
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +
> + for (i = 0; i < data->prepared; i++)
> + igt_remove_fb(data->drm_fd, &data->fb[i]);
> +}
> +
> +int main(int argc, char *argv[])
> +{
> + data_t data = {};
> +
> + igt_subtest_init_parse_opts(&argc, argv, "", NULL,
> + NULL, NULL, NULL);
> + igt_skip_on_simulation();
> +
> + igt_fixture {
> + data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> + kmstest_set_vt_graphics_mode();
> +
> + igt_display_require(&data.display, data.drm_fd);
> + search_mst_outputs(&data);
> + }
> +
> + igt_describe("Enable all MST streams in the same port");
> + igt_subtest_f("all_enabled") {
> + prepare(&data, data.mst_connectors);
> + igt_debug_manual_check("all", "all streams enabled");
> + cleanup(&data);
> + }
> +
> + igt_describe("Test change the master CRTC of the MST stream");
> + igt_subtest_f("change_master") {
> + enum pipe pipe;
> +
> + igt_require(data.mst_connectors >= 2);
> +
> + prepare(&data, 2);
> + igt_debug_manual_check("all", "dual output");
> +
> + pipe = data.mst_output[0]->pending_pipe;
> + igt_output_set_pipe(data.mst_output[0], PIPE_NONE);
> + igt_display_commit2(&data.display, COMMIT_ATOMIC);
> + igt_debug_manual_check("all", "first MST stream disabled");
> +
> + igt_output_set_pipe(data.mst_output[0], pipe);
> + igt_display_commit2(&data.display, COMMIT_ATOMIC);
> + igt_debug_manual_check("all", "dual output");
> +
> + pipe = data.mst_output[1]->pending_pipe;
> + igt_output_set_pipe(data.mst_output[1], PIPE_NONE);
> + igt_display_commit2(&data.display, COMMIT_ATOMIC);
> + igt_debug_manual_check("all", "second MST stream disabled");
> +
> + igt_output_set_pipe(data.mst_output[1], pipe);
> + igt_display_commit2(&data.display, COMMIT_ATOMIC);
> + igt_debug_manual_check("all", "dual output");
> +
> + cleanup(&data);
> + }
> +
> + igt_describe("Test change the resolution off all MST streams");
> + igt_subtest_f("change_resolution") {
> + prepare(&data, data.mst_connectors);
> + igt_debug_manual_check("all", "regular resolution in all streams");
> +
> + change_resolution(&data, true);
> + igt_debug_manual_check("all", "new resolution set in compatible streams");
> +
> + restore_resolution(&data);
> + igt_debug_manual_check("all", "regular resolution in all streams again");
> + cleanup(&data);
> + }
> +
> + igt_describe("Test do a fullmodeset in the master CRTC of the MST stream");
> + igt_subtest_f("fullmodeset_master") {
> + prepare(&data, data.mst_connectors);
> + igt_debug_manual_check("all", "regular resolution in all streams");
> +
> + change_resolution(&data, false);
> + igt_debug_manual_check("all", "new resolution in the first stream");
> +
> + restore_resolution(&data);
> + igt_debug_manual_check("all", "regular resolution in all streams again");
> + cleanup(&data);
> + }
> +
> + igt_fixture {
> + igt_display_reset(&data.display);
> + igt_display_fini(&data.display);
> + }
> +
> + igt_exit();
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index a79d22ba..a552301b 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -43,6 +43,7 @@ test_progs = [
> 'kms_lease',
> 'kms_legacy_colorkey',
> 'kms_mmap_write_crc',
> + 'kms_mst',
> 'kms_panel_fitting',
> 'kms_pipe_b_c_ivb',
> 'kms_pipe_crc_basic',
> --
> 2.25.0
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-24 18:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-17 18:14 [igt-dev] [PATCH i-g-t 1/2] lib: Add support to connector path property José Roberto de Souza
2020-01-17 18:14 ` [igt-dev] [PATCH i-g-t 2/2] tests: Add tests for DP MST José Roberto de Souza
2020-03-24 18:15 ` Ville Syrjälä
2020-01-17 20:35 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: Add support to connector path property Patchwork
2020-01-20 16:51 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox