All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: Use IGT helpers for selecting planes to scale
@ 2019-03-13 17:24 Nicholas Kazlauskas
  2019-03-13 18:15 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nicholas Kazlauskas @ 2019-03-13 17:24 UTC (permalink / raw)
  To: igt-dev

These tests intend to test scaling on hardware with overlay planes.

They will incorrectly try to scale the cursor plane or occasionally
crash by trying to access planes that don't exist for hardware that
doesn't expose any overlay planes.

Make plane selection explicit by requesting the plane by type and index
using the igt helper igt_pipe_get_plane_type_index.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 tests/kms_plane_scaling.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index d408a203..6fdb50c5 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -269,6 +269,7 @@ static void
 test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
 {
 	igt_display_t *display = &d->display;
+	igt_pipe_t *pipe_obj = &display->pipes[pipe];
 	drmModeModeInfo *mode;
 	int primary_plane_scaling = 0; /* For now */
 	uint64_t tiling = is_i915_device(display->drm_fd) ?
@@ -280,7 +281,7 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
 	mode = igt_output_get_mode(output);
 
 	/* Set up display with plane 1 */
-	d->plane1 = &display->pipes[pipe].planes[0];
+	d->plane1 = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_PRIMARY);
 	prepare_crtc(d, output, pipe, d->plane1, mode);
 
 	igt_create_color_pattern_fb(display->drm_fd, 600, 600,
@@ -311,7 +312,14 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
 	}
 
 	/* Set up fb[1]->plane2 mapping. */
-	d->plane2 = igt_output_get_plane(output, 1);
+	d->plane2 = igt_pipe_get_plane_type_index(pipe_obj,
+						  DRM_PLANE_TYPE_OVERLAY, 0);
+
+	if (!d->plane2) {
+		igt_debug("Plane-2 doesnt exist on pipe %s\n", kmstest_pipe_name(pipe));
+		return;
+	}
+
 	igt_plane_set_fb(d->plane2, &d->fb[1]);
 
 	/* 2nd plane windowed */
@@ -349,14 +357,15 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
 	}
 
 	/* Set up fb[2]->plane3 mapping. */
-	d->plane3 = igt_output_get_plane(output, 2);
-	igt_plane_set_fb(d->plane3, &d->fb[2]);
-
-	if(d->plane3->type == DRM_PLANE_TYPE_CURSOR) {
+	d->plane3 = igt_pipe_get_plane_type_index(pipe_obj,
+						  DRM_PLANE_TYPE_OVERLAY, 1);
+	if(!d->plane3) {
 		igt_debug("Plane-3 doesnt exist on pipe %s\n", kmstest_pipe_name(pipe));
 		return;
 	}
 
+	igt_plane_set_fb(d->plane3, &d->fb[2]);
+
 	/* 3rd plane windowed - no scaling */
 	igt_fb_set_position(&d->fb[2], d->plane3, 100, 100);
 	igt_fb_set_size(&d->fb[2], d->plane3, d->fb[2].width-300, d->fb[2].height-300);
@@ -435,13 +444,14 @@ __test_scaler_with_clipping_clamping_scenario(data_t *d, drmModeModeInfo *mode,
 static void
 test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe, igt_output_t *output)
 {
+	igt_pipe_t *pipe_obj = &d->display.pipes[pipe];
 	drmModeModeInfo *mode;
 
 	igt_require(get_num_scalers(d, pipe) >= 2);
 
 	mode = igt_output_get_mode(output);
-	d->plane1 = &d->display.pipes[pipe].planes[0];
-	d->plane2 = &d->display.pipes[pipe].planes[1];
+	d->plane1 = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_PRIMARY);
+	d->plane2 = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
 	prepare_crtc(d, output, pipe, d->plane1, mode);
 
 	for (int i = 0; i < d->plane1->drm_plane->count_formats; i++) {
-- 
2.17.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_plane_scaling: Use IGT helpers for selecting planes to scale
  2019-03-13 17:24 [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: Use IGT helpers for selecting planes to scale Nicholas Kazlauskas
@ 2019-03-13 18:15 ` Patchwork
  2019-03-14  1:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2019-03-27 20:12 ` [igt-dev] [PATCH i-g-t] " Li, Sun peng (Leo)
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-03-13 18:15 UTC (permalink / raw)
  To: Kazlauskas, Nicholas; +Cc: igt-dev

== Series Details ==

Series: tests/kms_plane_scaling: Use IGT helpers for selecting planes to scale
URL   : https://patchwork.freedesktop.org/series/57950/
State : success

== Summary ==

CI Bug Log - changes from IGT_4884 -> IGTPW_2605
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103191] / [fdo#107362]

  
#### Possible fixes ####

  * igt@gem_mmap@basic-small-bo:
    - {fi-icl-y}:         DMESG-WARN [fdo#109638] -> PASS

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS

  * igt@prime_vgem@basic-fence-flip:
    - fi-gdg-551:         DMESG-FAIL [fdo#103182] -> PASS

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

  [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#109638]: https://bugs.freedesktop.org/show_bug.cgi?id=109638


Participating hosts (48 -> 43)
------------------------------

  Missing    (5): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan 


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

    * IGT: IGT_4884 -> IGTPW_2605

  CI_DRM_5739: b44ac1a605b4e2d3586a9ead7daa462cdd77c6e9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2605: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2605/
  IGT_4884: c46051337b972f8b5a302afb6f603df06fea527d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2605/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_plane_scaling: Use IGT helpers for selecting planes to scale
  2019-03-13 17:24 [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: Use IGT helpers for selecting planes to scale Nicholas Kazlauskas
  2019-03-13 18:15 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-03-14  1:13 ` Patchwork
  2019-03-27 20:12 ` [igt-dev] [PATCH i-g-t] " Li, Sun peng (Leo)
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-03-14  1:13 UTC (permalink / raw)
  To: Nicholas Kazlauskas; +Cc: igt-dev

== Series Details ==

Series: tests/kms_plane_scaling: Use IGT helpers for selecting planes to scale
URL   : https://patchwork.freedesktop.org/series/57950/
State : success

== Summary ==

CI Bug Log - changes from IGT_4884_full -> IGTPW_2605_full
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_2605_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2605_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

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

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

### IGT changes ###

#### Warnings ####

  * igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format:
    - shard-glk:          SKIP [fdo#109271] / [fdo#109278] -> FAIL

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_isolation@rcs0-s3:
    - shard-kbl:          PASS -> INCOMPLETE [fdo#103665] +1

  * igt@gem_exec_big:
    - shard-hsw:          PASS -> TIMEOUT [fdo#107936]

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-apl:          PASS -> INCOMPLETE [fdo#103927]

  * igt@kms_atomic_transition@3x-modeset-transitions-fencing:
    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#107956] +1
    - shard-snb:          PASS -> DMESG-WARN [fdo#107956]

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

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

  * igt@kms_color@pipe-c-degamma:
    - shard-glk:          NOTRUN -> FAIL [fdo#104782]

  * igt@kms_concurrent@pipe-d:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2

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

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

  * igt@kms_cursor_crc@cursor-256x85-onscreen:
    - shard-glk:          NOTRUN -> FAIL [fdo#103232]

  * igt@kms_flip@modeset-vs-vblank-race-interruptible:
    - shard-glk:          PASS -> FAIL [fdo#103060]

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

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-blt:
    - shard-glk:          PASS -> FAIL [fdo#103167] +1

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-wc:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +38

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-wc:
    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] +23

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-draw-mmap-wc:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +22

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-d:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

  * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
    - shard-apl:          PASS -> FAIL [fdo#108145]
    - shard-glk:          PASS -> FAIL [fdo#108145]
    - shard-kbl:          PASS -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
    - shard-glk:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
    - shard-apl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_setmode@basic:
    - shard-kbl:          NOTRUN -> FAIL [fdo#99912]

  * igt@kms_vblank@pipe-c-ts-continuation-dpms-rpm:
    - shard-apl:          PASS -> FAIL [fdo#104894]

  * igt@kms_vblank@pipe-c-ts-continuation-modeset-hang:
    - shard-kbl:          PASS -> FAIL [fdo#104894]

  * igt@prime_nv_api@i915_nv_import_vs_close:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +26

  
#### Possible fixes ####

  * igt@gem_eio@reset-stress:
    - shard-hsw:          INCOMPLETE [fdo#103540] -> PASS

  * igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
    - shard-apl:          FAIL [fdo#109660] -> PASS
    - shard-kbl:          FAIL [fdo#109660] -> PASS

  * igt@kms_busy@extended-modeset-hang-newfb-render-b:
    - shard-kbl:          DMESG-WARN [fdo#107956] -> PASS +2
    - shard-snb:          DMESG-WARN [fdo#107956] -> PASS

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

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

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

  * igt@kms_ccs@pipe-b-missing-ccs-buffer:
    - shard-kbl:          DMESG-WARN [fdo#103558] / [fdo#105602] -> PASS +20

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

  * igt@kms_color@pipe-b-legacy-gamma:
    - shard-apl:          FAIL [fdo#104782] -> PASS
    - shard-kbl:          FAIL [fdo#104782] -> PASS

  * igt@kms_cursor_crc@cursor-64x64-sliding:
    - shard-apl:          FAIL [fdo#103232] -> PASS +2
    - shard-kbl:          FAIL [fdo#103232] -> PASS

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

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
    - shard-kbl:          FAIL [fdo#103167] -> PASS

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

  * {igt@kms_plane@plane-position-covered-pipe-c-planes}:
    - shard-apl:          FAIL [fdo#110038] -> PASS

  * {igt@kms_plane_multiple@atomic-pipe-a-tiling-y}:
    - shard-apl:          FAIL [fdo#110037] -> PASS +4

  * {igt@kms_plane_multiple@atomic-pipe-b-tiling-y}:
    - shard-glk:          FAIL [fdo#110037] -> PASS +6

  * {igt@kms_plane_multiple@atomic-pipe-b-tiling-yf}:
    - shard-kbl:          FAIL [fdo#110037] -> PASS +2

  * igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping:
    - shard-glk:          SKIP [fdo#109271] / [fdo#109278] -> PASS

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          FAIL [fdo#109016] -> PASS

  * igt@kms_universal_plane@universal-plane-pipe-b-functional:
    - shard-apl:          FAIL [fdo#103166] -> PASS

  
#### Warnings ####

  * igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format:
    - shard-glk:          FAIL -> SKIP [fdo#109271] / [fdo#109278]

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

  [fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
  [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#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [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#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
  [fdo#107936]: https://bugs.freedesktop.org/show_bug.cgi?id=107936
  [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#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109660]: https://bugs.freedesktop.org/show_bug.cgi?id=109660
  [fdo#110037]: https://bugs.freedesktop.org/show_bug.cgi?id=110037
  [fdo#110038]: https://bugs.freedesktop.org/show_bug.cgi?id=110038
  [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_4884 -> IGTPW_2605

  CI_DRM_5739: b44ac1a605b4e2d3586a9ead7daa462cdd77c6e9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2605: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2605/
  IGT_4884: c46051337b972f8b5a302afb6f603df06fea527d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2605/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: Use IGT helpers for selecting planes to scale
  2019-03-13 17:24 [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: Use IGT helpers for selecting planes to scale Nicholas Kazlauskas
  2019-03-13 18:15 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2019-03-14  1:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-03-27 20:12 ` Li, Sun peng (Leo)
  2 siblings, 0 replies; 4+ messages in thread
From: Li, Sun peng (Leo) @ 2019-03-27 20:12 UTC (permalink / raw)
  To: Kazlauskas, Nicholas, igt-dev



On 2019-03-13 1:24 p.m., Nicholas Kazlauskas wrote:
> These tests intend to test scaling on hardware with overlay planes.
> 
> They will incorrectly try to scale the cursor plane or occasionally
> crash by trying to access planes that don't exist for hardware that
> doesn't expose any overlay planes.
> 
> Make plane selection explicit by requesting the plane by type and index
> using the igt helper igt_pipe_get_plane_type_index.
> 
> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Reviewed-by: Leo Li <sunpeng.li@amd.com>

Thanks,
Leo

> ---
>   tests/kms_plane_scaling.c | 26 ++++++++++++++++++--------
>   1 file changed, 18 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index d408a203..6fdb50c5 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -269,6 +269,7 @@ static void
>   test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
>   {
>   	igt_display_t *display = &d->display;
> +	igt_pipe_t *pipe_obj = &display->pipes[pipe];
>   	drmModeModeInfo *mode;
>   	int primary_plane_scaling = 0; /* For now */
>   	uint64_t tiling = is_i915_device(display->drm_fd) ?
> @@ -280,7 +281,7 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
>   	mode = igt_output_get_mode(output);
>   
>   	/* Set up display with plane 1 */
> -	d->plane1 = &display->pipes[pipe].planes[0];
> +	d->plane1 = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_PRIMARY);
>   	prepare_crtc(d, output, pipe, d->plane1, mode);
>   
>   	igt_create_color_pattern_fb(display->drm_fd, 600, 600,
> @@ -311,7 +312,14 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
>   	}
>   
>   	/* Set up fb[1]->plane2 mapping. */
> -	d->plane2 = igt_output_get_plane(output, 1);
> +	d->plane2 = igt_pipe_get_plane_type_index(pipe_obj,
> +						  DRM_PLANE_TYPE_OVERLAY, 0);
> +
> +	if (!d->plane2) {
> +		igt_debug("Plane-2 doesnt exist on pipe %s\n", kmstest_pipe_name(pipe));
> +		return;
> +	}
> +
>   	igt_plane_set_fb(d->plane2, &d->fb[1]);
>   
>   	/* 2nd plane windowed */
> @@ -349,14 +357,15 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
>   	}
>   
>   	/* Set up fb[2]->plane3 mapping. */
> -	d->plane3 = igt_output_get_plane(output, 2);
> -	igt_plane_set_fb(d->plane3, &d->fb[2]);
> -
> -	if(d->plane3->type == DRM_PLANE_TYPE_CURSOR) {
> +	d->plane3 = igt_pipe_get_plane_type_index(pipe_obj,
> +						  DRM_PLANE_TYPE_OVERLAY, 1);
> +	if(!d->plane3) {
>   		igt_debug("Plane-3 doesnt exist on pipe %s\n", kmstest_pipe_name(pipe));
>   		return;
>   	}
>   
> +	igt_plane_set_fb(d->plane3, &d->fb[2]);
> +
>   	/* 3rd plane windowed - no scaling */
>   	igt_fb_set_position(&d->fb[2], d->plane3, 100, 100);
>   	igt_fb_set_size(&d->fb[2], d->plane3, d->fb[2].width-300, d->fb[2].height-300);
> @@ -435,13 +444,14 @@ __test_scaler_with_clipping_clamping_scenario(data_t *d, drmModeModeInfo *mode,
>   static void
>   test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe, igt_output_t *output)
>   {
> +	igt_pipe_t *pipe_obj = &d->display.pipes[pipe];
>   	drmModeModeInfo *mode;
>   
>   	igt_require(get_num_scalers(d, pipe) >= 2);
>   
>   	mode = igt_output_get_mode(output);
> -	d->plane1 = &d->display.pipes[pipe].planes[0];
> -	d->plane2 = &d->display.pipes[pipe].planes[1];
> +	d->plane1 = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_PRIMARY);
> +	d->plane2 = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
>   	prepare_crtc(d, output, pipe, d->plane1, mode);
>   
>   	for (int i = 0; i < d->plane1->drm_plane->count_formats; i++) {
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13 17:24 [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: Use IGT helpers for selecting planes to scale Nicholas Kazlauskas
2019-03-13 18:15 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-03-14  1:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-27 20:12 ` [igt-dev] [PATCH i-g-t] " Li, Sun peng (Leo)

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.