Skip to contentSkip to conversation

tests/kms_atomic: add test to validate immutable zpos

PATCH Superseded Swati Sharma 4 participants 6 messages Mar 12, 2020 – Mar 16, 2020

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tests/kms_atomic: add test to validate immutable zpos

i915 implements immutable zpos property whereas the existing test case is written to validate mutable zpos.

Added new sub-test to validate immutable zpos. In the test, to validate reported zpos of the plane is correct by making sure a full-screen plane covers all other planes with the lower zpos, and the plane with the next available zpos is indeed partially covering the full-screen plane.

v2: -Removed intel only checks [Martin]
-Used XRGB8888 pixel format as used in other IGTs
-Added documentation [Martin]
-Removed skip, instead continue if plane doesn't support zpos [Martin] -Sorted planes in increasing order of zpos [Martin]

Issue: https://gitlab.freedesktop.org/drm/intel/issues/404

---
 tests/kms_atomic.c | 156 ++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 146 insertions(+), 10 deletions(-)
tests/kms_atomic.c +146 -10
index 8462d128..2a6a407e 100644
@@ -121,7 +121,7 @@ static void plane_check_current_state(igt_plane_t *plane, const uint64_t *values
 }
 
 static void plane_commit(igt_plane_t *plane, enum igt_commit_style s,
-                                enum kms_atomic_check_relax relax)
+                         enum kms_atomic_check_relax relax)
 {
 	igt_display_commit2(plane->pipe->display, s);
 	plane_check_current_state(plane, plane->values, relax);
@@ -277,9 +277,9 @@ static uint32_t plane_get_igt_format(igt_plane_t *plane)
 }
 
 static void
-plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
-			   igt_plane_t *primary, igt_plane_t *overlay,
-			   uint32_t format_primary, uint32_t format_overlay)
+plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
+			           igt_plane_t *primary, igt_plane_t *overlay,
+			           uint32_t format_primary, uint32_t format_overlay)
 {
 	struct igt_fb fb_primary, fb_overlay;
 	drmModeModeInfo *mode = igt_output_get_mode(output);
@@ -320,7 +320,7 @@ plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
 	igt_plane_set_prop_value(overlay, IGT_PLANE_ZPOS, 1);
 
 	igt_info("Committing with overlay on top, it has a hole "\
-		  "through which the primary should be seen\n");
+		 "through which the primary should be seen\n");
 	plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
 
 	igt_assert_eq_u64(igt_plane_get_prop(primary, IGT_PLANE_ZPOS), 0);
@@ -346,7 +346,7 @@ plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
 	igt_put_cairo_ctx(pipe->display->drm_fd, &fb_primary, cr);
 
 	igt_info("Committing with a hole in the primary through "\
-		  "which the underlay should be seen\n");
+		 "which the underlay should be seen\n");
 	plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
 
 	/* reset it back to initial state */
@@ -358,6 +358,127 @@ plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
 	igt_assert_eq_u64(igt_plane_get_prop(overlay, IGT_PLANE_ZPOS), 1);
 }
 
+static void
+plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
+		     igt_output_t *output)
+{
+	cairo_t *cr;
+	int min_idx;
+	struct igt_fb fb_ref;
+	igt_plane_t *primary;
+	drmModeModeInfo *mode;
+	igt_pipe_crc_t *pipe_crc;
+	igt_crc_t ref_crc, new_crc;
+	int n_planes = pipe->n_planes;
+	igt_plane_t *plane_ptr[n_planes];
+	igt_plane_t *plane_lower, *plane_upper;
+	uint32_t w_lower, h_lower, w_upper, h_upper;
+
+	mode = igt_output_get_mode(output);
+	primary = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+	/* for lower plane */
+	w_lower = mode->hdisplay;
+	h_lower = mode->vdisplay;
+
+	/* for upper plane */
+	w_upper = mode->hdisplay / 2;
+	h_upper = mode->vdisplay / 2;
+
+	igt_create_color_fb(display->drm_fd,
+			    w_lower, h_lower,
+			    DRM_FORMAT_XRGB8888,
+			    I915_TILING_NONE,
+			    0.0, 0.0, 0.0, &fb_ref);
+
+	/* create reference image */
+	cr = igt_get_cairo_ctx(display->drm_fd, &fb_ref);
+	igt_assert(cairo_status(cr) == 0);
+	igt_paint_color(cr, 0, 0, w_lower, h_lower, 0.0, 0.0, 1.0);
+	igt_paint_color(cr, w_upper / 2, h_upper / 2, w_upper, h_upper, 1.0, 1.0, 0.0);
+	igt_put_cairo_ctx(display->drm_fd, &fb_ref, cr);
+	igt_plane_set_fb(primary, &fb_ref);
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
+	/* create the pipe_crc object for this pipe */
+	pipe_crc = igt_pipe_crc_new(pipe->display->drm_fd, pipe->pipe,
+				    INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	/* get reference crc */
+	igt_pipe_crc_start(pipe_crc);
+	igt_pipe_crc_get_current(display->drm_fd, pipe_crc, &ref_crc);
+
+	igt_plane_set_fb(primary, NULL);
+
+	/* sort planes in increasing order of zpos */
+	for (int k = 0; k < n_planes; k++)
+		plane_ptr[k] = &display->pipes[pipe->pipe].planes[k];
+
+	for (int l = 0; l < n_planes - 1; l++) {
+		min_idx = l;
+		for (int m = l + 1; m < n_planes; m++) {
+			int zpos1, zpos2;
+
+			if (!igt_plane_has_prop(plane_ptr[min_idx], IGT_PLANE_ZPOS) ||
+			    !igt_plane_has_prop(plane_ptr[m], IGT_PLANE_ZPOS))
+				continue;
+
+			zpos1 = igt_plane_get_prop(plane_ptr[min_idx], IGT_PLANE_ZPOS);
+			zpos2 = igt_plane_get_prop(plane_ptr[m], IGT_PLANE_ZPOS);
+
+			if (zpos1 == zpos2)
+				continue;
+
+			if (zpos2 < zpos1)
+				min_idx = m;
+		}
+
+		igt_swap(plane_ptr[min_idx], plane_ptr[l]);
+	}
+
+	/* checking only pairs of plane in increasing fashion
+	 * to avoid combinatorial explosion
+	 */
+	for (int i = 0; i < n_planes - 1; i++) {
+		struct igt_fb fb_lower, fb_upper;
+
+		plane_lower = plane_ptr[i];
+		plane_upper = plane_ptr[i + 1];
+
+		if ((plane_lower->type == DRM_PLANE_TYPE_CURSOR) ||
+		    (plane_upper->type == DRM_PLANE_TYPE_CURSOR))
+			continue;
+
+		igt_create_color_fb(display->drm_fd,
+				    w_lower, h_lower,
+				    DRM_FORMAT_XRGB8888,
+				    I915_TILING_NONE,
+				    0.0, 0.0, 1.0, &fb_lower);
+
+		igt_create_color_fb(display->drm_fd,
+				    w_upper, h_upper,
+				    DRM_FORMAT_XRGB8888,
+				    I915_TILING_NONE,
+				    1.0, 1.0, 0.0, &fb_upper);
+
+		igt_plane_set_position(plane_lower, 0, 0);
+		igt_plane_set_fb(plane_lower, &fb_lower);
+
+		igt_plane_set_position(plane_upper, w_upper / 2, h_upper / 2);
+		igt_plane_set_fb(plane_upper, &fb_upper);
+
+		igt_info("Committing with the plane[%d] underneath "\
+			 "plane[%d]\n", i, (i + 1));
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		igt_pipe_crc_get_current(pipe->display->drm_fd, pipe_crc, &new_crc);
+
+		igt_assert_crc_equal(&ref_crc, &new_crc);
+
+		igt_plane_set_fb(plane_lower, NULL);
+		igt_plane_set_fb(plane_upper, NULL);
+	}
+}
+
 static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *plane)
 {
 	drmModeModeInfo *mode = igt_output_get_mode(output);
@@ -987,14 +1108,18 @@ igt_main
 		plane_primary(pipe_obj, primary, &fb);
 	}
 
-	igt_subtest("plane_primary_overlay_zpos") {
+	igt_describe("Tests mutable zpos where zpos is modified for "\
+		     "primary and overlay planes, order of planes is validated "\
+		     "visually where top plane has hole through which underlay plane "\
+		     "can be seen");
+	igt_subtest("plane_primary_overlay_mutable_zpos") {
 		uint32_t format_primary = DRM_FORMAT_ARGB8888;
 		uint32_t format_overlay = DRM_FORMAT_ARGB1555;
 
 		igt_plane_t *overlay =
 			igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
-
 		igt_require(overlay);
+
 		igt_require(igt_plane_has_prop(primary, IGT_PLANE_ZPOS));
 		igt_require(igt_plane_has_prop(overlay, IGT_PLANE_ZPOS));
 
@@ -1002,8 +1127,18 @@ igt_main
 		igt_require(igt_plane_has_format_mod(overlay, format_overlay, 0x0));
 
 		igt_output_set_pipe(output, pipe);
-		plane_primary_overlay_zpos(pipe_obj, output, primary, overlay,
-					   format_primary, format_overlay);
+		plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
+						   format_primary, format_overlay);
+	}
+
+	igt_describe("Tests immutable zpos where zpos cannot be modified such that "\
+		     "reported zpos of the plane is correct by making sure a "\
+		     "full-screen plane covers all other planes with the lower zpos,"\
+		     "and the plane with the next available zpos is indeed partially "\
+		     "covering the full-screen plane");
+	igt_subtest("plane_immutable_zpos") {
+		igt_output_set_pipe(output, pipe);
+		plane_immutable_zpos(&display, pipe_obj, output);
 	}
 
 	igt_subtest("test_only") {
@@ -1011,6 +1146,7 @@ igt_main
 
 		test_only(pipe_obj, primary, output);
 	}
+
 	igt_subtest("plane_cursor_legacy") {
 		igt_plane_t *cursor =
 			igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);
Signature · 6 lines
2.25.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_atomic: add test to validate immutable zpos (rev2)

== Series Details ==

== Series Details ==

Series: tests/kms_atomic: add test to validate immutable zpos (rev2)
URL : https://patchwork.freedesktop.org/series/73956/
State : success

== Summary ==

CI Bug Log - changes from IGT_5506 -> IGTPW_4294
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@gem_contexts:
- fi-cml-s: [PASS][1] -> [DMESG-FAIL][2] ([i915#877])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/fi-cml-s/igt@i915_selftest@live@gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/fi-cml-s/igt@i915_selftest@live@gem_contexts.html

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s4-devices:
- fi-tgl-y: [FAIL][3] ([CI#94]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/fi-tgl-y/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/fi-tgl-y/igt@[email protected]

* igt@i915_selftest@live@active:
- fi-bxt-dsi: [DMESG-FAIL][5] ([i915#666]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/fi-bxt-dsi/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/fi-bxt-dsi/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@execlists:
- fi-skl-6770hq: [INCOMPLETE][7] ([i915#1430]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/fi-skl-6770hq/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/fi-skl-6770hq/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-soraka: [DMESG-FAIL][9] ([fdo#112406]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html

* igt@kms_flip@basic-flip-vs-dpms:
- {fi-kbl-7560u}: [FAIL][11] ([i915#998]) -> [PASS][12] +5 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/fi-kbl-7560u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/fi-kbl-7560u/igt@[email protected]

#### Warnings ####

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][13] ([i915#323]) -> [FAIL][14] ([fdo#111407])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/fi-kbl-7500u/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/fi-kbl-7500u/igt@[email protected]

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

[CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#112406]: https://bugs.freedesktop.org/show_bug.cgi?id=112406
[i915#1430]: https://gitlab.freedesktop.org/drm/intel/issues/1430
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#666]: https://gitlab.freedesktop.org/drm/intel/issues/666
[i915#877]: https://gitlab.freedesktop.org/drm/intel/issues/877
[i915#998]: https://gitlab.freedesktop.org/drm/intel/issues/998

Participating hosts (47 -> 43)
------------------------------

Missing (4): fi-byt-clapper fi-byt-squawks fi-bsw-cyan fi-hsw-4200u

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

* CI: CI-20190529 -> None
* IGT: IGT_5506 -> IGTPW_4294

CI-20190529: 20190529
CI_DRM_8126: 2bd9e989a5653d4cd710e9dd2b42b0a080f1add8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4294: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/index.html
IGT_5506: 59fd8a0d01dac58dc6c7d86ef391ed4393ab5aae @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

+igt@kms_atomic@plane_immutable_zpos +igt@kms_atomic@plane_primary_overlay_mutable_zpos -igt@kms_atomic@plane_primary_overlay_zpos

== Logs ==

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

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for tests/kms_atomic: add test to validate immutable zpos (rev2)

In reply to Swati Sharma
== Series Details ==

== Series Details ==

Series: tests/kms_atomic: add test to validate immutable zpos (rev2)
URL : https://patchwork.freedesktop.org/series/73956/
State : success

== Summary ==

CI Bug Log - changes from IGT_5506_full -> IGTPW_4294_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Possible regressions ####

* {igt@kms_atomic@plane_primary_overlay_mutable_zpos} (NEW):
- shard-iclb: NOTRUN -> [SKIP][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb2/igt@kms_atomic@plane_primary_overlay_mutable_zpos.html
- shard-tglb: NOTRUN -> [SKIP][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-tglb6/igt@kms_atomic@plane_primary_overlay_mutable_zpos.html

New tests
---------

New tests have been introduced between IGT_5506_full and IGTPW_4294_full:

### New IGT tests (2) ###

* igt@kms_atomic@plane_immutable_zpos:
- Statuses : 7 pass(s)
- Exec time: [0.14, 0.37] s

* igt@kms_atomic@plane_primary_overlay_mutable_zpos:
- Statuses : 7 skip(s)
- Exec time: [0.0] s

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#112080]) +7 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb7/igt@[email protected]

* igt@gem_eio@in-flight-suspend:
- shard-kbl: [PASS][5] -> [DMESG-WARN][6] ([i915#180]) +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-kbl7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-kbl1/igt@[email protected]

* igt@gem_exec_schedule@implicit-both-bsd1:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276] / [i915#677]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb8/igt@[email protected]

* igt@gem_exec_schedule@pi-shared-iova-bsd:
- shard-iclb: [PASS][9] -> [SKIP][10] ([i915#677])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb8/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb2/igt@[email protected]

* igt@gem_exec_schedule@preempt-other-chain-bsd:
- shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#112146]) +4 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb8/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb1/igt@[email protected]

* igt@gem_exec_whisper@basic-fds-forked:
- shard-tglb: [PASS][13] -> [INCOMPLETE][14] ([i915#1318] / [i915#1401])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-tglb2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-tglb5/igt@[email protected]

* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-apl: [PASS][15] -> [FAIL][16] ([i915#644])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-apl4/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-apl6/igt@[email protected]
- shard-iclb: [PASS][17] -> [FAIL][18] ([i915#644])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb4/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb1/igt@[email protected]

* igt@kms_atomic_transition@plane-toggle-modeset-transition:
- shard-snb: [PASS][19] -> [SKIP][20] ([fdo#109271]) +2 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-snb2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-snb6/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-apl: [PASS][21] -> [DMESG-WARN][22] ([i915#180])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-apl4/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-apl1/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-64x21-onscreen:
- shard-apl: [PASS][23] -> [FAIL][24] ([i915#54]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-apl2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-apl8/igt@[email protected]
- shard-glk: [PASS][25] -> [FAIL][26] ([i915#54])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-glk4/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-glk6/igt@[email protected]
- shard-kbl: [PASS][27] -> [FAIL][28] ([i915#54])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-kbl2/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-kbl7/igt@[email protected]

* igt@kms_flip@flip-vs-panning:
- shard-kbl: [PASS][29] -> [DMESG-WARN][30] ([i915#1297])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-kbl2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-kbl4/igt@[email protected]
- shard-apl: [PASS][31] -> [DMESG-WARN][32] ([i915#1297])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-apl3/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-apl2/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][33] -> [SKIP][34] ([fdo#109642] / [fdo#111068])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb2/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb1/igt@[email protected]

* igt@kms_psr@psr2_suspend:
- shard-iclb: [PASS][35] -> [SKIP][36] ([fdo#109441])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb2/igt@kms_psr@psr2_suspend.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb1/igt@kms_psr@psr2_suspend.html

* igt@kms_setmode@basic:
- shard-kbl: [PASS][37] -> [FAIL][38] ([i915#31])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-kbl7/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-kbl7/igt@[email protected]

* igt@prime_busy@hang-bsd2:
- shard-iclb: [PASS][39] -> [SKIP][40] ([fdo#109276]) +21 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb4/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb6/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [SKIP][41] ([fdo#110841]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb1/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb7/igt@[email protected]

* igt@gem_exec_parallel@vcs1-fds:
- shard-iclb: [SKIP][43] ([fdo#112080]) -> [PASS][44] +9 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb7/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@fifo-bsd1:
- shard-iclb: [SKIP][45] ([fdo#109276]) -> [PASS][46] +12 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb8/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@implicit-both-bsd:
- shard-iclb: [SKIP][47] ([i915#677]) -> [PASS][48] +2 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb1/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb8/igt@[email protected]

* igt@gem_exec_schedule@implicit-write-read-bsd1:
- shard-iclb: [SKIP][49] ([fdo#109276] / [i915#677]) -> [PASS][50] +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb8/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb4/igt@[email protected]

* igt@gem_exec_schedule@in-order-bsd:
- shard-iclb: [SKIP][51] ([fdo#112146]) -> [PASS][52] +4 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb2/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb5/igt@[email protected]

* igt@gem_exec_whisper@basic-fds-priority:
- shard-tglb: [INCOMPLETE][53] ([i915#1401]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-tglb6/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-tglb2/igt@[email protected]

* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-glk: [FAIL][55] ([i915#644]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-glk2/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-glk5/igt@[email protected]

* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [DMESG-WARN][57] ([i915#180]) -> [PASS][58] +4 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-apl6/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-apl6/igt@[email protected]

* igt@i915_pm_rps@reset:
- shard-tglb: [FAIL][59] ([i915#413]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-tglb7/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-tglb6/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
- shard-glk: [FAIL][61] ([i915#72]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-glk1/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-glk4/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-kbl: [DMESG-WARN][63] ([i915#180]) -> [PASS][64] +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-kbl2/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-kbl6/igt@[email protected]

* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][65] ([fdo#109441]) -> [PASS][66] +2 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-iclb3/igt@kms_psr@psr2_primary_mmap_cpu.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

* igt@kms_setmode@basic:
- shard-apl: [FAIL][67] ([i915#31]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-apl3/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-apl8/igt@[email protected]

#### Warnings ####

* igt@gem_userptr_blits@sync-unmap-after-close:
- shard-snb: [DMESG-WARN][69] ([fdo#110789] / [fdo#111870] / [i915#478]) -> [DMESG-WARN][70] ([fdo#111870] / [i915#478])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5506/shard-snb6/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/shard-snb4/igt@[email protected]

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

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#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#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[i915#1297]: https://gitlab.freedesktop.org/drm/intel/issues/1297
[i915#1318]: https://gitlab.freedesktop.org/drm/intel/issues/1318
[i915#1401]: https://gitlab.freedesktop.org/drm/intel/issues/1401
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#478]: https://gitlab.freedesktop.org/drm/intel/issues/478
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72

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

No changes in participating hosts

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

* CI: CI-20190529 -> None
* IGT: IGT_5506 -> IGTPW_4294

CI-20190529: 20190529
CI_DRM_8126: 2bd9e989a5653d4cd710e9dd2b42b0a080f1add8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4294: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4294/index.html
IGT_5506: 59fd8a0d01dac58dc6c7d86ef391ed4393ab5aae @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

Reviewed-by on v2 1/1
#3 lore raw
In reply to Swati Sharma
Quoted 75 lines · Swati Sharma

i915 implements immutable zpos property whereas the existing test case is written to validate mutable zpos.

Added new sub-test to validate immutable zpos. In the test, to validate reported zpos of the plane is correct by making sure a full-screen plane covers all other planes with the lower zpos, and the plane with the next available zpos is indeed partially covering the full-screen plane.

v2: -Removed intel only checks [Martin]
-Used XRGB8888 pixel format as used in other IGTs
-Added documentation [Martin]
-Removed skip, instead continue if plane doesn't support zpos [Martin] -Sorted planes in increasing order of zpos [Martin]

Issue: https://gitlab.freedesktop.org/drm/intel/issues/404

---
 tests/kms_atomic.c | 156 ++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 146 insertions(+), 10 deletions(-)
tests/kms_atomic.c +13 -6
index 8462d128..2a6a407e 100644
@@ -121,7 +121,7 @@ static void plane_check_current_state(igt_plane_t *plane, const uint64_t *values
 }
 
 static void plane_commit(igt_plane_t *plane, enum igt_commit_style s,
-                                enum kms_atomic_check_relax relax)
+                         enum kms_atomic_check_relax relax)
 {
 	igt_display_commit2(plane->pipe->display, s);
 	plane_check_current_state(plane, plane->values, relax);
@@ -277,9 +277,9 @@ static uint32_t plane_get_igt_format(igt_plane_t *plane)
 }
 
 static void
-plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
-			   igt_plane_t *primary, igt_plane_t *overlay,
-			   uint32_t format_primary, uint32_t format_overlay)
+plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
+			           igt_plane_t *primary, igt_plane_t *overlay,
+			           uint32_t format_primary, uint32_t format_overlay)
 {
 	struct igt_fb fb_primary, fb_overlay;
 	drmModeModeInfo *mode = igt_output_get_mode(output);
@@ -320,7 +320,7 @@ plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
 	igt_plane_set_prop_value(overlay, IGT_PLANE_ZPOS, 1);
 
 	igt_info("Committing with overlay on top, it has a hole "\
-		  "through which the primary should be seen\n");
+		 "through which the primary should be seen\n");
 	plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
 
 	igt_assert_eq_u64(igt_plane_get_prop(primary, IGT_PLANE_ZPOS), 0);
@@ -346,7 +346,7 @@ plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
 	igt_put_cairo_ctx(pipe->display->drm_fd, &fb_primary, cr);
 
 	igt_info("Committing with a hole in the primary through "\
-		  "which the underlay should be seen\n");
+		 "which the underlay should be seen\n");
 	plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
 
 	/* reset it back to initial state */
@@ -358,6 +358,127 @@ plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
 	igt_assert_eq_u64(igt_plane_get_prop(overlay, IGT_PLANE_ZPOS), 1);
 }
 
+static void
+plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
+		     igt_output_t *output)
+{
+	cairo_t *cr;
+	int min_idx;
+	struct igt_fb fb_ref;

tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 377

Quoted 10 lines
tests/kms_atomic.c +10 -0
+	igt_plane_t *primary;
+	drmModeModeInfo *mode;
+	igt_pipe_crc_t *pipe_crc;
+	igt_crc_t ref_crc, new_crc;
+	int n_planes = pipe->n_planes;
+	igt_plane_t *plane_ptr[n_planes];
+	igt_plane_t *plane_lower, *plane_upper;
+	uint32_t w_lower, h_lower, w_upper, h_upper;
+
+	mode = igt_output_get_mode(output);

Make sure to set a low resolution so that we don't run out of memory bandwidth when having a ton of planes enabled.

Quoted 75 lines
tests/kms_atomic.c +75 -0
+	primary = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+	/* for lower plane */
+	w_lower = mode->hdisplay;
+	h_lower = mode->vdisplay;
+
+	/* for upper plane */
+	w_upper = mode->hdisplay / 2;
+	h_upper = mode->vdisplay / 2;
+
+	igt_create_color_fb(display->drm_fd,
+			    w_lower, h_lower,
+			    DRM_FORMAT_XRGB8888,
+			    I915_TILING_NONE,
+			    0.0, 0.0, 0.0, &fb_ref);
+
+	/* create reference image */
+	cr = igt_get_cairo_ctx(display->drm_fd, &fb_ref);
+	igt_assert(cairo_status(cr) == 0);
+	igt_paint_color(cr, 0, 0, w_lower, h_lower, 0.0, 0.0, 1.0);
+	igt_paint_color(cr, w_upper / 2, h_upper / 2, w_upper, h_upper, 1.0, 1.0, 0.0);
+	igt_put_cairo_ctx(display->drm_fd, &fb_ref, cr);
+	igt_plane_set_fb(primary, &fb_ref);
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
+	/* create the pipe_crc object for this pipe */
+	pipe_crc = igt_pipe_crc_new(pipe->display->drm_fd, pipe->pipe,
+				    INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	/* get reference crc */
+	igt_pipe_crc_start(pipe_crc);
+	igt_pipe_crc_get_current(display->drm_fd, pipe_crc, &ref_crc);
+
+	igt_plane_set_fb(primary, NULL);
+
+	/* sort planes in increasing order of zpos */
+	for (int k = 0; k < n_planes; k++)
+		plane_ptr[k] = &display->pipes[pipe->pipe].planes[k];
+
+	for (int l = 0; l < n_planes - 1; l++) {
+		min_idx = l;
+		for (int m = l + 1; m < n_planes; m++) {
+			int zpos1, zpos2;
+
+			if (!igt_plane_has_prop(plane_ptr[min_idx], IGT_PLANE_ZPOS) ||
+			    !igt_plane_has_prop(plane_ptr[m], IGT_PLANE_ZPOS))
+				continue;
+
+			zpos1 = igt_plane_get_prop(plane_ptr[min_idx], IGT_PLANE_ZPOS);
+			zpos2 = igt_plane_get_prop(plane_ptr[m], IGT_PLANE_ZPOS);
+
+			if (zpos1 == zpos2)
+				continue;
+
+			if (zpos2 < zpos1)
+				min_idx = m;
+		}
+
+		igt_swap(plane_ptr[min_idx], plane_ptr[l]);
+	}
+
+	/* checking only pairs of plane in increasing fashion
+	 * to avoid combinatorial explosion
+	 */
+	for (int i = 0; i < n_planes - 1; i++) {
+		struct igt_fb fb_lower, fb_upper;
+
+		plane_lower = plane_ptr[i];
+		plane_upper = plane_ptr[i + 1];
+
+		if ((plane_lower->type == DRM_PLANE_TYPE_CURSOR) ||
+		    (plane_upper->type == DRM_PLANE_TYPE_CURSOR))
+			continue;
+
+		igt_create_color_fb(display->drm_fd,

tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 462

Quoted 10 lines
tests/kms_atomic.c +10 -0
+				    w_lower, h_lower,
+				    DRM_FORMAT_XRGB8888,
+				    I915_TILING_NONE,
+				    0.0, 0.0, 1.0, &fb_lower);
+
+		igt_create_color_fb(display->drm_fd,
+				    w_upper, h_upper,
+				    DRM_FORMAT_XRGB8888,
+				    I915_TILING_NONE,
+				    1.0, 1.0, 0.0, &fb_upper);

Do you need to re-create the fb at every loop?

Quoted 6 lines
tests/kms_atomic.c +6 -0
+
+		igt_plane_set_position(plane_lower, 0, 0);
+		igt_plane_set_fb(plane_lower, &fb_lower);
+
+		igt_plane_set_position(plane_upper, w_upper / 2, h_upper / 2);
+		igt_plane_set_fb(plane_upper, &fb_upper);

tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 478

Quoted 10 lines
tests/kms_atomic.c +10 -0
+
+		igt_info("Committing with the plane[%d] underneath "\
+			 "plane[%d]\n", i, (i + 1));
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		igt_pipe_crc_get_current(pipe->display->drm_fd, pipe_crc, &new_crc);
+
+		igt_assert_crc_equal(&ref_crc, &new_crc);
+
+		igt_plane_set_fb(plane_lower, NULL);
+		igt_plane_set_fb(plane_upper, NULL);

So, you don't set all the planes under the lower one to another color or something?

Quoted 7 lines
tests/kms_atomic.c +3 -0
+	}
+}
+
 static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *plane)
 {
 	drmModeModeInfo *mode = igt_output_get_mode(output);

tests/kms_atomic.c igt_main · line 1114

Quoted 8 lines
tests/kms_atomic.c +4 -1
@@ -987,14 +1108,18 @@ igt_main
 		plane_primary(pipe_obj, primary, &fb);
 	}
 
-	igt_subtest("plane_primary_overlay_zpos") {
+	igt_describe("Tests mutable zpos where zpos is modified for "\
+		     "primary and overlay planes, order of planes is validated "\
+		     "visually where top plane has hole through which underlay plane "\
+		     "can be seen");

The wording is a little odd and the description is more focused on the how, rather than what it is trying to check.

How about: "Verify that the overlay plane can cover the primary one (and vice versa) by changing their zpos property."

Quoted 17 lines
tests/kms_atomic.c +2 -2
+	igt_subtest("plane_primary_overlay_mutable_zpos") {
 		uint32_t format_primary = DRM_FORMAT_ARGB8888;
 		uint32_t format_overlay = DRM_FORMAT_ARGB1555;
 
 		igt_plane_t *overlay =
 			igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
-
 		igt_require(overlay);
+
 		igt_require(igt_plane_has_prop(primary, IGT_PLANE_ZPOS));
 		igt_require(igt_plane_has_prop(overlay, IGT_PLANE_ZPOS));
 
@@ -1002,8 +1127,18 @@ igt_main
 		igt_require(igt_plane_has_format_mod(overlay, format_overlay, 0x0));
 
 		igt_output_set_pipe(output, pipe);
-		plane_primary_overlay_zpos(pipe_obj, output, primary, overlay,

tests/kms_atomic.c igt_main · line 1138

Quoted 10 lines
tests/kms_atomic.c +9 -1
-					   format_primary, format_overlay);
+		plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
+						   format_primary, format_overlay);
+	}
+
+	igt_describe("Tests immutable zpos where zpos cannot be modified such that "\
+		     "reported zpos of the plane is correct by making sure a "\
+		     "full-screen plane covers all other planes with the lower zpos,"\
+		     "and the plane with the next available zpos is indeed partially "\
+		     "covering the full-screen plane");

How about: "Verify the reported zpos property of planes by making sure only higher zpos planes cover the lower zpos ones".

tests/kms_atomic.c igt_main · line 1139

Quoted 1 line
tests/kms_atomic.c +1 -0
+	igt_subtest("plane_immutable_zpos") {

Do we want a per-pipe test? The current exec time is [0.14, 0.37] s, so good job here, and we could test every pipe!

Anyway, all of these comments are nit picks. If you fix the description, this is:

Martin

Quoted 7 lines
tests/kms_atomic.c +2 -0
+		igt_output_set_pipe(output, pipe);
+		plane_immutable_zpos(&display, pipe_obj, output);
 	}
 
 	igt_subtest("test_only") {

tests/kms_atomic.c igt_main · line 1152

Quoted 7 lines
tests/kms_atomic.c +1 -0
@@ -1011,6 +1146,7 @@ igt_main
 
 		test_only(pipe_obj, primary, output);
 	}
+
 	igt_subtest("plane_cursor_legacy") {
 		igt_plane_t *cursor =
 			igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by Martin Peres
#4 lore raw

Hi Swati,

I think we can avoid the sorting if we use 'zpos % num_planes' as the index. Something like:
plane_ptr[zpos % n_planes] = &display->pipes[pipe].planes[i]

-Ankit

-----Original Message-----
From: Martin Peres <[email protected]>
Sent: Friday, March 13, 2020 7:56 PM
To: Sharma, Swati2 <[email protected]>; [email protected]
Cc: [email protected]; Hiler, Arkadiusz <[email protected]>; Latvala, Petri <[email protected]>; Nautiyal, Ankit K <[email protected]>
Subject: Re: [PATCH i-g-t v2] tests/kms_atomic: add test to validate immutable zpos

Quoted 75 lines · Swati Sharma

i915 implements immutable zpos property whereas the existing test case is written to validate mutable zpos.

Added new sub-test to validate immutable zpos. In the test, to
validate reported zpos of the plane is correct by making sure a full-screen plane covers all other planes with the lower zpos, and the plane with the next available zpos is indeed partially covering the full-screen plane.

v2: -Removed intel only checks [Martin]
-Used XRGB8888 pixel format as used in other IGTs
-Added documentation [Martin]
-Removed skip, instead continue if plane doesn't support zpos [Martin] -Sorted planes in increasing order of zpos [Martin]

Issue: https://gitlab.freedesktop.org/drm/intel/issues/404

---
 tests/kms_atomic.c | 156 
++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 146 insertions(+), 10 deletions(-)
tests/kms_atomic.c index renamed from tests/kms_atomic.c +0 -0

8462d128..2a6a407e 100644

tests/kms_atomic.c +8 -6
@@ -121,7 +121,7 @@ static void plane_check_current_state(igt_plane_t 
 *plane, const uint64_t *values  }
 
 static void plane_commit(igt_plane_t *plane, enum igt_commit_style s,
-                                enum kms_atomic_check_relax relax)
+                         enum kms_atomic_check_relax relax)
 {
 	igt_display_commit2(plane->pipe->display, s);
 	plane_check_current_state(plane, plane->values, relax); @@ -277,9 
+277,9 @@ static uint32_t plane_get_igt_format(igt_plane_t *plane)  }
 
 static void
-plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
-			   igt_plane_t *primary, igt_plane_t *overlay,
-			   uint32_t format_primary, uint32_t format_overlay)
+plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
+			           igt_plane_t *primary, igt_plane_t *overlay,
+			           uint32_t format_primary, uint32_t format_overlay)
 {
 	struct igt_fb fb_primary, fb_overlay;
 	drmModeModeInfo *mode = igt_output_get_mode(output); @@ -320,7 
+320,7 @@ plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
 	igt_plane_set_prop_value(overlay, IGT_PLANE_ZPOS, 1);
 
 	igt_info("Committing with overlay on top, it has a hole "\
-		  "through which the primary should be seen\n");
+		 "through which the primary should be seen\n");
 	plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
 
 	igt_assert_eq_u64(igt_plane_get_prop(primary, IGT_PLANE_ZPOS), 0); 
@@ -346,7 +346,7 @@ plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
 	igt_put_cairo_ctx(pipe->display->drm_fd, &fb_primary, cr);
 
 	igt_info("Committing with a hole in the primary through "\
-		  "which the underlay should be seen\n");
+		 "which the underlay should be seen\n");
 	plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
 
 	/* reset it back to initial state */ @@ -358,6 +358,127 @@ 

plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
igt_assert_eq_u64(igt_plane_get_prop(overlay, IGT_PLANE_ZPOS), 1);
}

tests/kms_atomic.c +7 -0
+static void
+plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
+		     igt_output_t *output)
+{
+	cairo_t *cr;
+	int min_idx;
+	struct igt_fb fb_ref;

tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 377

Quoted 10 lines
tests/kms_atomic.c +10 -0
+	igt_plane_t *primary;
+	drmModeModeInfo *mode;
+	igt_pipe_crc_t *pipe_crc;
+	igt_crc_t ref_crc, new_crc;
+	int n_planes = pipe->n_planes;
+	igt_plane_t *plane_ptr[n_planes];
+	igt_plane_t *plane_lower, *plane_upper;
+	uint32_t w_lower, h_lower, w_upper, h_upper;
+
+	mode = igt_output_get_mode(output);

Make sure to set a low resolution so that we don't run out of memory bandwidth when having a ton of planes enabled.

Quoted 75 lines
tests/kms_atomic.c +75 -0
+	primary = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+	/* for lower plane */
+	w_lower = mode->hdisplay;
+	h_lower = mode->vdisplay;
+
+	/* for upper plane */
+	w_upper = mode->hdisplay / 2;
+	h_upper = mode->vdisplay / 2;
+
+	igt_create_color_fb(display->drm_fd,
+			    w_lower, h_lower,
+			    DRM_FORMAT_XRGB8888,
+			    I915_TILING_NONE,
+			    0.0, 0.0, 0.0, &fb_ref);
+
+	/* create reference image */
+	cr = igt_get_cairo_ctx(display->drm_fd, &fb_ref);
+	igt_assert(cairo_status(cr) == 0);
+	igt_paint_color(cr, 0, 0, w_lower, h_lower, 0.0, 0.0, 1.0);
+	igt_paint_color(cr, w_upper / 2, h_upper / 2, w_upper, h_upper, 1.0, 1.0, 0.0);
+	igt_put_cairo_ctx(display->drm_fd, &fb_ref, cr);
+	igt_plane_set_fb(primary, &fb_ref);
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
+	/* create the pipe_crc object for this pipe */
+	pipe_crc = igt_pipe_crc_new(pipe->display->drm_fd, pipe->pipe,
+				    INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	/* get reference crc */
+	igt_pipe_crc_start(pipe_crc);
+	igt_pipe_crc_get_current(display->drm_fd, pipe_crc, &ref_crc);
+
+	igt_plane_set_fb(primary, NULL);
+
+	/* sort planes in increasing order of zpos */
+	for (int k = 0; k < n_planes; k++)
+		plane_ptr[k] = &display->pipes[pipe->pipe].planes[k];
+
+	for (int l = 0; l < n_planes - 1; l++) {
+		min_idx = l;
+		for (int m = l + 1; m < n_planes; m++) {
+			int zpos1, zpos2;
+
+			if (!igt_plane_has_prop(plane_ptr[min_idx], IGT_PLANE_ZPOS) ||
+			    !igt_plane_has_prop(plane_ptr[m], IGT_PLANE_ZPOS))
+				continue;
+
+			zpos1 = igt_plane_get_prop(plane_ptr[min_idx], IGT_PLANE_ZPOS);
+			zpos2 = igt_plane_get_prop(plane_ptr[m], IGT_PLANE_ZPOS);
+
+			if (zpos1 == zpos2)
+				continue;
+
+			if (zpos2 < zpos1)
+				min_idx = m;
+		}
+
+		igt_swap(plane_ptr[min_idx], plane_ptr[l]);
+	}
+
+	/* checking only pairs of plane in increasing fashion
+	 * to avoid combinatorial explosion
+	 */
+	for (int i = 0; i < n_planes - 1; i++) {
+		struct igt_fb fb_lower, fb_upper;
+
+		plane_lower = plane_ptr[i];
+		plane_upper = plane_ptr[i + 1];
+
+		if ((plane_lower->type == DRM_PLANE_TYPE_CURSOR) ||
+		    (plane_upper->type == DRM_PLANE_TYPE_CURSOR))
+			continue;
+
+		igt_create_color_fb(display->drm_fd,

tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 462

Quoted 10 lines
tests/kms_atomic.c +10 -0
+				    w_lower, h_lower,
+				    DRM_FORMAT_XRGB8888,
+				    I915_TILING_NONE,
+				    0.0, 0.0, 1.0, &fb_lower);
+
+		igt_create_color_fb(display->drm_fd,
+				    w_upper, h_upper,
+				    DRM_FORMAT_XRGB8888,
+				    I915_TILING_NONE,
+				    1.0, 1.0, 0.0, &fb_upper);

Do you need to re-create the fb at every loop?

Quoted 7 lines
tests/kms_atomic.c +7 -0
+
+		igt_plane_set_position(plane_lower, 0, 0);
+		igt_plane_set_fb(plane_lower, &fb_lower);
+
+		igt_plane_set_position(plane_upper, w_upper / 2, h_upper / 2);
+		igt_plane_set_fb(plane_upper, &fb_upper);
+

tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 478

Quoted 10 lines
tests/kms_atomic.c +10 -0
+		igt_info("Committing with the plane[%d] underneath "\
+			 "plane[%d]\n", i, (i + 1));
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		igt_pipe_crc_get_current(pipe->display->drm_fd, pipe_crc, 
+&new_crc);
+
+		igt_assert_crc_equal(&ref_crc, &new_crc);
+
+		igt_plane_set_fb(plane_lower, NULL);
+		igt_plane_set_fb(plane_upper, NULL);

So, you don't set all the planes under the lower one to another color or something?

Quoted 5 lines
tests/kms_atomic.c +3 -0
+	}
+}
+
 static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, 

igt_plane_t *plane) {

tests/kms_atomic.c igt_main · line 1114

Quoted 10 lines
tests/kms_atomic.c +5 -1
 	drmModeModeInfo *mode = igt_output_get_mode(output); @@ -987,14 
+1108,18 @@ igt_main
 		plane_primary(pipe_obj, primary, &fb);
 	}
 
-	igt_subtest("plane_primary_overlay_zpos") {
+	igt_describe("Tests mutable zpos where zpos is modified for "\
+		     "primary and overlay planes, order of planes is validated "\
+		     "visually where top plane has hole through which underlay plane "\
+		     "can be seen");

The wording is a little odd and the description is more focused on the how, rather than what it is trying to check.

How about: "Verify that the overlay plane can cover the primary one (and vice versa) by changing their zpos property."

Quoted 18 lines
tests/kms_atomic.c +2 -2
+	igt_subtest("plane_primary_overlay_mutable_zpos") {
 		uint32_t format_primary = DRM_FORMAT_ARGB8888;
 		uint32_t format_overlay = DRM_FORMAT_ARGB1555;
 
 		igt_plane_t *overlay =
 			igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
-
 		igt_require(overlay);
+
 		igt_require(igt_plane_has_prop(primary, IGT_PLANE_ZPOS));
 		igt_require(igt_plane_has_prop(overlay, IGT_PLANE_ZPOS));
@@ -1002,8 +1127,18 @@ igt_main
 		igt_require(igt_plane_has_format_mod(overlay, format_overlay, 
 0x0));
 
 		igt_output_set_pipe(output, pipe);
-		plane_primary_overlay_zpos(pipe_obj, output, primary, overlay,

tests/kms_atomic.c igt_main · line 1139

Quoted 10 lines
tests/kms_atomic.c +9 -1
-					   format_primary, format_overlay);
+		plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
+						   format_primary, format_overlay);
+	}
+
+	igt_describe("Tests immutable zpos where zpos cannot be modified such that "\
+		     "reported zpos of the plane is correct by making sure a "\
+		     "full-screen plane covers all other planes with the lower zpos,"\
+		     "and the plane with the next available zpos is indeed partially "\
+		     "covering the full-screen plane");

How about: "Verify the reported zpos property of planes by making sure only higher zpos planes cover the lower zpos ones".

tests/kms_atomic.c igt_main · line 1139

Quoted 1 line
tests/kms_atomic.c +1 -0
+	igt_subtest("plane_immutable_zpos") {

Do we want a per-pipe test? The current exec time is [0.14, 0.37] s, so good job here, and we could test every pipe!

Anyway, all of these comments are nit picks. If you fix the description, this is:

Martin

Quoted 7 lines
tests/kms_atomic.c +2 -0
+		igt_output_set_pipe(output, pipe);
+		plane_immutable_zpos(&display, pipe_obj, output);
 	}
 
tests/kms_atomic.c +0 -0
 	igt_subtest("test_only") {

tests/kms_atomic.c igt_main · line 1152

Quoted 7 lines
tests/kms_atomic.c +1 -0
@@ -1011,6 +1146,7 @@ igt_main
 
 		test_only(pipe_obj, primary, output);
 	}
+
 	igt_subtest("plane_cursor_legacy") {
 		igt_plane_t *cursor =
 			igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw
Quoted 7 lines · Ankit K

Hi Swati,

I think we can avoid the sorting if we use 'zpos % num_planes' as the index. Something like:
plane_ptr[zpos % n_planes] = &display->pipes[pipe].planes[i]

-Ankit

Done in v3

Quoted 88 lines

-----Original Message-----
From: Martin Peres <[email protected]>
Sent: Friday, March 13, 2020 7:56 PM
To: Sharma, Swati2 <[email protected]>; [email protected]
Cc: [email protected]; Hiler, Arkadiusz <[email protected]>; Latvala, Petri <[email protected]>; Nautiyal, Ankit K <[email protected]>
Subject: Re: [PATCH i-g-t v2] tests/kms_atomic: add test to validate immutable zpos

Quoted 79 lines · Swati Sharma

i915 implements immutable zpos property whereas the existing test case is written to validate mutable zpos.

Added new sub-test to validate immutable zpos. In the test, to
validate reported zpos of the plane is correct by making sure a full-screen plane covers all other planes with the lower zpos, and the plane with the next available zpos is indeed partially covering the full-screen plane.

v2: -Removed intel only checks [Martin]
-Used XRGB8888 pixel format as used in other IGTs
-Added documentation [Martin]
-Removed skip, instead continue if plane doesn't support zpos [Martin] -Sorted planes in increasing order of zpos [Martin]

Issue: https://gitlab.freedesktop.org/drm/intel/issues/404

---
  tests/kms_atomic.c | 156
++++++++++++++++++++++++++++++++++++++++++---
  1 file changed, 146 insertions(+), 10 deletions(-)
tests/kms_atomic.c index renamed from tests/kms_atomic.c +0 -0

8462d128..2a6a407e 100644

tests/kms_atomic.c +8 -6
@@ -121,7 +121,7 @@ static void plane_check_current_state(igt_plane_t
 *plane, const uint64_t *values  }
 
  static void plane_commit(igt_plane_t *plane, enum igt_commit_style s,
-                                enum kms_atomic_check_relax relax)
+                         enum kms_atomic_check_relax relax)
  {
  	igt_display_commit2(plane->pipe->display, s);
  	plane_check_current_state(plane, plane->values, relax); @@ -277,9
+277,9 @@ static uint32_t plane_get_igt_format(igt_plane_t *plane)  }
 
  static void
-plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
-			   igt_plane_t *primary, igt_plane_t *overlay,
-			   uint32_t format_primary, uint32_t format_overlay)
+plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
+			           igt_plane_t *primary, igt_plane_t *overlay,
+			           uint32_t format_primary, uint32_t format_overlay)
  {
  	struct igt_fb fb_primary, fb_overlay;
  	drmModeModeInfo *mode = igt_output_get_mode(output); @@ -320,7
+320,7 @@ plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
  	igt_plane_set_prop_value(overlay, IGT_PLANE_ZPOS, 1);
 
  	igt_info("Committing with overlay on top, it has a hole "\
-		  "through which the primary should be seen\n");
+		 "through which the primary should be seen\n");
  	plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
 
  	igt_assert_eq_u64(igt_plane_get_prop(primary, IGT_PLANE_ZPOS), 0);
@@ -346,7 +346,7 @@ plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
  	igt_put_cairo_ctx(pipe->display->drm_fd, &fb_primary, cr);
 
  	igt_info("Committing with a hole in the primary through "\
-		  "which the underlay should be seen\n");
+		 "which the underlay should be seen\n");
  	plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
 
  	/* reset it back to initial state */ @@ -358,6 +358,127 @@

plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output,
igt_assert_eq_u64(igt_plane_get_prop(overlay, IGT_PLANE_ZPOS), 1);
}

tests/kms_atomic.c +11 -0
+static void
+plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
+		     igt_output_t *output)
+{
+	cairo_t *cr;
+	int min_idx;
+	struct igt_fb fb_ref;
+	igt_plane_t *primary;
+	drmModeModeInfo *mode;
+	igt_pipe_crc_t *pipe_crc;
+	igt_crc_t ref_crc, new_crc;
Quoted 8 lines

tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 377

Quoted 6 lines
tests/kms_atomic.c +6 -0
+	int n_planes = pipe->n_planes;
+	igt_plane_t *plane_ptr[n_planes];
+	igt_plane_t *plane_lower, *plane_upper;
+	uint32_t w_lower, h_lower, w_upper, h_upper;
+
+	mode = igt_output_get_mode(output);

Make sure to set a low resolution so that we don't run out of memory bandwidth when having a ton of planes enabled.

We enable only 2 planes at a time, so BW shouldn't be problem.

Quoted 80 lines
Quoted 80 lines
tests/kms_atomic.c +79 -0
+	primary = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+	/* for lower plane */
+	w_lower = mode->hdisplay;
+	h_lower = mode->vdisplay;
+
+	/* for upper plane */
+	w_upper = mode->hdisplay / 2;
+	h_upper = mode->vdisplay / 2;
+
+	igt_create_color_fb(display->drm_fd,
+			    w_lower, h_lower,
+			    DRM_FORMAT_XRGB8888,
+			    I915_TILING_NONE,
+			    0.0, 0.0, 0.0, &fb_ref);
+
+	/* create reference image */
+	cr = igt_get_cairo_ctx(display->drm_fd, &fb_ref);
+	igt_assert(cairo_status(cr) == 0);
+	igt_paint_color(cr, 0, 0, w_lower, h_lower, 0.0, 0.0, 1.0);
+	igt_paint_color(cr, w_upper / 2, h_upper / 2, w_upper, h_upper, 1.0, 1.0, 0.0);
+	igt_put_cairo_ctx(display->drm_fd, &fb_ref, cr);
+	igt_plane_set_fb(primary, &fb_ref);
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
+	/* create the pipe_crc object for this pipe */
+	pipe_crc = igt_pipe_crc_new(pipe->display->drm_fd, pipe->pipe,
+				    INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	/* get reference crc */
+	igt_pipe_crc_start(pipe_crc);
+	igt_pipe_crc_get_current(display->drm_fd, pipe_crc, &ref_crc);
+
+	igt_plane_set_fb(primary, NULL);
+
+	/* sort planes in increasing order of zpos */
+	for (int k = 0; k < n_planes; k++)
+		plane_ptr[k] = &display->pipes[pipe->pipe].planes[k];
+
+	for (int l = 0; l < n_planes - 1; l++) {
+		min_idx = l;
+		for (int m = l + 1; m < n_planes; m++) {
+			int zpos1, zpos2;
+
+			if (!igt_plane_has_prop(plane_ptr[min_idx], IGT_PLANE_ZPOS) ||
+			    !igt_plane_has_prop(plane_ptr[m], IGT_PLANE_ZPOS))
+				continue;
+
+			zpos1 = igt_plane_get_prop(plane_ptr[min_idx], IGT_PLANE_ZPOS);
+			zpos2 = igt_plane_get_prop(plane_ptr[m], IGT_PLANE_ZPOS);
+
+			if (zpos1 == zpos2)
+				continue;
+
+			if (zpos2 < zpos1)
+				min_idx = m;
+		}
+
+		igt_swap(plane_ptr[min_idx], plane_ptr[l]);
+	}
+
+	/* checking only pairs of plane in increasing fashion
+	 * to avoid combinatorial explosion
+	 */
+	for (int i = 0; i < n_planes - 1; i++) {
+		struct igt_fb fb_lower, fb_upper;
+
+		plane_lower = plane_ptr[i];
+		plane_upper = plane_ptr[i + 1];
+
+		if ((plane_lower->type == DRM_PLANE_TYPE_CURSOR) ||
+		    (plane_upper->type == DRM_PLANE_TYPE_CURSOR))
+			continue;
+
+		igt_create_color_fb(display->drm_fd,
+				    w_lower, h_lower,
+				    DRM_FORMAT_XRGB8888,
+				    I915_TILING_NONE,
+				    0.0, 0.0, 1.0, &fb_lower);
Quoted 8 lines

tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 462

Quoted 6 lines
tests/kms_atomic.c +6 -0
+
+		igt_create_color_fb(display->drm_fd,
+				    w_upper, h_upper,
+				    DRM_FORMAT_XRGB8888,
+				    I915_TILING_NONE,
+				    1.0, 1.0, 0.0, &fb_upper);

Do you need to re-create the fb at every loop?

Yes, since in each iteration we are changing plane, fb needs to be recreated.

Quoted 12 lines
Quoted 12 lines
tests/kms_atomic.c +11 -0
+
+		igt_plane_set_position(plane_lower, 0, 0);
+		igt_plane_set_fb(plane_lower, &fb_lower);
+
+		igt_plane_set_position(plane_upper, w_upper / 2, h_upper / 2);
+		igt_plane_set_fb(plane_upper, &fb_upper);
+
+		igt_info("Committing with the plane[%d] underneath "\
+			 "plane[%d]\n", i, (i + 1));
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		igt_pipe_crc_get_current(pipe->display->drm_fd, pipe_crc,
Quoted 8 lines

tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 478

Quoted 6 lines

+&new_crc);

tests/kms_atomic.c +5 -0
+
+		igt_assert_crc_equal(&ref_crc, &new_crc);
+
+		igt_plane_set_fb(plane_lower, NULL);
+		igt_plane_set_fb(plane_upper, NULL);

So, you don't set all the planes under the lower one to another color or something?

No, since i m enabling only 2 planes at a time there won't be any planes active under lower plane.

Quoted 37 lines
Quoted 11 lines
tests/kms_atomic.c +3 -0
+	}
+}
+
  static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output,

igt_plane_t *plane) {
drmModeModeInfo *mode = igt_output_get_mode(output); @@ -987,14
+1108,18 @@ igt_main
plane_primary(pipe_obj, primary, &fb);
}

tests/kms_atomic.c igt_main · line 1114

Quoted 5 lines
tests/kms_atomic.c +4 -1
-	igt_subtest("plane_primary_overlay_zpos") {
+	igt_describe("Tests mutable zpos where zpos is modified for "\
+		     "primary and overlay planes, order of planes is validated "\
+		     "visually where top plane has hole through which underlay plane "\
+		     "can be seen");

The wording is a little odd and the description is more focused on the how, rather than what it is trying to check.

How about: "Verify that the overlay plane can cover the primary one (and vice versa) by changing their zpos property."

Quoted 16 lines
tests/kms_atomic.c +2 -1
+	igt_subtest("plane_primary_overlay_mutable_zpos") {
  		uint32_t format_primary = DRM_FORMAT_ARGB8888;
  		uint32_t format_overlay = DRM_FORMAT_ARGB1555;
 
  		igt_plane_t *overlay =
  			igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
-
  		igt_require(overlay);
+
  		igt_require(igt_plane_has_prop(primary, IGT_PLANE_ZPOS));
  		igt_require(igt_plane_has_prop(overlay, IGT_PLANE_ZPOS));
@@ -1002,8 +1127,18 @@ igt_main
  		igt_require(igt_plane_has_format_mod(overlay, format_overlay,
 0x0));
 
Quoted 14 lines

tests/kms_atomic.c igt_main · line 1138

Quoted 12 lines
tests/kms_atomic.c +9 -2
  		igt_output_set_pipe(output, pipe);
-		plane_primary_overlay_zpos(pipe_obj, output, primary, overlay,
-					   format_primary, format_overlay);
+		plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
+						   format_primary, format_overlay);
+	}
+
+	igt_describe("Tests immutable zpos where zpos cannot be modified such that "\
+		     "reported zpos of the plane is correct by making sure a "\
+		     "full-screen plane covers all other planes with the lower zpos,"\
+		     "and the plane with the next available zpos is indeed partially "\
+		     "covering the full-screen plane");

How about: "Verify the reported zpos property of planes by making sure only higher zpos planes cover the lower zpos ones".

Done in v3. Thanks, it sounds much better :)

Quoted 5 lines

tests/kms_atomic.c igt_main · line 1139

Quoted 2 lines
tests/kms_atomic.c +1 -0
+	igt_subtest("plane_immutable_zpos") {

Do we want a per-pipe test? The current exec time is [0.14, 0.37] s, so good job here, and we could test every pipe!

Yes, we can have per-pipe test, but it needs restructuring in whole kms_atomic IGT; which i don't think is in the scope of this patch. Even if i will make this test per-pipe it will little bit odd and won't go in the same flow as other subtests. Is it okay?

Quoted 19 lines

Anyway, all of these comments are nit picks. If you fix the description, this is:

Martin

Quoted 14 lines
tests/kms_atomic.c +2 -0
+		igt_output_set_pipe(output, pipe);
+		plane_immutable_zpos(&display, pipe_obj, output);
  	}
 
  	igt_subtest("test_only") {
tests/kms_atomic.c +1 -0
@@ -1011,6 +1146,7 @@ igt_main
 
  		test_only(pipe_obj, primary, output);
  	}
+
  	igt_subtest("plane_cursor_legacy") {
  		igt_plane_t *cursor =
  			igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);
Signature · 5 lines
~Swati Sharma
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev