Re: [Intel-gfx] [PATCH i-g-t v2 05/15] tests/kms: Clean up more users of unassigned pipes.
How about this? tests/kms: Clean up more users of unassigned pipes. Use for_each_pipe_with_valid_output instead. This may increase test time slightly on the affected tests, because now outputs will be tested on every pipe instead of the first pipe. This will increase test coverage to all usable pipes though, so it shouldn't be an issue. ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH i-g-t v2 05/15] tests/kms: Clean up more users of unassigned pipes.
Op 20-07-16 om 14:56 schreef Ander Conselvan De Oliveira: > On Wed, 2016-07-06 at 11:55 +0200, Maarten Lankhorst wrote: >> Use for_each_pipe_with_valid_output instead. >> >> Signed-off-by: Maarten Lankhorst >> --- >> tests/kms_crtc_background_color.c | 3 +-- >> tests/kms_flip_tiling.c | 50 >> +++--- >> - >> tests/kms_panel_fitting.c | 5 ++-- >> tests/kms_plane_scaling.c | 5 ++-- >> 4 files changed, 34 insertions(+), 29 deletions(-) >> >> diff --git a/tests/kms_crtc_background_color.c >> b/tests/kms_crtc_background_color.c >> index b496625c1693..b97c1142df6e 100644 >> --- a/tests/kms_crtc_background_color.c >> +++ b/tests/kms_crtc_background_color.c >> @@ -133,10 +133,9 @@ static void test_crtc_background(data_t *data) >> >> igt_require(data->display.has_universal_planes); >> >> -for_each_connected_output(display, output) { >> +for_each_pipe_with_valid_output(display, pipe, output) { >> igt_plane_t *plane; >> >> -pipe = output->config.pipe; >> igt_output_set_pipe(output, pipe); > Won't this cause the test to be executed more times? I.e., every output paired > with every supported pipe vs. every output only with the pipe it is currently > configured to use. > > None of the changed tests are part of BAT, so I'm not sure we care about a > potential increase in execution time, though. But maybe add a note in the > commit > message for future reference? It will, but it will also increase test coverage by running the test on each crtc. If we only cared for the test to run with a single combination, we should have just added break at the end. Good idea to put it in the commit message though, would be useful. ~Maarten ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH i-g-t v2 05/15] tests/kms: Clean up more users of unassigned pipes.
On Wed, 2016-07-06 at 11:55 +0200, Maarten Lankhorst wrote: > Use for_each_pipe_with_valid_output instead. > > Signed-off-by: Maarten Lankhorst > --- > tests/kms_crtc_background_color.c | 3 +-- > tests/kms_flip_tiling.c | 50 +++--- > - > tests/kms_panel_fitting.c | 5 ++-- > tests/kms_plane_scaling.c | 5 ++-- > 4 files changed, 34 insertions(+), 29 deletions(-) > > diff --git a/tests/kms_crtc_background_color.c > b/tests/kms_crtc_background_color.c > index b496625c1693..b97c1142df6e 100644 > --- a/tests/kms_crtc_background_color.c > +++ b/tests/kms_crtc_background_color.c > @@ -133,10 +133,9 @@ static void test_crtc_background(data_t *data) > > igt_require(data->display.has_universal_planes); > > - for_each_connected_output(display, output) { > + for_each_pipe_with_valid_output(display, pipe, output) { > igt_plane_t *plane; > > - pipe = output->config.pipe; > igt_output_set_pipe(output, pipe); Won't this cause the test to be executed more times? I.e., every output paired with every supported pipe vs. every output only with the pipe it is currently configured to use. None of the changed tests are part of BAT, so I'm not sure we care about a potential increase in execution time, though. But maybe add a note in the commit message for future reference? Ander > > plane = igt_output_get_plane(output, IGT_PLANE_PRIMARY); > diff --git a/tests/kms_flip_tiling.c b/tests/kms_flip_tiling.c > index f58e65be61ee..cd2f510f1d45 100644 > --- a/tests/kms_flip_tiling.c > +++ b/tests/kms_flip_tiling.c > @@ -80,16 +80,15 @@ static void wait_for_pageflip(int fd) > } > > static void > -test_flip_tiling(data_t *data, igt_output_t *output, uint64_t tiling[2]) > +test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t > tiling[2]) > { > drmModeModeInfo *mode; > igt_plane_t *primary; > struct igt_fb fb[2]; > igt_pipe_crc_t *pipe_crc; > igt_crc_t reference_crc, crc; > - int fb_id, pipe, ret, width; > + int fb_id, ret, width; > > - pipe = output->config.pipe; > pipe_crc = pipe_crc_new(pipe); > igt_output_set_pipe(output, pipe); > > @@ -184,31 +183,34 @@ igt_main > igt_subtest_f("flip-changes-tiling") { > uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_X_TILED, > LOCAL_DRM_FORMAT_MOD_NONE }; > + enum pipe pipe; > > - for_each_connected_output(&data.display, output) > - test_flip_tiling(&data, output, tiling); > + for_each_pipe_with_valid_output(&data.display, pipe, output) > + test_flip_tiling(&data, pipe, output, tiling); > } > > igt_subtest_f("flip-changes-tiling-Y") { > uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Y_TILED, > LOCAL_DRM_FORMAT_MOD_NONE }; > + enum pipe pipe; > > igt_require_fb_modifiers(data.drm_fd); > igt_require(data.gen >= 9); > > - for_each_connected_output(&data.display, output) > - test_flip_tiling(&data, output, tiling); > + for_each_pipe_with_valid_output(&data.display, pipe, output) > + test_flip_tiling(&data, pipe, output, tiling); > } > > igt_subtest_f("flip-changes-tiling-Yf") { > uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Yf_TILED, > LOCAL_DRM_FORMAT_MOD_NONE }; > + enum pipe pipe; > > igt_require_fb_modifiers(data.drm_fd); > igt_require(data.gen >= 9); > > - for_each_connected_output(&data.display, output) > - test_flip_tiling(&data, output, tiling); > + for_each_pipe_with_valid_output(&data.display, pipe, output) > + test_flip_tiling(&data, pipe, output, tiling); > } > > /* > @@ -222,31 +224,34 @@ igt_main > igt_subtest_f("flip-X-tiled") { > uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_X_TILED, > LOCAL_I915_FORMAT_MOD_X_TILED }; > + enum pipe pipe; > > - for_each_connected_output(&data.display, output) > - test_flip_tiling(&data, output, tiling); > + for_each_pipe_with_valid_output(&data.display, pipe, output) > + test_flip_tiling(&data, pipe, output, tiling); > } > > igt_subtest_f("flip-Y-tiled") { > uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Y_TILED, > LOCAL_I915_FORMAT_MOD_Y_TILED }; > + enum pipe pipe; > > igt_require_fb_modifiers(data.drm_fd); > igt_require(data.gen >= 9); > > - for_each_connected_output(&data.display, output) > -
[Intel-gfx] [PATCH i-g-t v2 05/15] tests/kms: Clean up more users of unassigned pipes.
Use for_each_pipe_with_valid_output instead. Signed-off-by: Maarten Lankhorst --- tests/kms_crtc_background_color.c | 3 +-- tests/kms_flip_tiling.c | 50 +++ tests/kms_panel_fitting.c | 5 ++-- tests/kms_plane_scaling.c | 5 ++-- 4 files changed, 34 insertions(+), 29 deletions(-) diff --git a/tests/kms_crtc_background_color.c b/tests/kms_crtc_background_color.c index b496625c1693..b97c1142df6e 100644 --- a/tests/kms_crtc_background_color.c +++ b/tests/kms_crtc_background_color.c @@ -133,10 +133,9 @@ static void test_crtc_background(data_t *data) igt_require(data->display.has_universal_planes); - for_each_connected_output(display, output) { + for_each_pipe_with_valid_output(display, pipe, output) { igt_plane_t *plane; - pipe = output->config.pipe; igt_output_set_pipe(output, pipe); plane = igt_output_get_plane(output, IGT_PLANE_PRIMARY); diff --git a/tests/kms_flip_tiling.c b/tests/kms_flip_tiling.c index f58e65be61ee..cd2f510f1d45 100644 --- a/tests/kms_flip_tiling.c +++ b/tests/kms_flip_tiling.c @@ -80,16 +80,15 @@ static void wait_for_pageflip(int fd) } static void -test_flip_tiling(data_t *data, igt_output_t *output, uint64_t tiling[2]) +test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t tiling[2]) { drmModeModeInfo *mode; igt_plane_t *primary; struct igt_fb fb[2]; igt_pipe_crc_t *pipe_crc; igt_crc_t reference_crc, crc; - int fb_id, pipe, ret, width; + int fb_id, ret, width; - pipe = output->config.pipe; pipe_crc = pipe_crc_new(pipe); igt_output_set_pipe(output, pipe); @@ -184,31 +183,34 @@ igt_main igt_subtest_f("flip-changes-tiling") { uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_X_TILED, LOCAL_DRM_FORMAT_MOD_NONE }; + enum pipe pipe; - for_each_connected_output(&data.display, output) - test_flip_tiling(&data, output, tiling); + for_each_pipe_with_valid_output(&data.display, pipe, output) + test_flip_tiling(&data, pipe, output, tiling); } igt_subtest_f("flip-changes-tiling-Y") { uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Y_TILED, LOCAL_DRM_FORMAT_MOD_NONE }; + enum pipe pipe; igt_require_fb_modifiers(data.drm_fd); igt_require(data.gen >= 9); - for_each_connected_output(&data.display, output) - test_flip_tiling(&data, output, tiling); + for_each_pipe_with_valid_output(&data.display, pipe, output) + test_flip_tiling(&data, pipe, output, tiling); } igt_subtest_f("flip-changes-tiling-Yf") { uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Yf_TILED, LOCAL_DRM_FORMAT_MOD_NONE }; + enum pipe pipe; igt_require_fb_modifiers(data.drm_fd); igt_require(data.gen >= 9); - for_each_connected_output(&data.display, output) - test_flip_tiling(&data, output, tiling); + for_each_pipe_with_valid_output(&data.display, pipe, output) + test_flip_tiling(&data, pipe, output, tiling); } /* @@ -222,31 +224,34 @@ igt_main igt_subtest_f("flip-X-tiled") { uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_X_TILED, LOCAL_I915_FORMAT_MOD_X_TILED }; + enum pipe pipe; - for_each_connected_output(&data.display, output) - test_flip_tiling(&data, output, tiling); + for_each_pipe_with_valid_output(&data.display, pipe, output) + test_flip_tiling(&data, pipe, output, tiling); } igt_subtest_f("flip-Y-tiled") { uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Y_TILED, LOCAL_I915_FORMAT_MOD_Y_TILED }; + enum pipe pipe; igt_require_fb_modifiers(data.drm_fd); igt_require(data.gen >= 9); - for_each_connected_output(&data.display, output) - test_flip_tiling(&data, output, tiling); + for_each_pipe_with_valid_output(&data.display, pipe, output) + test_flip_tiling(&data, pipe, output, tiling); } igt_subtest_f("flip-Yf-tiled") { uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Yf_TILED, LOCAL_I915_FORMAT_MOD_Yf_TILED }; + enum pipe pipe; igt_require_fb_modifiers(data.drm_fd); igt_require(data.ge