Re: [Intel-gfx] [PATCH i-g-t] igt/kms_rotation_crc: Add RGB565 90 degree test for gen>9
On 28.11.2017 13:53, Maarten Lankhorst wrote: Hey, Op 21-11-17 om 15:02 schreef Juha-Pekka Heikkila: Gen10 onwards 90 and 270 degree rotations are supported for RGB565 format. v2 (Ville Syrjälä): As a side effect to keep bad-pixel-format test valid on all supported platforms it need to use DRM_FORMAT_C8 now. While at it clean up kms_rotation_crc test a bit, take out test_plane_rotation_ytiled_obj() function as test_plane_rotation() can basically do the same. v3 (Ville Syrjälä): repurpose test_plane_rotation_ytiled_obj() function for bad pixel testing with DRM_FORMAT_C8 as igt doesn't support this format. Signed-off-by: Juha-Pekka HeikkilaAt this point there is no correct order to apply the tests then. What I would like to see is the bad-pixel-format changes in a separate commit, so we can commit that first, and then commit kernel change, watch CI results for regressions and then add the new IGT test.. With that fixed the patches can be applied. :) Hei, thanks for the comment Maarten. I'll make the change and add you as cc once done. :) /Juha-Pekka ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH i-g-t] igt/kms_rotation_crc: Add RGB565 90 degree test for gen>9
Hey, Op 21-11-17 om 15:02 schreef Juha-Pekka Heikkila: > Gen10 onwards 90 and 270 degree rotations are supported for RGB565 format. > > v2 (Ville Syrjälä): > As a side effect to keep bad-pixel-format test valid on all supported > platforms it need to use DRM_FORMAT_C8 now. > > While at it clean up kms_rotation_crc test a bit, take out > test_plane_rotation_ytiled_obj() function as > test_plane_rotation() can basically do the same. > > v3 (Ville Syrjälä): > repurpose test_plane_rotation_ytiled_obj() function for > bad pixel testing with DRM_FORMAT_C8 as igt doesn't > support this format. > > Signed-off-by: Juha-Pekka HeikkilaAt this point there is no correct order to apply the tests then. What I would like to see is the bad-pixel-format changes in a separate commit, so we can commit that first, and then commit kernel change, watch CI results for regressions and then add the new IGT test.. With that fixed the patches can be applied. :) ~Maarten ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH i-g-t] igt/kms_rotation_crc: Add RGB565 90 degree test for gen>9
Gen10 onwards 90 and 270 degree rotations are supported for RGB565 format. v2 (Ville Syrjälä): As a side effect to keep bad-pixel-format test valid on all supported platforms it need to use DRM_FORMAT_C8 now. While at it clean up kms_rotation_crc test a bit, take out test_plane_rotation_ytiled_obj() function as test_plane_rotation() can basically do the same. v3 (Ville Syrjälä): repurpose test_plane_rotation_ytiled_obj() function for bad pixel testing with DRM_FORMAT_C8 as igt doesn't support this format. Signed-off-by: Juha-Pekka Heikkila--- tests/kms_rotation_crc.c | 58 ++-- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 27d1f80..1769264 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -376,10 +376,6 @@ static void test_plane_rotation(data_t *data, int plane_type) igt_plane_set_size(plane, data->fb.height, data->fb.width); ret = igt_display_try_commit2(display, commit); - if (data->override_fmt || data->override_tiling) { - igt_assert_eq(ret, -EINVAL); - continue; - } /* Verify commit was ok. */ igt_assert_eq(ret, 0); @@ -421,14 +417,13 @@ static void test_plane_rotation(data_t *data, int plane_type) igt_require_f(valid_tests, "no valid crtc/connector combinations found\n"); } -static void test_plane_rotation_ytiled_obj(data_t *data, +static void test_bad_pixel_format(data_t *data, igt_output_t *output, int plane_type) { igt_display_t *display = >display; uint64_t tiling = LOCAL_I915_FORMAT_MOD_Y_TILED; - uint32_t format = DRM_FORMAT_XRGB; - int bpp = igt_drm_format_to_bpp(format); + uint32_t format = DRM_FORMAT_C8; enum igt_commit_style commit = COMMIT_LEGACY; int fd = data->gfx_fd; igt_plane_t *plane; @@ -453,7 +448,7 @@ static void test_plane_rotation_ytiled_obj(data_t *data, w = mode->hdisplay; h = mode->vdisplay; - for (stride = 512; stride < (w * bpp / 8); stride *= 2) + for (stride = 512; stride < w; stride *= 2) ; for (size = 1024*1024; size < stride * h; size *= 2) ; @@ -482,7 +477,9 @@ static void test_plane_rotation_ytiled_obj(data_t *data, kmstest_restore_vt_mode(); igt_remove_fb(fd, >fb); - igt_assert_eq(ret, 0); + data->fb.fb_id = 0; + + igt_assert_eq(ret, -EINVAL); } static void test_plane_rotation_exhaust_fences(data_t *data, @@ -693,12 +690,25 @@ igt_main } igt_subtest_f("bad-pixel-format") { + enum pipe pipe; + igt_output_t *output; + int valid_tests = 0; + igt_require(gen >= 9); data.pos_x = 0, data.pos_y = 0; data.rotation = IGT_ROTATION_90; - data.override_fmt = DRM_FORMAT_RGB565; - test_plane_rotation(, DRM_PLANE_TYPE_PRIMARY); + + for_each_pipe_with_valid_output(, pipe, output) { + igt_output_set_pipe(output, pipe); + + test_bad_pixel_format(, output, DRM_PLANE_TYPE_PRIMARY); + + valid_tests++; + break; + } + + igt_require_f(valid_tests, "invalid pixel format accepted for rotation\n"); } igt_subtest_f("bad-tiling") { @@ -709,24 +719,20 @@ igt_main test_plane_rotation(, DRM_PLANE_TYPE_PRIMARY); } - igt_subtest_f("primary-rotation-90-Y-tiled") { - enum pipe pipe; - igt_output_t *output; - int valid_tests = 0; + igt_subtest_f("primary-rotation-90-Y-tiled-16bpp") { + igt_require(gen >= 10); + data.rotation = IGT_ROTATION_90; + data.override_fmt = DRM_FORMAT_RGB565; + data.override_tiling = LOCAL_I915_FORMAT_MOD_Y_TILED; + test_plane_rotation(, DRM_PLANE_TYPE_PRIMARY); + } + igt_subtest_f("primary-rotation-90-Y-tiled") { igt_require(gen >= 9); data.rotation = IGT_ROTATION_90; - - for_each_pipe_with_valid_output(, pipe, output) { - igt_output_set_pipe(output, pipe); - - test_plane_rotation_ytiled_obj(, output, DRM_PLANE_TYPE_PRIMARY); - - valid_tests++; - break; - } - - igt_require_f(valid_tests, "no valid crtc/connector combinations found\n"); + data.override_fmt = DRM_FORMAT_XRGB; +
[Intel-gfx] [PATCH i-g-t] igt/kms_rotation_crc: Add RGB565 90 degree test for gen>9
Add rgb565 90 degree test for gen10 onwards and do some house cleaning on the same go. /Juha-Pekka Juha-Pekka Heikkila (1): igt/kms_rotation_crc: Add RGB565 90 degree test for gen>9 tests/kms_rotation_crc.c | 58 ++-- 1 file changed, 32 insertions(+), 26 deletions(-) -- 2.7.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH i-g-t] igt/kms_rotation_crc: Add RGB565 90 degree test for gen>9
On Fri, Nov 03, 2017 at 04:26:30PM +0200, Juha-Pekka Heikkila wrote: > Gen10 onwards 90 and 270 degree rotations are supported for RGB565 format. > > Signed-off-by: Juha-Pekka Heikkila> --- > tests/kms_rotation_crc.c | 30 +++--- > 1 file changed, 27 insertions(+), 3 deletions(-) > > diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c > index 27d1f80..f22bcb5 100644 > --- a/tests/kms_rotation_crc.c > +++ b/tests/kms_rotation_crc.c > @@ -423,11 +423,10 @@ static void test_plane_rotation(data_t *data, int > plane_type) > > static void test_plane_rotation_ytiled_obj(data_t *data, > igt_output_t *output, > -int plane_type) > +int plane_type, uint32_t format) > { > igt_display_t *display = >display; > uint64_t tiling = LOCAL_I915_FORMAT_MOD_Y_TILED; > - uint32_t format = DRM_FORMAT_XRGB; > int bpp = igt_drm_format_to_bpp(format); > enum igt_commit_style commit = COMMIT_LEGACY; > int fd = data->gfx_fd; > @@ -709,6 +708,29 @@ igt_main > test_plane_rotation(, DRM_PLANE_TYPE_PRIMARY); > } > > + igt_subtest_f("primary-rotation-90-Y-tiled-16bpp") { > + enum pipe pipe; > + igt_output_t *output; > + int valid_tests = 0; > + > + igt_require(gen > 9); > + data.rotation = IGT_ROTATION_90; > + > + for_each_pipe_with_valid_output(, pipe, output) { > + igt_output_set_pipe(output, pipe); > + > + test_plane_rotation_ytiled_obj(, output, > +DRM_PLANE_TYPE_PRIMARY, > +DRM_FORMAT_RGB565); This will fail on pre-gen10, so you'll need to adjust something else as well. Also you'll want to change the bad-format test to use maybe C8. Looks like kms_rotation_crc as a whole could use some refactoring. I don't understand why we have test_plane_rotation() and test_plane_rotation_ytiled_obj(). One function really should be enough. > + > + valid_tests++; > + break; > + } > + > + igt_require_f(valid_tests, > + "no valid crtc/connector combinations found\n"); > + } > + > igt_subtest_f("primary-rotation-90-Y-tiled") { > enum pipe pipe; > igt_output_t *output; > @@ -720,7 +742,9 @@ igt_main > for_each_pipe_with_valid_output(, pipe, output) { > igt_output_set_pipe(output, pipe); > > - test_plane_rotation_ytiled_obj(, output, > DRM_PLANE_TYPE_PRIMARY); > + test_plane_rotation_ytiled_obj(, output, > +DRM_PLANE_TYPE_PRIMARY, > +DRM_FORMAT_XRGB); > > valid_tests++; > break; > -- > 2.7.4 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ville Syrjälä Intel OTC ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH i-g-t] igt/kms_rotation_crc: Add RGB565 90 degree test for gen>9
Gen10 onwards 90 and 270 degree rotations are supported for RGB565 format. Signed-off-by: Juha-Pekka Heikkila--- tests/kms_rotation_crc.c | 30 +++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 27d1f80..f22bcb5 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -423,11 +423,10 @@ static void test_plane_rotation(data_t *data, int plane_type) static void test_plane_rotation_ytiled_obj(data_t *data, igt_output_t *output, - int plane_type) + int plane_type, uint32_t format) { igt_display_t *display = >display; uint64_t tiling = LOCAL_I915_FORMAT_MOD_Y_TILED; - uint32_t format = DRM_FORMAT_XRGB; int bpp = igt_drm_format_to_bpp(format); enum igt_commit_style commit = COMMIT_LEGACY; int fd = data->gfx_fd; @@ -709,6 +708,29 @@ igt_main test_plane_rotation(, DRM_PLANE_TYPE_PRIMARY); } + igt_subtest_f("primary-rotation-90-Y-tiled-16bpp") { + enum pipe pipe; + igt_output_t *output; + int valid_tests = 0; + + igt_require(gen > 9); + data.rotation = IGT_ROTATION_90; + + for_each_pipe_with_valid_output(, pipe, output) { + igt_output_set_pipe(output, pipe); + + test_plane_rotation_ytiled_obj(, output, + DRM_PLANE_TYPE_PRIMARY, + DRM_FORMAT_RGB565); + + valid_tests++; + break; + } + + igt_require_f(valid_tests, + "no valid crtc/connector combinations found\n"); + } + igt_subtest_f("primary-rotation-90-Y-tiled") { enum pipe pipe; igt_output_t *output; @@ -720,7 +742,9 @@ igt_main for_each_pipe_with_valid_output(, pipe, output) { igt_output_set_pipe(output, pipe); - test_plane_rotation_ytiled_obj(, output, DRM_PLANE_TYPE_PRIMARY); + test_plane_rotation_ytiled_obj(, output, + DRM_PLANE_TYPE_PRIMARY, + DRM_FORMAT_XRGB); valid_tests++; break; -- 2.7.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx