All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property.
@ 2019-02-16 18:29 Marius Vlad via igt-dev
  2019-02-16 18:29 ` [igt-dev] [PATCH i-g-t 2/2] kms_atomic: Add subtest for testing " Marius Vlad via igt-dev
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Marius Vlad via igt-dev @ 2019-02-16 18:29 UTC (permalink / raw)
  To: igt-dev; +Cc: Marius Vlad, daniel, p.zabel

From: Marius Vlad <marius.vlad0@gmail.com>

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
---
 lib/igt_kms.c | 1 +
 lib/igt_kms.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 85a911e1..87fa5bff 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -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] = {
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 679d4e84..227fa020 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -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
 };
 
-- 
2.19.2

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

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

* [igt-dev] [PATCH i-g-t 2/2] kms_atomic: Add subtest for testing zpos plane property
  2019-02-16 18:29 [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property Marius Vlad via igt-dev
@ 2019-02-16 18:29 ` Marius Vlad via igt-dev
  2019-03-08 13:30   ` Philipp Zabel
  2019-02-16 19:03 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_kms: Add " Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Marius Vlad via igt-dev @ 2019-02-16 18:29 UTC (permalink / raw)
  To: igt-dev; +Cc: Tomeu Vizoso, daniel, p.zabel

From: Tomeu Vizoso <tomeu.vizoso@collabora.com>

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.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
---
 tests/kms_atomic.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index 3aad2d9a..a9bc7f16 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -276,6 +276,78 @@ 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)
+{
+	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, DRM_FORMAT_ARGB8888, I915_TILING_NONE,
+				    0.2, 0.2, 0.2, &fb_primary);
+
+	igt_create_color_pattern_fb(pipe->display->drm_fd,
+				    w_overlay, h_overlay,
+				    DRM_FORMAT_RGB565, 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("Commiting 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("Commiting 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("Commiting with a hole in the primary through "\
+		  "which the underlay should be seen\n");
+	plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+}
+
 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 +977,18 @@ igt_main
 		plane_primary(pipe_obj, primary, &fb);
 	}
 
+	igt_subtest("plane_primary_overlay_zpos") {
+		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_output_set_pipe(output, pipe);
+		plane_primary_overlay_zpos(pipe_obj, output, primary, overlay);
+	}
+
 	igt_subtest("test_only") {
 		atomic_clear(&display, pipe, primary, output);
 
-- 
2.19.2

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_kms: Add zpos plane property.
  2019-02-16 18:29 [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property Marius Vlad via igt-dev
  2019-02-16 18:29 ` [igt-dev] [PATCH i-g-t 2/2] kms_atomic: Add subtest for testing " Marius Vlad via igt-dev
@ 2019-02-16 19:03 ` Patchwork
  2019-02-16 20:54 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-02-16 19:03 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/igt_kms: Add zpos plane property.
URL   : https://patchwork.freedesktop.org/series/56795/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5615 -> IGTPW_2431
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56795/revisions/1/mbox/

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

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

### IGT changes ###

#### Suppressed ####

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

  * igt@i915_selftest@live_gtt:
    - {fi-icl-y}:         NOTRUN -> INCOMPLETE

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_evict:
    - fi-bsw-kefka:       PASS -> DMESG-WARN [fdo#107709]

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       INCOMPLETE [fdo#107718] -> PASS

  * igt@pm_rpm@module-reload:
    - {fi-icl-y}:         INCOMPLETE [fdo#108840] -> PASS

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

  [fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315


Participating hosts (43 -> 40)
------------------------------

  Missing    (3): fi-kbl-soraka fi-byt-squawks fi-bsw-cyan 


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

    * IGT: IGT_4833 -> IGTPW_2431

  CI_DRM_5615: a6e4cbf00557faf0c2d68fdff81b1afb9242aa4d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2431: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2431/
  IGT_4833: 7802324e86ddf947cba847e910f75b1a8affe8d7 @ 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_2431/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] lib/igt_kms: Add zpos plane property.
  2019-02-16 18:29 [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property Marius Vlad via igt-dev
  2019-02-16 18:29 ` [igt-dev] [PATCH i-g-t 2/2] kms_atomic: Add subtest for testing " Marius Vlad via igt-dev
  2019-02-16 19:03 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_kms: Add " Patchwork
@ 2019-02-16 20:54 ` Patchwork
  2019-03-08 13:30 ` [igt-dev] [PATCH i-g-t 1/2] " Philipp Zabel
  2019-03-12 13:43 ` Daniel Vetter
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-02-16 20:54 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/igt_kms: Add zpos plane property.
URL   : https://patchwork.freedesktop.org/series/56795/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5615_full -> IGTPW_2431_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56795/revisions/1/mbox/

New tests
---------

  New tests have been introduced between CI_DRM_5615_full and IGTPW_2431_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_2431_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * {igt@kms_atomic@plane_primary_overlay_zpos} (NEW):
    - shard-apl:          NOTRUN -> {SKIP} [fdo#109271]
    - shard-snb:          NOTRUN -> {SKIP} [fdo#109271]
    - shard-glk:          NOTRUN -> {SKIP} [fdo#109271]
    - shard-hsw:          NOTRUN -> {SKIP} [fdo#109271]

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
    - shard-snb:          PASS -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
    - shard-glk:          PASS -> DMESG-WARN [fdo#107956]

  * igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
    - shard-glk:          PASS -> FAIL [fdo#108145]

  * igt@kms_cursor_crc@cursor-256x256-dpms:
    - shard-apl:          PASS -> FAIL [fdo#103232] +1

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-apl:          PASS -> FAIL [fdo#103191] / [fdo#103232]

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
    - shard-hsw:          PASS -> INCOMPLETE [fdo#103540]

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-wc:
    - shard-snb:          PASS -> INCOMPLETE [fdo#105411]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
    - shard-glk:          PASS -> FAIL [fdo#103167] +1
    - shard-apl:          PASS -> FAIL [fdo#103167] +2

  * igt@kms_frontbuffer_tracking@fbc-1p-rte:
    - shard-glk:          PASS -> FAIL [fdo#103167] / [fdo#105682]
    - shard-apl:          PASS -> FAIL [fdo#103167] / [fdo#105682]

  * igt@kms_plane@plane-position-covered-pipe-c-planes:
    - shard-apl:          PASS -> FAIL [fdo#103166] +1

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-none:
    - shard-glk:          PASS -> FAIL [fdo#103166] +3

  * igt@kms_setmode@basic:
    - shard-apl:          PASS -> FAIL [fdo#99912]
    - shard-hsw:          PASS -> FAIL [fdo#99912]

  * igt@kms_vblank@pipe-b-ts-continuation-modeset-rpm:
    - shard-apl:          PASS -> FAIL [fdo#104894] +3

  
#### Possible fixes ####

  * igt@gem_eio@unwedge-stress:
    - shard-snb:          FAIL -> PASS

  * igt@gem_linear_blits@normal:
    - shard-snb:          INCOMPLETE [fdo#105411] -> PASS

  * igt@kms_color@pipe-a-ctm-max:
    - shard-apl:          FAIL [fdo#108147] -> PASS

  * igt@kms_cursor_crc@cursor-128x128-random:
    - shard-apl:          FAIL [fdo#103232] -> PASS +7

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-apl:          FAIL [fdo#103191] / [fdo#103232] -> PASS +1

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-apl:          FAIL [fdo#103167] -> PASS +4

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
    - shard-glk:          FAIL [fdo#103167] -> PASS +3

  * igt@kms_plane@plane-position-covered-pipe-b-planes:
    - shard-glk:          FAIL [fdo#103166] -> PASS +1

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-apl:          FAIL [fdo#103166] -> PASS +3

  
  {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#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [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#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 -> 4)
------------------------------

  Missing    (3): shard-skl shard-kbl shard-iclb 


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

    * IGT: IGT_4833 -> IGTPW_2431
    * Piglit: piglit_4509 -> None

  CI_DRM_5615: a6e4cbf00557faf0c2d68fdff81b1afb9242aa4d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2431: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2431/
  IGT_4833: 7802324e86ddf947cba847e910f75b1a8affe8d7 @ 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_2431/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property.
  2019-02-16 18:29 [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property Marius Vlad via igt-dev
                   ` (2 preceding siblings ...)
  2019-02-16 20:54 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-03-08 13:30 ` Philipp Zabel
  2019-03-12 13:43 ` Daniel Vetter
  4 siblings, 0 replies; 9+ messages in thread
From: Philipp Zabel @ 2019-03-08 13:30 UTC (permalink / raw)
  To: Marius Vlad, igt-dev; +Cc: Marius Vlad, daniel

On Sat, 2019-02-16 at 20:29 +0200, Marius Vlad wrote:
> From: Marius Vlad <marius.vlad0@gmail.com>
> 
> Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
> ---
>  lib/igt_kms.c | 1 +
>  lib/igt_kms.h | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 85a911e1..87fa5bff 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -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] = {
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 679d4e84..227fa020 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -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
>  };
>  

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

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

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

* Re: [igt-dev] [PATCH i-g-t 2/2] kms_atomic: Add subtest for testing zpos plane property
  2019-02-16 18:29 ` [igt-dev] [PATCH i-g-t 2/2] kms_atomic: Add subtest for testing " Marius Vlad via igt-dev
@ 2019-03-08 13:30   ` Philipp Zabel
  0 siblings, 0 replies; 9+ messages in thread
From: Philipp Zabel @ 2019-03-08 13:30 UTC (permalink / raw)
  To: Marius Vlad, igt-dev; +Cc: Tomeu Vizoso, daniel

On Sat, 2019-02-16 at 20:29 +0200, Marius Vlad wrote:
> From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> 
> 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.
> 
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
> ---
>  tests/kms_atomic.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 84 insertions(+)
> 
> diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
> index 3aad2d9a..a9bc7f16 100644
> --- a/tests/kms_atomic.c
> +++ b/tests/kms_atomic.c
> @@ -276,6 +276,78 @@ 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)
> +{
> +	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, DRM_FORMAT_ARGB8888, I915_TILING_NONE,
> +				    0.2, 0.2, 0.2, &fb_primary);
> +
> +	igt_create_color_pattern_fb(pipe->display->drm_fd,
> +				    w_overlay, h_overlay,
> +				    DRM_FORMAT_RGB565, 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);

How can this draw a hole when the overlay plane has DRM_FORMAT_RGB565? I
would assume the alpha value is ignored in this case.

> +	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("Commiting 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("Commiting with primary on top, only the primary should be visible\n");

Committing

> +	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("Commiting with a hole in the primary through "\
> +		  "which the underlay should be seen\n");
> +	plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> +}
> +
>  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 +977,18 @@ igt_main
>  		plane_primary(pipe_obj, primary, &fb);
>  	}
>  
> +	igt_subtest("plane_primary_overlay_zpos") {
> +		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));

Maybe also check igt_plane_has_format_mod for the formats the test wants
to set.

> +
> +		igt_output_set_pipe(output, pipe);
> +		plane_primary_overlay_zpos(pipe_obj, output, primary, overlay);
> +	}
> +
>  	igt_subtest("test_only") {
>  		atomic_clear(&display, pipe, primary, output);
>  

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

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

* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property.
  2019-02-16 18:29 [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property Marius Vlad via igt-dev
                   ` (3 preceding siblings ...)
  2019-03-08 13:30 ` [igt-dev] [PATCH i-g-t 1/2] " Philipp Zabel
@ 2019-03-12 13:43 ` Daniel Vetter
  2019-03-12 14:18   ` Marius Vlad
  4 siblings, 1 reply; 9+ messages in thread
From: Daniel Vetter @ 2019-03-12 13:43 UTC (permalink / raw)
  To: Marius Vlad; +Cc: igt-dev, Marius Vlad, daniel, p.zabel

On Sat, Feb 16, 2019 at 08:29:58PM +0200, Marius Vlad wrote:
> From: Marius Vlad <marius.vlad0@gmail.com>
> 
> Signed-off-by: Marius Vlad <marius.vlad@collabora.com>

Since you already have a pile of igt patches merged, want commit rights?
From a quick look you don't have access to the gitlab repo yet.

Cheers, Daniel
> ---
>  lib/igt_kms.c | 1 +
>  lib/igt_kms.h | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 85a911e1..87fa5bff 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -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] = {
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 679d4e84..227fa020 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -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
>  };
>  
> -- 
> 2.19.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property.
  2019-03-12 13:43 ` Daniel Vetter
@ 2019-03-12 14:18   ` Marius Vlad
  2019-03-12 15:22     ` Daniel Vetter
  0 siblings, 1 reply; 9+ messages in thread
From: Marius Vlad @ 2019-03-12 14:18 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: igt-dev, Marius Vlad, p.zabel


[-- Attachment #1.1: Type: text/plain, Size: 1563 bytes --]

On Tue, Mar 12, 2019 at 02:43:46PM +0100, Daniel Vetter wrote:
> On Sat, Feb 16, 2019 at 08:29:58PM +0200, Marius Vlad wrote:
> > From: Marius Vlad <marius.vlad0@gmail.com>
> > 
> > Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
> 
> Since you already have a pile of igt patches merged, want commit rights?
> From a quick look you don't have access to the gitlab repo yet.
Sure! marius.vlad0 is my username on fdo gitlab.

Thanks!
> 
> Cheers, Daniel
> > ---
> >  lib/igt_kms.c | 1 +
> >  lib/igt_kms.h | 1 +
> >  2 files changed, 2 insertions(+)
> > 
> > diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> > index 85a911e1..87fa5bff 100644
> > --- a/lib/igt_kms.c
> > +++ b/lib/igt_kms.c
> > @@ -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] = {
> > diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> > index 679d4e84..227fa020 100644
> > --- a/lib/igt_kms.h
> > +++ b/lib/igt_kms.h
> > @@ -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
> >  };
> >  
> > -- 
> > 2.19.2
> > 
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

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

* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property.
  2019-03-12 14:18   ` Marius Vlad
@ 2019-03-12 15:22     ` Daniel Vetter
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2019-03-12 15:22 UTC (permalink / raw)
  To: Marius Vlad; +Cc: igt-dev, Marius Vlad, p.zabel, Daniel Vetter

On Tue, Mar 12, 2019 at 04:18:31PM +0200, Marius Vlad wrote:
> On Tue, Mar 12, 2019 at 02:43:46PM +0100, Daniel Vetter wrote:
> > On Sat, Feb 16, 2019 at 08:29:58PM +0200, Marius Vlad wrote:
> > > From: Marius Vlad <marius.vlad0@gmail.com>
> > > 
> > > Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
> > 
> > Since you already have a pile of igt patches merged, want commit rights?
> > From a quick look you don't have access to the gitlab repo yet.
> Sure! marius.vlad0 is my username on fdo gitlab.

Done!
-Daniel

> 
> Thanks!
> > 
> > Cheers, Daniel
> > > ---
> > >  lib/igt_kms.c | 1 +
> > >  lib/igt_kms.h | 1 +
> > >  2 files changed, 2 insertions(+)
> > > 
> > > diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> > > index 85a911e1..87fa5bff 100644
> > > --- a/lib/igt_kms.c
> > > +++ b/lib/igt_kms.c
> > > @@ -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] = {
> > > diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> > > index 679d4e84..227fa020 100644
> > > --- a/lib/igt_kms.h
> > > +++ b/lib/igt_kms.h
> > > @@ -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
> > >  };
> > >  
> > > -- 
> > > 2.19.2
> > > 
> > 
> > -- 
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-03-12 15:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-16 18:29 [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Add zpos plane property Marius Vlad via igt-dev
2019-02-16 18:29 ` [igt-dev] [PATCH i-g-t 2/2] kms_atomic: Add subtest for testing " Marius Vlad via igt-dev
2019-03-08 13:30   ` Philipp Zabel
2019-02-16 19:03 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_kms: Add " Patchwork
2019-02-16 20:54 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-08 13:30 ` [igt-dev] [PATCH i-g-t 1/2] " Philipp Zabel
2019-03-12 13:43 ` Daniel Vetter
2019-03-12 14:18   ` Marius Vlad
2019-03-12 15:22     ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.