tests/kms_atomic: add test to validate immutable zpos
PATCH v4 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 a new sub-test to validate immutable zpos. Test validates the reported zpos property of plane by making sure only higher zpos plane covers the lower zpos one (lower plane covers full screen, upper plane covers half screen).
Only two planes at a time are tested in increasing fashion to avoid combinatorial explosion. By transitive property,
if (p1, z1) < (p2, z2) and (p2, z2) < (p3, z3) then (p1, z1) < (p3, z3)
where p and z denotes planes and zpos
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]
v3: -Fix description [Martin]
-Avoid sorting [Ankit]
v4: -Change in commit message [Ankit]
-Few minor changes [Ankit]
Issue: https://gitlab.freedesktop.org/drm/intel/issues/404
--- tests/kms_atomic.c | 160 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 150 insertions(+), 10 deletions(-)
tests/kms_atomic.c +150 -10
@@ -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,136 @@ 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; +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]; +uint32_t w_lower, h_lower, w_upper, h_upper; + +igt_require (n_planes >=2 ); + + 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 ); + +for (int k =0 ; k < n_planes; k++) { +int zpos; +igt_plane_t *temp; + + temp = &display->pipes[pipe->pipe].planes[k]; + +if (!igt_plane_has_prop (temp,IGT_PLANE_ZPOS )) +continue ; + +assert (zpos < n_planes); + + zpos =igt_plane_get_prop (temp,IGT_PLANE_ZPOS ); + plane_ptr[zpos] = temp; + } + +/* +* checking only pairs of plane in increasing fashion +* to avoid combinatorial explosion +*/ +for (int i =0 ; i < n_planes -1 ; i++) { +int fb_id_lower, fb_id_upper; +struct igt_fb fb_lower, fb_upper; +igt_plane_t *plane_lower, *plane_upper; + +if (plane_ptr[i] !=NULL ) + plane_lower = plane_ptr[i]; +else +continue ; + +while (i < (n_planes -1 )) { +if (plane_ptr[i +1 ] !=NULL ) { + plane_upper = plane_ptr[i +1 ]; +break ; + }else { + i++; +continue ; + } + } + +if (i == (n_planes -1 )) +break ; + +if ((plane_lower->type ==DRM_PLANE_TYPE_CURSOR ) || + (plane_upper->type ==DRM_PLANE_TYPE_CURSOR )) +continue ; + + fb_id_lower =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_assert (fb_id_lower); + + fb_id_upper =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_assert (fb_id_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 +1117,16 @@ igt_mainplane_primary (pipe_obj, primary, &fb); } - igt_subtest("plane_primary_overlay_zpos") { +igt_describe ("Verify that the overlay plane can cover the primary one (and " \ +"vice versa) by changing their zpos property." ); + 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 +1134,15 @@ igt_mainigt_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 ("Verify the reported zpos property of planes by making sure " \ +"only higher zpos planes cover the lower zpos ones." ); + igt_subtest("plane_immutable_zpos") { +igt_output_set_pipe (output, pipe); +plane_immutable_zpos (&display, pipe_obj, output); } igt_subtest("test_only") {
@@ -1011,6 +1150,7 @@ igt_maintest_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
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_atomic: add test to validate immutable zpos (rev4)
== Series Details ==
== Series Details ==
Series: tests/kms_atomic: add test to validate immutable zpos (rev4)
URL : https://patchwork.freedesktop.org/series/73956/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8139 -> IGTPW_4314
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/index.html
Known issues
------------
Here are the changes found in IGTPW_4314 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/CI_DRM_8139/fi-cml-s/igt@i915_selftest@live@gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/fi-cml-s/igt@i915_selftest@live@gem_contexts.html
[i915#877]: https://gitlab.freedesktop.org/drm/intel/issues/877
Participating hosts (43 -> 35)
------------------------------
Additional (3): fi-kbl-soraka fi-bwr-2160 fi-bsw-nick
Missing (11): fi-tgl-dsi fi-hsw-4200u fi-hsw-peppy fi-skl-6770hq fi-byt-squawks fi-bsw-cyan fi-ivb-3770 fi-skl-lmem fi-kbl-7560u fi-byt-clapper fi-snb-2600
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5512 -> IGTPW_4314
CI-20190529: 20190529
CI_DRM_8139: 1516ff1b2279ede916d81b1978da0428414705f8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4314: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/index.html
IGT_5512: f6fef7eff6f121e5e89afd7e70116f471ccd5b8b @ 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_4314/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for tests/kms_atomic: add test to validate immutable zpos (rev4)
In reply to Swati Sharma== Series Details ==
== Series Details ==
Series: tests/kms_atomic: add test to validate immutable zpos (rev4)
URL : https://patchwork.freedesktop.org/series/73956/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8139_full -> IGTPW_4314_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_4314_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_4314/shard-iclb8/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_4314/shard-tglb5/igt@kms_atomic@plane_primary_overlay_mutable_zpos.html
New tests
---------
New tests have been introduced between CI_DRM_8139_full and IGTPW_4314_full:
### New IGT tests (5) ###
* igt@kms_atomic@plane_immutable_zpos:
- Statuses : 1 incomplete(s) 6 pass(s)
- Exec time: [0.0, 0.51] s
* igt@kms_atomic@plane_primary_overlay_mutable_zpos:
- Statuses : 7 skip(s)
- Exec time: [0.0] s
* igt@sysfs_heartbeat_interval@off:
- Statuses :
- Exec time: [None] s
* igt@sysfs_heartbeat_interval@precise:
- Statuses :
- Exec time: [None] s
* igt@sysfs_preempt_timeout@idempotent:
- Statuses :
- Exec time: [None] s
Known issues
------------
Here are the changes found in IGTPW_4314_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_persistence@close-replace-race:
- shard-tglb: [PASS][3] -> [INCOMPLETE][4] ([i915#1402])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-tglb6/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-tglb8/igt@[email protected]
* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#110841])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb6/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb1/igt@[email protected]
* igt@gem_eio@in-flight-contexts-1us:
- shard-tglb: [PASS][7] -> [TIMEOUT][8] ([fdo#112126])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-tglb1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-tglb5/igt@[email protected]
* igt@gem_exec_async@concurrent-writes-bsd:
- shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#112146]) +3 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb8/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@implicit-read-write-bsd1:
- shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#109276] / [i915#677])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb4/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb5/igt@[email protected]
* igt@gem_exec_whisper@basic-fds-all:
- shard-tglb: [PASS][13] -> [INCOMPLETE][14] ([i915#1401])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-tglb3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-tglb8/igt@[email protected]
* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-snb: [PASS][15] -> [DMESG-WARN][16] ([fdo#110789] / [fdo#111870] / [i915#478])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-snb6/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-snb5/igt@[email protected]
* igt@gen9_exec_parse@allowed-all:
- shard-kbl: [PASS][17] -> [DMESG-WARN][18] ([i915#716])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-kbl6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-kbl6/igt@[email protected]
* igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait:
- shard-hsw: [PASS][19] -> [SKIP][20] ([fdo#109271])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-hsw5/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-hsw5/igt@[email protected]
- shard-glk: [PASS][21] -> [SKIP][22] ([fdo#109271])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-glk6/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-glk2/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-apl: [PASS][23] -> [DMESG-WARN][24] ([i915#180])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-apl1/igt@[email protected]
* igt@kms_draw_crc@fill-fb:
- shard-snb: [PASS][25] -> [DMESG-WARN][26] ([i915#478])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-snb6/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-snb6/igt@[email protected]
- shard-hsw: [PASS][27] -> [DMESG-WARN][28] ([i915#478])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-hsw4/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-hsw1/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-apl: [PASS][29] -> [FAIL][30] ([i915#49])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-apl1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt.html
- shard-kbl: [PASS][31] -> [FAIL][32] ([i915#49])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-kbl2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
- shard-kbl: [PASS][33] -> [DMESG-WARN][34] ([i915#180]) +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-kbl6/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-kbl2/igt@[email protected]
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][35] -> [SKIP][36] ([fdo#109642] / [fdo#111068])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb2/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb5/igt@[email protected]
* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: [PASS][37] -> [SKIP][38] ([fdo#109441])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb1/igt@kms_psr@psr2_cursor_blt.html
* igt@kms_vblank@pipe-c-wait-busy-hang:
- shard-apl: [PASS][39] -> [DMESG-WARN][40] ([i915#62]) +26 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl2/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-apl6/igt@[email protected]
* igt@perf_pmu@busy-no-semaphores-vcs1:
- shard-iclb: [PASS][41] -> [SKIP][42] ([fdo#112080]) +7 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb4/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb5/igt@[email protected]
* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [PASS][43] -> [SKIP][44] ([fdo#109276]) +20 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb1/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb8/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [SKIP][45] ([fdo#112080]) -> [PASS][46] +12 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb5/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb2/igt@[email protected]
* igt@gem_ctx_persistence@close-replace-race:
- shard-iclb: [INCOMPLETE][47] ([i915#1402]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb8/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb5/igt@[email protected]
* igt@gem_eio@in-flight-suspend:
- shard-kbl: [DMESG-WARN][49] ([i915#56]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-kbl6/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-kbl7/igt@[email protected]
* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][51] ([fdo#110854]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb6/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb1/igt@[email protected]
* igt@gem_exec_schedule@implicit-read-write-bsd2:
- shard-iclb: [SKIP][53] ([fdo#109276] / [i915#677]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb8/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@pi-distinct-iova-bsd:
- shard-iclb: [SKIP][55] ([i915#677]) -> [PASS][56] +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb4/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb5/igt@[email protected]
* igt@gem_exec_schedule@preempt-queue-bsd:
- shard-iclb: [SKIP][57] ([fdo#112146]) -> [PASS][58] +3 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb2/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb8/igt@[email protected]
* igt@gem_partial_pwrite_pread@write-uncached:
- shard-snb: [DMESG-WARN][59] ([fdo#110789] / [i915#478]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-snb6/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-snb2/igt@[email protected]
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-apl: [FAIL][61] ([i915#644]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl1/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-apl4/igt@[email protected]
- shard-kbl: [FAIL][63] ([i915#644]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-kbl3/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-kbl6/igt@[email protected]
* igt@gem_userptr_blits@sync-unmap:
- shard-snb: [DMESG-WARN][65] ([fdo#111870] / [i915#478]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-snb4/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-snb6/igt@[email protected]
- shard-hsw: [DMESG-WARN][67] ([fdo#111870]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-hsw1/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-hsw1/igt@[email protected]
* igt@i915_pm_rps@reset:
- shard-iclb: [FAIL][69] ([i915#413]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb6/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb7/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [FAIL][71] ([i915#72]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-glk3/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-glk8/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [DMESG-WARN][73] ([i915#180]) -> [PASS][74] +3 similar issues
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-kbl3/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-kbl1/igt@[email protected]
- shard-apl: [DMESG-WARN][75] ([i915#180]) -> [PASS][76] +1 similar issue
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl1/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-apl8/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-glk: [FAIL][77] ([i915#899]) -> [PASS][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-glk5/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-glk5/igt@[email protected]
* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-iclb: [SKIP][79] ([fdo#109441]) -> [PASS][80]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb5/igt@kms_psr@psr2_cursor_plane_onoff.html
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html
* igt@kms_vblank@pipe-c-ts-continuation-dpms-rpm:
- shard-glk: [SKIP][81] ([fdo#109271]) -> [PASS][82]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-glk5/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-glk7/igt@[email protected]
- shard-tglb: [SKIP][83] ([fdo#112015]) -> [PASS][84]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-tglb7/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-tglb8/igt@[email protected]
- shard-hsw: [SKIP][85] ([fdo#109271]) -> [PASS][86]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-hsw2/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-hsw5/igt@[email protected]
- shard-iclb: [SKIP][87] ([fdo#109278]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb5/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb5/igt@[email protected]
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-hsw: [INCOMPLETE][89] ([i915#61]) -> [PASS][90]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-hsw4/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-hsw5/igt@[email protected]
* igt@prime_busy@after-bsd2:
- shard-iclb: [SKIP][91] ([fdo#109276]) -> [PASS][92] +12 similar issues
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb7/igt@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb4/igt@[email protected]
#### Warnings ####
* igt@gem_ctx_persistence@close-replace-race:
- shard-apl: [INCOMPLETE][93] ([fdo#103927]) -> [INCOMPLETE][94] ([fdo#103927] / [i915#1402])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl4/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-apl2/igt@[email protected]
* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-hsw: [DMESG-WARN][95] ([fdo#111870]) -> [DMESG-WARN][96] ([fdo#110789] / [fdo#111870])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-hsw2/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-hsw4/igt@[email protected]
* igt@i915_pm_dc@dc3co-vpb-simulation:
- shard-iclb: [SKIP][97] ([i915#658]) -> [SKIP][98] ([i915#588])
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb7/igt@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb2/igt@[email protected]
* igt@i915_pm_dc@dc6-dpms:
- shard-tglb: [FAIL][99] ([i915#454]) -> [SKIP][100] ([i915#468])
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-tglb6/igt@[email protected]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-tglb2/igt@[email protected]
* igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait:
- shard-tglb: [SKIP][101] ([fdo#111644] / [i915#1397]) -> [SKIP][102] ([i915#1316])
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-tglb2/igt@[email protected]
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-tglb1/igt@[email protected]
- shard-iclb: [SKIP][103] ([fdo#110892]) -> [SKIP][104] ([i915#1316])
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-iclb1/igt@[email protected]
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-iclb2/igt@[email protected]
* igt@i915_selftest@live@execlists:
- shard-apl: [INCOMPLETE][105] ([fdo#103927] / [i915#656]) -> [INCOMPLETE][106] ([fdo#103927] / [i915#529])
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl6/igt@i915_selftest@[email protected]
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-apl7/igt@i915_selftest@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-kbl: [DMESG-WARN][107] ([i915#180]) -> [INCOMPLETE][108] ([i915#648])
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-kbl6/igt@[email protected]
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-kbl3/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-alpha-transparant-fb:
- shard-apl: [FAIL][109] ([fdo#108145]) -> [DMESG-FAIL][110] ([fdo#108145] / [i915#62]) +1 similar issue
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl3/igt@[email protected]
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-apl6/igt@[email protected]
* igt@runner@aborted:
- shard-kbl: ([FAIL][111], [FAIL][112]) ([i915#1389] / [i915#1402] / [i915#92]) -> ([FAIL][113], [FAIL][114], [FAIL][115]) ([i915#1389] / [i915#1402] / [i915#716] / [i915#92])
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-kbl1/igt@[email protected]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-kbl1/igt@[email protected]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-kbl4/igt@[email protected]
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-kbl2/igt@[email protected]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-kbl6/igt@[email protected]
- shard-apl: ([FAIL][116], [FAIL][117], [FAIL][118]) ([fdo#103927] / [i915#1402] / [i915#529]) -> ([FAIL][119], [FAIL][120]) ([fdo#103927] / [i915#1402])
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl6/igt@[email protected]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl6/igt@[email protected]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8139/shard-apl4/igt@[email protected]
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-apl2/igt@[email protected]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/shard-apl6/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#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#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#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#110892]: https://bugs.freedesktop.org/show_bug.cgi?id=110892
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#112015]: https://bugs.freedesktop.org/show_bug.cgi?id=112015
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112126]: https://bugs.freedesktop.org/show_bug.cgi?id=112126
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[i915#1316]: https://gitlab.freedesktop.org/drm/intel/issues/1316
[i915#1389]: https://gitlab.freedesktop.org/drm/intel/issues/1389
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1401]: https://gitlab.freedesktop.org/drm/intel/issues/1401
[i915#1402]: https://gitlab.freedesktop.org/drm/intel/issues/1402
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#478]: https://gitlab.freedesktop.org/drm/intel/issues/478
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#529]: https://gitlab.freedesktop.org/drm/intel/issues/529
[i915#56]: https://gitlab.freedesktop.org/drm/intel/issues/56
[i915#588]: https://gitlab.freedesktop.org/drm/intel/issues/588
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#648]: https://gitlab.freedesktop.org/drm/intel/issues/648
[i915#656]: https://gitlab.freedesktop.org/drm/intel/issues/656
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
Participating hosts (10 -> 8)
------------------------------
Missing (2): pig-skl-6260u pig-glk-j5005
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5512 -> IGTPW_4314
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_8139: 1516ff1b2279ede916d81b1978da0428414705f8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4314: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4314/index.html
IGT_5512: f6fef7eff6f121e5e89afd7e70116f471ccd5b8b @ 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_4314/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 134 lines · Swati Sharma
i915 implements immutable zpos property whereas the existing test case is written to validate mutable zpos.
Added a new sub-test to validate immutable zpos. Test validates the reported zpos property of plane by making sure only higher zpos plane covers the lower zpos one (lower plane covers full screen, upper plane covers half screen).
Only two planes at a time are tested in increasing fashion to avoid combinatorial explosion. By transitive property,
if (p1, z1) < (p2, z2) and (p2, z2) < (p3, z3) then (p1, z1) < (p3, z3)where p and z denotes planes and zpos
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]
v3: -Fix description [Martin]
-Avoid sorting [Ankit]
v4: -Change in commit message [Ankit]
-Few minor changes [Ankit]Issue: https://gitlab.freedesktop.org/drm/intel/issues/404
Signed-off-by Swati Sharma <[email protected]>Reviewed-by Martin Peres <[email protected]>Reviewed-by Ankit Nautiyal <[email protected]>--- tests/kms_atomic.c | 160 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 150 insertions(+), 10 deletions(-)tests/kms_atomic.c +60
-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,136 @@ 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; +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]; +uint32_t w_lower, h_lower, w_upper, h_upper; + +igt_require (n_planes >=2 ); + + 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 ); + +for (int k =0 ; k < n_planes; k++) { +int zpos;
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 424
Quoted 10 lines
tests/kms_atomic.c +10
-0+igt_plane_t *temp; + + temp = &display->pipes[pipe->pipe].planes[k]; + +if (!igt_plane_has_prop (temp,IGT_PLANE_ZPOS )) +continue ; + +assert (zpos < n_planes); + + zpos =igt_plane_get_prop (temp,IGT_PLANE_ZPOS );
Do not use plain assert in tests. Use igt_assert() and its brothers. igt_assert_lt(zpos, n_planes) prints the values compared when it fails.
You have a test failure (lucky that it happened) because you check zpos before you set it to a value...
Signature · 5 lines
Petri Latvala _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 150 lines · Petri Latvala
Quoted 134 lines · Swati Sharma
i915 implements immutable zpos property whereas the existing test case is written to validate mutable zpos.
Added a new sub-test to validate immutable zpos. Test validates the reported zpos property of plane by making sure only higher zpos plane covers the lower zpos one (lower plane covers full screen, upper plane covers half screen).
Only two planes at a time are tested in increasing fashion to avoid combinatorial explosion. By transitive property,
if (p1, z1) < (p2, z2) and (p2, z2) < (p3, z3) then (p1, z1) < (p3, z3)where p and z denotes planes and zpos
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]
v3: -Fix description [Martin]
-Avoid sorting [Ankit]
v4: -Change in commit message [Ankit]
-Few minor changes [Ankit]Issue: https://gitlab.freedesktop.org/drm/intel/issues/404
Signed-off-by Swati Sharma <[email protected]>Reviewed-by Martin Peres <[email protected]>Reviewed-by Ankit Nautiyal <[email protected]>--- tests/kms_atomic.c | 160 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 150 insertions(+), 10 deletions(-)tests/kms_atomic.c +60
-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,136 @@ 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; +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]; +uint32_t w_lower, h_lower, w_upper, h_upper; + +igt_require (n_planes >=2 ); + + 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 ); + +for (int k =0 ; k < n_planes; k++) { +int zpos;tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 424
Quoted 10 lines
tests/kms_atomic.c +10
-0+igt_plane_t *temp; + + temp = &display->pipes[pipe->pipe].planes[k]; + +if (!igt_plane_has_prop (temp,IGT_PLANE_ZPOS )) +continue ; + +assert (zpos < n_planes); + + zpos =igt_plane_get_prop (temp,IGT_PLANE_ZPOS );Do not use plain assert in tests. Use
igt_assert()and its brothers.igt_assert_lt(zpos, n_planes)prints the values compared when it fails.
Quoted 2 lines
You have a test failure (lucky that it happened) because you check zpos before you set it to a value...
Thanks Petri and sorry for this :(
Quoted 2 lines
Signature · 5 lines
~Swati Sharma _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 96 lines · Swati Sharma
i915 implements immutable zpos property whereas the existing test case is written to validate mutable zpos.
Added a new sub-test to validate immutable zpos. Test validates the reported zpos property of plane by making sure only higher zpos plane covers the lower zpos one (lower plane covers full screen, upper plane covers half screen).
Only two planes at a time are tested in increasing fashion to avoid combinatorial explosion. By transitive property,
if (p1, z1) < (p2, z2) and (p2, z2) < (p3, z3) then (p1, z1) < (p3, z3)where p and z denotes planes and zpos
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]
v3: -Fix description [Martin]
-Avoid sorting [Ankit]
v4: -Change in commit message [Ankit]
-Few minor changes [Ankit]Issue: https://gitlab.freedesktop.org/drm/intel/issues/404
Signed-off-by Swati Sharma <[email protected]>Reviewed-by Martin Peres <[email protected]>Reviewed-by Ankit Nautiyal <[email protected]>--- tests/kms_atomic.c | 160 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 150 insertions(+), 10 deletions(-)tests/kms_atomic.c +22
-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,136 @@ 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; +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]; +uint32_t w_lower, h_lower, w_upper, h_upper; + +igt_require (n_planes >=2 ); +
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 386
Quoted 10 lines
tests/kms_atomic.c +10
-0+ 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 ;
I would make that just 64x64 aka. kms_plane/pixel-format*.
Potentially we could use a 64x64 for all planes on many platforms but that might complicate the logic a bit so maybe a fullscreen plane for the lowerr plane is fine.
Alhtough using a smaller size the lower plane would be more robust since then we could see that the uper plane looks correct even in places where there's no plane below it.
Quoted 57 lines
tests/kms_atomic.c +57
-0+ +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 ); + +for (int k =0 ; k < n_planes; k++) { +int zpos; +igt_plane_t *temp; + + temp = &display->pipes[pipe->pipe].planes[k]; + +if (!igt_plane_has_prop (temp,IGT_PLANE_ZPOS )) +continue ; + +assert (zpos < n_planes); + + zpos =igt_plane_get_prop (temp,IGT_PLANE_ZPOS ); + plane_ptr[zpos] = temp; + } + +/* +* checking only pairs of plane in increasing fashion +* to avoid combinatorial explosion +*/ +for (int i =0 ; i < n_planes -1 ; i++) { +int fb_id_lower, fb_id_upper; +struct igt_fb fb_lower, fb_upper; +igt_plane_t *plane_lower, *plane_upper; + +if (plane_ptr[i] !=NULL ) + plane_lower = plane_ptr[i]; +else +continue ; + +while (i < (n_planes -1 )) { +if (plane_ptr[i +1 ] !=NULL ) {
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 453
Quoted 10 lines
tests/kms_atomic.c +10
-0+ plane_upper = plane_ptr[i +1 ]; +break ; + }else { + i++; +continue ; + } + } + +if (i == (n_planes -1 )) +break ;
I have no idea what this is trying to do. Just pick plane[i] and plane[i+1] and proceed with the test? a
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 457
Quoted 4 lines
tests/kms_atomic.c +4
-0+ +if ((plane_lower->type ==DRM_PLANE_TYPE_CURSOR ) || + (plane_upper->type ==DRM_PLANE_TYPE_CURSOR )) +continue ;
We want to test cursors too.
Quoted 4 lines
tests/kms_atomic.c +4
-0+ + fb_id_lower = igt_create_color_fb(display->drm_fd, + w_lower, h_lower, + DRM_FORMAT_XRGB8888,
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 471
Quoted 10 lines
tests/kms_atomic.c +10
-0+I915_TILING_NONE , + 0.0, 0.0, 1.0, &fb_lower); +igt_assert (fb_id_lower); + + fb_id_upper =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_assert (fb_id_upper);
Creating new fbs every iteration is pointless.
You also seem to be leaking these.
Quoted 44 lines
tests/kms_atomic.c +23
-2+ +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 +1117,16 @@ igt_mainplane_primary (pipe_obj, primary, &fb); } - igt_subtest("plane_primary_overlay_zpos") { +igt_describe ("Verify that the overlay plane can cover the primary one (and " \ +"vice versa) by changing their zpos property." ); + 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 +1134,15 @@ igt_mainigt_require (igt_plane_has_format_mod (overlay, format_overlay,0x0 ));
tests/kms_atomic.c igt_main · line 1143
Quoted 10 lines
tests/kms_atomic.c +7
-2igt_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 ("Verify the reported zpos property of planes by making sure " \ +"only higher zpos planes cover the lower zpos ones." ); + igt_subtest("plane_immutable_zpos") {
'-' is the normal delimeter in subtest names.
tests/kms_atomic.c igt_main · line 1146
Quoted 3 lines
tests/kms_atomic.c +2
-0+igt_output_set_pipe (output, pipe); +plane_immutable_zpos (&display, pipe_obj, output); }
I don't see anything that checks the props are immutable. And probably we shouldn't do any suhc checks. Ie. the test is more of "check the defaut zpos values are correct". Although if the previous subtest messes with the zpos (which it looks like it will) then this will test different things depending on when it runs.
The other subtest also seems needlessly specific (ie. only test a single pair of planes). No idea why it wasn't made generic as well.
tests/kms_atomic.c igt_main · line 1148
Quoted 2 lines
tests/kms_atomic.c +0
-0igt_subtest("test_only") {
Hrmh. Looks like this test has non-standard conventions :(
Quoted 15 lines
tests/kms_atomic.c +1
-0@@ -1011,6 +1150,7 @@ igt_maintest_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
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 101 lines · Ville Syrjälä
Quoted 100 lines · Swati Sharma
i915 implements immutable zpos property whereas the existing test case is written to validate mutable zpos.
Added a new sub-test to validate immutable zpos. Test validates the reported zpos property of plane by making sure only higher zpos plane covers the lower zpos one (lower plane covers full screen, upper plane covers half screen).
Only two planes at a time are tested in increasing fashion to avoid combinatorial explosion. By transitive property,
if (p1, z1) < (p2, z2) and (p2, z2) < (p3, z3) then (p1, z1) < (p3, z3)where p and z denotes planes and zpos
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]
v3: -Fix description [Martin]
-Avoid sorting [Ankit]
v4: -Change in commit message [Ankit]
-Few minor changes [Ankit]Issue: https://gitlab.freedesktop.org/drm/intel/issues/404
Signed-off-by Swati Sharma <[email protected]>Reviewed-by Martin Peres <[email protected]>Reviewed-by Ankit Nautiyal <[email protected]>--- tests/kms_atomic.c | 160 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 150 insertions(+), 10 deletions(-)tests/kms_atomic.c +26
-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,136 @@ 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; +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]; +uint32_t w_lower, h_lower, w_upper, h_upper; + +igt_require (n_planes >=2 ); + + mode =igt_output_get_mode (output); + primary =igt_pipe_get_plane_type (pipe,DRM_PLANE_TYPE_PRIMARY ); + +/* for lower plane */
Quoted 8 lines
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 386
Quoted 6 lines
tests/kms_atomic.c +6
-0+ w_lower = mode->hdisplay; + h_lower = mode->vdisplay; + +/* for upper plane */ + w_upper = mode->hdisplay /2 ; + h_upper = mode->vdisplay /2 ;I would make that just 64x64 aka. kms_plane/pixel-format*.
Done in v5. With that and change in pixel format able to validate cursor plane aswell.
Quoted 71 lines
Potentially we could use a 64x64 for all planes on many platforms but that might complicate the logic a bit so maybe a fullscreen plane for the lowerr plane is fine.
Alhtough using a smaller size the lower plane would be more robust since then we could see that the uper plane looks correct even in places where there's no plane below it.
Quoted 62 lines
tests/kms_atomic.c +62
-0+ +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 ); + +for (int k =0 ; k < n_planes; k++) { +int zpos; +igt_plane_t *temp; + + temp = &display->pipes[pipe->pipe].planes[k]; + +if (!igt_plane_has_prop (temp,IGT_PLANE_ZPOS )) +continue ; + +assert (zpos < n_planes); + + zpos =igt_plane_get_prop (temp,IGT_PLANE_ZPOS ); + plane_ptr[zpos] = temp; + } + +/* +* checking only pairs of plane in increasing fashion +* to avoid combinatorial explosion +*/ +for (int i =0 ; i < n_planes -1 ; i++) { +int fb_id_lower, fb_id_upper; +struct igt_fb fb_lower, fb_upper; +igt_plane_t *plane_lower, *plane_upper; + +if (plane_ptr[i] !=NULL ) + plane_lower = plane_ptr[i]; +else +continue ; + +while (i < (n_planes -1 )) { +if (plane_ptr[i +1 ] !=NULL ) { + plane_upper = plane_ptr[i +1 ]; +break ; + }else { + i++; +continue ;
Quoted 9 lines
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 453
Quoted 5 lines
tests/kms_atomic.c +5
-0+ } + } + +if (i == (n_planes -1 )) +break ;I have no idea what this is trying to do. Just pick plane[i] and plane[i+1] and proceed with the test?
Yes, true. It's not required.
Quoted 6 lines
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 457
Quoted 4 lines
tests/kms_atomic.c +4
-0+ +if ((plane_lower->type ==DRM_PLANE_TYPE_CURSOR ) || + (plane_upper->type ==DRM_PLANE_TYPE_CURSOR )) +continue ;We want to test cursors too.
Done in v5.
Quoted 10 lines
Quoted 10 lines
tests/kms_atomic.c +9
-0+ + fb_id_lower =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_assert (fb_id_lower); + + fb_id_upper = igt_create_color_fb(display->drm_fd,
Quoted 8 lines
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 471
Quoted 5 lines
tests/kms_atomic.c +5
-0+ w_upper, h_upper, +DRM_FORMAT_XRGB8888 , +I915_TILING_NONE , + 1.0, 1.0, 0.0, &fb_upper); +igt_assert (fb_id_upper);Creating new fbs every iteration is pointless.
You also seem to be leaking these.
Correct, sorry for this. Done in v5.
Quoted 45 lines
Quoted 45 lines
tests/kms_atomic.c +23
-2+ +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 +1117,16 @@ igt_mainplane_primary (pipe_obj, primary, &fb); } - igt_subtest("plane_primary_overlay_zpos") { +igt_describe ("Verify that the overlay plane can cover the primary one (and " \ +"vice versa) by changing their zpos property." ); + 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 +1134,15 @@ igt_mainigt_require (igt_plane_has_format_mod (overlay, format_overlay,0x0 ));
Quoted 12 lines
tests/kms_atomic.c igt_main · line 1143
Quoted 10 lines
tests/kms_atomic.c +7
-2igt_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 ("Verify the reported zpos property of planes by making sure " \ +"only higher zpos planes cover the lower zpos ones." ); + igt_subtest("plane_immutable_zpos") {'-' is the normal delimeter in subtest names.
Thanks for pointing out.
Quoted 8 lines
tests/kms_atomic.c igt_main · line 1146
Quoted 4 lines
tests/kms_atomic.c +2
-0+igt_output_set_pipe (output, pipe); +plane_immutable_zpos (&display, pipe_obj, output); }I don't see anything that checks the props are immutable. And probably we shouldn't do any suhc checks. Ie. the test is more of "check the defaut zpos values are correct". Although if the previous subtest messes with
Agreed. Were you expecting any change name in subtest?
Quoted 2 lines
the zpos (which it looks like it will) then this will test different things depending on when it runs.
Mutable zpos changes zpos value back to default.
Quoted 3 lines
The other subtest also seems needlessly specific (ie. only test a single pair of planes). No idea why it wasn't made generic as well.
Yeah correct. It's not generic aswell.
Quoted 5 lines
tests/kms_atomic.c igt_main · line 1148
Quoted 3 lines
tests/kms_atomic.c +0
-0igt_subtest("test_only") {Hrmh. Looks like this test has non-standard conventions :(
Send other patch, changing all subtests to standard conventions.
Quoted 18 lines
Quoted 17 lines
tests/kms_atomic.c +1
-0@@ -1011,6 +1150,7 @@ igt_maintest_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
Signature · 5 lines
~Swati Sharma _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 132 lines · Swati Sharma
i915 implements immutable zpos property whereas the existing test case is written to validate mutable zpos.
Added a new sub-test to validate immutable zpos. Test validates the reported zpos property of plane by making sure only higher zpos plane covers the lower zpos one (lower plane covers full screen, upper plane covers half screen).
Only two planes at a time are tested in increasing fashion to avoid combinatorial explosion. By transitive property,
if (p1, z1) < (p2, z2) and (p2, z2) < (p3, z3) then (p1, z1) < (p3, z3)where p and z denotes planes and zpos
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]
v3: -Fix description [Martin]
-Avoid sorting [Ankit]
v4: -Change in commit message [Ankit]
-Few minor changes [Ankit]Issue: https://gitlab.freedesktop.org/drm/intel/issues/404
Signed-off-by Swati Sharma <[email protected]>Reviewed-by Martin Peres <[email protected]>Reviewed-by Ankit Nautiyal <[email protected]>--- tests/kms_atomic.c | 160 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 150 insertions(+), 10 deletions(-)tests/kms_atomic.c +58
-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,136 @@ 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; +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]; +uint32_t w_lower, h_lower, w_upper, h_upper; + +igt_require (n_planes >=2 ); + + 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 ); +
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 422
Quoted 10 lines
tests/kms_atomic.c +10
-0+for (int k =0 ; k < n_planes; k++) { +int zpos; +igt_plane_t *temp; + + temp = &display->pipes[pipe->pipe].planes[k]; + +if (!igt_plane_has_prop (temp,IGT_PLANE_ZPOS )) +continue ; + +assert (zpos < n_planes);
I'll assume you get this fixed, as suggested by Petri (unspecified zpos and igt_assert_lt).
Quoted 21 lines
tests/kms_atomic.c +21
-0+ + zpos =igt_plane_get_prop (temp,IGT_PLANE_ZPOS ); + plane_ptr[zpos] = temp; + } + +/* +* checking only pairs of plane in increasing fashion +* to avoid combinatorial explosion +*/ +for (int i =0 ; i < n_planes -1 ; i++) { +int fb_id_lower, fb_id_upper; +struct igt_fb fb_lower, fb_upper; +igt_plane_t *plane_lower, *plane_upper; + +if (plane_ptr[i] !=NULL ) + plane_lower = plane_ptr[i]; +else +continue ; + +while (i < (n_planes -1 )) { +if (plane_ptr[i +1 ] !=NULL ) {
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 453
Quoted 10 lines
tests/kms_atomic.c +10
-0+ plane_upper = plane_ptr[i +1 ]; +break ; + }else { + i++; +continue ; + } + } + +if (i == (n_planes -1 )) +break ;
This should be impossible to reach given that the for loop is i < n_planes - 1
You can drop this.
Quoted 61 lines
tests/kms_atomic.c +41
-2+ +if ((plane_lower->type ==DRM_PLANE_TYPE_CURSOR ) || + (plane_upper->type ==DRM_PLANE_TYPE_CURSOR )) +continue ; + + fb_id_lower =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_assert (fb_id_lower); + + fb_id_upper =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_assert (fb_id_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 +1117,16 @@ igt_mainplane_primary (pipe_obj, primary, &fb); } - igt_subtest("plane_primary_overlay_zpos") { +igt_describe ("Verify that the overlay plane can cover the primary one (and " \ +"vice versa) by changing their zpos property." ); + 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 +1134,15 @@ igt_mainigt_require (igt_plane_has_format_mod (overlay, format_overlay,0x0 ));
tests/kms_atomic.c igt_main · line 1142
Quoted 10 lines
tests/kms_atomic.c +6
-2igt_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 ("Verify the reported zpos property of planes by making sure " \ +"only higher zpos planes cover the lower zpos ones." );
With what you have right now, you are checking planes only 2 by 2, as opposed to keeping the planes under the "main" plane active, but with a different color, in order to check for non-linearity between planes' reported zpos. This would require really broken HW, but this is what the test is about :s
To save memory bandwidth, we could have a 2x2 red fb that would be used by all planes ;)
I am however OK with merging this now, as it is already a pretty good test! With the changes suggested by Petri, this patch is:
Quoted 8 lines
tests/kms_atomic.c +3
-0+ igt_subtest("plane_immutable_zpos") { +igt_output_set_pipe (output, pipe); +plane_immutable_zpos (&display, pipe_obj, output); } igt_subtest("test_only") {
tests/kms_atomic.c igt_main · line 1156
Quoted 7 lines
tests/kms_atomic.c +1
-0@@ -1011,6 +1150,7 @@ igt_maintest_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
Quoted 138 lines · Martin
Quoted 137 lines · Swati Sharma
i915 implements immutable zpos property whereas the existing test case is written to validate mutable zpos.
Added a new sub-test to validate immutable zpos. Test validates the reported zpos property of plane by making sure only higher zpos plane covers the lower zpos one (lower plane covers full screen, upper plane covers half screen).
Only two planes at a time are tested in increasing fashion to avoid combinatorial explosion. By transitive property,
if (p1, z1) < (p2, z2) and (p2, z2) < (p3, z3) then (p1, z1) < (p3, z3)where p and z denotes planes and zpos
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]
v3: -Fix description [Martin]
-Avoid sorting [Ankit]
v4: -Change in commit message [Ankit]
-Few minor changes [Ankit]Issue: https://gitlab.freedesktop.org/drm/intel/issues/404
Signed-off-by Swati Sharma <[email protected]>Reviewed-by Martin Peres <[email protected]>Reviewed-by Ankit Nautiyal <[email protected]>--- tests/kms_atomic.c | 160 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 150 insertions(+), 10 deletions(-)tests/kms_atomic.c +63
-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,136 @@ 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; +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]; +uint32_t w_lower, h_lower, w_upper, h_upper; + +igt_require (n_planes >=2 ); + + 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 ); + +for (int k =0 ; k < n_planes; k++) { +int zpos; +igt_plane_t *temp; + + temp = &display->pipes[pipe->pipe].planes[k];
Quoted 9 lines
tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 422
Quoted 5 lines
tests/kms_atomic.c +5
-0+ +if (!igt_plane_has_prop (temp,IGT_PLANE_ZPOS )) +continue ; + +assert (zpos < n_planes);I'll assume you get this fixed, as suggested by Petri (unspecified zpos and
igt_assert_lt).
Done in v5.
Quoted 35 lines
Quoted 21 lines
tests/kms_atomic.c +21
-0+ + zpos =igt_plane_get_prop (temp,IGT_PLANE_ZPOS ); + plane_ptr[zpos] = temp; + } + +/* +* checking only pairs of plane in increasing fashion +* to avoid combinatorial explosion +*/ +for (int i =0 ; i < n_planes -1 ; i++) { +int fb_id_lower, fb_id_upper; +struct igt_fb fb_lower, fb_upper; +igt_plane_t *plane_lower, *plane_upper; + +if (plane_ptr[i] !=NULL ) + plane_lower = plane_ptr[i]; +else +continue ; + +while (i < (n_planes -1 )) { +if (plane_ptr[i +1 ] !=NULL ) {tests/kms_atomic.c plane_primary_overlay_zpos(igt_pipe_t *pipe, igt_output_t *output, · line 453
Quoted 10 lines
tests/kms_atomic.c +10
-0+ plane_upper = plane_ptr[i +1 ]; +break ; + }else { + i++; +continue ; + } + } + +if (i == (n_planes -1 )) +break ;This should be impossible to reach given that the for loop is i <
n_planes- 1
Quoted 1 line
You can drop this.
Done in v5.
Quoted 78 lines
Quoted 61 lines
tests/kms_atomic.c +41
-2+ +if ((plane_lower->type ==DRM_PLANE_TYPE_CURSOR ) || + (plane_upper->type ==DRM_PLANE_TYPE_CURSOR )) +continue ; + + fb_id_lower =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_assert (fb_id_lower); + + fb_id_upper =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_assert (fb_id_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 +1117,16 @@ igt_mainplane_primary (pipe_obj, primary, &fb); } - igt_subtest("plane_primary_overlay_zpos") { +igt_describe ("Verify that the overlay plane can cover the primary one (and " \ +"vice versa) by changing their zpos property." ); + 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 +1134,15 @@ igt_mainigt_require (igt_plane_has_format_mod (overlay, format_overlay,0x0 ));tests/kms_atomic.c igt_main · line 1142
Quoted 10 lines
tests/kms_atomic.c +6
-2igt_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 ("Verify the reported zpos property of planes by making sure " \ +"only higher zpos planes cover the lower zpos ones." );With what you have right now, you are checking planes only 2 by 2, as opposed to keeping the planes under the "main" plane active, but with a different color, in order to check for non-linearity between planes' reported zpos. This would require really broken HW, but this is what the test is about :s
Quoted 7 lines
To save memory bandwidth, we could have a 2x2 red fb that would be used by all planes ;)
I am however OK with merging this now, as it is already a pretty good test! With the changes suggested by Petri, this patch is:
Reviewed-by Martin Peres <[email protected]>
Thanks!
Quoted 17 lines
Quoted 16 lines
tests/kms_atomic.c +4
-0+ igt_subtest("plane_immutable_zpos") { +igt_output_set_pipe (output, pipe); +plane_immutable_zpos (&display, pipe_obj, output); } igt_subtest("test_only") {@@ -1011,6 +1150,7 @@ igt_maintest_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