Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH v3 0/2] Add negative test for extended display
@ 2023-05-07 19:39 Mohammed Thasleem
  2023-05-07 19:39 ` [igt-dev] [PATCH v3 1/2] tests/kms_display_modes: " Mohammed Thasleem
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Mohammed Thasleem @ 2023-05-07 19:39 UTC (permalink / raw)
  To: igt-dev

Added negative test to validte ENOSPC when two 2k-4k or 4k-4k
moniters connected through MST.
This test added to provide bandwidth issue in MST config.

Mohammed Thasleem (2):
  tests/kms_display_modes: Add negative test for extended display
  lib/igt_kms: Check for other modes to fit on bw when ENOSPC failure

 lib/igt_kms.c             |   2 +
 tests/kms_display_modes.c | 165 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 167 insertions(+)

-- 
2.25.1

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

* [igt-dev] [PATCH v3 1/2] tests/kms_display_modes: Add negative test for extended display
  2023-05-07 19:39 [igt-dev] [PATCH v3 0/2] Add negative test for extended display Mohammed Thasleem
@ 2023-05-07 19:39 ` Mohammed Thasleem
  2023-05-12 10:36   ` Kamil Konieczny
  2023-06-05 15:08   ` Kamil Konieczny
  2023-05-07 19:39 ` [igt-dev] [PATCH v3 2/2] lib/igt_kms: Check for other modes to fit on bw when ENOSPC failure Mohammed Thasleem
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 8+ messages in thread
From: Mohammed Thasleem @ 2023-05-07 19:39 UTC (permalink / raw)
  To: igt-dev

Added negative test to validte ENOSPC when two 2k-4k or 4k-4k
moniters connected through MST.
This test added to provide bandwidth issue in MST config.

Example:
  When two monitors connected through MST, the second monitor
  also tries to use the same mode. So two such modes may not
  fit into the link bandwidth. So, iterate through connected
  outputs & modes and find a invalid combination.

v2: Rebased on tip.
v3: -Code cleanup and updated description.
    -Free path_blob before call return. (Kamil)
v4: Updated code formatting and function description. (Jeevan)
v5: Updated commit description and minor changes.
v6: Added bigjoiner check and updated comments. (Bhanu)

Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
Reviewed-by: Jeevan B <jeevan.b@intel.com>
---
 tests/kms_display_modes.c | 165 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 165 insertions(+)

diff --git a/tests/kms_display_modes.c b/tests/kms_display_modes.c
index d69c7b931..892f39b20 100644
--- a/tests/kms_display_modes.c
+++ b/tests/kms_display_modes.c
@@ -26,14 +26,111 @@
 
 #include "igt.h"
 
+#define HDISPLAY_4K	3840
+#define VDISPLAY_4K	2160
+
 IGT_TEST_DESCRIPTION("Test Display Modes");
 
 typedef struct {
 	int drm_fd;
 	igt_display_t display;
+	drmModeModeInfo mode_mst[2];
+	igt_output_t *mst_output[2];
 	int n_pipes;
 } data_t;
 
+/* Get higher mode supported by panel. */
+static drmModeModeInfo *get_highres_mode(igt_output_t *output)
+{
+	drmModeConnector *connector = output->config.connector;
+	drmModeModeInfo *highest_mode = NULL;
+
+	igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc);
+	highest_mode = &connector->modes[0];
+
+	return highest_mode;
+}
+
+/* Get the 4k or less then 4k mode of connected panel. */
+static drmModeModeInfo *get_mode(igt_output_t *output)
+{
+	int j;
+	drmModeModeInfo *required_mode = NULL;
+	drmModeConnector *connector = output->config.connector;
+
+	required_mode = igt_output_get_mode(output);
+	if (required_mode->vdisplay <= VDISPLAY_4K &&
+	    required_mode->hdisplay <= HDISPLAY_4K) {
+		return required_mode;
+	}
+
+	/* If default mode not 4k or less than 4k mode, then sort modes and check for it. */
+	igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc);
+	for (j = 0; j < connector->count_modes; j++) {
+		if (connector->modes[j].vdisplay <= VDISPLAY_4K &&
+		    connector->modes[j].hdisplay <= HDISPLAY_4K) {
+			required_mode = &connector->modes[j];
+			break;
+		}
+	}
+
+	return required_mode;
+}
+
+static int parse_path_blob(char *blob_data)
+{
+	int connector_id;
+	char *encoder;
+
+	encoder = strtok(blob_data, ":");
+	igt_assert_f(!strcmp(encoder, "mst"), "PATH connector property expected to have 'mst'\n");
+
+	connector_id = atoi(strtok(NULL, "-"));
+
+	return connector_id;
+}
+
+static bool output_is_dp_mst(data_t *data, igt_output_t *output, int i)
+{
+	drmModePropertyBlobPtr path_blob = NULL;
+	uint64_t path_blob_id;
+	drmModeConnector *connector = output->config.connector;
+	struct kmstest_connector_config config;
+	const char *encoder;
+	int connector_id;
+	static int prev_connector_id;
+
+	kmstest_get_connector_config(data->drm_fd, output->config.connector->connector_id,
+				     -1, &config);
+	encoder = kmstest_encoder_type_str(config.encoder->encoder_type);
+
+	if (strcmp(encoder, "DP MST"))
+		return false;
+
+	igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
+		   DRM_MODE_OBJECT_CONNECTOR, "PATH", NULL,
+		   &path_blob_id, NULL));
+
+	igt_assert(path_blob = drmModeGetPropertyBlob(data->drm_fd, path_blob_id));
+
+	connector_id = parse_path_blob((char *) path_blob->data);
+
+	drmModeFreePropertyBlob(path_blob);
+
+	/*
+	 * Discarding outputs of other DP MST topology.
+	 * Testing only on outputs on the topology we got previously
+	 */
+	if (i == 0) {
+		prev_connector_id = connector_id;
+	} else {
+		if (connector_id != prev_connector_id)
+			return false;
+	}
+
+	return true;
+}
+
 static void run_extendedmode_basic(data_t *data,
 				   enum pipe pipe1, igt_output_t *output1,
 				   enum pipe pipe2, igt_output_t *output2)
@@ -173,8 +270,47 @@ static void run_extendedmode_test(data_t *data) {
 	}
 }
 
+static void run_extendedmode_negative(data_t *data, int pipe1, int pipe2)
+{
+	struct igt_fb fbs[2];
+	igt_display_t *display = &data->display;
+	igt_plane_t *plane[2];
+	int ret;
+
+	igt_display_reset(display);
+
+	igt_output_set_pipe(data->mst_output[0], pipe1);
+	igt_output_set_pipe(data->mst_output[1], pipe2);
+
+	igt_create_color_fb(data->drm_fd, data->mode_mst[0].hdisplay, data->mode_mst[0].vdisplay,
+			    DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR, 1, 0, 0, &fbs[0]);
+	igt_create_color_fb(data->drm_fd, data->mode_mst[1].hdisplay, data->mode_mst[1].vdisplay,
+			    DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR, 0, 0, 1, &fbs[1]);
+
+	plane[0] = igt_pipe_get_plane_type(&display->pipes[pipe1], DRM_PLANE_TYPE_PRIMARY);
+	plane[1] = igt_pipe_get_plane_type(&display->pipes[pipe2], DRM_PLANE_TYPE_PRIMARY);
+
+	igt_plane_set_fb(plane[0], &fbs[0]);
+	igt_fb_set_size(&fbs[0], plane[0], data->mode_mst[0].hdisplay, data->mode_mst[0].vdisplay);
+	igt_plane_set_size(plane[0], data->mode_mst[0].hdisplay, data->mode_mst[0].vdisplay);
+
+	igt_plane_set_fb(plane[1], &fbs[1]);
+	igt_fb_set_size(&fbs[1], plane[1], data->mode_mst[1].hdisplay, data->mode_mst[1].vdisplay);
+	igt_plane_set_size(plane[1], data->mode_mst[1].hdisplay, data->mode_mst[1].vdisplay);
+
+	igt_output_override_mode(data->mst_output[0], &data->mode_mst[0]);
+	igt_output_override_mode(data->mst_output[1], &data->mode_mst[1]);
+
+	igt_require(i915_pipe_output_combo_valid(display));
+	ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
+	igt_assert(ret != 0 && errno == ENOSPC);
+}
+
 igt_main
 {
+	int dp_mst_outputs = 0, count = 0;
+	enum pipe pipe1, pipe2;
+	igt_output_t *output;
 	data_t data;
 
 	igt_fixture {
@@ -182,12 +318,41 @@ igt_main
 		kmstest_set_vt_graphics_mode();
 		igt_display_require(&data.display, data.drm_fd);
 		igt_display_require_output(&data.display);
+
+		for_each_connected_output(&data.display, output) {
+			data.mst_output[count++] = output;
+			if (output_is_dp_mst(&data, output, dp_mst_outputs))
+				dp_mst_outputs++;
+		}
 	}
 
 	igt_describe("Test for validating display extended mode with a pair of connected displays");
 	igt_subtest_with_dynamic("extended-mode-basic")
 		run_extendedmode_test(&data);
 
+	igt_describe("Negative test for validating display extended mode with a pair of connected "
+		     "2k-4k or 4k-4k displays");
+	igt_subtest_with_dynamic("mst-extended-mode-negative") {
+		igt_require_f(dp_mst_outputs > 1, "MST not found more then one\n");
+
+		memcpy(&data.mode_mst[0], get_mode(data.mst_output[0]), sizeof(drmModeModeInfo));
+		memcpy(&data.mode_mst[1], get_highres_mode(data.mst_output[1]),
+				sizeof(drmModeModeInfo));
+		igt_require_f((data.mode_mst[1].hdisplay >= HDISPLAY_4K &&
+			       data.mode_mst[1].vdisplay >= VDISPLAY_4K), "4k panel not found\n");
+
+		for_each_pipe(&data.display, pipe1) {
+			for_each_pipe(&data.display, pipe2) {
+				if (pipe1 == pipe2)
+					continue;
+
+				igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe1),
+					      kmstest_pipe_name(pipe2))
+					run_extendedmode_negative(&data, pipe1, pipe2);
+			}
+		}
+	}
+
 	igt_fixture {
 		igt_display_fini(&data.display);
 	}
-- 
2.25.1

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

* [igt-dev] [PATCH v3 2/2] lib/igt_kms: Check for other modes to fit on bw when ENOSPC failure
  2023-05-07 19:39 [igt-dev] [PATCH v3 0/2] Add negative test for extended display Mohammed Thasleem
  2023-05-07 19:39 ` [igt-dev] [PATCH v3 1/2] tests/kms_display_modes: " Mohammed Thasleem
@ 2023-05-07 19:39 ` Mohammed Thasleem
  2023-05-09  5:24   ` Modem, Bhanuprakash
  2023-05-07 20:20 ` [igt-dev] ✓ Fi.CI.BAT: success for Add negative test for extended display (rev2) Patchwork
  2023-05-07 21:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 1 reply; 8+ messages in thread
From: Mohammed Thasleem @ 2023-05-07 19:39 UTC (permalink / raw)
  To: igt-dev

It check other then ENOSPC failure and if its ENOSPC then check all
active outputs modes to fit possible bw and return false if not found
any suitable bw.

v2: Check for other then ENOSPC failure. (Bhanu)
v3: Updated commit message.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
 lib/igt_kms.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index a6e91f982..5047d4b1b 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -4574,6 +4574,8 @@ bool __override_all_active_output_modes_to_fit_bw(igt_display_t *display,
 
 		if (!ret)
 			return true;
+		else if (ret != -ENOSPC)
+			return false;
 	}
 
 	return false;
-- 
2.25.1

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

* [igt-dev] ✓ Fi.CI.BAT: success for Add negative test for extended display (rev2)
  2023-05-07 19:39 [igt-dev] [PATCH v3 0/2] Add negative test for extended display Mohammed Thasleem
  2023-05-07 19:39 ` [igt-dev] [PATCH v3 1/2] tests/kms_display_modes: " Mohammed Thasleem
  2023-05-07 19:39 ` [igt-dev] [PATCH v3 2/2] lib/igt_kms: Check for other modes to fit on bw when ENOSPC failure Mohammed Thasleem
@ 2023-05-07 20:20 ` Patchwork
  2023-05-07 21:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2023-05-07 20:20 UTC (permalink / raw)
  To: Mohammed Thasleem; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 4711 bytes --]

== Series Details ==

Series: Add negative test for extended display (rev2)
URL   : https://patchwork.freedesktop.org/series/117348/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13116 -> IGTPW_8926
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

Participating hosts (41 -> 38)
------------------------------

  Missing    (3): fi-kbl-soraka fi-snb-2520m bat-mtlp-6 

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s3@smem:
    - bat-rpls-1:         [PASS][1] -> [ABORT][2] ([i915#6687] / [i915#7978] / [i915#8407])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/bat-rpls-1/igt@gem_exec_suspend@basic-s3@smem.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/bat-rpls-1/igt@gem_exec_suspend@basic-s3@smem.html

  * igt@i915_selftest@live@requests:
    - bat-rplp-1:         [PASS][3] -> [ABORT][4] ([i915#7913] / [i915#7920])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/bat-rplp-1/igt@i915_selftest@live@requests.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/bat-rplp-1/igt@i915_selftest@live@requests.html

  * igt@i915_selftest@live@slpc:
    - bat-rpls-2:         NOTRUN -> [DMESG-WARN][5] ([i915#6367])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/bat-rpls-2/igt@i915_selftest@live@slpc.html

  * igt@kms_chamelium_hpd@common-hpd-after-suspend:
    - bat-rpls-2:         NOTRUN -> [SKIP][6] ([i915#7828])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/bat-rpls-2/igt@kms_chamelium_hpd@common-hpd-after-suspend.html

  * igt@kms_pipe_crc_basic@suspend-read-crc:
    - bat-rpls-2:         NOTRUN -> [SKIP][7] ([i915#1845])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/bat-rpls-2/igt@kms_pipe_crc_basic@suspend-read-crc.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3@smem:
    - fi-rkl-11600:       [FAIL][8] ([fdo#103375]) -> [PASS][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/fi-rkl-11600/igt@gem_exec_suspend@basic-s3@smem.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/fi-rkl-11600/igt@gem_exec_suspend@basic-s3@smem.html

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-apl-guc:         [DMESG-FAIL][10] ([i915#5334]) -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@reset:
    - bat-rpls-2:         [ABORT][12] ([i915#4983] / [i915#7461] / [i915#7913] / [i915#8347]) -> [PASS][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/bat-rpls-2/igt@i915_selftest@live@reset.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/bat-rpls-2/igt@i915_selftest@live@reset.html

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

  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
  [i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
  [i915#7920]: https://gitlab.freedesktop.org/drm/intel/issues/7920
  [i915#7978]: https://gitlab.freedesktop.org/drm/intel/issues/7978
  [i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
  [i915#8407]: https://gitlab.freedesktop.org/drm/intel/issues/8407


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7281 -> IGTPW_8926

  CI-20190529: 20190529
  CI_DRM_13116: b34e363a43006fbfcdd34c40a774a939b5361865 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8926: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/index.html
  IGT_7281: 9e9cd7e69a393b7cce8fc12fce409eb59817dd7e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git


Testlist changes
----------------

+igt@kms_display_modes@mst-extended-mode-negative

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 5559 bytes --]

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

* [igt-dev] ✓ Fi.CI.IGT: success for Add negative test for extended display (rev2)
  2023-05-07 19:39 [igt-dev] [PATCH v3 0/2] Add negative test for extended display Mohammed Thasleem
                   ` (2 preceding siblings ...)
  2023-05-07 20:20 ` [igt-dev] ✓ Fi.CI.BAT: success for Add negative test for extended display (rev2) Patchwork
@ 2023-05-07 21:55 ` Patchwork
  3 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2023-05-07 21:55 UTC (permalink / raw)
  To: Mohammed Thasleem; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 14971 bytes --]

== Series Details ==

Series: Add negative test for extended display (rev2)
URL   : https://patchwork.freedesktop.org/series/117348/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13116_full -> IGTPW_8926_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

  No changes in participating hosts

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_display_modes@mst-extended-mode-negative} (NEW):
    - {shard-dg1}:        NOTRUN -> [SKIP][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-dg1-16/igt@kms_display_modes@mst-extended-mode-negative.html
    - {shard-tglu}:       NOTRUN -> [SKIP][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-tglu-4/igt@kms_display_modes@mst-extended-mode-negative.html

  
#### Suppressed ####

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

  * igt@prime_vgem@basic-write:
    - {shard-rkl}:        [SKIP][3] ([fdo#109295] / [i915#3291] / [i915#3708]) -> [ABORT][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-rkl-7/igt@prime_vgem@basic-write.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-rkl-3/igt@prime_vgem@basic-write.html

  
New tests
---------

  New tests have been introduced between CI_DRM_13116_full and IGTPW_8926_full:

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

  * igt@kms_display_modes@mst-extended-mode-negative:
    - Statuses : 5 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_barrier_race@remote-request@rcs0:
    - shard-apl:          [PASS][5] -> [ABORT][6] ([i915#7461] / [i915#8211] / [i915#8234])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-apl7/igt@gem_barrier_race@remote-request@rcs0.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-apl6/igt@gem_barrier_race@remote-request@rcs0.html

  * igt@gem_exec_fair@basic-deadline:
    - shard-glk:          [PASS][7] -> [FAIL][8] ([i915#2846])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-glk1/igt@gem_exec_fair@basic-deadline.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-glk8/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-apl:          [PASS][9] -> [FAIL][10] ([i915#2842])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-apl4/igt@gem_exec_fair@basic-none-solo@rcs0.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-apl6/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-glk:          [PASS][11] -> [FAIL][12] ([i915#2842])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-glk1/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-glk1/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-glk:          [PASS][13] -> [ABORT][14] ([i915#5566])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-glk1/igt@gen9_exec_parse@allowed-single.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-glk5/igt@gen9_exec_parse@allowed-single.html

  * igt@i915_module_load@reload-no-display:
    - shard-snb:          [PASS][15] -> [ABORT][16] ([i915#4528] / [i915#8393])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-snb4/igt@i915_module_load@reload-no-display.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-snb6/igt@i915_module_load@reload-no-display.html

  * igt@i915_selftest@live@gt_heartbeat:
    - shard-apl:          [PASS][17] -> [DMESG-FAIL][18] ([i915#5334])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-apl7/igt@i915_selftest@live@gt_heartbeat.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-apl6/igt@i915_selftest@live@gt_heartbeat.html

  * igt@kms_color@ctm-max@pipe-a-hdmi-a-1:
    - shard-snb:          NOTRUN -> [SKIP][19] ([fdo#109271]) +29 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-snb1/igt@kms_color@ctm-max@pipe-a-hdmi-a-1.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-glk:          [PASS][20] -> [FAIL][21] ([i915#2346])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-glk1/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-glk1/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

  * {igt@kms_display_modes@mst-extended-mode-negative} (NEW):
    - shard-apl:          NOTRUN -> [SKIP][22] ([fdo#109271])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-apl7/igt@kms_display_modes@mst-extended-mode-negative.html
    - shard-glk:          NOTRUN -> [SKIP][23] ([fdo#109271])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-glk4/igt@kms_display_modes@mst-extended-mode-negative.html

  * igt@kms_flip@flip-vs-suspend@a-dp1:
    - shard-apl:          [PASS][24] -> [ABORT][25] ([i915#180])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-apl1/igt@kms_flip@flip-vs-suspend@a-dp1.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-apl3/igt@kms_flip@flip-vs-suspend@a-dp1.html

  
#### Possible fixes ####

  * igt@gem_eio@unwedge-stress:
    - {shard-dg1}:        [FAIL][26] ([i915#5784]) -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-dg1-14/igt@gem_eio@unwedge-stress.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-dg1-17/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-none@vecs0:
    - {shard-rkl}:        [FAIL][28] ([i915#2842]) -> [PASS][29]
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-rkl-4/igt@gem_exec_fair@basic-none@vecs0.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-rkl-7/igt@gem_exec_fair@basic-none@vecs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - {shard-tglu}:       [FAIL][30] ([i915#2842]) -> [PASS][31]
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-tglu-9/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-tglu-5/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-apl:          [FAIL][32] ([i915#2842]) -> [PASS][33]
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-apl1/igt@gem_exec_fair@basic-pace-solo@rcs0.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-apl6/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
    - shard-glk:          [FAIL][34] ([i915#2842]) -> [PASS][35] +1 similar issue
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-glk5/igt@gem_exec_fair@basic-pace@vcs0.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-glk9/igt@gem_exec_fair@basic-pace@vcs0.html

  * igt@i915_pm_dc@dc9-dpms:
    - shard-apl:          [SKIP][36] ([fdo#109271]) -> [PASS][37]
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-apl2/igt@i915_pm_dc@dc9-dpms.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-apl4/igt@i915_pm_dc@dc9-dpms.html

  * igt@i915_pm_rpm@modeset-non-lpsp-stress:
    - {shard-rkl}:        [SKIP][38] ([i915#1397]) -> [PASS][39]
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-rkl-7/igt@i915_pm_rpm@modeset-non-lpsp-stress.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-rkl-1/igt@i915_pm_rpm@modeset-non-lpsp-stress.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-apl:          [FAIL][40] ([i915#2346]) -> [PASS][41]
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-apl1/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-apl7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@perf_pmu@idle@rcs0:
    - {shard-dg1}:        [FAIL][42] ([i915#4349]) -> [PASS][43]
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-dg1-16/igt@perf_pmu@idle@rcs0.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-dg1-17/igt@perf_pmu@idle@rcs0.html
    - {shard-rkl}:        [FAIL][44] ([i915#4349]) -> [PASS][45]
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13116/shard-rkl-1/igt@perf_pmu@idle@rcs0.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/shard-rkl-2/igt@perf_pmu@idle@rcs0.html

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

  [IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
  [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
  [i915#3023]: https://gitlab.freedesktop.org/drm/intel/issues/3023
  [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
  [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
  [i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
  [i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
  [i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
  [i915#7582]: https://gitlab.freedesktop.org/drm/intel/issues/7582
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#8211]: https://gitlab.freedesktop.org/drm/intel/issues/8211
  [i915#8234]: https://gitlab.freedesktop.org/drm/intel/issues/8234
  [i915#8393]: https://gitlab.freedesktop.org/drm/intel/issues/8393
  [i915#8411]: https://gitlab.freedesktop.org/drm/intel/issues/8411


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7281 -> IGTPW_8926
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_13116: b34e363a43006fbfcdd34c40a774a939b5361865 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8926: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8926/index.html
  IGT_7281: 9e9cd7e69a393b7cce8fc12fce409eb59817dd7e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 13094 bytes --]

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

* Re: [igt-dev] [PATCH v3 2/2] lib/igt_kms: Check for other modes to fit on bw when ENOSPC failure
  2023-05-07 19:39 ` [igt-dev] [PATCH v3 2/2] lib/igt_kms: Check for other modes to fit on bw when ENOSPC failure Mohammed Thasleem
@ 2023-05-09  5:24   ` Modem, Bhanuprakash
  0 siblings, 0 replies; 8+ messages in thread
From: Modem, Bhanuprakash @ 2023-05-09  5:24 UTC (permalink / raw)
  To: Mohammed Thasleem, igt-dev


On Mon-08-05-2023 01:09 am, Mohammed Thasleem wrote:
> It check other then ENOSPC failure and if its ENOSPC then check all
> active outputs modes to fit possible bw and return false if not found
> any suitable bw.
> 
> v2: Check for other then ENOSPC failure. (Bhanu)
> v3: Updated commit message.
> 
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>

Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

> ---
>   lib/igt_kms.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index a6e91f982..5047d4b1b 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -4574,6 +4574,8 @@ bool __override_all_active_output_modes_to_fit_bw(igt_display_t *display,
>   
>   		if (!ret)
>   			return true;
> +		else if (ret != -ENOSPC)
> +			return false;
>   	}
>   
>   	return false;

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

* Re: [igt-dev] [PATCH v3 1/2] tests/kms_display_modes: Add negative test for extended display
  2023-05-07 19:39 ` [igt-dev] [PATCH v3 1/2] tests/kms_display_modes: " Mohammed Thasleem
@ 2023-05-12 10:36   ` Kamil Konieczny
  2023-06-05 15:08   ` Kamil Konieczny
  1 sibling, 0 replies; 8+ messages in thread
From: Kamil Konieczny @ 2023-05-12 10:36 UTC (permalink / raw)
  To: igt-dev

Hi,

On 2023-05-08 at 01:09:42 +0530, Mohammed Thasleem wrote:
> Added negative test to validte ENOSPC when two 2k-4k or 4k-4k
----------------------------- ^
validate

> moniters connected through MST.
------ ^
monitors
Btw could you decipher here MST like:

MST (Multi-Stream Transport).

> This test added to provide bandwidth issue in MST config.
-------------------- ^
It is unclear, I guess the bw is limited so maybe write here
what it is ? Like:

Bandwidth of MST is limited to two 2k monitors.

Please correct my guess in above statement (maybe it is
even more limited and max is two 1k ?)
What is max bw for MST connection ? Your code tests for 4k-4k ?

> 
> Example:
>   When two monitors connected through MST, the second monitor
-------------------- ^
are

>   also tries to use the same mode. So two such modes may not
------------------------------------ ^
s/So two/Two/

>   fit into the link bandwidth. So, iterate through connected
s/So, iterate/Iterate/

>   outputs & modes and find a invalid combination.
---------------------------- ^
s/a/an/

> 
> v2: Rebased on tip.
> v3: -Code cleanup and updated description.
>     -Free path_blob before call return. (Kamil)
> v4: Updated code formatting and function description. (Jeevan)
> v5: Updated commit description and minor changes.
> v6: Added bigjoiner check and updated comments. (Bhanu)
> 
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
> Reviewed-by: Jeevan B <jeevan.b@intel.com>
> ---
>  tests/kms_display_modes.c | 165 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 165 insertions(+)
> 
> diff --git a/tests/kms_display_modes.c b/tests/kms_display_modes.c
> index d69c7b931..892f39b20 100644
> --- a/tests/kms_display_modes.c
> +++ b/tests/kms_display_modes.c
> @@ -26,14 +26,111 @@
>  
>  #include "igt.h"
>  
> +#define HDISPLAY_4K	3840
> +#define VDISPLAY_4K	2160
> +

You wrote in commit msg about 2k, why not add it here ?

>  IGT_TEST_DESCRIPTION("Test Display Modes");
>  
>  typedef struct {
>  	int drm_fd;
>  	igt_display_t display;
> +	drmModeModeInfo mode_mst[2];
> +	igt_output_t *mst_output[2];
>  	int n_pipes;
>  } data_t;
>  
> +/* Get higher mode supported by panel. */
> +static drmModeModeInfo *get_highres_mode(igt_output_t *output)
> +{
> +	drmModeConnector *connector = output->config.connector;
> +	drmModeModeInfo *highest_mode = NULL;
> +
> +	igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc);
> +	highest_mode = &connector->modes[0];
> +
> +	return highest_mode;
> +}
> +
> +/* Get the 4k or less then 4k mode of connected panel. */
> +static drmModeModeInfo *get_mode(igt_output_t *output)
> +{
> +	int j;
> +	drmModeModeInfo *required_mode = NULL;
> +	drmModeConnector *connector = output->config.connector;
> +
> +	required_mode = igt_output_get_mode(output);
> +	if (required_mode->vdisplay <= VDISPLAY_4K &&
> +	    required_mode->hdisplay <= HDISPLAY_4K) {
> +		return required_mode;
> +	}
> +
> +	/* If default mode not 4k or less than 4k mode, then sort modes and check for it. */
> +	igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc);
> +	for (j = 0; j < connector->count_modes; j++) {
> +		if (connector->modes[j].vdisplay <= VDISPLAY_4K &&
> +		    connector->modes[j].hdisplay <= HDISPLAY_4K) {
> +			required_mode = &connector->modes[j];
> +			break;
> +		}
> +	}
> +
> +	return required_mode;
> +}
> +
> +static int parse_path_blob(char *blob_data)
> +{
> +	int connector_id;
> +	char *encoder;
> +
> +	encoder = strtok(blob_data, ":");
> +	igt_assert_f(!strcmp(encoder, "mst"), "PATH connector property expected to have 'mst'\n");
> +
> +	connector_id = atoi(strtok(NULL, "-"));
> +
> +	return connector_id;
> +}
> +
> +static bool output_is_dp_mst(data_t *data, igt_output_t *output, int i)
> +{
> +	drmModePropertyBlobPtr path_blob = NULL;
> +	uint64_t path_blob_id;
> +	drmModeConnector *connector = output->config.connector;
> +	struct kmstest_connector_config config;
> +	const char *encoder;
> +	int connector_id;
> +	static int prev_connector_id;
> +
> +	kmstest_get_connector_config(data->drm_fd, output->config.connector->connector_id,
> +				     -1, &config);
> +	encoder = kmstest_encoder_type_str(config.encoder->encoder_type);
> +
> +	if (strcmp(encoder, "DP MST"))
> +		return false;
> +
> +	igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
> +		   DRM_MODE_OBJECT_CONNECTOR, "PATH", NULL,
> +		   &path_blob_id, NULL));
> +
> +	igt_assert(path_blob = drmModeGetPropertyBlob(data->drm_fd, path_blob_id));
> +
> +	connector_id = parse_path_blob((char *) path_blob->data);
> +
> +	drmModeFreePropertyBlob(path_blob);
> +
> +	/*
> +	 * Discarding outputs of other DP MST topology.
> +	 * Testing only on outputs on the topology we got previously
> +	 */
> +	if (i == 0) {
> +		prev_connector_id = connector_id;
> +	} else {
> +		if (connector_id != prev_connector_id)
> +			return false;
> +	}
> +
> +	return true;
> +}
> +
>  static void run_extendedmode_basic(data_t *data,
>  				   enum pipe pipe1, igt_output_t *output1,
>  				   enum pipe pipe2, igt_output_t *output2)
> @@ -173,8 +270,47 @@ static void run_extendedmode_test(data_t *data) {
>  	}
>  }
>  
> +static void run_extendedmode_negative(data_t *data, int pipe1, int pipe2)
> +{
> +	struct igt_fb fbs[2];
> +	igt_display_t *display = &data->display;
> +	igt_plane_t *plane[2];
> +	int ret;
> +
> +	igt_display_reset(display);
> +
> +	igt_output_set_pipe(data->mst_output[0], pipe1);
> +	igt_output_set_pipe(data->mst_output[1], pipe2);
> +
> +	igt_create_color_fb(data->drm_fd, data->mode_mst[0].hdisplay, data->mode_mst[0].vdisplay,
> +			    DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR, 1, 0, 0, &fbs[0]);
> +	igt_create_color_fb(data->drm_fd, data->mode_mst[1].hdisplay, data->mode_mst[1].vdisplay,
> +			    DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR, 0, 0, 1, &fbs[1]);
> +
> +	plane[0] = igt_pipe_get_plane_type(&display->pipes[pipe1], DRM_PLANE_TYPE_PRIMARY);
> +	plane[1] = igt_pipe_get_plane_type(&display->pipes[pipe2], DRM_PLANE_TYPE_PRIMARY);
> +
> +	igt_plane_set_fb(plane[0], &fbs[0]);
> +	igt_fb_set_size(&fbs[0], plane[0], data->mode_mst[0].hdisplay, data->mode_mst[0].vdisplay);
> +	igt_plane_set_size(plane[0], data->mode_mst[0].hdisplay, data->mode_mst[0].vdisplay);
> +
> +	igt_plane_set_fb(plane[1], &fbs[1]);
> +	igt_fb_set_size(&fbs[1], plane[1], data->mode_mst[1].hdisplay, data->mode_mst[1].vdisplay);
> +	igt_plane_set_size(plane[1], data->mode_mst[1].hdisplay, data->mode_mst[1].vdisplay);
> +
> +	igt_output_override_mode(data->mst_output[0], &data->mode_mst[0]);
> +	igt_output_override_mode(data->mst_output[1], &data->mode_mst[1]);
> +
> +	igt_require(i915_pipe_output_combo_valid(display));
> +	ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
> +	igt_assert(ret != 0 && errno == ENOSPC);
> +}
> +
>  igt_main
>  {
> +	int dp_mst_outputs = 0, count = 0;
> +	enum pipe pipe1, pipe2;
> +	igt_output_t *output;
>  	data_t data;
>  
>  	igt_fixture {
> @@ -182,12 +318,41 @@ igt_main
>  		kmstest_set_vt_graphics_mode();
>  		igt_display_require(&data.display, data.drm_fd);
>  		igt_display_require_output(&data.display);
> +
> +		for_each_connected_output(&data.display, output) {
> +			data.mst_output[count++] = output;
> +			if (output_is_dp_mst(&data, output, dp_mst_outputs))
> +				dp_mst_outputs++;
> +		}
>  	}
>  
>  	igt_describe("Test for validating display extended mode with a pair of connected displays");
>  	igt_subtest_with_dynamic("extended-mode-basic")
>  		run_extendedmode_test(&data);
>  
> +	igt_describe("Negative test for validating display extended mode with a pair of connected "
> +		     "2k-4k or 4k-4k displays");
> +	igt_subtest_with_dynamic("mst-extended-mode-negative") {
> +		igt_require_f(dp_mst_outputs > 1, "MST not found more then one\n");
> +
> +		memcpy(&data.mode_mst[0], get_mode(data.mst_output[0]), sizeof(drmModeModeInfo));
> +		memcpy(&data.mode_mst[1], get_highres_mode(data.mst_output[1]),
> +				sizeof(drmModeModeInfo));
> +		igt_require_f((data.mode_mst[1].hdisplay >= HDISPLAY_4K &&
> +			       data.mode_mst[1].vdisplay >= VDISPLAY_4K), "4k panel not found\n");

You are not checking >= 2k on mst[0] here.

Regards,
Kamil

> +
> +		for_each_pipe(&data.display, pipe1) {
> +			for_each_pipe(&data.display, pipe2) {
> +				if (pipe1 == pipe2)
> +					continue;
> +
> +				igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe1),
> +					      kmstest_pipe_name(pipe2))
> +					run_extendedmode_negative(&data, pipe1, pipe2);
> +			}
> +		}
> +	}
> +
>  	igt_fixture {
>  		igt_display_fini(&data.display);
>  	}
> -- 
> 2.25.1
> 

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

* Re: [igt-dev] [PATCH v3 1/2] tests/kms_display_modes: Add negative test for extended display
  2023-05-07 19:39 ` [igt-dev] [PATCH v3 1/2] tests/kms_display_modes: " Mohammed Thasleem
  2023-05-12 10:36   ` Kamil Konieczny
@ 2023-06-05 15:08   ` Kamil Konieczny
  1 sibling, 0 replies; 8+ messages in thread
From: Kamil Konieczny @ 2023-06-05 15:08 UTC (permalink / raw)
  To: igt-dev

Hi Mohammed,

On 2023-05-08 at 01:09:42 +0530, Mohammed Thasleem wrote:
> Added negative test to validte ENOSPC when two 2k-4k or 4k-4k
> moniters connected through MST.
> This test added to provide bandwidth issue in MST config.
> 
> Example:
>   When two monitors connected through MST, the second monitor
>   also tries to use the same mode. So two such modes may not
>   fit into the link bandwidth. So, iterate through connected
>   outputs & modes and find a invalid combination.
> 
> v2: Rebased on tip.
> v3: -Code cleanup and updated description.
>     -Free path_blob before call return. (Kamil)
> v4: Updated code formatting and function description. (Jeevan)
> v5: Updated commit description and minor changes.
> v6: Added bigjoiner check and updated comments. (Bhanu)
> 
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
> Reviewed-by: Jeevan B <jeevan.b@intel.com>
> ---
>  tests/kms_display_modes.c | 165 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 165 insertions(+)
> 
> diff --git a/tests/kms_display_modes.c b/tests/kms_display_modes.c
> index d69c7b931..892f39b20 100644
> --- a/tests/kms_display_modes.c
> +++ b/tests/kms_display_modes.c
> @@ -26,14 +26,111 @@
>  
>  #include "igt.h"
>  
> +#define HDISPLAY_4K	3840
> +#define VDISPLAY_4K	2160
> +
>  IGT_TEST_DESCRIPTION("Test Display Modes");
>  
>  typedef struct {
>  	int drm_fd;
>  	igt_display_t display;
> +	drmModeModeInfo mode_mst[2];
> +	igt_output_t *mst_output[2];
>  	int n_pipes;
>  } data_t;
>  
> +/* Get higher mode supported by panel. */
> +static drmModeModeInfo *get_highres_mode(igt_output_t *output)
> +{
> +	drmModeConnector *connector = output->config.connector;
> +	drmModeModeInfo *highest_mode = NULL;
> +
> +	igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc);
> +	highest_mode = &connector->modes[0];
> +
> +	return highest_mode;
> +}
> +
> +/* Get the 4k or less then 4k mode of connected panel. */
> +static drmModeModeInfo *get_mode(igt_output_t *output)
> +{
> +	int j;
> +	drmModeModeInfo *required_mode = NULL;
> +	drmModeConnector *connector = output->config.connector;
> +
> +	required_mode = igt_output_get_mode(output);
> +	if (required_mode->vdisplay <= VDISPLAY_4K &&
> +	    required_mode->hdisplay <= HDISPLAY_4K) {
> +		return required_mode;
> +	}
> +
> +	/* If default mode not 4k or less than 4k mode, then sort modes and check for it. */
> +	igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc);
> +	for (j = 0; j < connector->count_modes; j++) {
> +		if (connector->modes[j].vdisplay <= VDISPLAY_4K &&
> +		    connector->modes[j].hdisplay <= HDISPLAY_4K) {
> +			required_mode = &connector->modes[j];
> +			break;
> +		}
> +	}
> +
> +	return required_mode;
> +}
> +
> +static int parse_path_blob(char *blob_data)
> +{
> +	int connector_id;
> +	char *encoder;
> +
> +	encoder = strtok(blob_data, ":");
> +	igt_assert_f(!strcmp(encoder, "mst"), "PATH connector property expected to have 'mst'\n");
> +
> +	connector_id = atoi(strtok(NULL, "-"));
> +
> +	return connector_id;
> +}
> +
> +static bool output_is_dp_mst(data_t *data, igt_output_t *output, int i)
> +{
> +	drmModePropertyBlobPtr path_blob = NULL;
> +	uint64_t path_blob_id;
> +	drmModeConnector *connector = output->config.connector;
> +	struct kmstest_connector_config config;
> +	const char *encoder;
> +	int connector_id;
> +	static int prev_connector_id;
> +
> +	kmstest_get_connector_config(data->drm_fd, output->config.connector->connector_id,
> +				     -1, &config);
> +	encoder = kmstest_encoder_type_str(config.encoder->encoder_type);
> +
> +	if (strcmp(encoder, "DP MST"))
> +		return false;
> +
> +	igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
> +		   DRM_MODE_OBJECT_CONNECTOR, "PATH", NULL,
> +		   &path_blob_id, NULL));
> +
> +	igt_assert(path_blob = drmModeGetPropertyBlob(data->drm_fd, path_blob_id));
> +
> +	connector_id = parse_path_blob((char *) path_blob->data);
> +
> +	drmModeFreePropertyBlob(path_blob);
> +
> +	/*
> +	 * Discarding outputs of other DP MST topology.
> +	 * Testing only on outputs on the topology we got previously
> +	 */
> +	if (i == 0) {
> +		prev_connector_id = connector_id;
> +	} else {
> +		if (connector_id != prev_connector_id)
> +			return false;
> +	}
> +
> +	return true;
> +}
> +
>  static void run_extendedmode_basic(data_t *data,
>  				   enum pipe pipe1, igt_output_t *output1,
>  				   enum pipe pipe2, igt_output_t *output2)
> @@ -173,8 +270,47 @@ static void run_extendedmode_test(data_t *data) {
>  	}
>  }
>  
> +static void run_extendedmode_negative(data_t *data, int pipe1, int pipe2)
> +{
> +	struct igt_fb fbs[2];
> +	igt_display_t *display = &data->display;
> +	igt_plane_t *plane[2];
> +	int ret;
> +
> +	igt_display_reset(display);
> +
> +	igt_output_set_pipe(data->mst_output[0], pipe1);
> +	igt_output_set_pipe(data->mst_output[1], pipe2);
> +
> +	igt_create_color_fb(data->drm_fd, data->mode_mst[0].hdisplay, data->mode_mst[0].vdisplay,
> +			    DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR, 1, 0, 0, &fbs[0]);
> +	igt_create_color_fb(data->drm_fd, data->mode_mst[1].hdisplay, data->mode_mst[1].vdisplay,
> +			    DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR, 0, 0, 1, &fbs[1]);
> +
> +	plane[0] = igt_pipe_get_plane_type(&display->pipes[pipe1], DRM_PLANE_TYPE_PRIMARY);
> +	plane[1] = igt_pipe_get_plane_type(&display->pipes[pipe2], DRM_PLANE_TYPE_PRIMARY);
> +
> +	igt_plane_set_fb(plane[0], &fbs[0]);
> +	igt_fb_set_size(&fbs[0], plane[0], data->mode_mst[0].hdisplay, data->mode_mst[0].vdisplay);
> +	igt_plane_set_size(plane[0], data->mode_mst[0].hdisplay, data->mode_mst[0].vdisplay);
> +
> +	igt_plane_set_fb(plane[1], &fbs[1]);
> +	igt_fb_set_size(&fbs[1], plane[1], data->mode_mst[1].hdisplay, data->mode_mst[1].vdisplay);
> +	igt_plane_set_size(plane[1], data->mode_mst[1].hdisplay, data->mode_mst[1].vdisplay);
> +
> +	igt_output_override_mode(data->mst_output[0], &data->mode_mst[0]);
> +	igt_output_override_mode(data->mst_output[1], &data->mode_mst[1]);
> +
> +	igt_require(i915_pipe_output_combo_valid(display));
> +	ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
> +	igt_assert(ret != 0 && errno == ENOSPC);
> +}
> +
>  igt_main
>  {
> +	int dp_mst_outputs = 0, count = 0;
> +	enum pipe pipe1, pipe2;
> +	igt_output_t *output;
>  	data_t data;
>  
>  	igt_fixture {
> @@ -182,12 +318,41 @@ igt_main
>  		kmstest_set_vt_graphics_mode();
>  		igt_display_require(&data.display, data.drm_fd);
>  		igt_display_require_output(&data.display);
> +
> +		for_each_connected_output(&data.display, output) {
> +			data.mst_output[count++] = output;
> +			if (output_is_dp_mst(&data, output, dp_mst_outputs))
> +				dp_mst_outputs++;
> +		}
>  	}
>  
>  	igt_describe("Test for validating display extended mode with a pair of connected displays");
>  	igt_subtest_with_dynamic("extended-mode-basic")
>  		run_extendedmode_test(&data);
>  
> +	igt_describe("Negative test for validating display extended mode with a pair of connected "
> +		     "2k-4k or 4k-4k displays");
> +	igt_subtest_with_dynamic("mst-extended-mode-negative") {
> +		igt_require_f(dp_mst_outputs > 1, "MST not found more then one\n");
> +
> +		memcpy(&data.mode_mst[0], get_mode(data.mst_output[0]), sizeof(drmModeModeInfo));
> +		memcpy(&data.mode_mst[1], get_highres_mode(data.mst_output[1]),
> +				sizeof(drmModeModeInfo));
> +		igt_require_f((data.mode_mst[1].hdisplay >= HDISPLAY_4K &&
> +			       data.mode_mst[1].vdisplay >= VDISPLAY_4K), "4k panel not found\n");

I just realised that you sorted that so no need for [0] checks.
I merged your series after correcting some misspellings.

Regards,
Kamil

> +
> +		for_each_pipe(&data.display, pipe1) {
> +			for_each_pipe(&data.display, pipe2) {
> +				if (pipe1 == pipe2)
> +					continue;
> +
> +				igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe1),
> +					      kmstest_pipe_name(pipe2))
> +					run_extendedmode_negative(&data, pipe1, pipe2);
> +			}
> +		}
> +	}
> +
>  	igt_fixture {
>  		igt_display_fini(&data.display);
>  	}
> -- 
> 2.25.1
> 

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

end of thread, other threads:[~2023-06-05 15:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-07 19:39 [igt-dev] [PATCH v3 0/2] Add negative test for extended display Mohammed Thasleem
2023-05-07 19:39 ` [igt-dev] [PATCH v3 1/2] tests/kms_display_modes: " Mohammed Thasleem
2023-05-12 10:36   ` Kamil Konieczny
2023-06-05 15:08   ` Kamil Konieczny
2023-05-07 19:39 ` [igt-dev] [PATCH v3 2/2] lib/igt_kms: Check for other modes to fit on bw when ENOSPC failure Mohammed Thasleem
2023-05-09  5:24   ` Modem, Bhanuprakash
2023-05-07 20:20 ` [igt-dev] ✓ Fi.CI.BAT: success for Add negative test for extended display (rev2) Patchwork
2023-05-07 21:55 ` [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