All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mohammed Thasleem <mohammed.thasleem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jeevan.b@intel.com, Mohammed Thasleem <mohammed.thasleem@intel.com>
Subject: [PATCH i-g-t v2] tests/kms_display_modes: Remove negative test for extended display
Date: Fri, 21 Feb 2025 14:55:00 +0530	[thread overview]
Message-ID: <20250221092500.15215-1-mohammed.thasleem@intel.com> (raw)
In-Reply-To: <20250220103640.44879-1-mohammed.thasleem@intel.com>

This negative test was crated to validate ENOSPC when two 2k-4k or 4k-4k
monitors connected through MST to cover bandwidth issue in MST config.

But it will not helpfult to handle current bandwidth which are
DisplayPort (DP) 1.4 supports a total bandwidth of 4 × 8.1 Gbps.

However, with DP 2.1, the bandwidth allocation strategy has
significantly changed to 4 × 20 Gbps of available bandwidth.
This provides significantly greater display capabilities
w.r.t bandwidth.

v2: Fix compilation issue.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
 tests/kms_display_modes.c | 109 +-------------------------------------
 1 file changed, 1 insertion(+), 108 deletions(-)

diff --git a/tests/kms_display_modes.c b/tests/kms_display_modes.c
index 117f82325..e12d08f8d 100644
--- a/tests/kms_display_modes.c
+++ b/tests/kms_display_modes.c
@@ -40,64 +40,17 @@
  * Description: Test for validating display extended mode with a pair of connected
  *              displays
  * Functionality: kms_core
- *
- * SUBTEST: mst-extended-mode-negative
- * Description: Negative test for validating display extended mode with a pair
- *		of connected 2k-4k or 4k-4k displays.
- * Functionality: kms_core, mst
  */
 
-#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 bool output_is_dp_mst(data_t *data, igt_output_t *output, int i)
 {
 	int connector_id;
@@ -110,7 +63,7 @@ static bool output_is_dp_mst(data_t *data, igt_output_t *output, int i)
 	/*
 	 * 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 {
@@ -274,46 +227,9 @@ 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(intel_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;
 
@@ -340,29 +256,6 @@ igt_main
 		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.43.0


  parent reply	other threads:[~2025-02-21  9:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20 10:36 [PATCH i-g-t] tests/kms_display_modes: Remove negative test for extended display Mohammed Thasleem
2023-03-27 20:36 ` [PATCH v2] " Mohammed Thasleem
2025-02-21  9:25 ` Mohammed Thasleem [this message]
2025-02-24  5:19   ` [PATCH i-g-t " B, Jeevan
2025-02-21 10:04 ` ✓ Xe.CI.BAT: success for tests/kms_display_modes: Remove negative test for extended display (rev2) Patchwork
2025-02-21 10:21 ` ✓ i915.CI.BAT: " Patchwork
2025-02-21 11:59 ` ✗ i915.CI.Full: failure " Patchwork
2025-02-21 23:53 ` ✗ Xe.CI.Full: " Patchwork
2025-02-24  4:24 ` [PATCH i-g-t] tests/kms_display_modes: Remove negative test for extended display B, Jeevan
2025-03-03  8:18 ` ✓ Xe.CI.BAT: success for tests/kms_display_modes: Remove negative test for extended display (rev3) Patchwork
2025-03-03  8:33 ` ✓ i915.CI.BAT: " Patchwork
2025-03-03  9:12 ` ✗ Xe.CI.Full: failure " Patchwork
2025-03-03 10:19 ` ✗ i915.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250221092500.15215-1-mohammed.thasleem@intel.com \
    --to=mohammed.thasleem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jeevan.b@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.