lib/igt_kms: Add zpos plane property.
PATCH v2 1/2 lib/igt_kms: Add zpos plane property.
From: Marius Vlad <[email protected]>
--- lib/igt_kms.c | 1 + lib/igt_kms.h | 1 + 2 files changed, 2 insertions(+)
lib/igt_kms.c +1 -0
@@ -177,6 +177,7 @@ const char * const igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = { [IGT_PLANE_COLOR_RANGE] = "COLOR_RANGE", [IGT_PLANE_PIXEL_BLEND_MODE] = "pixel blend mode", [IGT_PLANE_ALPHA] = "alpha", + [IGT_PLANE_ZPOS] = "zpos", };const char *const igt_crtc_prop_names[IGT_NUM_CRTC_PROPS ] = {
lib/igt_kms.h +1 -0
@@ -272,6 +272,7 @@ enum igt_atomic_plane_properties {IGT_PLANE_COLOR_RANGE ,IGT_PLANE_PIXEL_BLEND_MODE ,IGT_PLANE_ALPHA , +IGT_PLANE_ZPOS , IGT_NUM_PLANE_PROPS };
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v2 2/2 kms_atomic: Add subtest for testing zpos plane property
From: Tomeu Vizoso <[email protected]>
We use a 16-bit pixel buffer format for the overlay plane, as some older HW might not be capable of driving a 32-bit pixel format.
Changes since v1:
- fix 'commitintg' with 'committing' (Philipp Zabel)
- replace RGB565 with ARGB1555 (Philipp Zabel)
- test plane if it supports the pixel format supplied (Philipp Zabel)
--- tests/kms_atomic.c | 101 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+)
tests/kms_atomic.c +101 -0
@@ -276,6 +276,88 @@ static uint32_t plane_get_igt_format(igt_plane_t *plane)return 0 ; } +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) +{ +struct igt_fb fb_primary, fb_overlay; +drmModeModeInfo *mode =igt_output_get_mode (output); +cairo_t *cr; + +/* for primary */ +uint32_t w = mode->hdisplay; +uint32_t h = mode->vdisplay; + +/* for overlay */ +uint32_t w_overlay = mode->hdisplay /2 ; +uint32_t h_overlay = mode->vdisplay /2 ; + +igt_create_color_pattern_fb (pipe->display->drm_fd, + w, h, format_primary,I915_TILING_NONE , +0.2 ,0.2 ,0.2 , &fb_primary); + +igt_create_color_pattern_fb (pipe->display->drm_fd, + w_overlay, h_overlay, + format_overlay,I915_TILING_NONE , +0.2 ,0.2 ,0.2 , &fb_overlay); + +/* Draw a hole in the overlay */ + cr =igt_get_cairo_ctx (pipe->display->drm_fd, &fb_overlay); +cairo_set_operator (cr,CAIRO_OPERATOR_SOURCE ); +igt_paint_color_alpha (cr, w_overlay /4 , h_overlay /4 , + w_overlay /2 , h_overlay /2 , +0.0 ,0.0 ,0.0 ,0.5 ); +cairo_set_operator (cr,CAIRO_OPERATOR_OVER ); +igt_put_cairo_ctx (pipe->display->drm_fd, &fb_overlay, cr); + +igt_plane_set_fb (primary, &fb_primary); +igt_plane_set_fb (overlay, &fb_overlay); + +igt_plane_set_position (overlay, w_overlay /2 , h_overlay /2 ); + +igt_plane_set_prop_value (primary,IGT_PLANE_ZPOS ,0 ); +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" ); +plane_commit (primary,COMMIT_ATOMIC ,ATOMIC_RELAX_NONE ); + +igt_assert_eq_u64 (igt_plane_get_prop (primary,IGT_PLANE_ZPOS ),0 ); +igt_assert_eq_u64 (igt_plane_get_prop (overlay,IGT_PLANE_ZPOS ),1 ); + +igt_plane_set_prop_value (primary,IGT_PLANE_ZPOS ,1 ); +igt_plane_set_prop_value (overlay,IGT_PLANE_ZPOS ,0 ); + +igt_info ("Committing with primary on top, only the primary " \ +"should be visible\n" ); +plane_commit (primary,COMMIT_ATOMIC ,ATOMIC_RELAX_NONE ); + +igt_assert_eq_u64 (igt_plane_get_prop (primary,IGT_PLANE_ZPOS ),1 ); +igt_assert_eq_u64 (igt_plane_get_prop (overlay,IGT_PLANE_ZPOS ),0 ); + +/* Draw a hole in the primary exactly on top of the overlay plane */ + cr =igt_get_cairo_ctx (pipe->display->drm_fd, &fb_primary); +cairo_set_operator (cr,CAIRO_OPERATOR_SOURCE ); +igt_paint_color_alpha (cr, w_overlay /2 , h_overlay /2 , + w_overlay, h_overlay, +0.0 ,0.0 ,0.0 ,0.5 ); +cairo_set_operator (cr,CAIRO_OPERATOR_OVER ); +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" ); +plane_commit (primary,COMMIT_ATOMIC ,ATOMIC_RELAX_NONE ); + +/* reset it back to initial state */ +igt_plane_set_prop_value (primary,IGT_PLANE_ZPOS ,0 ); +igt_plane_set_prop_value (overlay,IGT_PLANE_ZPOS ,1 ); +plane_commit (primary,COMMIT_ATOMIC ,ATOMIC_RELAX_NONE ); + +igt_assert_eq_u64 (igt_plane_get_prop (primary,IGT_PLANE_ZPOS ),0 ); +igt_assert_eq_u64 (igt_plane_get_prop (overlay,IGT_PLANE_ZPOS ),1 ); +} +static void plane_overlay (igt_pipe_t *pipe,igt_output_t *output,igt_plane_t *plane) {drmModeModeInfo *mode =igt_output_get_mode (output);
@@ -905,6 +987,25 @@ igt_mainplane_primary (pipe_obj, primary, &fb); } + igt_subtest("plane_primary_overlay_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 )); + +igt_require (igt_plane_has_format_mod (primary, format_primary,0x0 )); +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); + } + igt_subtest("test_only") {atomic_clear (&display, pipe, primary, output);
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2,v2] lib/igt_kms: Add zpos plane property.
In reply to Marius Vlad== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/2,v2] lib/igt_kms: Add zpos plane property.
URL : https://patchwork.freedesktop.org/series/57805/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5730 -> IGTPW_2584
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/57805/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2584 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_basic@readonly-bsd1:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] +57
* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: PASS -> FAIL [fdo#108511]
* igt@kms_busy@basic-flip-a:
- fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1
* igt@kms_busy@basic-flip-c:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u: PASS -> WARN [fdo#109380]
* igt@kms_chamelium@hdmi-crc-fast:
- fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] +62
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c:
- fi-kbl-7567u: PASS -> SKIP [fdo#109271] +33
#### Possible fixes ####
* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS
* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u2: FAIL [fdo#103167] -> PASS
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109380]: https://bugs.freedesktop.org/show_bug.cgi?id=109380
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
Participating hosts (41 -> 36)
------------------------------
Additional (2): fi-snb-2520m fi-bsw-n3050
Missing (7): fi-kbl-soraka fi-hsw-4770r fi-ilk-m540 fi-skl-guc fi-bsw-cyan fi-icl-u3 fi-bdw-samus
Build changes
-------------
* IGT: IGT_4878 -> IGTPW_2584
CI_DRM_5730: 24962f1aef49db97e09c7942157a2dbc973b546b @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2584: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2584/
IGT_4878: 478615b1edba88559386ba80ccbf0f035f3360a9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@kms_atomic@plane_primary_overlay_zpos
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2584/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2,v2] lib/igt_kms: Add zpos plane property.
In reply to Marius Vlad== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/2,v2] lib/igt_kms: Add zpos plane property.
URL : https://patchwork.freedesktop.org/series/57805/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5730_full -> IGTPW_2584_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/57805/revisions/1/mbox/
New tests
---------
New tests have been introduced between CI_DRM_5730_full and IGTPW_2584_full:
### New IGT tests (1) ###
* igt@kms_atomic@plane_primary_overlay_zpos:
- Statuses : 4 skip(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in IGTPW_2584_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_softpin@noreloc-s3:
- shard-apl: PASS -> DMESG-WARN [fdo#108566]
* {igt@kms_atomic@plane_primary_overlay_zpos} (NEW):
- shard-apl: NOTRUN -> SKIP [fdo#109271]
* igt@kms_atomic_transition@plane-all-modeset-transition-fencing:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
- shard-glk: NOTRUN -> DMESG-WARN [fdo#107956]
- shard-hsw: PASS -> DMESG-WARN [fdo#107956]
- shard-kbl: PASS -> DMESG-WARN [fdo#107956] * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-f:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1
* igt@kms_busy@extended-modeset-hang-oldfb-with-reset-render-c:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3
* igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
- shard-glk: PASS -> FAIL [fdo#108145] +2
* igt@kms_color@pipe-c-legacy-gamma:
- shard-apl: PASS -> FAIL [fdo#104782]
* igt@kms_cursor_crc@cursor-128x42-random:
- shard-kbl: PASS -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-256x256-random:
- shard-glk: NOTRUN -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-64x64-onscreen:
- shard-apl: PASS -> FAIL [fdo#103232] +1
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-apl: PASS -> FAIL [fdo#103167] +2
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
- shard-kbl: PASS -> FAIL [fdo#103167] +1
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
- shard-glk: PASS -> FAIL [fdo#103167] +4
* igt@kms_frontbuffer_tracking@fbcpsr-1p-indfb-fliptrack:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +41
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-mmap-cpu:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +33
* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-render:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +4
* igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-shrfb-draw-pwrite:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] +27
* igt@kms_plane@pixel-format-pipe-c-planes-source-clamping:
- shard-apl: PASS -> FAIL [fdo#108948]
* igt@kms_plane@plane-position-covered-pipe-b-planes:
- shard-kbl: PASS -> FAIL [fdo#103166]
* igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
- shard-kbl: PASS -> FAIL [fdo#108145]
- shard-apl: PASS -> FAIL [fdo#108145]
* igt@kms_plane_multiple@atomic-pipe-c-tiling-none:
- shard-glk: PASS -> FAIL [fdo#103166] +2
* igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3
* igt@kms_setmode@basic:
- shard-hsw: PASS -> FAIL [fdo#99912]
- shard-kbl: PASS -> FAIL [fdo#99912]
* igt@kms_universal_plane@cursor-fb-leak-pipe-d:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1
* igt@kms_universal_plane@universal-plane-pipe-b-functional:
- shard-apl: PASS -> FAIL [fdo#103166] +3
* igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm:
- shard-apl: PASS -> FAIL [fdo#104894]
- shard-kbl: PASS -> FAIL [fdo#104894]
#### Possible fixes ####
* igt@i915_suspend@forcewake:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS
* igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
- shard-apl: FAIL [fdo#107725] / [fdo#108145] -> PASS
* igt@kms_color@pipe-a-ctm-max:
- shard-apl: FAIL [fdo#108147] -> PASS
* igt@kms_color@pipe-a-degamma:
- shard-apl: FAIL [fdo#104782] / [fdo#108145] -> PASS
* igt@kms_cursor_crc@cursor-256x256-random:
- shard-kbl: FAIL [fdo#103232] -> PASS
* igt@kms_cursor_crc@cursor-64x21-random:
- shard-apl: FAIL [fdo#103232] -> PASS +3
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-apl: DMESG-WARN [fdo#108566] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
- shard-glk: FAIL [fdo#103167] -> PASS +3
- shard-apl: FAIL [fdo#103167] -> PASS +1
- shard-kbl: FAIL [fdo#103167] -> PASS +1 * igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
- shard-glk: FAIL [fdo#103166] -> PASS +2
* igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
- shard-apl: FAIL [fdo#103166] -> PASS +3
- shard-kbl: FAIL [fdo#103166] -> PASS +1
* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-kbl: FAIL [fdo#104894] -> PASS
* igt@kms_vblank@pipe-c-ts-continuation-modeset-rpm:
- shard-apl: FAIL [fdo#104894] -> PASS +1
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (7 -> 5)
------------------------------
Missing (2): shard-skl shard-iclb
Build changes
-------------
* IGT: IGT_4878 -> IGTPW_2584
* Piglit: piglit_4509 -> None
CI_DRM_5730: 24962f1aef49db97e09c7942157a2dbc973b546b @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2584: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2584/
IGT_4878: 478615b1edba88559386ba80ccbf0f035f3360a9 @ 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_2584/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev