All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_multipipe_modeset: Add test to validate max pipe configuration
@ 2020-04-13 10:21 Karthik B S
  2020-04-14 12:10 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Karthik B S @ 2020-04-13 10:21 UTC (permalink / raw)
  To: igt-dev

Added test to validate max pipe configuration for a platform.
In the test, the reference CRC is collected first by doing modeset
on all the outputs individually.Then a simultaneous modeset is
done on all the outputs and the CRC is collected. This is compared
with the reference CRC.

If the number of outputs connected is less than the number of pipes
supported by the platform, then the test skips.

This test is added to verify if the max pipe configuration for a
given platform is working fine. Even though there are other tests
which test multipipe configuration, they test some other functionalities
as well together with multipipe. This is a stand alone test that
intends to only verify simultaneous modeset at the max pipe configuration.

Signed-off-by: Karthik B S <karthik.b.s@intel.com>
---
 tests/Makefile.sources        |   1 +
 tests/kms_multipipe_modeset.c | 180 ++++++++++++++++++++++++++++++++++
 tests/meson.build             |   1 +
 3 files changed, 182 insertions(+)
 create mode 100644 tests/kms_multipipe_modeset.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 4e44c98c..903c5671 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -60,6 +60,7 @@ TESTS_progs = \
 	kms_lease \
 	kms_legacy_colorkey \
 	kms_mmap_write_crc \
+	kms_multipipe_modeset \
 	kms_panel_fitting \
 	kms_pipe_b_c_ivb \
 	kms_pipe_crc_basic \
diff --git a/tests/kms_multipipe_modeset.c b/tests/kms_multipipe_modeset.c
new file mode 100644
index 00000000..11328165
--- /dev/null
+++ b/tests/kms_multipipe_modeset.c
@@ -0,0 +1,180 @@
+/*
+ * Copyright © 2020 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Author:
+ *  Karthik B S <karthik.b.s@intel.com>
+ */
+
+#include "igt.h"
+
+IGT_TEST_DESCRIPTION("Test simultaneous modeset on all the supported pipes");
+
+typedef struct {
+	int drm_fd;
+	igt_display_t display;
+	struct igt_fb fb;
+} data_t;
+
+static void run_test(data_t *data, int valid_outputs)
+{
+	igt_output_t *output;
+	igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
+	igt_crc_t ref_crcs[IGT_MAX_PIPES], new_crcs[IGT_MAX_PIPES];
+	igt_display_t *display = &data->display;
+	int width = 0, height = 0, i, count = 0;
+	int output_to_pipe[valid_outputs];
+	igt_pipe_t *pipe;
+	igt_plane_t *plane;
+	drmModeModeInfo *mode;
+
+	for_each_connected_output(display, output) {
+		mode = igt_output_get_mode(output);
+		igt_assert(mode);
+
+		igt_output_set_pipe(output, PIPE_NONE);
+
+		width = max(width, mode->hdisplay);
+		height = max(height, mode->vdisplay);
+	}
+
+	igt_create_pattern_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE, &data->fb);
+
+	/* Make pipe-ouput mapping which will be used unchanged across the test */
+	for_each_pipe(display, i) {
+		count = 0;
+		for_each_connected_output(display, output) {
+			if (igt_pipe_connector_valid(i, output) &&
+			    output->pending_pipe == PIPE_NONE) {
+				igt_output_set_pipe(output, i);
+				output_to_pipe[count] = i;
+				break;
+			}
+			count++;
+		}
+	}
+
+	/* Collect reference CRC by Committing individually on all outputs*/
+	for_each_pipe(display, i) {
+		pipe = &display->pipes[i];
+		plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+		mode = NULL;
+
+		if (is_i915_device(display->drm_fd))
+			pipe_crcs[i] = igt_pipe_crc_new(display->drm_fd, i,
+							INTEL_PIPE_CRC_SOURCE_AUTO);
+
+		count = 0;
+		for_each_connected_output(display, output) {
+			if (output_to_pipe[count] == pipe->pipe) {
+				igt_output_set_pipe(output, i);
+				mode = igt_output_get_mode(output);
+				igt_assert(mode);
+			} else
+				igt_output_set_pipe(output, PIPE_NONE);
+			count++;
+		}
+
+		igt_plane_set_fb(plane, &data->fb);
+		igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+		igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		igt_pipe_crc_collect_crc(pipe_crcs[i], &ref_crcs[i]);
+	}
+
+	/* Simultaneously commit on all outputs */
+	for_each_pipe(display, i) {
+		pipe = &display->pipes[i];
+		plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+		mode = NULL;
+
+		count = 0;
+		for_each_connected_output(display, output) {
+			if (output_to_pipe[count] == pipe->pipe) {
+				igt_output_set_pipe(output, i);
+				mode = igt_output_get_mode(output);
+				igt_assert(mode);
+				break;
+			}
+			count++;
+		}
+
+		igt_plane_set_fb(plane, &data->fb);
+		igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+		igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+	}
+
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
+	/* CRC Verification */
+	for (count = 0; count < valid_outputs; count++) {
+		igt_pipe_crc_collect_crc(pipe_crcs[count], &new_crcs[count]);
+		igt_assert_crc_equal(&ref_crcs[count], &new_crcs[count]);
+	}
+
+	igt_plane_set_fb(plane, NULL);
+	igt_remove_fb(data->drm_fd, &data->fb);
+}
+
+static void test_multipipe(data_t *data)
+{
+	igt_output_t *output;
+	int valid_outputs = 0, num_pipes;
+
+	num_pipes = igt_display_get_n_pipes(&data->display);
+	for_each_connected_output(&data->display, output)
+		valid_outputs++;
+
+	igt_require_f(valid_outputs == num_pipes,
+		      "Number of connected outputs not equal to the "
+		      "number of pipes supported\n");
+
+	run_test(data, valid_outputs);
+}
+
+igt_main
+{
+	data_t data;
+	drmModeResPtr res;
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
+		kmstest_set_vt_graphics_mode();
+		igt_display_require(&data.display, data.drm_fd);
+
+		res = drmModeGetResources(data.drm_fd);
+		igt_assert(res);
+
+		kmstest_unset_all_crtcs(data.drm_fd, res);
+	}
+
+	igt_describe("Verify if simultaneous modesets on all the supported "
+		     "pipes is successful. Validate using CRC verification");
+	igt_subtest("multipipe-modeset")
+		test_multipipe(&data);
+
+	igt_fixture
+		igt_display_fini(&data.display);
+}
diff --git a/tests/meson.build b/tests/meson.build
index e882f4dc..5044d131 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -44,6 +44,7 @@ test_progs = [
 	'kms_lease',
 	'kms_legacy_colorkey',
 	'kms_mmap_write_crc',
+	'kms_multipipe_modeset',
 	'kms_panel_fitting',
 	'kms_pipe_b_c_ivb',
 	'kms_pipe_crc_basic',
-- 
2.22.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_multipipe_modeset: Add test to validate max pipe configuration
  2020-04-13 10:21 [igt-dev] [PATCH i-g-t] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Karthik B S
@ 2020-04-14 12:10 ` Patchwork
  2020-04-15  8:45 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2020-04-22  8:17 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2020-04-14 12:10 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev

== Series Details ==

Series: tests/kms_multipipe_modeset: Add test to validate max pipe configuration
URL   : https://patchwork.freedesktop.org/series/75876/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8294 -> IGTPW_4452
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Suppressed ####

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

  * {igt@gem_wait@wait@all}:
    - fi-byt-n2820:       [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/fi-byt-n2820/igt@gem_wait@wait@all.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/fi-byt-n2820/igt@gem_wait@wait@all.html

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



Participating hosts (48 -> 44)
------------------------------

  Additional (1): fi-kbl-r 
  Missing    (5): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5589 -> IGTPW_4452

  CI-20190529: 20190529
  CI_DRM_8294: b1631d3c1d7ff53437d9e67f740e2c6057de4fea @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4452: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/index.html
  IGT_5589: 31962324ac86f029e2841e56e97c42cf9d572956 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_multipipe_modeset@multipipe-modeset

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_multipipe_modeset: Add test to validate max pipe configuration
  2020-04-13 10:21 [igt-dev] [PATCH i-g-t] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Karthik B S
  2020-04-14 12:10 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2020-04-15  8:45 ` Patchwork
  2020-04-22  8:17 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2020-04-15  8:45 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev

== Series Details ==

Series: tests/kms_multipipe_modeset: Add test to validate max pipe configuration
URL   : https://patchwork.freedesktop.org/series/75876/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8294_full -> IGTPW_4452_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_multipipe_modeset@multipipe-modeset} (NEW):
    - shard-tglb:         NOTRUN -> [SKIP][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-tglb5/igt@kms_multipipe_modeset@multipipe-modeset.html
    - shard-iclb:         NOTRUN -> [SKIP][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-iclb2/igt@kms_multipipe_modeset@multipipe-modeset.html

  
New tests
---------

  New tests have been introduced between CI_DRM_8294_full and IGTPW_4452_full:

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

  * igt@kms_multipipe_modeset@multipipe-modeset:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_pm_rpm@system-suspend-modeset:
    - shard-glk:          [PASS][3] -> [SKIP][4] ([fdo#109271])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-glk6/igt@i915_pm_rpm@system-suspend-modeset.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-glk1/igt@i915_pm_rpm@system-suspend-modeset.html
    - shard-iclb:         [PASS][5] -> [SKIP][6] ([i915#1316] / [i915#579])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-iclb8/igt@i915_pm_rpm@system-suspend-modeset.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-iclb6/igt@i915_pm_rpm@system-suspend-modeset.html
    - shard-hsw:          [PASS][7] -> [SKIP][8] ([fdo#109271])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-hsw6/igt@i915_pm_rpm@system-suspend-modeset.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-hsw6/igt@i915_pm_rpm@system-suspend-modeset.html
    - shard-tglb:         [PASS][9] -> [SKIP][10] ([i915#1316] / [i915#579])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-tglb5/igt@i915_pm_rpm@system-suspend-modeset.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-tglb6/igt@i915_pm_rpm@system-suspend-modeset.html

  * igt@i915_suspend@sysfs-reader:
    - shard-apl:          [PASS][11] -> [DMESG-WARN][12] ([i915#180]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl1/igt@i915_suspend@sysfs-reader.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-apl1/igt@i915_suspend@sysfs-reader.html

  * igt@kms_big_fb@linear-32bpp-rotate-180:
    - shard-apl:          [PASS][13] -> [FAIL][14] ([i915#1119] / [i915#95])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl6/igt@kms_big_fb@linear-32bpp-rotate-180.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-apl2/igt@kms_big_fb@linear-32bpp-rotate-180.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x21-offscreen:
    - shard-kbl:          [PASS][15] -> [FAIL][16] ([i915#54] / [i915#93] / [i915#95])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-64x21-offscreen.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-kbl3/igt@kms_cursor_crc@pipe-a-cursor-64x21-offscreen.html

  * igt@kms_draw_crc@draw-method-rgb565-blt-ytiled:
    - shard-glk:          [PASS][17] -> [FAIL][18] ([i915#52] / [i915#54]) +4 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-glk1/igt@kms_draw_crc@draw-method-rgb565-blt-ytiled.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-glk4/igt@kms_draw_crc@draw-method-rgb565-blt-ytiled.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-snb:          [PASS][19] -> [DMESG-WARN][20] ([i915#42])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-snb6/igt@kms_fbcon_fbt@fbc-suspend.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-snb6/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-glk:          [PASS][21] -> [FAIL][22] ([i915#79]) +1 similar issue
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-glk9/igt@kms_flip@flip-vs-expired-vblank.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-glk9/igt@kms_flip@flip-vs-expired-vblank.html

  * igt@kms_flip@plain-flip-fb-recreate-interruptible:
    - shard-glk:          [PASS][23] -> [FAIL][24] ([i915#34])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-glk8/igt@kms_flip@plain-flip-fb-recreate-interruptible.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-glk2/igt@kms_flip@plain-flip-fb-recreate-interruptible.html

  * igt@kms_plane_cursor@pipe-a-overlay-size-64:
    - shard-apl:          [PASS][25] -> [FAIL][26] ([i915#1559] / [i915#95])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl4/igt@kms_plane_cursor@pipe-a-overlay-size-64.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-apl3/igt@kms_plane_cursor@pipe-a-overlay-size-64.html
    - shard-kbl:          [PASS][27] -> [FAIL][28] ([i915#1559] / [i915#93] / [i915#95])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-kbl1/igt@kms_plane_cursor@pipe-a-overlay-size-64.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-kbl6/igt@kms_plane_cursor@pipe-a-overlay-size-64.html

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         [PASS][29] -> [SKIP][30] ([fdo#109441]) +2 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-iclb3/igt@kms_psr@psr2_sprite_plane_move.html

  
#### Possible fixes ####

  * igt@gem_exec_balancer@hang:
    - shard-tglb:         [FAIL][31] ([i915#1277]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-tglb1/igt@gem_exec_balancer@hang.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-tglb8/igt@gem_exec_balancer@hang.html

  * igt@gem_exec_params@invalid-bsd-ring:
    - shard-iclb:         [SKIP][33] ([fdo#109276]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-iclb5/igt@gem_exec_params@invalid-bsd-ring.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-iclb4/igt@gem_exec_params@invalid-bsd-ring.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-apl:          [DMESG-WARN][35] ([i915#180]) -> [PASS][36] +2 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl6/igt@gem_workarounds@suspend-resume-context.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-apl6/igt@gem_workarounds@suspend-resume-context.html

  * igt@gem_workarounds@suspend-resume-fd:
    - shard-kbl:          [DMESG-WARN][37] ([i915#180]) -> [PASS][38] +2 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-kbl4/igt@gem_workarounds@suspend-resume-fd.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-kbl6/igt@gem_workarounds@suspend-resume-fd.html

  * igt@gen9_exec_parse@allowed-all:
    - shard-apl:          [DMESG-WARN][39] ([i915#716]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl4/igt@gen9_exec_parse@allowed-all.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-apl2/igt@gen9_exec_parse@allowed-all.html

  * igt@i915_pm_rpm@dpms-lpsp:
    - shard-iclb:         [SKIP][41] ([i915#1316] / [i915#579]) -> [PASS][42] +1 similar issue
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-iclb3/igt@i915_pm_rpm@dpms-lpsp.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-iclb7/igt@i915_pm_rpm@dpms-lpsp.html
    - shard-tglb:         [SKIP][43] ([i915#1316] / [i915#579]) -> [PASS][44] +1 similar issue
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-tglb1/igt@i915_pm_rpm@dpms-lpsp.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-tglb2/igt@i915_pm_rpm@dpms-lpsp.html

  * igt@i915_pm_rpm@sysfs-read:
    - shard-glk:          [SKIP][45] ([fdo#109271]) -> [PASS][46] +1 similar issue
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-glk7/igt@i915_pm_rpm@sysfs-read.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-glk2/igt@i915_pm_rpm@sysfs-read.html

  * igt@kms_draw_crc@draw-method-rgb565-render-ytiled:
    - shard-glk:          [FAIL][47] ([i915#52] / [i915#54]) -> [PASS][48] +3 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-glk8/igt@kms_draw_crc@draw-method-rgb565-render-ytiled.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-glk2/igt@kms_draw_crc@draw-method-rgb565-render-ytiled.html

  * igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled:
    - shard-apl:          [FAIL][49] ([i915#52] / [i915#54] / [i915#95]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl6/igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-apl6/igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled.html

  * igt@kms_mmap_write_crc@main:
    - shard-kbl:          [FAIL][51] ([i915#93] / [i915#95]) -> [PASS][52]
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-kbl7/igt@kms_mmap_write_crc@main.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-kbl4/igt@kms_mmap_write_crc@main.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant:
    - shard-apl:          [FAIL][53] ([fdo#108145] / [i915#265] / [i915#95]) -> [PASS][54] +1 similar issue
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl6/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-apl7/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html

  * igt@kms_psr@no_drrs:
    - shard-iclb:         [FAIL][55] ([i915#173]) -> [PASS][56]
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-iclb1/igt@kms_psr@no_drrs.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-iclb2/igt@kms_psr@no_drrs.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [SKIP][57] ([fdo#109441]) -> [PASS][58] +1 similar issue
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-iclb8/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][59] ([i915#31]) -> [PASS][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl2/igt@kms_setmode@basic.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-apl3/igt@kms_setmode@basic.html
    - shard-hsw:          [FAIL][61] ([i915#31]) -> [PASS][62]
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-hsw6/igt@kms_setmode@basic.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-hsw1/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm:
    - shard-tglb:         [SKIP][63] ([fdo#112015]) -> [PASS][64]
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-tglb1/igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-tglb6/igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm.html
    - shard-hsw:          [SKIP][65] ([fdo#109271]) -> [PASS][66] +1 similar issue
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-hsw1/igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-hsw1/igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm.html
    - shard-iclb:         [SKIP][67] ([fdo#109278]) -> [PASS][68]
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-iclb3/igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-iclb2/igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm.html

  * {igt@perf@blocking-parameterized}:
    - shard-iclb:         [FAIL][69] ([i915#1542]) -> [PASS][70]
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-iclb8/igt@perf@blocking-parameterized.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-iclb4/igt@perf@blocking-parameterized.html

  * igt@perf@gen12-mi-rpc:
    - shard-tglb:         [FAIL][71] ([i915#1085]) -> [PASS][72]
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-tglb5/igt@perf@gen12-mi-rpc.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-tglb7/igt@perf@gen12-mi-rpc.html

  * {igt@perf@polling-parameterized}:
    - shard-hsw:          [FAIL][73] ([i915#1542]) -> [PASS][74]
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-hsw6/igt@perf@polling-parameterized.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-hsw1/igt@perf@polling-parameterized.html

  
#### Warnings ####

  * igt@kms_plane_alpha_blend@pipe-a-alpha-basic:
    - shard-apl:          [FAIL][75] ([fdo#108145] / [i915#265] / [i915#95]) -> [FAIL][76] ([fdo#108145] / [i915#265]) +2 similar issues
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl2/igt@kms_plane_alpha_blend@pipe-a-alpha-basic.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-apl3/igt@kms_plane_alpha_blend@pipe-a-alpha-basic.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
    - shard-kbl:          [FAIL][77] ([fdo#108145] / [i915#265] / [i915#93] / [i915#95]) -> [FAIL][78] ([fdo#108145] / [i915#265]) +1 similar issue
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-kbl6/igt@kms_plane_alpha_blend@pipe-c-alpha-7efc.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-kbl1/igt@kms_plane_alpha_blend@pipe-c-alpha-7efc.html

  * igt@runner@aborted:
    - shard-apl:          ([FAIL][79], [FAIL][80]) ([i915#1423] / [i915#716]) -> [FAIL][81] ([i915#1423])
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl4/igt@runner@aborted.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8294/shard-apl4/igt@runner@aborted.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/shard-apl2/igt@runner@aborted.html

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

  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#112015]: https://bugs.freedesktop.org/show_bug.cgi?id=112015
  [i915#1085]: https://gitlab.freedesktop.org/drm/intel/issues/1085
  [i915#1119]: https://gitlab.freedesktop.org/drm/intel/issues/1119
  [i915#1277]: https://gitlab.freedesktop.org/drm/intel/issues/1277
  [i915#1316]: https://gitlab.freedesktop.org/drm/intel/issues/1316
  [i915#1423]: https://gitlab.freedesktop.org/drm/intel/issues/1423
  [i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
  [i915#1559]: https://gitlab.freedesktop.org/drm/intel/issues/1559
  [i915#173]: https://gitlab.freedesktop.org/drm/intel/issues/173
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
  [i915#42]: https://gitlab.freedesktop.org/drm/intel/issues/42
  [i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#579]: https://gitlab.freedesktop.org/drm/intel/issues/579
  [i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (10 -> 8)
------------------------------

  Missing    (2): pig-skl-6260u pig-glk-j5005 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5589 -> IGTPW_4452
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_8294: b1631d3c1d7ff53437d9e67f740e2c6057de4fea @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4452: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4452/index.html
  IGT_5589: 31962324ac86f029e2841e56e97c42cf9d572956 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t] tests/kms_multipipe_modeset: Add test to validate max pipe configuration
  2020-04-13 10:21 [igt-dev] [PATCH i-g-t] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Karthik B S
  2020-04-14 12:10 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2020-04-15  8:45 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2020-04-22  8:17 ` Petri Latvala
  2020-04-23  9:50   ` Karthik B S
  2 siblings, 1 reply; 6+ messages in thread
From: Petri Latvala @ 2020-04-22  8:17 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev

On Mon, Apr 13, 2020 at 03:51:44PM +0530, Karthik B S wrote:
> Added test to validate max pipe configuration for a platform.
> In the test, the reference CRC is collected first by doing modeset
> on all the outputs individually.Then a simultaneous modeset is
> done on all the outputs and the CRC is collected. This is compared
> with the reference CRC.
> 
> If the number of outputs connected is less than the number of pipes
> supported by the platform, then the test skips.
> 
> This test is added to verify if the max pipe configuration for a
> given platform is working fine. Even though there are other tests
> which test multipipe configuration, they test some other functionalities
> as well together with multipipe. This is a stand alone test that
> intends to only verify simultaneous modeset at the max pipe configuration.
> 
> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
> ---
>  tests/Makefile.sources        |   1 +
>  tests/kms_multipipe_modeset.c | 180 ++++++++++++++++++++++++++++++++++
>  tests/meson.build             |   1 +
>  3 files changed, 182 insertions(+)
>  create mode 100644 tests/kms_multipipe_modeset.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 4e44c98c..903c5671 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -60,6 +60,7 @@ TESTS_progs = \
>  	kms_lease \
>  	kms_legacy_colorkey \
>  	kms_mmap_write_crc \
> +	kms_multipipe_modeset \
>  	kms_panel_fitting \
>  	kms_pipe_b_c_ivb \
>  	kms_pipe_crc_basic \
> diff --git a/tests/kms_multipipe_modeset.c b/tests/kms_multipipe_modeset.c
> new file mode 100644
> index 00000000..11328165
> --- /dev/null
> +++ b/tests/kms_multipipe_modeset.c
> @@ -0,0 +1,180 @@
> +/*
> + * Copyright © 2020 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + *
> + * Author:
> + *  Karthik B S <karthik.b.s@intel.com>
> + */
> +
> +#include "igt.h"
> +
> +IGT_TEST_DESCRIPTION("Test simultaneous modeset on all the supported pipes");
> +
> +typedef struct {
> +	int drm_fd;
> +	igt_display_t display;
> +	struct igt_fb fb;
> +} data_t;
> +
> +static void run_test(data_t *data, int valid_outputs)
> +{
> +	igt_output_t *output;
> +	igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
> +	igt_crc_t ref_crcs[IGT_MAX_PIPES], new_crcs[IGT_MAX_PIPES];
> +	igt_display_t *display = &data->display;
> +	int width = 0, height = 0, i, count = 0;
> +	int output_to_pipe[valid_outputs];
> +	igt_pipe_t *pipe;
> +	igt_plane_t *plane;
> +	drmModeModeInfo *mode;
> +
> +	for_each_connected_output(display, output) {
> +		mode = igt_output_get_mode(output);
> +		igt_assert(mode);
> +
> +		igt_output_set_pipe(output, PIPE_NONE);
> +
> +		width = max(width, mode->hdisplay);
> +		height = max(height, mode->vdisplay);
> +	}
> +
> +	igt_create_pattern_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
> +			      LOCAL_DRM_FORMAT_MOD_NONE, &data->fb);
> +
> +	/* Make pipe-ouput mapping which will be used unchanged across the test */

Typo, pipe-output


> +	for_each_pipe(display, i) {
> +		count = 0;
> +		for_each_connected_output(display, output) {
> +			if (igt_pipe_connector_valid(i, output) &&
> +			    output->pending_pipe == PIPE_NONE) {
> +				igt_output_set_pipe(output, i);
> +				output_to_pipe[count] = i;
> +				break;
> +			}
> +			count++;
> +		}
> +	}
> +
> +	/* Collect reference CRC by Committing individually on all outputs*/
> +	for_each_pipe(display, i) {
> +		pipe = &display->pipes[i];
> +		plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
> +
> +		mode = NULL;
> +
> +		if (is_i915_device(display->drm_fd))
> +			pipe_crcs[i] = igt_pipe_crc_new(display->drm_fd, i,
> +							INTEL_PIPE_CRC_SOURCE_AUTO);
> +
> +		count = 0;
> +		for_each_connected_output(display, output) {
> +			if (output_to_pipe[count] == pipe->pipe) {
> +				igt_output_set_pipe(output, i);
> +				mode = igt_output_get_mode(output);
> +				igt_assert(mode);
> +			} else
> +				igt_output_set_pipe(output, PIPE_NONE);
> +			count++;
> +		}
> +
> +		igt_plane_set_fb(plane, &data->fb);
> +		igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
> +		igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
> +
> +		igt_display_commit2(display, COMMIT_ATOMIC);
> +		igt_pipe_crc_collect_crc(pipe_crcs[i], &ref_crcs[i]);

This will crash on non-i915. igt_pipe_crc_collect_crc needs a non-NULL pipe_crc.


> +	}
> +
> +	/* Simultaneously commit on all outputs */
> +	for_each_pipe(display, i) {
> +		pipe = &display->pipes[i];
> +		plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
> +
> +		mode = NULL;
> +
> +		count = 0;
> +		for_each_connected_output(display, output) {
> +			if (output_to_pipe[count] == pipe->pipe) {
> +				igt_output_set_pipe(output, i);
> +				mode = igt_output_get_mode(output);
> +				igt_assert(mode);
> +				break;
> +			}
> +			count++;
> +		}
> +
> +		igt_plane_set_fb(plane, &data->fb);
> +		igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
> +		igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
> +	}
> +
> +	igt_display_commit2(display, COMMIT_ATOMIC);
> +
> +	/* CRC Verification */
> +	for (count = 0; count < valid_outputs; count++) {
> +		igt_pipe_crc_collect_crc(pipe_crcs[count], &new_crcs[count]);
> +		igt_assert_crc_equal(&ref_crcs[count], &new_crcs[count]);
> +	}
> +
> +	igt_plane_set_fb(plane, NULL);
> +	igt_remove_fb(data->drm_fd, &data->fb);
> +}
> +
> +static void test_multipipe(data_t *data)
> +{
> +	igt_output_t *output;
> +	int valid_outputs = 0, num_pipes;
> +
> +	num_pipes = igt_display_get_n_pipes(&data->display);
> +	for_each_connected_output(&data->display, output)
> +		valid_outputs++;
> +
> +	igt_require_f(valid_outputs == num_pipes,
> +		      "Number of connected outputs not equal to the "
> +		      "number of pipes supported\n");

For debugging aid, please print the numbers as well.




-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests/kms_multipipe_modeset: Add test to validate max pipe configuration
  2020-04-22  8:17 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
@ 2020-04-23  9:50   ` Karthik B S
  2020-04-23 11:14     ` Petri Latvala
  0 siblings, 1 reply; 6+ messages in thread
From: Karthik B S @ 2020-04-23  9:50 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

Thanks a lot for the review.

On 4/22/2020 1:47 PM, Petri Latvala wrote:
> On Mon, Apr 13, 2020 at 03:51:44PM +0530, Karthik B S wrote:
>> Added test to validate max pipe configuration for a platform.
>> In the test, the reference CRC is collected first by doing modeset
>> on all the outputs individually.Then a simultaneous modeset is
>> done on all the outputs and the CRC is collected. This is compared
>> with the reference CRC.
>>
>> If the number of outputs connected is less than the number of pipes
>> supported by the platform, then the test skips.
>>
>> This test is added to verify if the max pipe configuration for a
>> given platform is working fine. Even though there are other tests
>> which test multipipe configuration, they test some other functionalities
>> as well together with multipipe. This is a stand alone test that
>> intends to only verify simultaneous modeset at the max pipe configuration.
>>
>> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
>> ---
>>   tests/Makefile.sources        |   1 +
>>   tests/kms_multipipe_modeset.c | 180 ++++++++++++++++++++++++++++++++++
>>   tests/meson.build             |   1 +
>>   3 files changed, 182 insertions(+)
>>   create mode 100644 tests/kms_multipipe_modeset.c
>>
>> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
>> index 4e44c98c..903c5671 100644
>> --- a/tests/Makefile.sources
>> +++ b/tests/Makefile.sources
>> @@ -60,6 +60,7 @@ TESTS_progs = \
>>   	kms_lease \
>>   	kms_legacy_colorkey \
>>   	kms_mmap_write_crc \
>> +	kms_multipipe_modeset \
>>   	kms_panel_fitting \
>>   	kms_pipe_b_c_ivb \
>>   	kms_pipe_crc_basic \
>> diff --git a/tests/kms_multipipe_modeset.c b/tests/kms_multipipe_modeset.c
>> new file mode 100644
>> index 00000000..11328165
>> --- /dev/null
>> +++ b/tests/kms_multipipe_modeset.c
>> @@ -0,0 +1,180 @@
>> +/*
>> + * Copyright © 2020 Intel Corporation
>> + *
>> + * Permission is hereby granted, free of charge, to any person obtaining a
>> + * copy of this software and associated documentation files (the "Software"),
>> + * to deal in the Software without restriction, including without limitation
>> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
>> + * and/or sell copies of the Software, and to permit persons to whom the
>> + * Software is furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice (including the next
>> + * paragraph) shall be included in all copies or substantial portions of the
>> + * Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
>> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
>> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>> + * IN THE SOFTWARE.
>> + *
>> + * Author:
>> + *  Karthik B S <karthik.b.s@intel.com>
>> + */
>> +
>> +#include "igt.h"
>> +
>> +IGT_TEST_DESCRIPTION("Test simultaneous modeset on all the supported pipes");
>> +
>> +typedef struct {
>> +	int drm_fd;
>> +	igt_display_t display;
>> +	struct igt_fb fb;
>> +} data_t;
>> +
>> +static void run_test(data_t *data, int valid_outputs)
>> +{
>> +	igt_output_t *output;
>> +	igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
>> +	igt_crc_t ref_crcs[IGT_MAX_PIPES], new_crcs[IGT_MAX_PIPES];
>> +	igt_display_t *display = &data->display;
>> +	int width = 0, height = 0, i, count = 0;
>> +	int output_to_pipe[valid_outputs];
>> +	igt_pipe_t *pipe;
>> +	igt_plane_t *plane;
>> +	drmModeModeInfo *mode;
>> +
>> +	for_each_connected_output(display, output) {
>> +		mode = igt_output_get_mode(output);
>> +		igt_assert(mode);
>> +
>> +		igt_output_set_pipe(output, PIPE_NONE);
>> +
>> +		width = max(width, mode->hdisplay);
>> +		height = max(height, mode->vdisplay);
>> +	}
>> +
>> +	igt_create_pattern_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
>> +			      LOCAL_DRM_FORMAT_MOD_NONE, &data->fb);
>> +
>> +	/* Make pipe-ouput mapping which will be used unchanged across the test */
> 
> Typo, pipe-output
> 
Noted. I'll fix this.
> 
>> +	for_each_pipe(display, i) {
>> +		count = 0;
>> +		for_each_connected_output(display, output) {
>> +			if (igt_pipe_connector_valid(i, output) &&
>> +			    output->pending_pipe == PIPE_NONE) {
>> +				igt_output_set_pipe(output, i);
>> +				output_to_pipe[count] = i;
>> +				break;
>> +			}
>> +			count++;
>> +		}
>> +	}
>> +
>> +	/* Collect reference CRC by Committing individually on all outputs*/
>> +	for_each_pipe(display, i) {
>> +		pipe = &display->pipes[i];
>> +		plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
>> +
>> +		mode = NULL;
>> +
>> +		if (is_i915_device(display->drm_fd))
>> +			pipe_crcs[i] = igt_pipe_crc_new(display->drm_fd, i,
>> +							INTEL_PIPE_CRC_SOURCE_AUTO);
>> +
>> +		count = 0;
>> +		for_each_connected_output(display, output) {
>> +			if (output_to_pipe[count] == pipe->pipe) {
>> +				igt_output_set_pipe(output, i);
>> +				mode = igt_output_get_mode(output);
>> +				igt_assert(mode);
>> +			} else
>> +				igt_output_set_pipe(output, PIPE_NONE);
>> +			count++;
>> +		}
>> +
>> +		igt_plane_set_fb(plane, &data->fb);
>> +		igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
>> +		igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
>> +
>> +		igt_display_commit2(display, COMMIT_ATOMIC);
>> +		igt_pipe_crc_collect_crc(pipe_crcs[i], &ref_crcs[i]);
> 
> This will crash on non-i915. igt_pipe_crc_collect_crc needs a non-NULL pipe_crc.
> 
Could you please suggest how I can handle this?
Does it mean I'll have to make the test Intel specific?
> 
>> +	}
>> +
>> +	/* Simultaneously commit on all outputs */
>> +	for_each_pipe(display, i) {
>> +		pipe = &display->pipes[i];
>> +		plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
>> +
>> +		mode = NULL;
>> +
>> +		count = 0;
>> +		for_each_connected_output(display, output) {
>> +			if (output_to_pipe[count] == pipe->pipe) {
>> +				igt_output_set_pipe(output, i);
>> +				mode = igt_output_get_mode(output);
>> +				igt_assert(mode);
>> +				break;
>> +			}
>> +			count++;
>> +		}
>> +
>> +		igt_plane_set_fb(plane, &data->fb);
>> +		igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
>> +		igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
>> +	}
>> +
>> +	igt_display_commit2(display, COMMIT_ATOMIC);
>> +
>> +	/* CRC Verification */
>> +	for (count = 0; count < valid_outputs; count++) {
>> +		igt_pipe_crc_collect_crc(pipe_crcs[count], &new_crcs[count]);
>> +		igt_assert_crc_equal(&ref_crcs[count], &new_crcs[count]);
>> +	}
>> +
>> +	igt_plane_set_fb(plane, NULL);
>> +	igt_remove_fb(data->drm_fd, &data->fb);
>> +}
>> +
>> +static void test_multipipe(data_t *data)
>> +{
>> +	igt_output_t *output;
>> +	int valid_outputs = 0, num_pipes;
>> +
>> +	num_pipes = igt_display_get_n_pipes(&data->display);
>> +	for_each_connected_output(&data->display, output)
>> +		valid_outputs++;
>> +
>> +	igt_require_f(valid_outputs == num_pipes,
>> +		      "Number of connected outputs not equal to the "
>> +		      "number of pipes supported\n");
> 
> For debugging aid, please print the numbers as well.
> 
Sure I'll update this.

Thanks,
Karthik
> 
> 
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests/kms_multipipe_modeset: Add test to validate max pipe configuration
  2020-04-23  9:50   ` Karthik B S
@ 2020-04-23 11:14     ` Petri Latvala
  0 siblings, 0 replies; 6+ messages in thread
From: Petri Latvala @ 2020-04-23 11:14 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev

On Thu, Apr 23, 2020 at 03:20:34PM +0530, Karthik B S wrote:
> Thanks a lot for the review.
> 
> On 4/22/2020 1:47 PM, Petri Latvala wrote:
> > On Mon, Apr 13, 2020 at 03:51:44PM +0530, Karthik B S wrote:
> > > Added test to validate max pipe configuration for a platform.
> > > In the test, the reference CRC is collected first by doing modeset
> > > on all the outputs individually.Then a simultaneous modeset is
> > > done on all the outputs and the CRC is collected. This is compared
> > > with the reference CRC.
> > > 
> > > If the number of outputs connected is less than the number of pipes
> > > supported by the platform, then the test skips.
> > > 
> > > This test is added to verify if the max pipe configuration for a
> > > given platform is working fine. Even though there are other tests
> > > which test multipipe configuration, they test some other functionalities
> > > as well together with multipipe. This is a stand alone test that
> > > intends to only verify simultaneous modeset at the max pipe configuration.
> > > 
> > > Signed-off-by: Karthik B S <karthik.b.s@intel.com>
> > > ---
> > >   tests/Makefile.sources        |   1 +
> > >   tests/kms_multipipe_modeset.c | 180 ++++++++++++++++++++++++++++++++++
> > >   tests/meson.build             |   1 +
> > >   3 files changed, 182 insertions(+)
> > >   create mode 100644 tests/kms_multipipe_modeset.c
> > > 
> > > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > > index 4e44c98c..903c5671 100644
> > > --- a/tests/Makefile.sources
> > > +++ b/tests/Makefile.sources
> > > @@ -60,6 +60,7 @@ TESTS_progs = \
> > >   	kms_lease \
> > >   	kms_legacy_colorkey \
> > >   	kms_mmap_write_crc \
> > > +	kms_multipipe_modeset \
> > >   	kms_panel_fitting \
> > >   	kms_pipe_b_c_ivb \
> > >   	kms_pipe_crc_basic \
> > > diff --git a/tests/kms_multipipe_modeset.c b/tests/kms_multipipe_modeset.c
> > > new file mode 100644
> > > index 00000000..11328165
> > > --- /dev/null
> > > +++ b/tests/kms_multipipe_modeset.c
> > > @@ -0,0 +1,180 @@
> > > +/*
> > > + * Copyright © 2020 Intel Corporation
> > > + *
> > > + * Permission is hereby granted, free of charge, to any person obtaining a
> > > + * copy of this software and associated documentation files (the "Software"),
> > > + * to deal in the Software without restriction, including without limitation
> > > + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > + * and/or sell copies of the Software, and to permit persons to whom the
> > > + * Software is furnished to do so, subject to the following conditions:
> > > + *
> > > + * The above copyright notice and this permission notice (including the next
> > > + * paragraph) shall be included in all copies or substantial portions of the
> > > + * Software.
> > > + *
> > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> > > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> > > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> > > + * IN THE SOFTWARE.
> > > + *
> > > + * Author:
> > > + *  Karthik B S <karthik.b.s@intel.com>
> > > + */
> > > +
> > > +#include "igt.h"
> > > +
> > > +IGT_TEST_DESCRIPTION("Test simultaneous modeset on all the supported pipes");
> > > +
> > > +typedef struct {
> > > +	int drm_fd;
> > > +	igt_display_t display;
> > > +	struct igt_fb fb;
> > > +} data_t;
> > > +
> > > +static void run_test(data_t *data, int valid_outputs)
> > > +{
> > > +	igt_output_t *output;
> > > +	igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
> > > +	igt_crc_t ref_crcs[IGT_MAX_PIPES], new_crcs[IGT_MAX_PIPES];
> > > +	igt_display_t *display = &data->display;
> > > +	int width = 0, height = 0, i, count = 0;
> > > +	int output_to_pipe[valid_outputs];
> > > +	igt_pipe_t *pipe;
> > > +	igt_plane_t *plane;
> > > +	drmModeModeInfo *mode;
> > > +
> > > +	for_each_connected_output(display, output) {
> > > +		mode = igt_output_get_mode(output);
> > > +		igt_assert(mode);
> > > +
> > > +		igt_output_set_pipe(output, PIPE_NONE);
> > > +
> > > +		width = max(width, mode->hdisplay);
> > > +		height = max(height, mode->vdisplay);
> > > +	}
> > > +
> > > +	igt_create_pattern_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
> > > +			      LOCAL_DRM_FORMAT_MOD_NONE, &data->fb);
> > > +
> > > +	/* Make pipe-ouput mapping which will be used unchanged across the test */
> > 
> > Typo, pipe-output
> > 
> Noted. I'll fix this.
> > 
> > > +	for_each_pipe(display, i) {
> > > +		count = 0;
> > > +		for_each_connected_output(display, output) {
> > > +			if (igt_pipe_connector_valid(i, output) &&
> > > +			    output->pending_pipe == PIPE_NONE) {
> > > +				igt_output_set_pipe(output, i);
> > > +				output_to_pipe[count] = i;
> > > +				break;
> > > +			}
> > > +			count++;
> > > +		}
> > > +	}
> > > +
> > > +	/* Collect reference CRC by Committing individually on all outputs*/
> > > +	for_each_pipe(display, i) {
> > > +		pipe = &display->pipes[i];
> > > +		plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
> > > +
> > > +		mode = NULL;
> > > +
> > > +		if (is_i915_device(display->drm_fd))
> > > +			pipe_crcs[i] = igt_pipe_crc_new(display->drm_fd, i,
> > > +							INTEL_PIPE_CRC_SOURCE_AUTO);
> > > +
> > > +		count = 0;
> > > +		for_each_connected_output(display, output) {
> > > +			if (output_to_pipe[count] == pipe->pipe) {
> > > +				igt_output_set_pipe(output, i);
> > > +				mode = igt_output_get_mode(output);
> > > +				igt_assert(mode);
> > > +			} else
> > > +				igt_output_set_pipe(output, PIPE_NONE);
> > > +			count++;
> > > +		}
> > > +
> > > +		igt_plane_set_fb(plane, &data->fb);
> > > +		igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
> > > +		igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
> > > +
> > > +		igt_display_commit2(display, COMMIT_ATOMIC);
> > > +		igt_pipe_crc_collect_crc(pipe_crcs[i], &ref_crcs[i]);
> > 
> > This will crash on non-i915. igt_pipe_crc_collect_crc needs a non-NULL pipe_crc.
> > 
> Could you please suggest how I can handle this?
> Does it mean I'll have to make the test Intel specific?

No, you just need to make sure i915 and non-i915 take non-crashing paths.

If the test is absolutely useless without crc support, do the crc handling
unconditionally, but call igt_require_pipe_crc() first.

If the test is somewhat useful without crc support, add the
is_i915_device() check for both the creation of the object and the
collecting as well. Although the check should be something like
igt_has_pipe_crc(), which doesn't exist...

I prefer the igt_require_pipe_crc() option myself.


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2020-04-23 11:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 10:21 [igt-dev] [PATCH i-g-t] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Karthik B S
2020-04-14 12:10 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-04-15  8:45 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-04-22  8:17 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
2020-04-23  9:50   ` Karthik B S
2020-04-23 11:14     ` Petri Latvala

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.