Restrict the execution to few pipes/planes
cover Restrict the execution to few pipes/planes
As the execution is taking more time in simulation, limit the execution to few pipes and few planes.
Bhanuprakash Modem (1):
tests/i915/kms_draw_crc: Ignore RGB565 & XRGB2101010 formats on
simulation
Nidhi Gupta (4):
tests/kms_cursor_edge_walk: Limit the execution to two pipes tests/kms_plane_alpha_blend: Limit the execution to two pipes tests/kms_color: Limit the execution to two pipes tests/i915/kms_frontbuffer_tracking: Reduce the execution time on
simulation
tests/i915/kms_draw_crc.c | 12 ++++-- tests/i915/kms_frontbuffer_tracking.c | 3 ++ tests/kms_color.c | 43 +++++++++++++++++++- tests/kms_cursor_edge_walk.c | 29 +++++++++++++- tests/kms_plane_alpha_blend.c | 58 ++++++++++++++++++++++++++- 5 files changed, 138 insertions(+), 7 deletions(-)
Signature · 1 line
2.39.0
PATCH 1/5 tests/kms_cursor_edge_walk: Limit the execution to two pipes
As the test execution is taking more time on simulation, limit the execution to two (first & last) pipes. This optimization is for simulation only and hence there will be no impact on real hardware.
This patch will also provide an option (command line flag '-e') to execute on all pipes.
Example: ./kms_cursor_edge_walk -e --run-subtest read-crc
--- tests/kms_cursor_edge_walk.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-)
tests/kms_cursor_edge_walk.c +28 -1
@@ -60,6 +60,10 @@ enum { EDGE_BOTTOM = 0x8, }; +static bool extended; +static enum pipe active_pipes[IGT_MAX_PIPES ]; +static uint32_t last_pipe; +static void create_cursor_fb (data_t *data,int cur_w,int cur_h) {cairo_t *cr;
@@ -273,6 +277,16 @@ static void test_crtc(data_t *data, unsigned int edges)cleanup_crtc (data); } +static bool simulation_constraint (enum pipe pipe) +{ +if (igt_run_in_simulation () && !extended && + pipe != active_pipes[0 ] && + pipe != active_pipes[last_pipe]) +return true; + +return false; +} +static int opt_handler (int opt,int opt_index,void *_data) {data_t *data = _data;
@@ -287,6 +301,9 @@ static int opt_handler(int opt, int opt_index, void *_data)case 'j' : data->jump = true;break ; +case 'e' : + extended = true; +break ;default :return IGT_OPT_HANDLER_ERROR ; }
@@ -305,7 +322,8 @@ static const struct option long_opts[] = {static const char *help_str =" --colored\t\tUse a colored cursor (disables CRC checks)\n" " --disable\t\tDisable the cursor between each step\n" -" --jump\t\tJump the cursor to middle of the screen between each step)\n" ; +" --jump\t\tJump the cursor to middle of the screen between each step)\n" +" --e \tExtended tests.\n" ; igt_main_args("", long_opts, help_str, opt_handler, &data) {
@@ -319,6 +337,9 @@ igt_main_args("", long_opts, help_str, opt_handler, &data) { "top-bottom", EDGE_BOTTOM }, };int i; +enum pipe pipe; + + last_pipe =0 ; igt_fixture {int ret;
@@ -340,6 +361,10 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)igt_display_require (&data.display, data.drm_fd);igt_display_require_output (&data.display); +/* Get active pipes. */ +for_each_pipe (&data.display, pipe) + active_pipes[last_pipe++] = pipe; + last_pipe--; }igt_describe ("Checking cursor by walking left/right/top/bottom edge of screen" );
@@ -347,6 +372,8 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)for (i =0 ; i <ARRAY_SIZE (tests); i++) { igt_subtest_with_dynamic(tests[i].name) {for_each_pipe_with_single_output (&data.display, data.pipe, data.output) { +if (simulation_constraint (pipe)) +continue ;for (data.curw =64 ; data.curw <=256 ; data.curw *=2 ) { data.curh = data.curw;igt_require (data.curw <= max_curw && data.curh <= max_curh);
Signature · 1 line
2.39.0
PATCH 2/5 tests/kms_plane_alpha_blend: Limit the execution to two pipes
In reply to Nidhi GuptaAs the test execution is taking more time on simulation, limit the execution to two (first & last) pipes. This optimization is for simulation only and hence there will be no impact on real hardware.
This patch will also provide an option (command line flag '-e') to execute on all pipes.
Example: ./kms_plane_alpha_blend -e --run-subtest alpha-7efc
V2: - Edited commit message (Bhanu)
V3: - New function for simulation constraints (Kamil)
- Update commit message (Bhanu)
--- tests/kms_plane_alpha_blend.c | 58 +++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-)
tests/kms_plane_alpha_blend.c +56 -2
@@ -28,6 +28,10 @@IGT_TEST_DESCRIPTION ("Test plane alpha and blending mode properties" ); +static bool extended; +static enum pipe active_pipes[IGT_MAX_PIPES ]; +static uint32_t last_pipe; + typedef struct { int gfx_fd; igt_display_t display;
@@ -482,8 +486,10 @@ static void run_test_on_pipe_planes(data_t *data, enum pipe pipe, igt_output_t * {igt_display_t *display = &data->display;igt_plane_t *plane; +int first_plane =-1 ; +int last_plane =-1 ; -for_each_plane_on_pipe (display, pipe, plane) { +for_each_plane_on_pipe (&data->display, pipe, plane) {if (!igt_plane_has_prop (plane,IGT_PLANE_ALPHA ))continue ;
@@ -496,6 +502,19 @@ static void run_test_on_pipe_planes(data_t *data, enum pipe pipe, igt_output_t *if (must_multiply && !has_multiplied_alpha (data, plane))continue ; +if (first_plane <0 ) + first_plane = j__; + + last_plane = j__; + } + +for_each_plane_on_pipe (&data->display, pipe, plane) { +if (j__ != first_plane && j__ != last_plane) +continue ; + +/* reset plane alpha properties between each plane */ +reset_alpha (display, pipe); +igt_info ("Testing plane %u\n" , plane->index);test (data, pipe, plane);igt_plane_set_fb (plane,NULL );
@@ -611,6 +630,16 @@ static bool pipe_check(data_t *data, enum pipe pipe, } } +static bool simulation_constraint (enum pipe pipe) +{ +if (igt_run_in_simulation () && !extended && + pipe != active_pipes[0 ] && + pipe != active_pipes[last_pipe]) +return true; + +return false; +} +static void run_subtests (data_t *data) {igt_output_t *output;
@@ -621,6 +650,8 @@ static void run_subtests(data_t *data) igt_subtest_with_dynamic(subtests[i].name) {for_each_pipe_with_single_output (&data->display, pipe, output) { +if (simulation_constraint (pipe)) +continue ;prepare_crtc (data, output, pipe);if (!pipe_check (data, pipe, subtests[i].blend, subtests[i].must_multiply))continue ;
@@ -633,15 +664,38 @@ static void run_subtests(data_t *data) } } -igt_main +static int opt_handler (int opt,int opt_index,void *_data) +{ +switch (opt) { +case 'e' : + extended = true; +break ; +default : +return IGT_OPT_HANDLER_ERROR ; + } + +return IGT_OPT_HANDLER_SUCCESS ; +} + +const char *help_str = +" -e \tExtended tests.\n" ; + +igt_main_args("e", NULL, help_str, opt_handler, NULL) {data_t data = {}; +enum pipe pipe; + + last_pipe =0 ; igt_fixture { data.gfx_fd =drm_open_driver_master (DRIVER_ANY );igt_require_pipe_crc (data.gfx_fd);igt_display_require (&data.display, data.gfx_fd);igt_require (data.display.is_atomic); +/* Get active pipes. */ +for_each_pipe (&data.display, pipe) + active_pipes[last_pipe++] = pipe; + last_pipe--; }run_subtests (&data);
Signature · 1 line
2.39.0
PATCH 3/5 tests/kms_color: Limit the execution to two pipes
In reply to Nidhi GuptaAs the test execution is taking more time on simulation, limit the execution to two (first & last) pipes. This optimization is for simulation only and hence there will be no impact on real hardware.
This patch will also provide an option (command line flag '-e') to execute on all pipes.
Example: ./kms_color -e --run-subtest ctm-0-50
--- tests/kms_color.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-)
tests/kms_color.c +42 -1
@@ -26,6 +26,10 @@IGT_TEST_DESCRIPTION ("Test Color Features at Pipe level" ); +static bool extended; +static enum pipe active_pipes[IGT_MAX_PIPES ]; +static uint32_t last_pipe; +static bool test_pipe_degamma (data_t *data,igt_plane_t *primary) {
@@ -876,6 +880,16 @@ run_deep_color_tests_for_pipe(data_t *data, enum pipe p)test_cleanup (data); } +static bool simulation_constraint (enum pipe pipe) +{ +if (igt_run_in_simulation () && !extended && + pipe != active_pipes[0 ] && + pipe != active_pipes[last_pipe]) +return true; + +return false; +} +static void run_invalid_tests_for_pipe (data_t *data) {
@@ -900,6 +914,8 @@ run_invalid_tests_for_pipe(data_t *data)igt_describe_f ("%s" , tests[i].desc); igt_subtest_with_dynamic_f("%s", tests[i].name) {for_each_pipe (&data->display, pipe) { +if (simulation_constraint (pipe)) +continue ;prep_pipe (data, pipe);igt_dynamic_f ("pipe-%s" ,kmstest_pipe_name (pipe))
@@ -1020,6 +1036,8 @@ run_tests_for_pipe(data_t *data)igt_describe_f ("%s" , ctm_tests[i].desc); igt_subtest_with_dynamic_f("%s", ctm_tests[i].name) {for_each_pipe (&data->display, pipe) { +if (simulation_constraint (pipe)) +continue ; run_ctm_tests_for_pipe(data, pipe, ctm_tests[i].colors, ctm_tests[i].ctm,
@@ -1039,9 +1057,28 @@ run_tests_for_pipe(data_t *data) } } -igt_main +static int opt_handler (int opt,int opt_index,void *_data) +{ +switch (opt) { +case 'e' : + extended = true; +break ; +default : +return IGT_OPT_HANDLER_ERROR ; + } + +return IGT_OPT_HANDLER_SUCCESS ; +} + +const char *help_str = +" -e \tExtended tests.\n" ; + +igt_main_args("e", NULL, help_str, opt_handler, NULL) {data_t data = {}; +enum pipe pipe; + + last_pipe =0 ; igt_fixture { data.drm_fd =drm_open_driver_master (DRIVER_ANY );
@@ -1050,6 +1087,10 @@ igt_mainkmstest_set_vt_graphics_mode ();igt_display_require (&data.display, data.drm_fd); +/* Get active pipes. */ +for_each_pipe (&data.display, pipe) + active_pipes[last_pipe++] = pipe; + last_pipe--; } igt_subtest_group
Signature · 1 line
2.39.0
Re: [igt-dev] [PATCH i-g-t 3/5] tests/kms_color: Limit the execution to two pipes
Hi Nidhi,
I have some reservations about this extended tests with simulation.
When I see -e option I understand that, with -e option, all the tests will run, and without that, only a subset of the tests will be run.
So to run only a subset of the tests, I just run the test without -e option, and this is consistent with other tests as well.
Now in some tests like this, we are having -e option only applicable for simulation.
When running on a real HW I would see "-e Extended tests", but actually it doesn't matter if option e is passed, or not.
So IMHO, if we are sure we are not loosing any coverage with limiting the pipes, let us limit not only for simulation, but for general case too.
Or otherwise, show -e option only in case for simulation, if its meant only for simulation.
Regards,
Ankit
Quoted 105 lines · Nidhi Gupta
As the test execution is taking more time on simulation, limit the execution to two (first & last) pipes. This optimization is for simulation only and hence there will be no impact on real hardware.
This patch will also provide an option (command line flag '-e') to execute on all pipes.
Example: ./kms_color -e --run-subtest ctm-0-50
Signed-off-by Nidhi Gupta <[email protected]>--- tests/kms_color.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-)tests/kms_color.c +42
-1@@ -26,6 +26,10 @@IGT_TEST_DESCRIPTION ("Test Color Features at Pipe level" ); +static bool extended; +static enum pipe active_pipes[IGT_MAX_PIPES ]; +static uint32_t last_pipe; +static bool test_pipe_degamma (data_t *data,igt_plane_t *primary) {@@ -876,6 +880,16 @@ run_deep_color_tests_for_pipe(data_t *data, enum pipe p)test_cleanup (data); } +static bool simulation_constraint (enum pipe pipe) +{ +if (igt_run_in_simulation () && !extended && + pipe != active_pipes[0 ] && + pipe != active_pipes[last_pipe]) +return true; + +return false; +} +static void run_invalid_tests_for_pipe (data_t *data) {@@ -900,6 +914,8 @@ run_invalid_tests_for_pipe(data_t *data)igt_describe_f ("%s" , tests[i].desc); igt_subtest_with_dynamic_f("%s", tests[i].name) {for_each_pipe (&data->display, pipe) { +if (simulation_constraint (pipe)) +continue ;prep_pipe (data, pipe);igt_dynamic_f ("pipe-%s" ,kmstest_pipe_name (pipe))@@ -1020,6 +1036,8 @@ run_tests_for_pipe(data_t *data)igt_describe_f ("%s" , ctm_tests[i].desc); igt_subtest_with_dynamic_f("%s", ctm_tests[i].name) {for_each_pipe (&data->display, pipe) { +if (simulation_constraint (pipe)) +continue ; run_ctm_tests_for_pipe(data, pipe, ctm_tests[i].colors, ctm_tests[i].ctm,@@ -1039,9 +1057,28 @@ run_tests_for_pipe(data_t *data) } } -igt_main +static int opt_handler (int opt,int opt_index,void *_data) +{ +switch (opt) { +case 'e' : + extended = true; +break ; +default : +return IGT_OPT_HANDLER_ERROR ; + } + +return IGT_OPT_HANDLER_SUCCESS ; +} + +const char *help_str = +" -e \tExtended tests.\n" ; + +igt_main_args("e", NULL, help_str, opt_handler, NULL) {data_t data = {}; +enum pipe pipe; + + last_pipe =0 ; igt_fixture { data.drm_fd =drm_open_driver_master (DRIVER_ANY );@@ -1050,6 +1087,10 @@ igt_mainkmstest_set_vt_graphics_mode ();igt_display_require (&data.display, data.drm_fd); +/* Get active pipes. */ +for_each_pipe (&data.display, pipe) + active_pipes[last_pipe++] = pipe; + last_pipe--; } igt_subtest_group
PATCH 4/5 tests/i915/kms_draw_crc: Ignore RGB565 & XRGB2101010 formats on simulation
In reply to Nidhi GuptaFrom: Bhanuprakash Modem <[email protected]>
As RGB565 and XRGB2101010 formats are bit slow in pre-si, we can ignore to improve the execution time.
--- tests/i915/kms_draw_crc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
tests/i915/kms_draw_crc.c +9 -3
@@ -290,10 +290,19 @@ igt_main "with different modifiers, DRM_FORMATS, DRAW_METHODS."); igt_subtest_with_dynamic("draw-method") {for (format_idx =0 ; format_idx <ARRAY_SIZE (formats); format_idx++) { +/* 10-bit formats are bit slow, ignore in pre-si. */ +if (igt_run_in_simulation () && + (formats[format_idx] ==DRM_FORMAT_XRGB2101010 || + formats[format_idx] ==DRM_FORMAT_RGB565 )) +continue ; +for (method =0 ; method <IGT_DRAW_METHOD_COUNT ; method++) {for (modifier_idx =0 ; modifier_idx <ARRAY_SIZE (modifiers); modifier_idx++) { modifier = modifiers[modifier_idx]; +if (!igt_display_has_format_mod (&display, formats[format_idx], modifier)) +continue ; +if (method ==IGT_DRAW_MMAP_WC && !gem_mmap__has_wc (drm_fd))continue ;
@@ -301,9 +310,6 @@ igt_main !gem_has_mappable_ggtt(drm_fd))continue ; -if (!igt_display_has_format_mod (&display, formats[format_idx], modifier)) -continue ; - igt_dynamic_f("%s-%s-%s", format_str(format_idx), igt_draw_get_method_name(method),
Signature · 1 line
2.39.0
PATCH 5/5 tests/i915/kms_frontbuffer_tracking: Reduce the execution time on simulation
In reply to Nidhi GuptaWith IGT_DRAW_RENDER draw method test is taking lot of time to complete causing timeout in simulation, to avoid the time out skipping IGT_DRAW_METHOD only for simulation
--- tests/i915/kms_frontbuffer_tracking.c | 3 +++ 1 file changed, 3 insertions(+)
tests/i915/kms_frontbuffer_tracking.c +3 -0
@@ -3159,6 +3159,9 @@ static void basic_subtest(const struct test_mode *t) fb1 = params->primary.fb;for (r =0 , method =0 ; method <IGT_DRAW_METHOD_COUNT ; method++) { +if (igt_run_in_simulation () && method ==IGT_DRAW_RENDER ) +continue ; +if (method ==IGT_DRAW_MMAP_GTT && !gem_has_mappable_ggtt (drm.fd))continue ;
Signature · 1 line
2.39.0
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for Restrict the execution to few pipes/planes
In reply to Nidhi Gupta== Series Details ==
== Series Details ==
Series: Restrict the execution to few pipes/planes
URL : https://patchwork.freedesktop.org/series/113723/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12705 -> IGTPW_8454
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_8454 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_8454, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8454/index.html
Participating hosts (36 -> 35)
------------------------------
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8454:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@execlists:
- fi-glk-j4005: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12705/fi-glk-j4005/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8454/fi-glk-j4005/igt@i915_selftest@[email protected]
Known issues
------------
Here are the changes found in IGTPW_8454 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-d-hdmi-a-2:
- bat-dg1-6: [PASS][3] -> [FAIL][4] ([fdo#103375]) +4 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12705/bat-dg1-6/igt@kms_pipe_crc_basic@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8454/bat-dg1-6/igt@kms_pipe_crc_basic@[email protected]
#### Possible fixes ####
* igt@gem_exec_gttfill@basic:
- fi-pnv-d510: [FAIL][5] ([i915#7229]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12705/fi-pnv-d510/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8454/fi-pnv-d510/igt@[email protected]
* igt@i915_pm_rpm@basic-rte:
- {bat-adlp-6}: [ABORT][7] ([i915#7977]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12705/bat-adlp-6/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8454/bat-adlp-6/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-dp-1:
- {bat-adlp-9}: [DMESG-WARN][9] -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12705/bat-adlp-9/igt@kms_pipe_crc_basic@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8454/bat-adlp-9/igt@kms_pipe_crc_basic@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7977]: https://gitlab.freedesktop.org/drm/intel/issues/7977
[i915#7982]: https://gitlab.freedesktop.org/drm/intel/issues/7982
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7152 -> IGTPW_8454
CI-20190529: 20190529
CI_DRM_12705: 84b50b45c1805a76c1784c821b78f154c38053c8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8454: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8454/index.html
IGT_7152: 790b81207a0a6705213ec5ea645bc5e223b2ce1d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8454/index.html