Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [i-g-t V4 0/6] Fix Bigjoiner checks
@ 2023-04-14 13:53 Bhanuprakash Modem
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 1/6] lib/igt_kms: " Bhanuprakash Modem
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Bhanuprakash Modem @ 2023-04-14 13:53 UTC (permalink / raw)
  To: igt-dev

Bigjoiner will come in the picture when the resolution > 5K or
clock > max dot-clock. Add a support to check the selected mode
clock is greater than the max dot-clock.

Bhanuprakash Modem (6):
  lib/igt_kms: Fix Bigjoiner checks
  tests/i915/kms_big_joiner: Fix Bigjoiner checks
  tests/i915/kms_dsc: Update bigjoiner pipe constraint
  tests/kms_invalid_mode: Use helpers from IGT lib
  tests/kms_flip: Fix Bigjoiner checks
  tests/kms_setmode: Fix Bigjoiner checks

 lib/igt_kms.c               | 71 ++++++++++++++++++++++++++++++--
 lib/igt_kms.h               |  2 +
 tests/i915/kms_big_joiner.c | 80 ++++++++++++++++++++++---------------
 tests/i915/kms_dsc.c        | 30 +++++++-------
 tests/i915/kms_dsc_helper.h |  2 -
 tests/kms_flip.c            | 12 +++---
 tests/kms_invalid_mode.c    | 38 +-----------------
 tests/kms_setmode.c         | 15 ++++---
 8 files changed, 148 insertions(+), 102 deletions(-)

--
2.40.0

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

* [igt-dev] [i-g-t V4 1/6] lib/igt_kms: Fix Bigjoiner checks
  2023-04-14 13:53 [igt-dev] [i-g-t V4 0/6] Fix Bigjoiner checks Bhanuprakash Modem
@ 2023-04-14 13:53 ` Bhanuprakash Modem
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 2/6] tests/i915/kms_big_joiner: " Bhanuprakash Modem
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Bhanuprakash Modem @ 2023-04-14 13:53 UTC (permalink / raw)
  To: igt-dev

Bigjoiner will come in the picture when the resolution > 5K or
clock > max dot-clock. Add a support to check the selected mode
clock is greater than the max dot-clock.

V2: - Update helper comments (Ankit)
    - New helper to check Bigjoiner requirement (Ankit)
V3: - For older Kernels, readback from i915_frequency_info

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 lib/igt_kms.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++---
 lib/igt_kms.h |  2 ++
 2 files changed, 69 insertions(+), 4 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 50655f136b8..4b3eeffc7f3 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -5813,6 +5813,66 @@ bool igt_max_bpc_constraint(igt_display_t *display, enum pipe pipe,
 	return false;
 }
 
+/*
+ * igt_get_max_dotclock:
+ * @fd: A drm file descriptor
+ *
+ * Get the Max pixel clock frequency from intel specific debugfs
+ * "i915_frequency_info".
+ *
+ * Returns: Max supported pixel clock frequency.
+ */
+int igt_get_max_dotclock(int fd)
+{
+	char buf[4096];
+	char *s;
+	int dir, res, max_dotclock = 0;
+
+	if (!is_i915_device(fd))
+		return max_dotclock;
+
+	dir = igt_debugfs_dir(fd);
+	igt_require(dir);
+
+	/*
+	 * Display specific clock frequency info is moved to i915_cdclk_info,
+	 * On older kernels if this debugfs is not found, fallback to read from
+	 * i915_frequency_info.
+	 */
+	res = igt_debugfs_simple_read(dir, "i915_cdclk_info",
+				      buf, sizeof(buf));
+	if (res <= 0)
+		res = igt_debugfs_simple_read(dir, "i915_frequency_info",
+					      buf, sizeof(buf));
+	close(dir);
+
+	igt_require(res > 0);
+
+	igt_assert(s = strstr(buf, "Max pixel clock frequency:"));
+	igt_assert_eq(sscanf(s, "Max pixel clock frequency: %d kHz", &max_dotclock), 1);
+
+	/* 100 Mhz to 5 GHz seem like reasonable values to expect */
+	igt_assert_lt(max_dotclock, 5000000);
+	igt_assert_lt(100000, max_dotclock);
+
+	return max_dotclock;
+}
+
+/* igt_bigjoiner_possible:
+ * @mode: libdrm mode
+ * @max_dotclock: Max pixel clock frequency
+ *
+ * Bigjoiner will come into the picture, when the requested
+ * mode resolution > 5K or mode clock > max_dotclock.
+ *
+ * Returns: True if mode requires Bigjoiner, else False.
+ */
+bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock)
+{
+	return (mode->hdisplay > MAX_HDISPLAY_PER_PIPE ||
+		mode->clock > max_dotclock);
+}
+
 /*
  * igt_check_bigjoiner_support:
  * @display: a pointer to an #igt_display_t structure
@@ -5835,6 +5895,7 @@ bool igt_check_bigjoiner_support(igt_display_t *display)
 		enum pipe idx;
 		drmModeModeInfo *mode;
 	} pipes[IGT_MAX_PIPES];
+	int max_dotclock;
 
 	/* Get total enabled pipes. */
 	for_each_pipe(display, p)
@@ -5858,22 +5919,24 @@ bool igt_check_bigjoiner_support(igt_display_t *display)
 		return true;
 	}
 
+	max_dotclock = igt_get_max_dotclock(display->drm_fd);
+
 	/*
-	 * if mode.hdisplay > 5120, then ignore
+	 * if mode resolution > 5K (or) mode.clock > max dot-clock, then ignore
 	 *  - if the consecutive pipe is not available
 	 *  - last crtc in single/multi-connector config
 	 *  - consecutive crtcs in multi-connector config
 	 *
 	 * in multi-connector config ignore if
-	 *  - previous crtc mode.hdisplay > 5120 and
+	 *  - previous crtc (mode resolution > 5K or mode.clock > max dot-clock) and
 	 *  - current & previous crtcs are consecutive
 	 */
 	for (i = 0; i < pipes_in_use; i++) {
-		if (((pipes[i].mode->hdisplay > MAX_HDISPLAY_PER_PIPE) &&
+		if ((igt_bigjoiner_possible(pipes[i].mode, max_dotclock) &&
 		     ((pipes[i].idx >= (total_pipes - 1)) ||
 		      (!display->pipes[pipes[i].idx + 1].enabled) ||
 		      ((i < (pipes_in_use - 1)) && (abs(pipes[i + 1].idx - pipes[i].idx) <= 1)))) ||
-		    ((i > 0) && (pipes[i - 1].mode->hdisplay > MAX_HDISPLAY_PER_PIPE) &&
+		    ((i > 0) && igt_bigjoiner_possible(pipes[i - 1].mode, max_dotclock) &&
 		     ((!display->pipes[pipes[i - 1].idx + 1].enabled) ||
 		      (abs(pipes[i].idx - pipes[i - 1].idx) <= 1)))) {
 			igt_debug("Pipe/Output combo is not possible with selected mode(s).\n");
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 2b917925158..df90bb2330d 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -990,6 +990,8 @@ void igt_sort_connector_modes(drmModeConnector *connector,
 
 bool igt_max_bpc_constraint(igt_display_t *display, enum pipe pipe,
 		igt_output_t *output, int bpc);
+int igt_get_max_dotclock(int fd);
+bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock);
 bool igt_check_bigjoiner_support(igt_display_t *display);
 bool igt_parse_mode_string(const char *mode_string, drmModeModeInfo *mode);
 bool i915_pipe_output_combo_valid(igt_display_t *display);
-- 
2.40.0

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

* [igt-dev] [i-g-t V4 2/6] tests/i915/kms_big_joiner: Fix Bigjoiner checks
  2023-04-14 13:53 [igt-dev] [i-g-t V4 0/6] Fix Bigjoiner checks Bhanuprakash Modem
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 1/6] lib/igt_kms: " Bhanuprakash Modem
@ 2023-04-14 13:53 ` Bhanuprakash Modem
  2023-04-17  6:45   ` Nautiyal, Ankit K
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 3/6] tests/i915/kms_dsc: Update bigjoiner pipe constraint Bhanuprakash Modem
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Bhanuprakash Modem @ 2023-04-14 13:53 UTC (permalink / raw)
  To: igt-dev

Bigjoiner will come in the picture when the resolution > 5K or
clock > max dot-clock. Add a support to check the selected mode
clock is greater than the max dot-clock.

V2: - Handle both 5k & max dot clock cases
    - Other minor cleanups
V3: - Fix the logic to avoid the retry

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/i915/kms_big_joiner.c | 80 ++++++++++++++++++++++---------------
 1 file changed, 48 insertions(+), 32 deletions(-)

diff --git a/tests/i915/kms_big_joiner.c b/tests/i915/kms_big_joiner.c
index 8be60ea1176..74639df9d69 100644
--- a/tests/i915/kms_big_joiner.c
+++ b/tests/i915/kms_big_joiner.c
@@ -26,10 +26,13 @@
 
 #include "igt.h"
 
-#define MAX_HDISPLAY_PER_PIPE 5120
-
 IGT_TEST_DESCRIPTION("Test big joiner");
 
+struct big_joiner_output {
+	uint32_t output_id;
+	drmModeModeInfo mode;
+};
+
 typedef struct {
 	int drm_fd;
 	igt_display_t display;
@@ -37,9 +40,11 @@ typedef struct {
 	int n_pipes;
 	enum pipe pipe1;
 	enum pipe pipe2;
-	uint32_t big_joiner_output[2];
+	struct big_joiner_output output[2];
 } data_t;
 
+static int max_dotclock;
+
 static void test_invalid_modeset(data_t *data)
 {
 	igt_output_t *output;
@@ -91,7 +96,7 @@ static void test_basic_modeset(data_t *data)
 	igt_display_reset(display);
 
 	for_each_connected_output(display, output) {
-		if (data->big_joiner_output[0] == output->id) {
+		if (data->output[0].output_id == output->id) {
 			big_joiner_output = output;
 			break;
 		}
@@ -99,9 +104,7 @@ static void test_basic_modeset(data_t *data)
 
 	igt_output_set_pipe(big_joiner_output, data->pipe1);
 
-	igt_sort_connector_modes(big_joiner_output->config.connector,
-				 sort_drm_modes_by_res_dsc);
-	mode = &big_joiner_output->config.connector->modes[0];
+	mode = &data->output[0].mode;
 	igt_output_override_mode(big_joiner_output, mode);
 
 	pipe = &display->pipes[data->pipe1];
@@ -130,7 +133,7 @@ static void test_dual_display(data_t *data)
 	igt_display_reset(display);
 
 	for_each_connected_output(display, output) {
-		if (data->big_joiner_output[count] == output->id) {
+		if (data->output[count].output_id == output->id) {
 			big_joiner_output[count] = output;
 			count++;
 		}
@@ -143,9 +146,7 @@ static void test_dual_display(data_t *data)
 	igt_output_set_pipe(big_joiner_output[1], data->pipe2);
 
 	/* Set up first big joiner output on Pipe A*/
-	igt_sort_connector_modes(big_joiner_output[0]->config.connector,
-				 sort_drm_modes_by_res_dsc);
-	mode = &big_joiner_output[0]->config.connector->modes[0];
+	mode = &data->output[0].mode;
 	igt_output_override_mode(big_joiner_output[0], mode);
 
 	pipe = &display->pipes[data->pipe1];
@@ -156,9 +157,7 @@ static void test_dual_display(data_t *data)
 	igt_plane_set_size(plane1, mode->hdisplay, mode->vdisplay);
 
 	/* Set up second big joiner output on Pipe C*/
-	igt_sort_connector_modes(big_joiner_output[1]->config.connector,
-				 sort_drm_modes_by_res_dsc);
-	mode = &big_joiner_output[1]->config.connector->modes[0];
+	mode = &data->output[1].mode;
 	igt_output_override_mode(big_joiner_output[1], mode);
 
 	pipe = &display->pipes[data->pipe2];
@@ -178,6 +177,16 @@ static void test_dual_display(data_t *data)
 	igt_display_commit2(display, COMMIT_ATOMIC);
 }
 
+static bool bigjoiner_mode_found(drmModeConnector *connector,
+				 int (*sort_method)(const void *, const void*),
+				 drmModeModeInfo *mode)
+{
+	igt_sort_connector_modes(connector, sort_method);
+	*mode = connector->modes[0];
+
+	return igt_bigjoiner_possible(mode, max_dotclock);
+}
+
 igt_main
 {
 	data_t data;
@@ -194,13 +203,24 @@ igt_main
 		igt_display_require(&data.display, data.drm_fd);
 		igt_require(data.display.is_atomic);
 
-		for_each_connected_output(&data.display, output) {
-			igt_sort_connector_modes(output->config.connector,
-						 sort_drm_modes_by_res_dsc);
+		max_dotclock = igt_get_max_dotclock(data.drm_fd);
 
-			mode = &output->config.connector->modes[0];
-			if (mode->hdisplay > MAX_HDISPLAY_PER_PIPE) {
-				data.big_joiner_output[count++] = output->id;
+		for_each_connected_output(&data.display, output) {
+			bool found = false;
+			drmModeConnector *connector = output->config.connector;
+
+			/*
+			 * Bigjoiner will come in the picture when
+			 * the resolution > 5K or clock > max-dot-clock.
+			 */
+			found = (bigjoiner_mode_found(connector, sort_drm_modes_by_res_dsc, mode) ||
+				 bigjoiner_mode_found(connector, sort_drm_modes_by_clk_dsc, mode)) ?
+					true : false;
+
+			if (found) {
+				data.output[count].output_id = output->id;
+				memcpy(&data.output[count].mode, mode, sizeof(drmModeModeInfo));
+				count++;
 
 				width = max(width, mode->hdisplay);
 				height = max(height, mode->vdisplay);
@@ -215,7 +235,7 @@ igt_main
 			j++;
 		}
 
-		igt_require_f(count > 0, "No output with 5k+ mode found\n");
+		igt_require_f(count > 0, "No output with 5k+ mode (or) clock > max-dot-clock found\n");
 
 		igt_create_pattern_fb(data.drm_fd, width, height, DRM_FORMAT_XRGB8888,
 				      DRM_FORMAT_MOD_LINEAR, &data.fb);
@@ -237,14 +257,12 @@ igt_main
 
 		igt_display_reset(&data.display);
 		for_each_connected_output(&data.display, output) {
-			if (data.big_joiner_output[0] != output->id)
+			if (data.output[0].output_id != output->id)
 				continue;
 
-			igt_sort_connector_modes(output->config.connector,
-						 sort_drm_modes_by_res_dsc);
-
+			mode = &data.output[0].mode;
 			igt_output_set_pipe(output, data.pipe1);
-			igt_output_override_mode(output, &output->config.connector->modes[0]);
+			igt_output_override_mode(output, mode);
 
 			igt_dynamic_f("pipe-%s-%s",
 				      kmstest_pipe_name(data.pipe1),
@@ -261,17 +279,15 @@ igt_main
 
 				igt_display_reset(&data.display);
 				for_each_connected_output(&data.display, output) {
-					igt_sort_connector_modes(output->config.connector,
-								 sort_drm_modes_by_res_dsc);
-
-					if (data.big_joiner_output[0] == output->id) {
+					if (data.output[0].output_id == output->id) {
 						first_output = output;
+						mode = &data.output[0].mode;
+
 						igt_output_set_pipe(output, data.pipe1);
-						igt_output_override_mode(output, &output->config.connector->modes[0]);
+						igt_output_override_mode(output, mode);
 					} else if (second_output == NULL) {
 						second_output = output;
 						igt_output_set_pipe(output, data.pipe2);
-						igt_output_override_mode(output, &output->config.connector->modes[0]);
 
 						break;
 					}
-- 
2.40.0

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

* [igt-dev] [i-g-t V4 3/6] tests/i915/kms_dsc: Update bigjoiner pipe constraint
  2023-04-14 13:53 [igt-dev] [i-g-t V4 0/6] Fix Bigjoiner checks Bhanuprakash Modem
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 1/6] lib/igt_kms: " Bhanuprakash Modem
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 2/6] tests/i915/kms_big_joiner: " Bhanuprakash Modem
@ 2023-04-14 13:53 ` Bhanuprakash Modem
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 4/6] tests/kms_invalid_mode: Use helpers from IGT lib Bhanuprakash Modem
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Bhanuprakash Modem @ 2023-04-14 13:53 UTC (permalink / raw)
  To: igt-dev

Instead of writing own logic at test level, use existing IGT
helper to check the bigjoiner support.

V2: - git squash to include i915_pipe_output_combo_valid()

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
---
 tests/i915/kms_dsc.c        | 30 +++++++++++++++---------------
 tests/i915/kms_dsc_helper.h |  2 --
 2 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index b3c5e60c773..cf34dc8a8b0 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -47,7 +47,6 @@ typedef struct {
 	unsigned int plane_format;
 	igt_output_t *output;
 	int input_bpc;
-	int n_pipes;
 	int disp_ver;
 	enum pipe pipe;
 } data_t;
@@ -72,19 +71,24 @@ static drmModeModeInfo *get_highres_mode(igt_output_t *output)
 	return highest_mode;
 }
 
-static bool check_big_joiner_pipe_constraint(data_t *data)
+static bool pipe_output_combo_valid(data_t *data)
 {
 	igt_output_t *output = data->output;
-	drmModeModeInfo *mode = get_highres_mode(output);
+	drmModeModeInfo *mode;
+	bool ret = true;
 
-	if (mode->hdisplay >= HDISPLAY_5K &&
-	    data->pipe == (data->n_pipes - 1)) {
-		igt_debug("Pipe-%s not supported due to bigjoiner limitation\n",
-			   kmstest_pipe_name(data->pipe));
-		return false;
-	}
+	igt_display_reset(&data->display);
+	mode = get_highres_mode(output);
+
+	igt_output_set_pipe(output, data->pipe);
+	igt_output_override_mode(output, mode);
+
+	if (!i915_pipe_output_combo_valid(&data->display))
+		ret = false;
+
+	igt_output_set_pipe(output, PIPE_NONE);
 
-	return true;
+	return ret;
 }
 
 static void test_cleanup(data_t *data)
@@ -190,7 +194,7 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
 		if (!check_gen11_bpc_constraint(data->drm_fd, data->output, data->input_bpc))
 			continue;
 
-		if (!check_big_joiner_pipe_constraint(data))
+		if (!pipe_output_combo_valid(data))
 			continue;
 
 		if (test_type == TEST_DSC_BPC)
@@ -206,7 +210,6 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
 igt_main
 {
 	data_t data = {};
-	int i;
 
 	igt_fixture {
 		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
@@ -217,9 +220,6 @@ igt_main
 		igt_display_require(&data.display, data.drm_fd);
 		igt_display_require_output(&data.display);
 		igt_require(data.disp_ver >= 11);
-		data.n_pipes = 0;
-		for_each_pipe(&data.display, i)
-			data.n_pipes++;
 	}
 
 	igt_describe("Tests basic display stream compression functionality if supported "
diff --git a/tests/i915/kms_dsc_helper.h b/tests/i915/kms_dsc_helper.h
index fe479dac472..b3828dcd44a 100644
--- a/tests/i915/kms_dsc_helper.h
+++ b/tests/i915/kms_dsc_helper.h
@@ -21,8 +21,6 @@
 #include <fcntl.h>
 #include <termios.h>
 
-#define HDISPLAY_5K	5120
-
 void force_dsc_enable(int drmfd, igt_output_t *output);
 void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int input_bpc);
 void save_force_dsc_en(int drmfd, igt_output_t *output);
-- 
2.40.0

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

* [igt-dev] [i-g-t V4 4/6] tests/kms_invalid_mode: Use helpers from IGT lib
  2023-04-14 13:53 [igt-dev] [i-g-t V4 0/6] Fix Bigjoiner checks Bhanuprakash Modem
                   ` (2 preceding siblings ...)
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 3/6] tests/i915/kms_dsc: Update bigjoiner pipe constraint Bhanuprakash Modem
@ 2023-04-14 13:53 ` Bhanuprakash Modem
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 5/6] tests/kms_flip: Fix Bigjoiner checks Bhanuprakash Modem
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Bhanuprakash Modem @ 2023-04-14 13:53 UTC (permalink / raw)
  To: igt-dev

Instead of writing own logic at test level, use existing IGT
helper to read the max dot clock.

V2: - Rebase

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
---
 tests/kms_invalid_mode.c | 38 +-------------------------------------
 1 file changed, 1 insertion(+), 37 deletions(-)

diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c
index 6ef36d3cc98..ec048305567 100644
--- a/tests/kms_invalid_mode.c
+++ b/tests/kms_invalid_mode.c
@@ -213,42 +213,6 @@ test_output(data_t *data)
 	igt_remove_fb(data->drm_fd, &fb);
 }
 
-static int i915_max_dotclock(data_t *data)
-{
-	char buf[4096];
-	char *s;
-	int dir, res, max_dotclock = 0;
-
-	if (!is_i915_device(data->drm_fd))
-		return 0;
-
-	dir = igt_debugfs_dir(data->drm_fd);
-	igt_require(dir);
-
-	/*
-	 * Display specific clock frequency info is moved to i915_cdclk_info,
-	 * On older kernels if this debugfs is not found, fallback to read from
-	 * i915_frequency_info.
-	 */
-	res = igt_debugfs_simple_read(dir, "i915_cdclk_info",
-				      buf, sizeof(buf));
-	if (res <= 0)
-		res = igt_debugfs_simple_read(dir, "i915_frequency_info",
-					      buf, sizeof(buf));
-	close(dir);
-
-	igt_require(res > 0);
-
-	igt_assert(s = strstr(buf, "Max pixel clock frequency:"));
-	igt_assert_eq(sscanf(s, "Max pixel clock frequency: %d kHz", &max_dotclock), 1);
-
-	/* 100 Mhz to 5 GHz seem like reasonable values to expect */
-	igt_assert_lt(max_dotclock, 5000000);
-	igt_assert_lt(100000, max_dotclock);
-
-	return max_dotclock;
-}
-
 static const struct {
 	const char *name;
 	bool (*adjust_mode)(data_t *data, drmModeModeInfoPtr mode);
@@ -308,7 +272,7 @@ igt_main
 		data.res = drmModeGetResources(data.drm_fd);
 		igt_assert(data.res);
 
-		data.max_dotclock = i915_max_dotclock(&data);
+		data.max_dotclock = igt_get_max_dotclock(data.drm_fd);
 		igt_info("Max dotclock: %d kHz\n", data.max_dotclock);
 	}
 
-- 
2.40.0

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

* [igt-dev] [i-g-t V4 5/6] tests/kms_flip: Fix Bigjoiner checks
  2023-04-14 13:53 [igt-dev] [i-g-t V4 0/6] Fix Bigjoiner checks Bhanuprakash Modem
                   ` (3 preceding siblings ...)
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 4/6] tests/kms_invalid_mode: Use helpers from IGT lib Bhanuprakash Modem
@ 2023-04-14 13:53 ` Bhanuprakash Modem
  2023-04-17  7:30   ` Nautiyal, Ankit K
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 6/6] tests/kms_setmode: " Bhanuprakash Modem
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Bhanuprakash Modem @ 2023-04-14 13:53 UTC (permalink / raw)
  To: igt-dev

Bigjoiner will come in the picture when the resolution > 5K or
clock > max dot-clock. Add a support to check the selected mode
clock is greater than the max dot-clock.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_flip.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 5e82f4a2f84..7cb8749c930 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -81,8 +81,6 @@
 #define RUN_TEST		1
 #define RUN_PAIR		2
 
-#define MAX_HDISPLAY_PER_CRTC 5120
-
 #ifndef DRM_CAP_TIMESTAMP_MONOTONIC
 #define DRM_CAP_TIMESTAMP_MONOTONIC 6
 #endif
@@ -96,6 +94,7 @@ uint32_t devid;
 int test_time = 3;
 static bool monotonic_timestamp;
 static pthread_t vblank_wait_thread;
+static int max_dotclock;
 
 static drmModeConnector *last_connector;
 
@@ -1528,19 +1527,19 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
 	/*
 	 * Handle BW limitations:
 	 *
-	 * if mode.hdisplay > 5120, then ignore
+	 * if mode resolution > 5K (or) mode clock > max_dotclock, then ignore
 	 *  - last crtc in single/multi-connector config
 	 *  - consecutive crtcs in multi-connector config
 	 *
 	 * in multi-connector config ignore if
-	 *  - previous crtc mode.hdisplay > 5120 and
+	 *  - previous crtc (mode resolution > 5K or mode clock > max_dotclock) and
 	 *  - current & previous crtcs are consecutive
 	 */
 	for (i = 0; i < crtc_count; i++) {
-		if (((o->kmode[i].hdisplay > MAX_HDISPLAY_PER_CRTC) &&
+		if ((igt_bigjoiner_possible(&o->kmode[i], max_dotclock) &&
 		     ((crtc_idxs[i] >= (total_crtcs - 1)) ||
 		      ((i < (crtc_count - 1)) && (abs(crtc_idxs[i + 1] - crtc_idxs[i]) <= 1)))) ||
-		    ((i > 0) && (o->kmode[i - 1].hdisplay > MAX_HDISPLAY_PER_CRTC) &&
+		    ((i > 0) && igt_bigjoiner_possible(&o->kmode[i - 1], max_dotclock) &&
 		     (abs(crtc_idxs[i] - crtc_idxs[i - 1]) <= 1))) {
 
 			igt_debug("Combo: %s is not possible with selected mode(s).\n", test_name);
@@ -1822,6 +1821,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)
 			for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++)
 				tests[i].flags &= ~(TEST_CHECK_TS | TEST_VBLANK_EXPIRED_SEQ);
 		}
+		max_dotclock = igt_get_max_dotclock(drm_fd);
 	}
 
 	igt_describe("Tests that nonblocking reading fails correctly");
-- 
2.40.0

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

* [igt-dev] [i-g-t V4 6/6] tests/kms_setmode: Fix Bigjoiner checks
  2023-04-14 13:53 [igt-dev] [i-g-t V4 0/6] Fix Bigjoiner checks Bhanuprakash Modem
                   ` (4 preceding siblings ...)
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 5/6] tests/kms_flip: Fix Bigjoiner checks Bhanuprakash Modem
@ 2023-04-14 13:53 ` Bhanuprakash Modem
  2023-04-17  7:33   ` Nautiyal, Ankit K
  2023-04-14 14:59 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix Bigjoiner checks (rev6) Patchwork
  2023-04-14 21:16 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 1 reply; 12+ messages in thread
From: Bhanuprakash Modem @ 2023-04-14 13:53 UTC (permalink / raw)
  To: igt-dev

Bigjoiner will come in the picture when the resolution > 5K or
clock > max dot-clock. Add a support to check the selected mode
clock is greater than the max dot-clock.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_setmode.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index bfa108916ce..7932a3ec285 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -40,13 +40,12 @@
 /* restricted pipe count */
 #define CRTC_RESTRICT_CNT 2
 
-#define MAX_HDISPLAY_PER_CRTC 5120
-
 static int drm_fd;
 static drmModeRes *drm_resources;
 static int filter_test_id;
 static bool dry_run;
 static bool extended = false;
+static int max_dotclock;
 
 const drmModeModeInfo mode_640_480 = {
 	.name		= "640x480",
@@ -664,18 +663,20 @@ static void test_one_combination(const struct test_config *tconf,
 			struct crtc_config *crtc = &crtcs[i];
 
 			/*
-			 * if mode.hdisplay > 5120, then ignore
+			 * if mode resolution > 5K (or) mode clock > max_dotclock,
+			 * then ignore
 			 *   - last crtc in single/multi-connector config
 			 *   - consecutive crtcs in multi-connector config
 			 *
 			 * in multi-connector config ignore if
-			 *   - previous crtc mode.hdisplay > 5120 and
+			 *   - previous crtc (mode resolution > 5K (or)
+			 *     mode clock > max_dotclock) and
 			 *   - current & previous crtcs are consecutive
 			 */
-			if (((crtc->mode.hdisplay > MAX_HDISPLAY_PER_CRTC) &&
+			if ((igt_bigjoiner_possible(&crtc->mode, max_dotclock) &&
 			     ((crtc->crtc_idx >= (tconf->resources->count_crtcs - 1)) ||
 			      ((i < (crtc_count - 1)) && (abs(crtcs[i + 1].crtc_idx - crtc->crtc_idx) <= 1)))) ||
-			    ((i > 0) && (crtc[i - 1].mode.hdisplay > MAX_HDISPLAY_PER_CRTC) &&
+			    ((i > 0) && igt_bigjoiner_possible(&crtc[i - 1].mode, max_dotclock) &&
 			     (abs(crtc->crtc_idx - crtcs[i - 1].crtc_idx) <= 1))) {
 				igt_info("Combo: %s is not possible with selected mode(s).\n", test_name);
 				goto out;
@@ -954,6 +955,8 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL)
 
 		drm_resources = drmModeGetResources(drm_fd);
 		igt_require(drm_resources);
+
+		max_dotclock = igt_get_max_dotclock(drm_fd);
 	}
 
 	for (i = 0; i < ARRAY_SIZE(tests); i++) {
-- 
2.40.0

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

* [igt-dev] ✓ Fi.CI.BAT: success for Fix Bigjoiner checks (rev6)
  2023-04-14 13:53 [igt-dev] [i-g-t V4 0/6] Fix Bigjoiner checks Bhanuprakash Modem
                   ` (5 preceding siblings ...)
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 6/6] tests/kms_setmode: " Bhanuprakash Modem
@ 2023-04-14 14:59 ` Patchwork
  2023-04-14 21:16 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2023-04-14 14:59 UTC (permalink / raw)
  To: Bhanuprakash Modem; +Cc: igt-dev

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

== Series Details ==

Series: Fix Bigjoiner checks (rev6)
URL   : https://patchwork.freedesktop.org/series/115712/
State : success

== Summary ==

CI Bug Log - changes from IGT_7255 -> IGTPW_8805
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_8805 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_8805, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (38 -> 36)
------------------------------

  Missing    (2): fi-kbl-soraka fi-snb-2520m 

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

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

### IGT changes ###

#### Warnings ####

  * igt@i915_selftest@live@migrate:
    - bat-dg2-11:         [DMESG-WARN][1] ([i915#7699]) -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/bat-dg2-11/igt@i915_selftest@live@migrate.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/bat-dg2-11/igt@i915_selftest@live@migrate.html

  * igt@kms_flip@basic-plain-flip:
    - bat-atsm-1:         [SKIP][3] ([i915#6166]) -> [FAIL][4] +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/bat-atsm-1/igt@kms_flip@basic-plain-flip.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/bat-atsm-1/igt@kms_flip@basic-plain-flip.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s3@smem:
    - bat-rpls-2:         NOTRUN -> [ABORT][5] ([i915#7978])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/bat-rpls-2/igt@gem_exec_suspend@basic-s3@smem.html

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-glk-j4005:       [PASS][6] -> [DMESG-FAIL][7] ([i915#5334])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/fi-glk-j4005/igt@i915_selftest@live@gt_heartbeat.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/fi-glk-j4005/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@requests:
    - bat-rpls-1:         [PASS][8] -> [ABORT][9] ([i915#7911] / [i915#7982])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/bat-rpls-1/igt@i915_selftest@live@requests.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/bat-rpls-1/igt@i915_selftest@live@requests.html

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

  * igt@kms_chamelium_hpd@common-hpd-after-suspend:
    - fi-bsw-n3050:       NOTRUN -> [SKIP][11] ([fdo#109271])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/fi-bsw-n3050/igt@kms_chamelium_hpd@common-hpd-after-suspend.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@execlists:
    - fi-bsw-n3050:       [ABORT][12] ([i915#7911] / [i915#7913]) -> [PASS][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/fi-bsw-n3050/igt@i915_selftest@live@execlists.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/fi-bsw-n3050/igt@i915_selftest@live@execlists.html

  * igt@i915_selftest@live@requests:
    - bat-rpls-2:         [ABORT][14] ([i915#4983] / [i915#7913]) -> [PASS][15]
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/bat-rpls-2/igt@i915_selftest@live@requests.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/bat-rpls-2/igt@i915_selftest@live@requests.html

  * igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1:
    - bat-dg2-8:          [FAIL][16] ([i915#7932]) -> [PASS][17]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#6166]: https://gitlab.freedesktop.org/drm/intel/issues/6166
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
  [i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
  [i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
  [i915#7978]: https://gitlab.freedesktop.org/drm/intel/issues/7978
  [i915#7982]: https://gitlab.freedesktop.org/drm/intel/issues/7982
  [i915#7996]: https://gitlab.freedesktop.org/drm/intel/issues/7996


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7255 -> IGTPW_8805

  CI-20190529: 20190529
  CI_DRM_13007: 3ae391fb66c919cf1fa3711c8852057917b7f5fe @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8805: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/index.html
  IGT_7255: 7f5ef367b536ce059c4dabe8684fcfac1a558609 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for Fix Bigjoiner checks (rev6)
  2023-04-14 13:53 [igt-dev] [i-g-t V4 0/6] Fix Bigjoiner checks Bhanuprakash Modem
                   ` (6 preceding siblings ...)
  2023-04-14 14:59 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix Bigjoiner checks (rev6) Patchwork
@ 2023-04-14 21:16 ` Patchwork
  7 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2023-04-14 21:16 UTC (permalink / raw)
  To: Bhanuprakash Modem; +Cc: igt-dev

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

== Series Details ==

Series: Fix Bigjoiner checks (rev6)
URL   : https://patchwork.freedesktop.org/series/115712/
State : success

== Summary ==

CI Bug Log - changes from IGT_7255_full -> IGTPW_8805_full
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_8805_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_8805_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/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_8805_full:

### IGT changes ###

#### Warnings ####

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt:
    - shard-snb:          [SKIP][1] ([fdo#109271]) -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-snb5/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-snb2/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt.html

  
#### Suppressed ####

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

  * igt@kms_big_joiner@basic:
    - {shard-rkl}:        [SKIP][3] ([i915#2705]) -> [SKIP][4] +1 similar issue
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-rkl-2/igt@kms_big_joiner@basic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-rkl-1/igt@kms_big_joiner@basic.html

  * igt@kms_big_joiner@invalid-modeset:
    - {shard-tglu}:       [SKIP][5] ([i915#2705]) -> [SKIP][6] +2 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-tglu-5/igt@kms_big_joiner@invalid-modeset.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-tglu-5/igt@kms_big_joiner@invalid-modeset.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_barrier_race@remote-request@rcs0:
    - shard-glk:          [PASS][7] -> [ABORT][8] ([i915#8211])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-glk8/igt@gem_barrier_race@remote-request@rcs0.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-glk6/igt@gem_barrier_race@remote-request@rcs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-apl:          [PASS][9] -> [FAIL][10] ([i915#2842])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-apl7/igt@gem_exec_fair@basic-pace-solo@rcs0.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-apl7/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-snb:          NOTRUN -> [WARN][11] ([i915#2658])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-snb7/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_userptr_blits@vma-merge:
    - shard-apl:          NOTRUN -> [FAIL][12] ([i915#3318])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-apl1/igt@gem_userptr_blits@vma-merge.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-apl:          NOTRUN -> [ABORT][13] ([i915#5566])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-apl6/igt@gen9_exec_parse@allowed-single.html

  * igt@i915_module_load@load:
    - shard-snb:          NOTRUN -> [SKIP][14] ([fdo#109271]) +111 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-snb5/igt@i915_module_load@load.html

  * igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_mc_ccs:
    - shard-apl:          NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#3886])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-apl3/igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html

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

  * igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-16bpp-4tile-upscaling@pipe-a-valid-mode:
    - shard-apl:          NOTRUN -> [SKIP][18] ([fdo#109271]) +32 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-apl2/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-16bpp-4tile-upscaling@pipe-a-valid-mode.html

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@preservation-s3@vcs0:
    - shard-apl:          [ABORT][19] ([i915#180]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-apl7/igt@gem_ctx_isolation@preservation-s3@vcs0.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-apl3/igt@gem_ctx_isolation@preservation-s3@vcs0.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-apl:          [FAIL][21] ([i915#2842]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-apl1/igt@gem_exec_fair@basic-none-solo@rcs0.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-apl2/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - {shard-tglu}:       [FAIL][23] ([i915#2842]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-tglu-7/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-tglu-7/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@i915_pm_dc@dc9-dpms:
    - shard-apl:          [SKIP][25] ([fdo#109271]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-apl6/igt@i915_pm_dc@dc9-dpms.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-apl6/igt@i915_pm_dc@dc9-dpms.html

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a:
    - {shard-rkl}:        [SKIP][27] ([i915#1937]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-rkl-4/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-rkl-7/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html
    - {shard-dg1}:        [SKIP][29] ([i915#1937]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-dg1-18/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-dg1-14/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html

  * igt@i915_pm_rpm@dpms-non-lpsp:
    - {shard-rkl}:        [SKIP][31] ([i915#1397]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-rkl-7/igt@i915_pm_rpm@dpms-non-lpsp.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-rkl-1/igt@i915_pm_rpm@dpms-non-lpsp.html

  * igt@i915_pm_rps@engine-order:
    - shard-apl:          [FAIL][33] ([i915#6537]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-apl3/igt@i915_pm_rps@engine-order.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-apl7/igt@i915_pm_rps@engine-order.html

  * igt@i915_pm_rps@reset:
    - shard-snb:          [INCOMPLETE][35] ([i915#7790]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-snb2/igt@i915_pm_rps@reset.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-snb2/igt@i915_pm_rps@reset.html

  * igt@i915_selftest@live@gt_heartbeat:
    - shard-apl:          [DMESG-FAIL][37] ([i915#5334]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-apl6/igt@i915_selftest@live@gt_heartbeat.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-apl1/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@sanitycheck:
    - shard-snb:          [ABORT][39] ([i915#4528]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-snb5/igt@i915_selftest@live@sanitycheck.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-snb4/igt@i915_selftest@live@sanitycheck.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip:
    - {shard-rkl}:        [FAIL][41] ([i915#3743]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7255/shard-rkl-7/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/shard-rkl-4/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip.html

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

  [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#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [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
  [fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
  [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#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
  [i915#1937]: https://gitlab.freedesktop.org/drm/intel/issues/1937
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
  [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#3023]: https://gitlab.freedesktop.org/drm/intel/issues/3023
  [i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
  [i915#3743]: https://gitlab.freedesktop.org/drm/intel/issues/3743
  [i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
  [i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
  [i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
  [i915#426]: https://gitlab.freedesktop.org/drm/intel/issues/426
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
  [i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
  [i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
  [i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
  [i915#4816]: https://gitlab.freedesktop.org/drm/intel/issues/4816
  [i915#4818]: https://gitlab.freedesktop.org/drm/intel/issues/4818
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
  [i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
  [i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
  [i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
  [i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
  [i915#4958]: https://gitlab.freedesktop.org/drm/intel/issues/4958
  [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#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#5431]: https://gitlab.freedesktop.org/drm/intel/issues/5431
  [i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
  [i915#5493]: https://gitlab.freedesktop.org/drm/intel/issues/5493
  [i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
  [i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
  [i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
  [i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
  [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
  [i915#6537]: https://gitlab.freedesktop.org/drm/intel/issues/6537
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
  [i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
  [i915#7790]: https://gitlab.freedesktop.org/drm/intel/issues/7790
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
  [i915#8211]: https://gitlab.freedesktop.org/drm/intel/issues/8211
  [i915#8304]: https://gitlab.freedesktop.org/drm/intel/issues/8304
  [i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7255 -> IGTPW_8805

  CI-20190529: 20190529
  CI_DRM_13007: 3ae391fb66c919cf1fa3711c8852057917b7f5fe @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8805: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8805/index.html
  IGT_7255: 7f5ef367b536ce059c4dabe8684fcfac1a558609 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

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

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

* Re: [igt-dev] [i-g-t V4 2/6] tests/i915/kms_big_joiner: Fix Bigjoiner checks
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 2/6] tests/i915/kms_big_joiner: " Bhanuprakash Modem
@ 2023-04-17  6:45   ` Nautiyal, Ankit K
  0 siblings, 0 replies; 12+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-17  6:45 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev


On 4/14/2023 7:23 PM, Bhanuprakash Modem wrote:
> Bigjoiner will come in the picture when the resolution > 5K or
> clock > max dot-clock. Add a support to check the selected mode
> clock is greater than the max dot-clock.
>
> V2: - Handle both 5k & max dot clock cases
>      - Other minor cleanups
> V3: - Fix the logic to avoid the retry
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/i915/kms_big_joiner.c | 80 ++++++++++++++++++++++---------------
>   1 file changed, 48 insertions(+), 32 deletions(-)
>
> diff --git a/tests/i915/kms_big_joiner.c b/tests/i915/kms_big_joiner.c
> index 8be60ea1176..74639df9d69 100644
> --- a/tests/i915/kms_big_joiner.c
> +++ b/tests/i915/kms_big_joiner.c
> @@ -26,10 +26,13 @@
>   
>   #include "igt.h"
>   
> -#define MAX_HDISPLAY_PER_PIPE 5120
> -
>   IGT_TEST_DESCRIPTION("Test big joiner");
>   
> +struct big_joiner_output {
> +	uint32_t output_id;
> +	drmModeModeInfo mode;
> +};
> +
>   typedef struct {
>   	int drm_fd;
>   	igt_display_t display;
> @@ -37,9 +40,11 @@ typedef struct {
>   	int n_pipes;
>   	enum pipe pipe1;
>   	enum pipe pipe2;
> -	uint32_t big_joiner_output[2];
> +	struct big_joiner_output output[2];

May be not in this patch, but we might need to have consistent naming 
for bigjoiner, so either big_joiner or bigjoiner.

>   } data_t;
>   
> +static int max_dotclock;


I think we can avoid the global variable. Perhaps pass max_dotclock in 
bigjoiner_mode_found() ?

> +
>   static void test_invalid_modeset(data_t *data)
>   {
>   	igt_output_t *output;
> @@ -91,7 +96,7 @@ static void test_basic_modeset(data_t *data)
>   	igt_display_reset(display);
>   
>   	for_each_connected_output(display, output) {
> -		if (data->big_joiner_output[0] == output->id) {
> +		if (data->output[0].output_id == output->id) {
>   			big_joiner_output = output;
>   			break;
>   		}
> @@ -99,9 +104,7 @@ static void test_basic_modeset(data_t *data)
>   
>   	igt_output_set_pipe(big_joiner_output, data->pipe1);
>   
> -	igt_sort_connector_modes(big_joiner_output->config.connector,
> -				 sort_drm_modes_by_res_dsc);
> -	mode = &big_joiner_output->config.connector->modes[0];
> +	mode = &data->output[0].mode;
>   	igt_output_override_mode(big_joiner_output, mode);
>   
>   	pipe = &display->pipes[data->pipe1];
> @@ -130,7 +133,7 @@ static void test_dual_display(data_t *data)
>   	igt_display_reset(display);
>   
>   	for_each_connected_output(display, output) {
> -		if (data->big_joiner_output[count] == output->id) {
> +		if (data->output[count].output_id == output->id) {
>   			big_joiner_output[count] = output;
>   			count++;
>   		}
> @@ -143,9 +146,7 @@ static void test_dual_display(data_t *data)
>   	igt_output_set_pipe(big_joiner_output[1], data->pipe2);
>   
>   	/* Set up first big joiner output on Pipe A*/
> -	igt_sort_connector_modes(big_joiner_output[0]->config.connector,
> -				 sort_drm_modes_by_res_dsc);
> -	mode = &big_joiner_output[0]->config.connector->modes[0];
> +	mode = &data->output[0].mode;
>   	igt_output_override_mode(big_joiner_output[0], mode);
>   
>   	pipe = &display->pipes[data->pipe1];
> @@ -156,9 +157,7 @@ static void test_dual_display(data_t *data)
>   	igt_plane_set_size(plane1, mode->hdisplay, mode->vdisplay);
>   
>   	/* Set up second big joiner output on Pipe C*/
> -	igt_sort_connector_modes(big_joiner_output[1]->config.connector,
> -				 sort_drm_modes_by_res_dsc);
> -	mode = &big_joiner_output[1]->config.connector->modes[0];
> +	mode = &data->output[1].mode;
>   	igt_output_override_mode(big_joiner_output[1], mode);
>   
>   	pipe = &display->pipes[data->pipe2];
> @@ -178,6 +177,16 @@ static void test_dual_display(data_t *data)
>   	igt_display_commit2(display, COMMIT_ATOMIC);
>   }
>   
> +static bool bigjoiner_mode_found(drmModeConnector *connector,
> +				 int (*sort_method)(const void *, const void*),
> +				 drmModeModeInfo *mode)
> +{
> +	igt_sort_connector_modes(connector, sort_method);
> +	*mode = connector->modes[0];
> +
> +	return igt_bigjoiner_possible(mode, max_dotclock);
> +}
> +
>   igt_main
>   {
>   	data_t data;
> @@ -194,13 +203,24 @@ igt_main
>   		igt_display_require(&data.display, data.drm_fd);
>   		igt_require(data.display.is_atomic);
>   
> -		for_each_connected_output(&data.display, output) {
> -			igt_sort_connector_modes(output->config.connector,
> -						 sort_drm_modes_by_res_dsc);
> +		max_dotclock = igt_get_max_dotclock(data.drm_fd);
>   
> -			mode = &output->config.connector->modes[0];
> -			if (mode->hdisplay > MAX_HDISPLAY_PER_PIPE) {
> -				data.big_joiner_output[count++] = output->id;
> +		for_each_connected_output(&data.display, output) {
> +			bool found = false;
> +			drmModeConnector *connector = output->config.connector;
> +
> +			/*
> +			 * Bigjoiner will come in the picture when
> +			 * the resolution > 5K or clock > max-dot-clock.
> +			 */
> +			found = (bigjoiner_mode_found(connector, sort_drm_modes_by_res_dsc, mode) ||
> +				 bigjoiner_mode_found(connector, sort_drm_modes_by_clk_dsc, mode)) ?
> +					true : false;
> +
> +			if (found) {
> +				data.output[count].output_id = output->id;
> +				memcpy(&data.output[count].mode, mode, sizeof(drmModeModeInfo));
> +				count++;
>   
>   				width = max(width, mode->hdisplay);
>   				height = max(height, mode->vdisplay);
> @@ -215,7 +235,7 @@ igt_main
>   			j++;
>   		}
>   
> -		igt_require_f(count > 0, "No output with 5k+ mode found\n");
> +		igt_require_f(count > 0, "No output with 5k+ mode (or) clock > max-dot-clock found\n");
>   
>   		igt_create_pattern_fb(data.drm_fd, width, height, DRM_FORMAT_XRGB8888,
>   				      DRM_FORMAT_MOD_LINEAR, &data.fb);
> @@ -237,14 +257,12 @@ igt_main
>   
>   		igt_display_reset(&data.display);
>   		for_each_connected_output(&data.display, output) {
> -			if (data.big_joiner_output[0] != output->id)
> +			if (data.output[0].output_id != output->id)
>   				continue;
>   
> -			igt_sort_connector_modes(output->config.connector,
> -						 sort_drm_modes_by_res_dsc);
> -
> +			mode = &data.output[0].mode;
>   			igt_output_set_pipe(output, data.pipe1);
> -			igt_output_override_mode(output, &output->config.connector->modes[0]);
> +			igt_output_override_mode(output, mode);
>   
>   			igt_dynamic_f("pipe-%s-%s",
>   				      kmstest_pipe_name(data.pipe1),
> @@ -261,17 +279,15 @@ igt_main
>   
>   				igt_display_reset(&data.display);
>   				for_each_connected_output(&data.display, output) {
> -					igt_sort_connector_modes(output->config.connector,
> -								 sort_drm_modes_by_res_dsc);
> -
> -					if (data.big_joiner_output[0] == output->id) {
> +					if (data.output[0].output_id == output->id) {
>   						first_output = output;
> +						mode = &data.output[0].mode;
> +
>   						igt_output_set_pipe(output, data.pipe1);
> -						igt_output_override_mode(output, &output->config.connector->modes[0]);
> +						igt_output_override_mode(output, mode);
>   					} else if (second_output == NULL) {
>   						second_output = output;
>   						igt_output_set_pipe(output, data.pipe2);
> -						igt_output_override_mode(output, &output->config.connector->modes[0]);

Is this not required? Is it because getting the highest mode on 
second_output doesn't matter, as the modeset on the slave pipe is going 
to fail?


Regards,

Ankit

>   
>   						break;
>   					}

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

* Re: [igt-dev] [i-g-t V4 5/6] tests/kms_flip: Fix Bigjoiner checks
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 5/6] tests/kms_flip: Fix Bigjoiner checks Bhanuprakash Modem
@ 2023-04-17  7:30   ` Nautiyal, Ankit K
  0 siblings, 0 replies; 12+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-17  7:30 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev


On 4/14/2023 7:23 PM, Bhanuprakash Modem wrote:
> Bigjoiner will come in the picture when the resolution > 5K or
> clock > max dot-clock. Add a support to check the selected mode
> clock is greater than the max dot-clock.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/kms_flip.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 5e82f4a2f84..7cb8749c930 100755
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -81,8 +81,6 @@
>   #define RUN_TEST		1
>   #define RUN_PAIR		2
>   
> -#define MAX_HDISPLAY_PER_CRTC 5120
> -
>   #ifndef DRM_CAP_TIMESTAMP_MONOTONIC
>   #define DRM_CAP_TIMESTAMP_MONOTONIC 6
>   #endif
> @@ -96,6 +94,7 @@ uint32_t devid;
>   int test_time = 3;
>   static bool monotonic_timestamp;
>   static pthread_t vblank_wait_thread;
> +static int max_dotclock;
>   
>   static drmModeConnector *last_connector;
>   
> @@ -1528,19 +1527,19 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
>   	/*
>   	 * Handle BW limitations:
>   	 *
> -	 * if mode.hdisplay > 5120, then ignore
> +	 * if mode resolution > 5K (or) mode clock > max_dotclock, then ignore
>   	 *  - last crtc in single/multi-connector config
>   	 *  - consecutive crtcs in multi-connector config
>   	 *
>   	 * in multi-connector config ignore if
> -	 *  - previous crtc mode.hdisplay > 5120 and
> +	 *  - previous crtc (mode resolution > 5K or mode clock > max_dotclock) and
>   	 *  - current & previous crtcs are consecutive
>   	 */
>   	for (i = 0; i < crtc_count; i++) {
> -		if (((o->kmode[i].hdisplay > MAX_HDISPLAY_PER_CRTC) &&
> +		if ((igt_bigjoiner_possible(&o->kmode[i], max_dotclock) &&

Bigjoiner checks are i915 specific, so lets have these checks only if it 
is an i915 device.

Otherwise the patch looks good to me.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>


>   		     ((crtc_idxs[i] >= (total_crtcs - 1)) ||
>   		      ((i < (crtc_count - 1)) && (abs(crtc_idxs[i + 1] - crtc_idxs[i]) <= 1)))) ||
> -		    ((i > 0) && (o->kmode[i - 1].hdisplay > MAX_HDISPLAY_PER_CRTC) &&
> +		    ((i > 0) && igt_bigjoiner_possible(&o->kmode[i - 1], max_dotclock) &&
>   		     (abs(crtc_idxs[i] - crtc_idxs[i - 1]) <= 1))) {
>   
>   			igt_debug("Combo: %s is not possible with selected mode(s).\n", test_name);
> @@ -1822,6 +1821,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)
>   			for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++)
>   				tests[i].flags &= ~(TEST_CHECK_TS | TEST_VBLANK_EXPIRED_SEQ);
>   		}
> +		max_dotclock = igt_get_max_dotclock(drm_fd);
>   	}
>   
>   	igt_describe("Tests that nonblocking reading fails correctly");

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

* Re: [igt-dev] [i-g-t V4 6/6] tests/kms_setmode: Fix Bigjoiner checks
  2023-04-14 13:53 ` [igt-dev] [i-g-t V4 6/6] tests/kms_setmode: " Bhanuprakash Modem
@ 2023-04-17  7:33   ` Nautiyal, Ankit K
  0 siblings, 0 replies; 12+ messages in thread
From: Nautiyal, Ankit K @ 2023-04-17  7:33 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev


On 4/14/2023 7:23 PM, Bhanuprakash Modem wrote:
> Bigjoiner will come in the picture when the resolution > 5K or
> clock > max dot-clock. Add a support to check the selected mode
> clock is greater than the max dot-clock.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/kms_setmode.c | 15 +++++++++------
>   1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
> index bfa108916ce..7932a3ec285 100644
> --- a/tests/kms_setmode.c
> +++ b/tests/kms_setmode.c
> @@ -40,13 +40,12 @@
>   /* restricted pipe count */
>   #define CRTC_RESTRICT_CNT 2
>   
> -#define MAX_HDISPLAY_PER_CRTC 5120
> -
>   static int drm_fd;
>   static drmModeRes *drm_resources;
>   static int filter_test_id;
>   static bool dry_run;
>   static bool extended = false;
> +static int max_dotclock;
>   
>   const drmModeModeInfo mode_640_480 = {
>   	.name		= "640x480",
> @@ -664,18 +663,20 @@ static void test_one_combination(const struct test_config *tconf,
>   			struct crtc_config *crtc = &crtcs[i];
>   
>   			/*
> -			 * if mode.hdisplay > 5120, then ignore
> +			 * if mode resolution > 5K (or) mode clock > max_dotclock,
> +			 * then ignore
>   			 *   - last crtc in single/multi-connector config
>   			 *   - consecutive crtcs in multi-connector config
>   			 *
>   			 * in multi-connector config ignore if
> -			 *   - previous crtc mode.hdisplay > 5120 and
> +			 *   - previous crtc (mode resolution > 5K (or)
> +			 *     mode clock > max_dotclock) and
>   			 *   - current & previous crtcs are consecutive
>   			 */
> -			if (((crtc->mode.hdisplay > MAX_HDISPLAY_PER_CRTC) &&
> +			if ((igt_bigjoiner_possible(&crtc->mode, max_dotclock) &&

As mentioned in other patch as well, lets have the bigjoiner check only 
for i915 case.

Regards,

Ankit


>   			     ((crtc->crtc_idx >= (tconf->resources->count_crtcs - 1)) ||
>   			      ((i < (crtc_count - 1)) && (abs(crtcs[i + 1].crtc_idx - crtc->crtc_idx) <= 1)))) ||
> -			    ((i > 0) && (crtc[i - 1].mode.hdisplay > MAX_HDISPLAY_PER_CRTC) &&
> +			    ((i > 0) && igt_bigjoiner_possible(&crtc[i - 1].mode, max_dotclock) &&
>   			     (abs(crtc->crtc_idx - crtcs[i - 1].crtc_idx) <= 1))) {
>   				igt_info("Combo: %s is not possible with selected mode(s).\n", test_name);
>   				goto out;
> @@ -954,6 +955,8 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL)
>   
>   		drm_resources = drmModeGetResources(drm_fd);
>   		igt_require(drm_resources);
> +
> +		max_dotclock = igt_get_max_dotclock(drm_fd);
>   	}
>   
>   	for (i = 0; i < ARRAY_SIZE(tests); i++) {

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

end of thread, other threads:[~2023-04-17  7:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14 13:53 [igt-dev] [i-g-t V4 0/6] Fix Bigjoiner checks Bhanuprakash Modem
2023-04-14 13:53 ` [igt-dev] [i-g-t V4 1/6] lib/igt_kms: " Bhanuprakash Modem
2023-04-14 13:53 ` [igt-dev] [i-g-t V4 2/6] tests/i915/kms_big_joiner: " Bhanuprakash Modem
2023-04-17  6:45   ` Nautiyal, Ankit K
2023-04-14 13:53 ` [igt-dev] [i-g-t V4 3/6] tests/i915/kms_dsc: Update bigjoiner pipe constraint Bhanuprakash Modem
2023-04-14 13:53 ` [igt-dev] [i-g-t V4 4/6] tests/kms_invalid_mode: Use helpers from IGT lib Bhanuprakash Modem
2023-04-14 13:53 ` [igt-dev] [i-g-t V4 5/6] tests/kms_flip: Fix Bigjoiner checks Bhanuprakash Modem
2023-04-17  7:30   ` Nautiyal, Ankit K
2023-04-14 13:53 ` [igt-dev] [i-g-t V4 6/6] tests/kms_setmode: " Bhanuprakash Modem
2023-04-17  7:33   ` Nautiyal, Ankit K
2023-04-14 14:59 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix Bigjoiner checks (rev6) Patchwork
2023-04-14 21:16 ` [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