* [igt-dev] [PATCH i-g-t v1] igt/tests: kms_atomic_transition improvements.
@ 2019-03-28 15:17 Stanislav Lisovskiy
2019-03-28 15:53 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stanislav Lisovskiy @ 2019-03-28 15:17 UTC (permalink / raw)
To: igt-dev; +Cc: stanislav.lisovskiy, ville.syrjala, martin.peres
Fixes:
- With some upcoming changes i915 might not allow
all sprite planes enabled, depending on available
bandwidth limitation. Thus the test need to decrement
amount of planes and try again, instead of panicking.
- Removed unneeded overlays variable, changed the parms
initialization cycle that it initializes also iter_mask
and parms[i].mask at the same time, fullfiling the same
requirements(i.e always use primary, cursor and one sprite
plane, for the rest parms[i].mask is randomized).
- While fixing used amount of planes, discovered that if
wm_setup_plane is called with 0 planes(might happen during
main testing cycle, as parms[i].mask can be 0 due to randomization)
then subsequent wait_transition fails in assertion on fd_completed.
So added return value to wm_setup_plane, which would allow to
determine, if we need to skip this step.
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
---
tests/kms_atomic_transition.c | 85 +++++++++++++++++++----------------
1 file changed, 47 insertions(+), 38 deletions(-)
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 18f73317..a75e98b5 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -118,11 +118,12 @@ static void configure_fencing(igt_plane_t *plane)
igt_assert_eq(ret, 0);
}
-static void
+static int
wm_setup_plane(igt_display_t *display, enum pipe pipe,
uint32_t mask, struct plane_parms *parms, bool fencing)
{
igt_plane_t *plane;
+ int planes_set_up = 0;
/*
* Make sure these buffers are suited for display use
@@ -133,8 +134,10 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe,
int i = plane->index;
if (!mask || !(parms[i].mask & mask)) {
- if (plane->values[IGT_PLANE_FB_ID])
+ if (plane->values[IGT_PLANE_FB_ID]) {
igt_plane_set_fb(plane, NULL);
+ planes_set_up++;
+ }
continue;
}
@@ -144,7 +147,10 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe,
igt_plane_set_fb(plane, parms[i].fb);
igt_fb_set_size(parms[i].fb, plane, parms[i].width, parms[i].height);
igt_plane_set_size(plane, parms[i].width, parms[i].height);
+
+ planes_set_up++;
}
+ return planes_set_up;
}
static void ev_page_flip(int fd, unsigned seq, unsigned tv_sec, unsigned tv_usec, void *user_data)
@@ -206,9 +212,10 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
unsigned sprite_width, sprite_height, prev_w, prev_h;
bool max_sprite_width, max_sprite_height, alpha = true;
uint32_t n_planes = display->pipes[pipe].n_planes;
- uint32_t n_overlays = 0, overlays[n_planes];
+ uint32_t n_overlays;
igt_plane_t *plane;
- uint32_t iter_mask = 3;
+ uint32_t iter_mask;
+ int retries = n_planes - 1;
do_or_die(drmGetCap(display->drm_fd, DRM_CAP_CURSOR_WIDTH, &cursor_width));
if (cursor_width >= mode->hdisplay)
@@ -217,6 +224,9 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
do_or_die(drmGetCap(display->drm_fd, DRM_CAP_CURSOR_HEIGHT, &cursor_height));
if (cursor_height >= mode->vdisplay)
cursor_height = mode->vdisplay;
+retry:
+ n_overlays = 0;
+ iter_mask = 0;
for_each_plane_on_pipe(display, pipe, plane) {
int i = plane->index;
@@ -225,36 +235,21 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
parms[i].fb = primary_fb;
parms[i].width = mode->hdisplay;
parms[i].height = mode->vdisplay;
- parms[i].mask = 1 << 0;
} else if (plane->type == DRM_PLANE_TYPE_CURSOR) {
parms[i].fb = argb_fb;
parms[i].width = cursor_width;
parms[i].height = cursor_height;
- parms[i].mask = 1 << 1;
} else {
parms[i].fb = sprite_fb;
- parms[i].mask = 1 << 2;
-
- iter_mask |= 1 << 2;
-
- overlays[n_overlays++] = i;
+ n_overlays++;
}
- }
-
- if (n_overlays >= 2) {
- uint32_t i;
-
- /*
- * Create 2 groups for overlays, make sure 1 plane is put
- * in each then spread the rest out.
- */
- iter_mask |= 1 << 3;
- parms[overlays[n_overlays - 1]].mask = 1 << 3;
-
- for (i = 1; i < n_overlays - 1; i++) {
- int val = hars_petruska_f54_1_random_unsafe_max(2);
-
- parms[overlays[i]].mask = 1 << (2 + val);
+ iter_mask |= 1 << i;
+ if (i <= 2) {
+ /* always leave one plane as in original algorithm */
+ parms[i].mask = 1 << i;
+ }
+ else {
+ parms[i].mask = hars_petruska_f54_1_random_unsafe_max(2) << i;
}
}
@@ -272,7 +267,6 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
* Pre gen9 not all sizes are supported, find the biggest possible
* size that can be enabled on all sprite planes.
*/
-retry:
prev_w = sprite_width = cursor_width;
prev_h = sprite_height = cursor_height;
@@ -292,12 +286,22 @@ retry:
if (is_atomic_check_plane_size_errno(ret)) {
if (cursor_width == sprite_width &&
cursor_height == sprite_height) {
- igt_assert_f(alpha,
- "Cannot configure the test with all sprite planes enabled\n");
-
- /* retry once with XRGB format. */
- alpha = false;
- goto retry;
+ if (--retries >= 0) {
+ /* retry once with XRGB format. */
+ if (alpha) {
+ alpha = false;
+ }
+ else if (display->pipes[pipe].n_planes > 0) {
+ display->pipes[pipe].n_planes--;
+ igt_info("Reduced available planes to %d\n",
+ display->pipes[pipe].n_planes);
+ }
+ n_planes = display->pipes[pipe].n_planes;
+ igt_assert_f(n_planes > 0, "No planes left to proceed with!");
+ goto retry;
+ }
+ igt_assert_f(retries > 0,
+ "Cannot configure the test with all sprite planes enabled\n");
}
sprite_width = prev_w;
@@ -544,7 +548,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
igt_output_set_pipe(output, pipe);
- wm_setup_plane(display, pipe, i, parms, fencing);
+ if (!wm_setup_plane(display, pipe, i, parms, fencing))
+ continue;
atomic_commit(display, pipe, flags, (void *)(unsigned long)i, fencing);
wait_for_transition(display, pipe, nonblocking, fencing);
@@ -552,7 +557,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
if (type == TRANSITION_MODESET_DISABLE) {
igt_output_set_pipe(output, PIPE_NONE);
- wm_setup_plane(display, pipe, 0, parms, fencing);
+ if (!wm_setup_plane(display, pipe, 0, parms, fencing))
+ continue;
atomic_commit(display, pipe, flags, (void *) 0UL, fencing);
wait_for_transition(display, pipe, nonblocking, fencing);
@@ -568,7 +574,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
n_enable_planes < pipe_obj->n_planes)
continue;
- wm_setup_plane(display, pipe, j, parms, fencing);
+ if (!wm_setup_plane(display, pipe, j, parms, fencing))
+ continue;
if (type >= TRANSITION_MODESET)
igt_output_override_mode(output, &override_mode);
@@ -576,7 +583,9 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
atomic_commit(display, pipe, flags, (void *)(unsigned long) j, fencing);
wait_for_transition(display, pipe, nonblocking, fencing);
- wm_setup_plane(display, pipe, i, parms, fencing);
+ if (!wm_setup_plane(display, pipe, i, parms, fencing))
+ continue;
+
if (type >= TRANSITION_MODESET)
igt_output_override_mode(output, NULL);
--
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 igt/tests: kms_atomic_transition improvements.
2019-03-28 15:17 [igt-dev] [PATCH i-g-t v1] igt/tests: kms_atomic_transition improvements Stanislav Lisovskiy
@ 2019-03-28 15:53 ` Patchwork
2019-03-29 3:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-29 8:55 ` [igt-dev] [PATCH i-g-t v1] " Daniel Vetter
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-03-28 15:53 UTC (permalink / raw)
To: Stanislav Lisovskiy; +Cc: igt-dev
== Series Details ==
Series: igt/tests: kms_atomic_transition improvements.
URL : https://patchwork.freedesktop.org/series/58677/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5831 -> IGTPW_2725
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/58677/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2725 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718]
* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: PASS -> FAIL [fdo#103167]
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
Participating hosts (43 -> 38)
------------------------------
Missing (5): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-kbl-guc
Build changes
-------------
* IGT: IGT_4911 -> IGTPW_2725
CI_DRM_5831: 8cac0cc264d2a6af0b33370b542b12d516e022c5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2725: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2725/
IGT_4911: d9fe699ea45406e279b78d1afdb4d57a205a3c99 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2725/
_______________________________________________
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 igt/tests: kms_atomic_transition improvements.
2019-03-28 15:17 [igt-dev] [PATCH i-g-t v1] igt/tests: kms_atomic_transition improvements Stanislav Lisovskiy
2019-03-28 15:53 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-03-29 3:28 ` Patchwork
2019-03-29 8:55 ` [igt-dev] [PATCH i-g-t v1] " Daniel Vetter
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-03-29 3:28 UTC (permalink / raw)
To: Stanislav Lisovskiy; +Cc: igt-dev
== Series Details ==
Series: igt/tests: kms_atomic_transition improvements.
URL : https://patchwork.freedesktop.org/series/58677/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5831_full -> IGTPW_2725_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/58677/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2725_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_pwrite@big-cpu-fbr:
- shard-hsw: PASS -> INCOMPLETE [fdo#103540]
* igt@gem_tiled_swapping@non-threaded:
- shard-hsw: PASS -> DMESG-WARN [fdo#108686]
* igt@kms_atomic_transition@6x-modeset-transitions-fencing:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_atomic_transition@plane-all-modeset-transition-fencing:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]
- shard-kbl: PASS -> INCOMPLETE [fdo#103665] +1
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
- shard-hsw: PASS -> DMESG-WARN [fdo#110222]
- shard-kbl: PASS -> DMESG-WARN [fdo#110222]
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-snb: PASS -> DMESG-WARN [fdo#110222]
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-f:
- shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_cursor_crc@cursor-256x256-onscreen:
- shard-kbl: PASS -> FAIL [fdo#103232]
- shard-apl: PASS -> FAIL [fdo#103232]
* igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic:
- shard-hsw: PASS -> SKIP [fdo#109271]
* igt@kms_fbcon_fbt@fbc:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +12
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-shrfb-pgflip-blt:
- shard-glk: PASS -> FAIL [fdo#103167]
* igt@kms_plane_alpha_blend@pipe-b-alpha-transparant-fb:
- shard-apl: NOTRUN -> FAIL [fdo#108145]
* igt@kms_psr@basic:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +15
* igt@kms_vblank@pipe-c-ts-continuation-modeset:
- shard-kbl: PASS -> FAIL [fdo#104894] +2
* igt@kms_vblank@pipe-c-ts-continuation-modeset-hang:
- shard-apl: PASS -> FAIL [fdo#104894] +2
#### Possible fixes ####
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-hsw: DMESG-WARN [fdo#110222] -> PASS
* igt@kms_cursor_crc@cursor-128x128-dpms:
- shard-kbl: FAIL [fdo#103232] -> PASS
- shard-apl: FAIL [fdo#103232] -> PASS
* igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled:
- shard-glk: FAIL [fdo#107791] -> PASS
* igt@kms_flip@flip-vs-suspend:
- shard-kbl: DMESG-WARN [fdo#108566] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-apl: FAIL [fdo#103167] -> PASS
- shard-kbl: FAIL [fdo#103167] -> PASS
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt:
- shard-glk: FAIL [fdo#103167] -> PASS
* {igt@kms_plane@pixel-format-pipe-b-planes-source-clamping}:
- shard-glk: SKIP [fdo#109271] -> PASS +1
* igt@kms_sequence@queue-idle:
- shard-apl: INCOMPLETE [fdo#103927] -> PASS
* igt@kms_setmode@basic:
- shard-apl: FAIL [fdo#99912] -> PASS
* igt@kms_vblank@pipe-a-ts-continuation-modeset:
- shard-apl: FAIL [fdo#104894] -> PASS
- shard-kbl: FAIL [fdo#104894] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[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#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#107791]: https://bugs.freedesktop.org/show_bug.cgi?id=107791
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (10 -> 5)
------------------------------
Missing (5): shard-skl pig-hsw-4770r pig-glk-j5005 shard-iclb pig-skl-6260u
Build changes
-------------
* IGT: IGT_4911 -> IGTPW_2725
* Piglit: piglit_4509 -> None
CI_DRM_5831: 8cac0cc264d2a6af0b33370b542b12d516e022c5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2725: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2725/
IGT_4911: d9fe699ea45406e279b78d1afdb4d57a205a3c99 @ 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_2725/
_______________________________________________
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 v1] igt/tests: kms_atomic_transition improvements.
2019-03-28 15:17 [igt-dev] [PATCH i-g-t v1] igt/tests: kms_atomic_transition improvements Stanislav Lisovskiy
2019-03-28 15:53 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-03-29 3:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-03-29 8:55 ` Daniel Vetter
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2019-03-29 8:55 UTC (permalink / raw)
To: Stanislav Lisovskiy; +Cc: igt-dev, ville.syrjala, martin.peres
On Thu, Mar 28, 2019 at 05:17:28PM +0200, Stanislav Lisovskiy wrote:
> Fixes:
> - With some upcoming changes i915 might not allow
> all sprite planes enabled, depending on available
> bandwidth limitation. Thus the test need to decrement
> amount of planes and try again, instead of panicking.
> - Removed unneeded overlays variable, changed the parms
> initialization cycle that it initializes also iter_mask
> and parms[i].mask at the same time, fullfiling the same
> requirements(i.e always use primary, cursor and one sprite
> plane, for the rest parms[i].mask is randomized).
> - While fixing used amount of planes, discovered that if
> wm_setup_plane is called with 0 planes(might happen during
> main testing cycle, as parms[i].mask can be 0 due to randomization)
> then subsequent wait_transition fails in assertion on fd_completed.
> So added return value to wm_setup_plane, which would allow to
> determine, if we need to skip this step.
Sounds like 3 patches crammed into one. Can you pls split up?
Thanks, Daniel
>
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> ---
> tests/kms_atomic_transition.c | 85 +++++++++++++++++++----------------
> 1 file changed, 47 insertions(+), 38 deletions(-)
>
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index 18f73317..a75e98b5 100644
> --- a/tests/kms_atomic_transition.c
> +++ b/tests/kms_atomic_transition.c
> @@ -118,11 +118,12 @@ static void configure_fencing(igt_plane_t *plane)
> igt_assert_eq(ret, 0);
> }
>
> -static void
> +static int
> wm_setup_plane(igt_display_t *display, enum pipe pipe,
> uint32_t mask, struct plane_parms *parms, bool fencing)
> {
> igt_plane_t *plane;
> + int planes_set_up = 0;
>
> /*
> * Make sure these buffers are suited for display use
> @@ -133,8 +134,10 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe,
> int i = plane->index;
>
> if (!mask || !(parms[i].mask & mask)) {
> - if (plane->values[IGT_PLANE_FB_ID])
> + if (plane->values[IGT_PLANE_FB_ID]) {
> igt_plane_set_fb(plane, NULL);
> + planes_set_up++;
> + }
> continue;
> }
>
> @@ -144,7 +147,10 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe,
> igt_plane_set_fb(plane, parms[i].fb);
> igt_fb_set_size(parms[i].fb, plane, parms[i].width, parms[i].height);
> igt_plane_set_size(plane, parms[i].width, parms[i].height);
> +
> + planes_set_up++;
> }
> + return planes_set_up;
> }
>
> static void ev_page_flip(int fd, unsigned seq, unsigned tv_sec, unsigned tv_usec, void *user_data)
> @@ -206,9 +212,10 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
> unsigned sprite_width, sprite_height, prev_w, prev_h;
> bool max_sprite_width, max_sprite_height, alpha = true;
> uint32_t n_planes = display->pipes[pipe].n_planes;
> - uint32_t n_overlays = 0, overlays[n_planes];
> + uint32_t n_overlays;
> igt_plane_t *plane;
> - uint32_t iter_mask = 3;
> + uint32_t iter_mask;
> + int retries = n_planes - 1;
>
> do_or_die(drmGetCap(display->drm_fd, DRM_CAP_CURSOR_WIDTH, &cursor_width));
> if (cursor_width >= mode->hdisplay)
> @@ -217,6 +224,9 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
> do_or_die(drmGetCap(display->drm_fd, DRM_CAP_CURSOR_HEIGHT, &cursor_height));
> if (cursor_height >= mode->vdisplay)
> cursor_height = mode->vdisplay;
> +retry:
> + n_overlays = 0;
> + iter_mask = 0;
>
> for_each_plane_on_pipe(display, pipe, plane) {
> int i = plane->index;
> @@ -225,36 +235,21 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
> parms[i].fb = primary_fb;
> parms[i].width = mode->hdisplay;
> parms[i].height = mode->vdisplay;
> - parms[i].mask = 1 << 0;
> } else if (plane->type == DRM_PLANE_TYPE_CURSOR) {
> parms[i].fb = argb_fb;
> parms[i].width = cursor_width;
> parms[i].height = cursor_height;
> - parms[i].mask = 1 << 1;
> } else {
> parms[i].fb = sprite_fb;
> - parms[i].mask = 1 << 2;
> -
> - iter_mask |= 1 << 2;
> -
> - overlays[n_overlays++] = i;
> + n_overlays++;
> }
> - }
> -
> - if (n_overlays >= 2) {
> - uint32_t i;
> -
> - /*
> - * Create 2 groups for overlays, make sure 1 plane is put
> - * in each then spread the rest out.
> - */
> - iter_mask |= 1 << 3;
> - parms[overlays[n_overlays - 1]].mask = 1 << 3;
> -
> - for (i = 1; i < n_overlays - 1; i++) {
> - int val = hars_petruska_f54_1_random_unsafe_max(2);
> -
> - parms[overlays[i]].mask = 1 << (2 + val);
> + iter_mask |= 1 << i;
> + if (i <= 2) {
> + /* always leave one plane as in original algorithm */
> + parms[i].mask = 1 << i;
> + }
> + else {
> + parms[i].mask = hars_petruska_f54_1_random_unsafe_max(2) << i;
> }
> }
>
> @@ -272,7 +267,6 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
> * Pre gen9 not all sizes are supported, find the biggest possible
> * size that can be enabled on all sprite planes.
> */
> -retry:
> prev_w = sprite_width = cursor_width;
> prev_h = sprite_height = cursor_height;
>
> @@ -292,12 +286,22 @@ retry:
> if (is_atomic_check_plane_size_errno(ret)) {
> if (cursor_width == sprite_width &&
> cursor_height == sprite_height) {
> - igt_assert_f(alpha,
> - "Cannot configure the test with all sprite planes enabled\n");
> -
> - /* retry once with XRGB format. */
> - alpha = false;
> - goto retry;
> + if (--retries >= 0) {
> + /* retry once with XRGB format. */
> + if (alpha) {
> + alpha = false;
> + }
> + else if (display->pipes[pipe].n_planes > 0) {
> + display->pipes[pipe].n_planes--;
> + igt_info("Reduced available planes to %d\n",
> + display->pipes[pipe].n_planes);
> + }
> + n_planes = display->pipes[pipe].n_planes;
> + igt_assert_f(n_planes > 0, "No planes left to proceed with!");
> + goto retry;
> + }
> + igt_assert_f(retries > 0,
> + "Cannot configure the test with all sprite planes enabled\n");
> }
>
> sprite_width = prev_w;
> @@ -544,7 +548,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
>
> igt_output_set_pipe(output, pipe);
>
> - wm_setup_plane(display, pipe, i, parms, fencing);
> + if (!wm_setup_plane(display, pipe, i, parms, fencing))
> + continue;
>
> atomic_commit(display, pipe, flags, (void *)(unsigned long)i, fencing);
> wait_for_transition(display, pipe, nonblocking, fencing);
> @@ -552,7 +557,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
> if (type == TRANSITION_MODESET_DISABLE) {
> igt_output_set_pipe(output, PIPE_NONE);
>
> - wm_setup_plane(display, pipe, 0, parms, fencing);
> + if (!wm_setup_plane(display, pipe, 0, parms, fencing))
> + continue;
>
> atomic_commit(display, pipe, flags, (void *) 0UL, fencing);
> wait_for_transition(display, pipe, nonblocking, fencing);
> @@ -568,7 +574,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
> n_enable_planes < pipe_obj->n_planes)
> continue;
>
> - wm_setup_plane(display, pipe, j, parms, fencing);
> + if (!wm_setup_plane(display, pipe, j, parms, fencing))
> + continue;
>
> if (type >= TRANSITION_MODESET)
> igt_output_override_mode(output, &override_mode);
> @@ -576,7 +583,9 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
> atomic_commit(display, pipe, flags, (void *)(unsigned long) j, fencing);
> wait_for_transition(display, pipe, nonblocking, fencing);
>
> - wm_setup_plane(display, pipe, i, parms, fencing);
> + if (!wm_setup_plane(display, pipe, i, parms, fencing))
> + continue;
> +
> if (type >= TRANSITION_MODESET)
> igt_output_override_mode(output, NULL);
>
> --
> 2.17.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
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] 4+ messages in thread
end of thread, other threads:[~2019-03-29 8:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-28 15:17 [igt-dev] [PATCH i-g-t v1] igt/tests: kms_atomic_transition improvements Stanislav Lisovskiy
2019-03-28 15:53 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-03-29 3:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-29 8:55 ` [igt-dev] [PATCH i-g-t v1] " Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox