tests/kms_atomic_transition: Do not timeout when number of sprites is huge, v2.
PATCH 1/1 tests/kms_atomic_transition: Do not timeout when number of sprites is huge, v2.
We mostly care about the plane type, because sometimes the driver may do silly things when only a cursor is enabled for example, so we reduce the number of tests. This puts an upper bound on the number of plane combinations being tested, which is nice for gen11.
Changes since v1:
- Make 2 groups for overlay planes, and randomly put planes in either group.
--- tests/kms_atomic_transition.c | 43 +++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 7 deletions(-)
tests/kms_atomic_transition.c +36 -7
@@ -41,7 +41,7 @@struct plane_parms {struct igt_fb *fb; -uint32_t width, height; +uint32_t width, height, mask; };/* globals for fence support */
@@ -131,7 +131,7 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe,for_each_plane_on_pipe (display, pipe, plane) {int i = plane->index; -if (!((1 << plane->index) & mask)) { +if (mask && (parms[i].mask & mask)) {if (plane->values[IGT_PLANE_FB_ID ])igt_plane_set_fb (plane,NULL );continue ;
@@ -192,13 +192,16 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,struct igt_fb *primary_fb, struct igt_fb *argb_fb, struct igt_fb *sprite_fb, - struct plane_parms *parms) + struct plane_parms *parms, + unsigned *iter_max) { uint64_t cursor_width, cursor_height;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];igt_plane_t *plane; +uint32_t iter_mask =3 ;do_or_die (drmGetCap (display->drm_fd,DRM_CAP_CURSOR_WIDTH , &cursor_width));if (cursor_width >= mode->hdisplay)
@@ -215,12 +218,37 @@ 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; - }else + parms[i].mask =1 <<1 ; + }else { parms[i].fb = sprite_fb; + parms[i].mask =1 <<2 ; + + iter_mask |=1 <<2 ; + + overlays[n_overlays++] = i; + } + } + +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); + } } igt_create_fb(display->drm_fd, cursor_width, cursor_height,
@@ -229,7 +257,8 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,igt_create_fb (display->drm_fd, cursor_width, cursor_height,DRM_FORMAT_ARGB8888 ,LOCAL_DRM_FORMAT_MOD_NONE , sprite_fb); -if (n_planes <3 ) + *iter_max = iter_mask +1 ; +if (!n_overlays)return ;/*
@@ -390,7 +419,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *outputdrmModeModeInfo *mode, override_mode;igt_plane_t *plane;igt_pipe_t *pipe_obj = &display->pipes[pipe]; -uint32_t iter_max =1 << pipe_obj->n_planes, i; +uint32_t iter_max, i;struct plane_parms parms[pipe_obj->n_planes];unsigned flags =0 ;int ret;
@@ -428,7 +457,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *outputigt_display_commit2 (display,COMMIT_ATOMIC ); -setup_parms (display, pipe, mode, &fb, &argb_fb, &sprite_fb, parms); +setup_parms (display, pipe, mode, &fb, &argb_fb, &sprite_fb, parms, &iter_max);/* * In some configurations the tests may not run to completion with all
Signature · 6 lines
2.19.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_atomic_transition: Do not timeout when number of sprites is huge, v2.
== Series Details ==
== Series Details ==
Series: tests/kms_atomic_transition: Do not timeout when number of sprites is huge, v2.
URL : https://patchwork.freedesktop.org/series/51887/
State : failure
== Summary ==
IGT patchset build failed on latest successful build ace031dcb1e8bf2b32b4b0d54a55eb30e8f41d6f lib: Help static analyzers figure out the execution flow
ninja: Entering directory `build'
[1/342] Generating version.h with a custom command.
[2/248] Linking target tests/kms_atomic_transition.
FAILED: tests/kms_atomic_transition
ccache cc -o tests/kms_atomic_transition 'tests/kms_atomic_transition@exe/kms_atomic_transition.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group lib/libigt.so -pthread -lcairo -lglib-2.0 -L/opt/igt/lib -ldrm -lkmod -lprocps -ludev -ldw -lelf -lpciaccess -lm -lrt -lssl -lcrypto -lpixman-1 -L/opt/igt/lib -ldrm_intel -ldrm -lunwind -lgsl -lgslcblas -lm -L/usr/lib/x86_64-linux-gnu -lxmlrpc_client -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lcurl -Wl,--end-group -ldrm_nouveau -L/usr/lib/x86_64-linux-gnu -lxmlrpc_client -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lcurl '-Wl,-rpath,$ORIGIN/../lib:XXXXXXXXXXXXXXXXXXXX' -Wl,-rpath-link,/home/cidrm/igt-gpu-tools/build/lib tests/kms_atomic_transition@exe/kms_atomic_transition.c.o: In function `setup_parms':/home/cidrm/igt-gpu-tools/build/../tests/kms_atomic_transition.c:248: undefined reference to `hars_petruska_f54_1_random_unsafe_max'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev