public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration
@ 2020-04-24  7:05 Karthik B S
  2020-04-24  7:59 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_multipipe_modeset: Add test to validate max pipe configuration (rev2) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Karthik B S @ 2020-04-24  7:05 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

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.

v2: -Fix Typo in comment (Petri)
    -Use igt_require_pipe_crc() to prevent crash in non i915 case (Petri)
    -Print the number of outputs and pipes in igt_require() for
     debugging aid (Petri)

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

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 32cbbf4f..c450fa0e 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -61,6 +61,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..e1d292ee
--- /dev/null
+++ b/tests/kms_multipipe_modeset.c
@@ -0,0 +1,181 @@
+/*
+ * 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-output 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;
+
+		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(%d) not equal to the "
+		      "number of pipes supported(%d)\n", valid_outputs, num_pipes);
+
+	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_require_pipe_crc(data.drm_fd);
+		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 0bdcfbe4..88e4875b 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -45,6 +45,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 (rev2)
  2020-04-24  7:05 [igt-dev] [PATCH i-g-t v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Karthik B S
@ 2020-04-24  7:59 ` Patchwork
  2020-04-24  8:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2020-04-24  9:12 ` [igt-dev] [PATCH i-g-t v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Petri Latvala
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2020-04-24  7:59 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_8357 -> IGTPW_4505
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Possible fixes ####

  * igt@i915_selftest@live@sanitycheck:
    - fi-bwr-2160:        [INCOMPLETE][1] ([i915#489]) -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/fi-bwr-2160/igt@i915_selftest@live@sanitycheck.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/fi-bwr-2160/igt@i915_selftest@live@sanitycheck.html

  * {igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1}:
    - fi-bsw-kefka:       [FAIL][3] ([i915#34]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/fi-bsw-kefka/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/fi-bsw-kefka/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html

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

  [i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
  [i915#489]: https://gitlab.freedesktop.org/drm/intel/issues/489


Participating hosts (49 -> 42)
------------------------------

  Missing    (7): fi-ehl-1 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5609 -> IGTPW_4505

  CI-20190529: 20190529
  CI_DRM_8357: 95fef3b4fb9f6c72d65af138cdffb68e0f062910 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4505: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/index.html
  IGT_5609: c100fe19f7b144538549415e8503093053883ec6 @ 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_4505/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 (rev2)
  2020-04-24  7:05 [igt-dev] [PATCH i-g-t v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Karthik B S
  2020-04-24  7:59 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_multipipe_modeset: Add test to validate max pipe configuration (rev2) Patchwork
@ 2020-04-24  8:58 ` Patchwork
  2020-04-24  9:12 ` [igt-dev] [PATCH i-g-t v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Petri Latvala
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2020-04-24  8:58 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_8357_full -> IGTPW_4505_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

  Here are the unknown changes that may have been introduced in IGTPW_4505_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_4505/shard-tglb2/igt@kms_multipipe_modeset@multipipe-modeset.html
    - shard-iclb:         NOTRUN -> [SKIP][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-iclb8/igt@kms_multipipe_modeset@multipipe-modeset.html

  
New tests
---------

  New tests have been introduced between CI_DRM_8357_full and IGTPW_4505_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_4505_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_persistence@engines-mixed-process@vcs1:
    - shard-tglb:         [PASS][3] -> [FAIL][4] ([i915#1528])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-tglb8/igt@gem_ctx_persistence@engines-mixed-process@vcs1.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-tglb5/igt@gem_ctx_persistence@engines-mixed-process@vcs1.html

  * igt@gem_ctx_ringsize@idle@bcs0:
    - shard-glk:          [PASS][5] -> [INCOMPLETE][6] ([i915#58] / [k.org#198133])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-glk1/igt@gem_ctx_ringsize@idle@bcs0.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-glk5/igt@gem_ctx_ringsize@idle@bcs0.html

  * igt@gem_softpin@noreloc-s3:
    - shard-kbl:          [PASS][7] -> [DMESG-WARN][8] ([i915#180])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl1/igt@gem_softpin@noreloc-s3.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl1/igt@gem_softpin@noreloc-s3.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x42-sliding:
    - shard-apl:          [PASS][9] -> [FAIL][10] ([i915#54] / [i915#95])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl3/igt@kms_cursor_crc@pipe-a-cursor-128x42-sliding.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl1/igt@kms_cursor_crc@pipe-a-cursor-128x42-sliding.html

  * igt@kms_cursor_crc@pipe-b-cursor-suspend:
    - shard-apl:          [PASS][11] -> [DMESG-WARN][12] ([i915#180])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl7/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl1/igt@kms_cursor_crc@pipe-b-cursor-suspend.html

  * igt@kms_cursor_edge_walk@pipe-a-64x64-bottom-edge:
    - shard-kbl:          [PASS][13] -> [FAIL][14] ([i915#70] / [i915#93] / [i915#95])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl4/igt@kms_cursor_edge_walk@pipe-a-64x64-bottom-edge.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl7/igt@kms_cursor_edge_walk@pipe-a-64x64-bottom-edge.html

  * igt@kms_draw_crc@draw-method-rgb565-pwrite-untiled:
    - shard-glk:          [PASS][15] -> [FAIL][16] ([i915#177] / [i915#52] / [i915#54])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-glk4/igt@kms_draw_crc@draw-method-rgb565-pwrite-untiled.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-glk9/igt@kms_draw_crc@draw-method-rgb565-pwrite-untiled.html

  * igt@kms_draw_crc@draw-method-rgb565-pwrite-ytiled:
    - shard-glk:          [PASS][17] -> [FAIL][18] ([i915#52] / [i915#54]) +3 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-glk8/igt@kms_draw_crc@draw-method-rgb565-pwrite-ytiled.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-glk8/igt@kms_draw_crc@draw-method-rgb565-pwrite-ytiled.html

  * igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled:
    - shard-apl:          [PASS][19] -> [FAIL][20] ([i915#52] / [i915#54] / [i915#95])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl1/igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl7/igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled.html
    - shard-kbl:          [PASS][21] -> [FAIL][22] ([i915#177] / [i915#52] / [i915#54] / [i915#93] / [i915#95])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl2/igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl2/igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled.html

  * igt@kms_flip_tiling@flip-changes-tiling-yf:
    - shard-kbl:          [PASS][23] -> [FAIL][24] ([i915#699] / [i915#93] / [i915#95])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl2/igt@kms_flip_tiling@flip-changes-tiling-yf.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl6/igt@kms_flip_tiling@flip-changes-tiling-yf.html
    - shard-apl:          [PASS][25] -> [FAIL][26] ([i915#95])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl7/igt@kms_flip_tiling@flip-changes-tiling-yf.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl1/igt@kms_flip_tiling@flip-changes-tiling-yf.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          [PASS][27] -> [DMESG-WARN][28] ([i915#180] / [i915#93] / [i915#95])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
    - shard-kbl:          [PASS][29] -> [FAIL][30] ([fdo#108145] / [i915#265] / [i915#93] / [i915#95])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl1/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl3/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
    - shard-apl:          [PASS][31] -> [FAIL][32] ([fdo#108145] / [i915#265] / [i915#95])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl3/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl8/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html

  * igt@kms_psr@psr2_sprite_mmap_cpu:
    - shard-iclb:         [PASS][33] -> [SKIP][34] ([fdo#109441])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-iclb8/igt@kms_psr@psr2_sprite_mmap_cpu.html

  
#### Possible fixes ####

  * igt@gem_exec_params@invalid-bsd-ring:
    - shard-iclb:         [SKIP][35] ([fdo#109276]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-iclb7/igt@gem_exec_params@invalid-bsd-ring.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-iclb2/igt@gem_exec_params@invalid-bsd-ring.html

  * igt@i915_pm_rps@waitboost:
    - shard-glk:          [FAIL][37] ([i915#39]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-glk1/igt@i915_pm_rps@waitboost.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-glk8/igt@i915_pm_rps@waitboost.html

  * igt@kms_big_fb@linear-32bpp-rotate-180:
    - shard-apl:          [FAIL][39] ([i915#1119] / [i915#95]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl4/igt@kms_big_fb@linear-32bpp-rotate-180.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl2/igt@kms_big_fb@linear-32bpp-rotate-180.html
    - shard-kbl:          [FAIL][41] ([i915#1119] / [i915#93] / [i915#95]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl2/igt@kms_big_fb@linear-32bpp-rotate-180.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl6/igt@kms_big_fb@linear-32bpp-rotate-180.html

  * igt@kms_color@pipe-a-ctm-max:
    - shard-kbl:          [FAIL][43] ([i915#168] / [i915#93] / [i915#95]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl2/igt@kms_color@pipe-a-ctm-max.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl7/igt@kms_color@pipe-a-ctm-max.html
    - shard-apl:          [FAIL][45] ([i915#168] / [i915#95]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl4/igt@kms_color@pipe-a-ctm-max.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl7/igt@kms_color@pipe-a-ctm-max.html
    - shard-glk:          [FAIL][47] ([i915#168]) -> [PASS][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-glk9/igt@kms_color@pipe-a-ctm-max.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-glk4/igt@kms_color@pipe-a-ctm-max.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x21-sliding:
    - shard-apl:          [FAIL][49] ([i915#54] / [i915#95]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl7/igt@kms_cursor_crc@pipe-a-cursor-64x21-sliding.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl2/igt@kms_cursor_crc@pipe-a-cursor-64x21-sliding.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x64-random:
    - shard-kbl:          [FAIL][51] ([i915#54] / [i915#93] / [i915#95]) -> [PASS][52]
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-64x64-random.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-64x64-random.html

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
    - shard-glk:          [FAIL][53] ([i915#72]) -> [PASS][54]
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-glk7/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-glk4/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html

  * igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-untiled:
    - shard-glk:          [FAIL][55] ([i915#52] / [i915#54]) -> [PASS][56] +1 similar issue
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-glk9/igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-untiled.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-glk4/igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-untiled.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          [FAIL][57] ([i915#53] / [i915#93] / [i915#95]) -> [PASS][58]
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl4/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
    - shard-apl:          [FAIL][59] ([i915#53] / [i915#95]) -> [PASS][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl4/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl1/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
    - shard-apl:          [DMESG-WARN][61] ([i915#180]) -> [PASS][62] +3 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant:
    - shard-apl:          [FAIL][63] ([fdo#108145] / [i915#265] / [i915#95]) -> [PASS][64]
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl7/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl8/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html

  * igt@kms_plane_cursor@pipe-a-viewport-size-256:
    - shard-apl:          [FAIL][65] ([i915#1559] / [i915#95]) -> [PASS][66]
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl8/igt@kms_plane_cursor@pipe-a-viewport-size-256.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl8/igt@kms_plane_cursor@pipe-a-viewport-size-256.html
    - shard-kbl:          [FAIL][67] ([i915#1559] / [i915#93] / [i915#95]) -> [PASS][68]
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl3/igt@kms_plane_cursor@pipe-a-viewport-size-256.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl7/igt@kms_plane_cursor@pipe-a-viewport-size-256.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-glk:          [FAIL][69] ([i915#899]) -> [PASS][70]
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-glk1/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-glk9/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-iclb:         [SKIP][71] ([fdo#109642] / [fdo#111068]) -> [PASS][72]
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-iclb6/igt@kms_psr2_su@frontbuffer.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-iclb2/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         [SKIP][73] ([fdo#109441]) -> [PASS][74] +1 similar issue
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-iclb1/igt@kms_psr@psr2_no_drrs.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

  * igt@kms_vblank@pipe-b-ts-continuation-suspend:
    - shard-apl:          [DMESG-WARN][75] ([i915#180] / [i915#95]) -> [PASS][76]
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl1/igt@kms_vblank@pipe-b-ts-continuation-suspend.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl3/igt@kms_vblank@pipe-b-ts-continuation-suspend.html

  * igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
    - shard-kbl:          [INCOMPLETE][77] ([i915#155]) -> [PASS][78]
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl3/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl4/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html

  * {igt@perf@blocking-parameterized}:
    - shard-iclb:         [FAIL][79] ([i915#1542]) -> [PASS][80]
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-iclb8/igt@perf@blocking-parameterized.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-iclb3/igt@perf@blocking-parameterized.html

  
#### Warnings ####

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-iclb:         [SKIP][81] ([i915#588]) -> [SKIP][82] ([i915#658])
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-iclb5/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@i915_pm_dc@dc6-psr:
    - shard-tglb:         [FAIL][83] ([i915#454]) -> [SKIP][84] ([i915#468])
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-tglb5/igt@i915_pm_dc@dc6-psr.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-tglb2/igt@i915_pm_dc@dc6-psr.html

  * igt@kms_content_protection@uevent:
    - shard-kbl:          [FAIL][85] ([i915#357] / [i915#93] / [i915#95]) -> [FAIL][86] ([i915#357])
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl1/igt@kms_content_protection@uevent.html
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl3/igt@kms_content_protection@uevent.html
    - shard-apl:          [FAIL][87] ([i915#357] / [i915#95]) -> [FAIL][88] ([i915#357])
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl8/igt@kms_content_protection@uevent.html
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl6/igt@kms_content_protection@uevent.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-apl:          [FAIL][89] ([i915#95]) -> [DMESG-FAIL][90] ([i915#180] / [i915#95])
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl1/igt@kms_fbcon_fbt@fbc-suspend.html
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl8/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
    - shard-apl:          [FAIL][91] ([fdo#108145] / [i915#265]) -> [FAIL][92] ([fdo#108145] / [i915#265] / [i915#95])
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-apl2/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max.html
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-apl3/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max.html

  * igt@kms_setmode@basic:
    - shard-kbl:          [FAIL][93] ([i915#31]) -> [FAIL][94] ([i915#31] / [i915#93] / [i915#95])
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8357/shard-kbl2/igt@kms_setmode@basic.html
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/shard-kbl4/igt@kms_setmode@basic.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#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [i915#1119]: https://gitlab.freedesktop.org/drm/intel/issues/1119
  [i915#1528]: https://gitlab.freedesktop.org/drm/intel/issues/1528
  [i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
  [i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
  [i915#1559]: https://gitlab.freedesktop.org/drm/intel/issues/1559
  [i915#168]: https://gitlab.freedesktop.org/drm/intel/issues/168
  [i915#177]: https://gitlab.freedesktop.org/drm/intel/issues/177
  [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#357]: https://gitlab.freedesktop.org/drm/intel/issues/357
  [i915#39]: https://gitlab.freedesktop.org/drm/intel/issues/39
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
  [i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
  [i915#53]: https://gitlab.freedesktop.org/drm/intel/issues/53
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#58]: https://gitlab.freedesktop.org/drm/intel/issues/58
  [i915#588]: https://gitlab.freedesktop.org/drm/intel/issues/588
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#699]: https://gitlab.freedesktop.org/drm/intel/issues/699
  [i915#70]: https://gitlab.freedesktop.org/drm/intel/issues/70
  [i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
  [i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899
  [i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


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

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


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5609 -> IGTPW_4505
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_8357: 95fef3b4fb9f6c72d65af138cdffb68e0f062910 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4505: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4505/index.html
  IGT_5609: c100fe19f7b144538549415e8503093053883ec6 @ 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_4505/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 v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration
  2020-04-24  7:05 [igt-dev] [PATCH i-g-t v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Karthik B S
  2020-04-24  7:59 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_multipipe_modeset: Add test to validate max pipe configuration (rev2) Patchwork
  2020-04-24  8:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2020-04-24  9:12 ` Petri Latvala
  2020-04-24  9:42   ` Nautiyal, Ankit K
  2 siblings, 1 reply; 6+ messages in thread
From: Petri Latvala @ 2020-04-24  9:12 UTC (permalink / raw)
  To: Karthik B S; +Cc: igt-dev

On Fri, Apr 24, 2020 at 12:35:28PM +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.
> 
> v2: -Fix Typo in comment (Petri)
>     -Use igt_require_pipe_crc() to prevent crash in non i915 case (Petri)
>     -Print the number of outputs and pipes in igt_require() for
>      debugging aid (Petri)
> 
> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
> ---
>  tests/Makefile.sources        |   1 +
>  tests/kms_multipipe_modeset.c | 181 ++++++++++++++++++++++++++++++++++
>  tests/meson.build             |   1 +
>  3 files changed, 183 insertions(+)
>  create mode 100644 tests/kms_multipipe_modeset.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 32cbbf4f..c450fa0e 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -61,6 +61,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..e1d292ee
> --- /dev/null
> +++ b/tests/kms_multipipe_modeset.c
> @@ -0,0 +1,181 @@
> +/*
> + * 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-output 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;
> +
> +		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(%d) not equal to the "
> +		      "number of pipes supported(%d)\n", valid_outputs, num_pipes);
> +
> +	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_require_pipe_crc(data.drm_fd);
> +		igt_display_require(&data.display, data.drm_fd);
> +
> +		res = drmModeGetResources(data.drm_fd);

Hmm, assigning to a local variable in an igt_fixture... But it's not
read outside it, this is fine.

> +		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);

This test binary is already called kms_multipipe_modeset, I wonder if
we can find a better name for it, considering we might want to add
more later.

"basic-crc-check" ?

Otherwise the patch LGTM.
Reviewed-by: Petri Latvala <petri.latvala@intel.com>


> +
> +	igt_fixture
> +		igt_display_fini(&data.display);
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index 0bdcfbe4..88e4875b 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -45,6 +45,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	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration
  2020-04-24  9:12 ` [igt-dev] [PATCH i-g-t v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Petri Latvala
@ 2020-04-24  9:42   ` Nautiyal, Ankit K
  2020-04-27  9:31     ` Nautiyal, Ankit K
  0 siblings, 1 reply; 6+ messages in thread
From: Nautiyal, Ankit K @ 2020-04-24  9:42 UTC (permalink / raw)
  To: Petri Latvala, Karthik B S; +Cc: igt-dev

Hi Karthik,

Thanks for the patch. Overall the patch looks good to me.

Only a small concern I have is that when the commit fails due to not 
sufficient bandwidth, due to perhaps, high resolution displays

connected. So it might be that the 'n' displays are supported, but 
perhaps not with the given resolutions.

The test in that case might fail due to "EINVAL".

Trying with try_commit by changing resolution is a solution but might be 
an overkill.

Perhaps trying with lowest mode would be better, if we just want to 
check if all pipes are coming up simultaneously.

Again this is just a specific scenario with high resolution displays 
connected, which the platform might not support.

Regards,

Ankit

On 4/24/2020 2:42 PM, Petri Latvala wrote:
> On Fri, Apr 24, 2020 at 12:35:28PM +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.
>>
>> v2: -Fix Typo in comment (Petri)
>>      -Use igt_require_pipe_crc() to prevent crash in non i915 case (Petri)
>>      -Print the number of outputs and pipes in igt_require() for
>>       debugging aid (Petri)
>>
>> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
>> ---
>>   tests/Makefile.sources        |   1 +
>>   tests/kms_multipipe_modeset.c | 181 ++++++++++++++++++++++++++++++++++
>>   tests/meson.build             |   1 +
>>   3 files changed, 183 insertions(+)
>>   create mode 100644 tests/kms_multipipe_modeset.c
>>
>> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
>> index 32cbbf4f..c450fa0e 100644
>> --- a/tests/Makefile.sources
>> +++ b/tests/Makefile.sources
>> @@ -61,6 +61,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..e1d292ee
>> --- /dev/null
>> +++ b/tests/kms_multipipe_modeset.c
>> @@ -0,0 +1,181 @@
>> +/*
>> + * 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-output 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;
>> +
>> +		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(%d) not equal to the "
>> +		      "number of pipes supported(%d)\n", valid_outputs, num_pipes);
>> +
>> +	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_require_pipe_crc(data.drm_fd);
>> +		igt_display_require(&data.display, data.drm_fd);
>> +
>> +		res = drmModeGetResources(data.drm_fd);
> Hmm, assigning to a local variable in an igt_fixture... But it's not
> read outside it, this is fine.
>
>> +		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);
> This test binary is already called kms_multipipe_modeset, I wonder if
> we can find a better name for it, considering we might want to add
> more later.
>
> "basic-crc-check" ?
>
> Otherwise the patch LGTM.
> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
>
>
>> +
>> +	igt_fixture
>> +		igt_display_fini(&data.display);
>> +}
>> diff --git a/tests/meson.build b/tests/meson.build
>> index 0bdcfbe4..88e4875b 100644
>> --- a/tests/meson.build
>> +++ b/tests/meson.build
>> @@ -45,6 +45,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	[flat|nested] 6+ messages in thread

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

Hi Karthik,

I think I was mistaken. Since the modes which the platform cannot set, 
will be pruned and since you are using a single plane on each pipe,

without tiling, scaling or any thing that might exceed Dbuf/watermark 
requirement, there might not be any bandwidth issue.

You can discard my last comment.

I have a few suggestions given inline.


On 4/24/2020 3:12 PM, Nautiyal, Ankit K wrote:
> Hi Karthik,
>
> Thanks for the patch. Overall the patch looks good to me.
>
> Only a small concern I have is that when the commit fails due to not 
> sufficient bandwidth, due to perhaps, high resolution displays
>
> connected. So it might be that the 'n' displays are supported, but 
> perhaps not with the given resolutions.
>
> The test in that case might fail due to "EINVAL".
>
> Trying with try_commit by changing resolution is a solution but might 
> be an overkill.
>
> Perhaps trying with lowest mode would be better, if we just want to 
> check if all pipes are coming up simultaneously.
>
> Again this is just a specific scenario with high resolution displays 
> connected, which the platform might not support.
>
> Regards,
>
> Ankit
>
> On 4/24/2020 2:42 PM, Petri Latvala wrote:
>> On Fri, Apr 24, 2020 at 12:35:28PM +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.
>>>
>>> v2: -Fix Typo in comment (Petri)
>>>      -Use igt_require_pipe_crc() to prevent crash in non i915 case 
>>> (Petri)
>>>      -Print the number of outputs and pipes in igt_require() for
>>>       debugging aid (Petri)
>>>
>>> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
>>> ---
>>>   tests/Makefile.sources        |   1 +
>>>   tests/kms_multipipe_modeset.c | 181 
>>> ++++++++++++++++++++++++++++++++++
>>>   tests/meson.build             |   1 +
>>>   3 files changed, 183 insertions(+)
>>>   create mode 100644 tests/kms_multipipe_modeset.c
>>>
>>> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
>>> index 32cbbf4f..c450fa0e 100644
>>> --- a/tests/Makefile.sources
>>> +++ b/tests/Makefile.sources
>>> @@ -61,6 +61,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..e1d292ee
>>> --- /dev/null
>>> +++ b/tests/kms_multipipe_modeset.c
>>> @@ -0,0 +1,181 @@
>>> +/*
>>> + * 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-output 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++;
>>> +        }
>>> +    }
>>> +

In the above loop we are enabling all the pipes, and later we are 
enabling one and disabling the rest.

Instead, after disabling all the pipes, loop for each valid connector
     -Map it to an available pipe to it
     -Do a modeset
     -Collect CRC
     -unset the pipe
This will avoid multiple loops below and need of output to pipe mapping, 
as mapping is fixed:
PIPEA for first valid connected output, PIPEB for second and so on.

Regards,
Ankit
>>> +    /* 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;
>>> +
>>> +        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(%d) not equal to the "
>>> +              "number of pipes supported(%d)\n", valid_outputs, 
>>> num_pipes);
>>> +
>>> +    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_require_pipe_crc(data.drm_fd);
>>> +        igt_display_require(&data.display, data.drm_fd);
>>> +
>>> +        res = drmModeGetResources(data.drm_fd);
>> Hmm, assigning to a local variable in an igt_fixture... But it's not
>> read outside it, this is fine.
>>
>>> +        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);
>> This test binary is already called kms_multipipe_modeset, I wonder if
>> we can find a better name for it, considering we might want to add
>> more later.
>>
>> "basic-crc-check" ?
>>
>> Otherwise the patch LGTM.
>> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
>>
>>
>>> +
>>> +    igt_fixture
>>> +        igt_display_fini(&data.display);
>>> +}
>>> diff --git a/tests/meson.build b/tests/meson.build
>>> index 0bdcfbe4..88e4875b 100644
>>> --- a/tests/meson.build
>>> +++ b/tests/meson.build
>>> @@ -45,6 +45,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	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-27  9:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-24  7:05 [igt-dev] [PATCH i-g-t v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Karthik B S
2020-04-24  7:59 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_multipipe_modeset: Add test to validate max pipe configuration (rev2) Patchwork
2020-04-24  8:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-04-24  9:12 ` [igt-dev] [PATCH i-g-t v2] tests/kms_multipipe_modeset: Add test to validate max pipe configuration Petri Latvala
2020-04-24  9:42   ` Nautiyal, Ankit K
2020-04-27  9:31     ` Nautiyal, Ankit K

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox