kms_plane_scaling tests.
v3 cover kms_plane_scaling tests.
This series fixes the current scaler igt test failures and enhances kms_plane_scaling and kms_plane for covering subtests below:
- verify all the supported pixel formats in planes
- combination of rotation and scaling
- combination of tiling and scaling
- multi-plane/multi-pipe scaling
I've cleaned up the previous series sent out by Vidya Srinivas, and split out some patches for clarity.
Changes since previous version:
- Fix test failures on APL.
- Fix test failures on platforms the tests should skip on.
Jyoti Yadav (3):
tests/kms_plane_scaling: test scaling with tiling rotation and pixel
formats, v2.
tests/kms_plane_scaling: test scaler with clipping clamping, v3. tests/kms_plane_scaling: test for multi pipe with scaling, v3.
Maarten Lankhorst (4):
tests/kms_plane_scaling: Move the actual test to its own function. tests/kms_plane_scaling: Convert from simple test to full test tests/kms_plane_scaling: Move get_num_scalers to a function. tests/kms_plane_scaling: Clean up tests to work better with igt_kms,
v2.
Mahesh Kumar (1):
tests/kms_plane_scaling: Fix basic scaling test, v3.
tests/kms_plane_scaling.c | 661 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 468 insertions(+), 193 deletions(-)
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 1/8 tests/kms_plane_scaling: Move the actual test to its own function.
We will add more subtests in the future, it's more clear if we split out the actual test to its own function first.
--- tests/kms_plane_scaling.c | 226 ++++++++++++++++++++++++---------------------- 1 file changed, 117 insertions(+), 109 deletions(-)
tests/kms_plane_scaling.c +117 -109
@@ -163,144 +163,151 @@ static void iterate_plane_scaling(data_t *d, drmModeModeInfo *mode) } } -static void test_plane_scaling (data_t *d) +static void +test_plane_scaling_on_pipe (data_t *d,enum pipe pipe,igt_output_t *output) {igt_display_t *display = &d->display; -igt_output_t *output; -enum pipe pipe; -int valid_tests =0 ; +drmModeModeInfo *mode;int primary_plane_scaling =0 ;/* For now */ -igt_require (d->num_scalers); +igt_output_set_pipe (output, pipe); + mode =igt_output_get_mode (output); + +/* allocate fb2 with image size */ + d->fb_id2 =igt_create_image_fb (d->drm_fd,0 ,0 , +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ +FILE_NAME , &d->fb2); +igt_assert (d->fb_id2); + + d->fb_id3 =igt_create_pattern_fb (d->drm_fd, + mode->hdisplay, mode->vdisplay, +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ + &d->fb3); +igt_assert (d->fb_id3); + +/* Set up display with plane 1 */ + d->plane1 =igt_output_get_plane (output,0 ); +prepare_crtc (d, output, pipe, d->plane1, mode,COMMIT_UNIVERSAL ); + +if (primary_plane_scaling) { +/* Primary plane upscaling */ +igt_fb_set_position (&d->fb1, d->plane1,100 ,100 ); +igt_fb_set_size (&d->fb1, d->plane1,500 ,500 ); +igt_plane_set_position (d->plane1,0 ,0 ); +igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); +igt_display_commit2 (display,COMMIT_UNIVERSAL ); -for_each_pipe_with_valid_output (display, pipe, output) { -drmModeModeInfo *mode; - -igt_output_set_pipe (output, pipe); - - mode =igt_output_get_mode (output); - -/* allocate fb2 with image size */ - d->fb_id2 =igt_create_image_fb (d->drm_fd,0 ,0 , -DRM_FORMAT_XRGB8888 , -LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ -FILE_NAME , &d->fb2); -igt_assert (d->fb_id2); - - d->fb_id3 =igt_create_pattern_fb (d->drm_fd, - mode->hdisplay, mode->vdisplay, -DRM_FORMAT_XRGB8888 , -LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ - &d->fb3); -igt_assert (d->fb_id3); - -/* Set up display with plane 1 */ - d->plane1 =igt_output_get_plane (output,0 ); -prepare_crtc (d, output, pipe, d->plane1, mode,COMMIT_UNIVERSAL ); - -if (primary_plane_scaling) { -/* Primary plane upscaling */ -igt_fb_set_position (&d->fb1, d->plane1,100 ,100 ); -igt_fb_set_size (&d->fb1, d->plane1,500 ,500 ); -igt_plane_set_position (d->plane1,0 ,0 ); -igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +/* Primary plane 1:1 no scaling */ +igt_fb_set_position (&d->fb1, d->plane1,0 ,0 ); +igt_fb_set_size (&d->fb1, d->plane1, d->fb1.width, d->fb1.height); +igt_plane_set_position (d->plane1,0 ,0 ); +igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); +igt_display_commit2 (display,COMMIT_UNIVERSAL ); + } -/* Primary plane 1:1 no scaling */ -igt_fb_set_position (&d->fb1, d->plane1,0 ,0 ); -igt_fb_set_size (&d->fb1, d->plane1, d->fb1.width, d->fb1.height); -igt_plane_set_position (d->plane1,0 ,0 ); -igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); - } +/* Set up fb2->plane2 mapping. */ + d->plane2 =igt_output_get_plane (output,1 ); +igt_plane_set_fb (d->plane2, &d->fb2); -/* Set up fb2->plane2 mapping. */ - d->plane2 =igt_output_get_plane (output,1 ); -igt_plane_set_fb (d->plane2, &d->fb2); +/* 2nd plane windowed */ +igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); +igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width-200 , d->fb2.height-200 ); +igt_plane_set_position (d->plane2,100 ,100 ); +igt_plane_set_size (d->plane2, mode->hdisplay-200 , mode->vdisplay-200 ); +igt_display_commit2 (display,COMMIT_UNIVERSAL ); -/* 2nd plane windowed */ -igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); -igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width-200 , d->fb2.height-200 ); -igt_plane_set_position (d->plane2,100 ,100 ); -igt_plane_set_size (d->plane2, mode->hdisplay-200 , mode->vdisplay-200 ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +iterate_plane_scaling (d, mode); -iterate_plane_scaling (d, mode); +/* 2nd plane up scaling */ +igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); +igt_fb_set_size (&d->fb2, d->plane2,500 ,500 ); +igt_plane_set_position (d->plane2,10 ,10 ); +igt_plane_set_size (d->plane2, mode->hdisplay-20 , mode->vdisplay-20 ); +igt_display_commit2 (display,COMMIT_UNIVERSAL ); -/* 2nd plane up scaling */ -igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); -igt_fb_set_size (&d->fb2, d->plane2,500 ,500 ); -igt_plane_set_position (d->plane2,10 ,10 ); -igt_plane_set_size (d->plane2, mode->hdisplay-20 , mode->vdisplay-20 ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +/* 2nd plane downscaling */ +igt_fb_set_position (&d->fb2, d->plane2,0 ,0 ); +igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width, d->fb2.height); +igt_plane_set_position (d->plane2,10 ,10 ); +igt_plane_set_size (d->plane2,500 ,500 * d->fb2.height/d->fb2.width); +igt_display_commit2 (display,COMMIT_UNIVERSAL ); -/* 2nd plane downscaling */ -igt_fb_set_position (&d->fb2, d->plane2,0 ,0 ); -igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width, d->fb2.height); -igt_plane_set_position (d->plane2,10 ,10 ); -igt_plane_set_size (d->plane2,500 ,500 * d->fb2.height/d->fb2.width); +if (primary_plane_scaling) { +/* Primary plane up scaling */ +igt_fb_set_position (&d->fb1, d->plane1,100 ,100 ); +igt_fb_set_size (&d->fb1, d->plane1,500 ,500 ); +igt_plane_set_position (d->plane1,0 ,0 ); +igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay);igt_display_commit2 (display,COMMIT_UNIVERSAL ); + } -if (primary_plane_scaling) { -/* Primary plane up scaling */ -igt_fb_set_position (&d->fb1, d->plane1,100 ,100 ); -igt_fb_set_size (&d->fb1, d->plane1,500 ,500 ); -igt_plane_set_position (d->plane1,0 ,0 ); -igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); - } +/* Set up fb3->plane3 mapping. */ + d->plane3 =igt_output_get_plane (output,2 ); +igt_plane_set_fb (d->plane3, &d->fb3); + +/* 3rd plane windowed - no scaling */ +igt_fb_set_position (&d->fb3, d->plane3,100 ,100 ); +igt_fb_set_size (&d->fb3, d->plane3, d->fb3.width-300 , d->fb3.height-300 ); +igt_plane_set_position (d->plane3,100 ,100 ); +igt_plane_set_size (d->plane3, mode->hdisplay-300 , mode->vdisplay-300 ); +igt_display_commit2 (display,COMMIT_UNIVERSAL ); -/* Set up fb3->plane3 mapping. */ - d->plane3 =igt_output_get_plane (output,2 ); -igt_plane_set_fb (d->plane3, &d->fb3); +/* Switch scaler from plane 2 to plane 3 */ +igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); +igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width-200 , d->fb2.height-200 ); +igt_plane_set_position (d->plane2,100 ,100 ); +igt_plane_set_size (d->plane2, d->fb2.width-200 , d->fb2.height-200 ); -/* 3rd plane windowed - no scaling */ -igt_fb_set_position (&d->fb3, d->plane3,100 ,100 ); -igt_fb_set_size (&d->fb3, d->plane3, d->fb3.width-300 , d->fb3.height-300 ); -igt_plane_set_position (d->plane3,100 ,100 ); -igt_plane_set_size (d->plane3, mode->hdisplay-300 , mode->vdisplay-300 ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_fb_set_position (&d->fb3, d->plane3,100 ,100 ); +igt_fb_set_size (&d->fb3, d->plane3, d->fb3.width-400 , d->fb3.height-400 ); +igt_plane_set_position (d->plane3,10 ,10 ); +igt_plane_set_size (d->plane3, mode->hdisplay-300 , mode->vdisplay-300 ); +igt_display_commit2 (display,COMMIT_UNIVERSAL ); + +if (primary_plane_scaling) { +/* Switch scaler from plane 1 to plane 2 */ +igt_fb_set_position (&d->fb1, d->plane1,0 ,0 ); +igt_fb_set_size (&d->fb1, d->plane1, d->fb1.width, d->fb1.height); +igt_plane_set_position (d->plane1,0 ,0 ); +igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); -/* Switch scaler from plane 2 to plane 3 */ igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); -igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width-200 , d->fb2.height-200 ); +igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width-500 ,d->fb2.height-500 );igt_plane_set_position (d->plane2,100 ,100 ); -igt_plane_set_size (d->plane2, d->fb2.width-200 , d->fb2.height-200 ); - -igt_fb_set_position (&d->fb3, d->plane3,100 ,100 ); -igt_fb_set_size (&d->fb3, d->plane3, d->fb3.width-400 , d->fb3.height-400 ); -igt_plane_set_position (d->plane3,10 ,10 ); -igt_plane_set_size (d->plane3, mode->hdisplay-300 , mode->vdisplay-300 ); +igt_plane_set_size (d->plane2, mode->hdisplay-200 , mode->vdisplay-200 );igt_display_commit2 (display,COMMIT_UNIVERSAL ); + } -if (primary_plane_scaling) { -/* Switch scaler from plane 1 to plane 2 */ -igt_fb_set_position (&d->fb1, d->plane1,0 ,0 ); -igt_fb_set_size (&d->fb1, d->plane1, d->fb1.width, d->fb1.height); -igt_plane_set_position (d->plane1,0 ,0 ); -igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); - -igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); -igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width-500 ,d->fb2.height-500 ); -igt_plane_set_position (d->plane2,100 ,100 ); -igt_plane_set_size (d->plane2, mode->hdisplay-200 , mode->vdisplay-200 ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); - } +/* back to single plane mode */ +igt_plane_set_fb (d->plane2,NULL ); +igt_plane_set_fb (d->plane3,NULL ); +igt_display_commit2 (display,COMMIT_UNIVERSAL ); -/* back to single plane mode */ -igt_plane_set_fb (d->plane2,NULL ); -igt_plane_set_fb (d->plane3,NULL ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +cleanup_crtc (d, output, d->plane1); +} +static void test_plane_scaling (data_t *d,enum pipe pipe) +{ +igt_output_t *output; +int valid_tests =0 ; + +igt_require (d->num_scalers); + +for_each_valid_output_on_pipe (&d->display, pipe, output) { +test_plane_scaling_on_pipe (d, pipe, output); +igt_output_set_pipe (output,PIPE_ANY ); valid_tests++; -cleanup_crtc (d, output, d->plane1); } +igt_require_f (valid_tests,"no valid crtc/connector combinations found\n" ); } igt_simple_main {data_t data = {}; +enum pipe pipe;igt_skip_on_simulation ();
@@ -312,7 +319,8 @@ igt_simple_main data.num_scalers =intel_gen (data.devid) >=9 ?2 :0 ; -test_plane_scaling (&data); +for_each_pipe_static (pipe) +test_plane_scaling (&data, pipe);igt_display_fini (&data.display); }
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 2/8 tests/kms_plane_scaling: Fix basic scaling test, v3.
In reply to Maarten LankhorstFrom: Mahesh Kumar <[email protected]>
PIPEC doesnt have 3rd plane in GEN9. So, we skip the 3rd plane related scaling test where 2nd OVERLAY plane is not available.
Restricting downscaling to (9/10)x original size of the image to avoid "Max pixel rate limitation" of the hardware.
When testing with a resolution of 1024x768, the test fails in iterate_plane_scaling because height becomes out of bounds.
Lastly, instead of a fixed test image, generate a test pattern at runtime to not run into bxt's hardware limits for scaling.
Later patches in this series will cover corner cases of scaling.
Changes since v1:
- Move out the code reshuffle to a separate commit. (Maarten)
This makes it more clear what's fixed.
Changes since v2:
- Fix iterate_plane_scaling on 1024x768. (Maarten)
- Instead of upscaling a test image, use the test pattern with a color. (Maarten) Using a 600x600 test pattern doesn't run into BXT's
hardware limits for scaling.
--- tests/kms_plane_scaling.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
tests/kms_plane_scaling.c +16 -9
@@ -53,8 +53,6 @@ typedef struct {igt_plane_t *plane4; } data_t; -#define FILE_NAME "1080p-left.png" -static void prepare_crtc (data_t *data,igt_output_t *output,enum pipe pipe,igt_plane_t *plane,drmModeModeInfo *mode,enum igt_commit_style s) {
@@ -156,7 +154,9 @@ static void iterate_plane_scaling(data_t *d, drmModeModeInfo *mode)/* adjust fb size */ for (w = mode->hdisplay; w <= d->fb2.width; w+=10 ) { - h = w * mode->hdisplay / mode->vdisplay; +/* Source coordinates must not be clipped. */ + h =min (w * mode->hdisplay / mode->vdisplay, d->fb2.height); +igt_fb_set_size (&d->fb2, d->plane2, w, h);igt_display_commit2 (display,COMMIT_UNIVERSAL ); }
@@ -173,11 +173,10 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)igt_output_set_pipe (output, pipe); mode =igt_output_get_mode (output); -/* allocate fb2 with image size */ - d->fb_id2 =igt_create_image_fb (d->drm_fd,0 ,0 , -DRM_FORMAT_XRGB8888 , -LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ -FILE_NAME , &d->fb2); + d->fb_id2 =igt_create_color_pattern_fb (display->drm_fd,600 ,600 , +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ +.5 ,.5 ,.5 , &d->fb2);igt_assert (d->fb_id2); d->fb_id3 = igt_create_pattern_fb(d->drm_fd,
@@ -231,7 +230,9 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)igt_fb_set_position (&d->fb2, d->plane2,0 ,0 );igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width, d->fb2.height);igt_plane_set_position (d->plane2,10 ,10 ); -igt_plane_set_size (d->plane2,500 ,500 * d->fb2.height/d->fb2.width); + +/* Downscale (10/9)x of original image */ +igt_plane_set_size (d->plane2, (d->fb2.width *10 )/9 , (d->fb2.height *10 )/9 );igt_display_commit2 (display,COMMIT_UNIVERSAL );if (primary_plane_scaling) {
@@ -247,6 +248,11 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output) d->plane3 =igt_output_get_plane (output,2 );igt_plane_set_fb (d->plane3, &d->fb3); +if (d->plane3->type ==DRM_PLANE_TYPE_CURSOR ) { +igt_debug ("Plane-3 doesnt exist on pipe %s\n" ,kmstest_pipe_name (pipe)); + goto cleanup; + } +/* 3rd plane windowed - no scaling */ igt_fb_set_position (&d->fb3, d->plane3,100 ,100 );igt_fb_set_size (&d->fb3, d->plane3, d->fb3.width-300 , d->fb3.height-300 );
@@ -280,6 +286,7 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)igt_display_commit2 (display,COMMIT_UNIVERSAL ); } +cleanup:/* back to single plane mode */ igt_plane_set_fb (d->plane2,NULL );igt_plane_set_fb (d->plane3,NULL );
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 3/8 tests/kms_plane_scaling: Convert from simple test to full test
In reply to Maarten LankhorstConvert the test to run subtests per pipe, before we start adding more subtests.
--- tests/kms_plane_scaling.c | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-)
tests/kms_plane_scaling.c +21 -25
@@ -170,6 +170,9 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)drmModeModeInfo *mode;int primary_plane_scaling =0 ;/* For now */ +igt_require (d->num_scalers >0 ); + +igt_display_reset (display);igt_output_set_pipe (output, pipe); mode =igt_output_get_mode (output);
@@ -295,39 +298,32 @@ cleanup:cleanup_crtc (d, output, d->plane1); } -static void test_plane_scaling (data_t *d,enum pipe pipe) -{ -igt_output_t *output; -int valid_tests =0 ; - -igt_require (d->num_scalers); - -for_each_valid_output_on_pipe (&d->display, pipe, output) { -test_plane_scaling_on_pipe (d, pipe, output); -igt_output_set_pipe (output,PIPE_ANY ); - valid_tests++; - } - -igt_require_f (valid_tests,"no valid crtc/connector combinations found\n" ); -} - -igt_simple_main +igt_main {data_t data = {};enum pipe pipe;igt_skip_on_simulation (); + igt_fixture { + data.drm_fd =drm_open_driver (DRIVER_INTEL ); +igt_require_pipe_crc (data.drm_fd); +igt_display_init (&data.display, data.drm_fd); + data.devid =intel_get_drm_devid (data.drm_fd); + data.num_scalers =intel_gen (data.devid) >=9 ?2 :0 ; + } - data.drm_fd =drm_open_driver (DRIVER_INTEL ); -igt_require_pipe_crc (data.drm_fd); -igt_display_init (&data.display, data.drm_fd); - data.devid =intel_get_drm_devid (data.drm_fd); + for_each_pipe_static(pipe) igt_subtest_group { +igt_output_t *output; - data.num_scalers =intel_gen (data.devid) >=9 ?2 :0 ; + igt_fixture + igt_display_require_output_on_pipe(&data.display, pipe); -for_each_pipe_static (pipe) -test_plane_scaling (&data, pipe); + igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe)) +for_each_valid_output_on_pipe (&data.display, pipe, output) +test_plane_scaling_on_pipe (&data, pipe, output); + } -igt_display_fini (&data.display); + igt_fixture + igt_display_fini(&data.display); }
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 4/8 tests/kms_plane_scaling: Move get_num_scalers to a function.
In reply to Maarten LankhorstThe number of scalers can depend on the pipe, so require at least 1 scaler before running any subtests.
--- tests/kms_plane_scaling.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
tests/kms_plane_scaling.c +14 -6
@@ -38,8 +38,6 @@ typedef struct {int image_w;int image_h; -int num_scalers; -struct igt_fb fb1;struct igt_fb fb2;struct igt_fb fb3;
@@ -53,6 +51,16 @@ typedef struct {igt_plane_t *plane4; } data_t; +static int get_num_scalers (uint32_t devid,enum pipe pipe) +{ +igt_require (intel_gen (devid) >=9 ); + +if (intel_gen (devid) >9 || pipe !=PIPE_C ) +return 2 ; +else +return 1 ; +} +static void prepare_crtc (data_t *data,igt_output_t *output,enum pipe pipe,igt_plane_t *plane,drmModeModeInfo *mode,enum igt_commit_style s) {
@@ -170,8 +178,6 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)drmModeModeInfo *mode;int primary_plane_scaling =0 ;/* For now */ -igt_require (d->num_scalers >0 ); -igt_display_reset (display);igt_output_set_pipe (output, pipe); mode =igt_output_get_mode (output);
@@ -310,15 +316,17 @@ igt_mainigt_require_pipe_crc (data.drm_fd);igt_display_init (&data.display, data.drm_fd); data.devid =intel_get_drm_devid (data.drm_fd); - data.num_scalers =intel_gen (data.devid) >=9 ?2 :0 ; } for_each_pipe_static(pipe) igt_subtest_group {igt_output_t *output; - igt_fixture + igt_fixture {igt_display_require_output_on_pipe (&data.display, pipe); +igt_require (get_num_scalers (data.devid, pipe) >0 ); + } + igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))for_each_valid_output_on_pipe (&data.display, pipe, output)test_plane_scaling_on_pipe (&data, pipe, output);
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t v3 4/8] tests/kms_plane_scaling: Move get_num_scalers to a function.
Quoted 25 lines · Maarten Lankhorst
The number of scalers can depend on the pipe, so require at least 1 scaler before running any subtests.
Signed-off-by Maarten Lankhorst <[email protected]>---
tests/kms_plane_scaling.c | 20 ++++++++++++++------1 file changed, 14 insertions(+), 6 deletions(-)tests/kms_plane_scaling.c +0
-0@@ -38,8 +38,6 @@ typedef struct { int image_w; int image_h;tests/kms_plane_scaling.c +0
-2-int num_scalers; -struct
igt_fbfb1;
structigt_fbfb2;
structigt_fbfb3;tests/kms_plane_scaling.c +0
-0@@ -53,6 +51,16 @@ typedef struct { igt_plane_t *plane4; } data_t;
tests/kms_plane_scaling.c typedef struct { · line 62
Quoted 9 lines
tests/kms_plane_scaling.c +9
-0+static int get_num_scalers (uint32_t devid,enum pipe pipe) +{ +igt_require (intel_gen (devid) >=9 ); + +if (intel_gen (devid) >9 || pipe !=PIPE_C ) +return 2 ; +else +return 1 ; +}
From GEN10 onwards, we have symmetric pipes and therefore the number of scalers is the same for all pipes. I suggest that we update this to match with the kernel implementation from intel_device_info_runtime_init() such as.
if (intel_gen(devid) >= 10) return 2; else if (intel_gen(devid) == 9 && pipe != PIPE_C)
return 2;
else
return 1;
Quoted 42 lines
+
static void prepare_crtc(data_t *data,igt_output_t*output, enum pipe pipe,
igt_plane_t*plane, drmModeModeInfo *mode, enumigt_commit_styles)
{tests/kms_plane_scaling.c +0
-0@@ -170,8 +178,6 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output) drmModeModeInfo *mode;int
primary_plane_scaling= 0; /* For now */tests/kms_plane_scaling.c +0
-2-igt_require (d->num_scalers >0 ); -
igt_display_reset(display);
igt_output_set_pipe(output, pipe);
mode =igt_output_get_mode(output);tests/kms_plane_scaling.c +0
-1@@ -310,15 +316,17 @@ igt_main igt_require_pipe_crc(data.drm_fd); igt_display_init(&data.display, data.drm_fd); data.devid = intel_get_drm_devid(data.drm_fd); - data.num_scalers =intel_gen (data.devid) >=9 ?2 :0 ; }
for_each_pipe_static(pipe)igt_subtest_group{igt_output_t*output;tests/kms_plane_scaling.c +1
-1- igt_fixture + igt_fixture {
igt_display_require_output_on_pipe(&data.dis play, pipe);tests/kms_plane_scaling.c +1
-0+ igt_require(get_num_scalers(data.devid,pipe) > 0);
tests/kms_plane_scaling.c +2
-0+ } +
igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))for_each_valid_output_on_pipe(&data.display, pipe, output)
test_plane_scaling_on_pipe(&data, pipe, output);
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 tests/kms_plane_scaling: Move get_num_scalers to a function, v2.
In reply to Maarten LankhorstThe number of scalers can depend on the pipe, so require at least 1 scaler before running any subtests.
Changes since v1:
- More closely match kernel implementation. (Mika)
--- tests/kms_plane_scaling.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
tests/kms_plane_scaling.c +16 -6
@@ -38,8 +38,6 @@ typedef struct {int image_w;int image_h; -int num_scalers; -struct igt_fb fb1;struct igt_fb fb2;struct igt_fb fb3;
@@ -53,6 +51,18 @@ typedef struct {igt_plane_t *plane4; } data_t; +static int get_num_scalers (uint32_t devid,enum pipe pipe) +{ +igt_require (intel_gen (devid) >=9 ); + +if (intel_gen (devid) >=10 ) +return 2 ; +else if (pipe !=PIPE_C ) +return 2 ; +else +return 1 ; +} +static void prepare_crtc (data_t *data,igt_output_t *output,enum pipe pipe,igt_plane_t *plane,drmModeModeInfo *mode,enum igt_commit_style s) {
@@ -170,8 +180,6 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)drmModeModeInfo *mode;int primary_plane_scaling =0 ;/* For now */ -igt_require (d->num_scalers >0 ); -igt_display_reset (display);igt_output_set_pipe (output, pipe); mode =igt_output_get_mode (output);
@@ -310,15 +318,17 @@ igt_mainigt_require_pipe_crc (data.drm_fd);igt_display_init (&data.display, data.drm_fd); data.devid =intel_get_drm_devid (data.drm_fd); - data.num_scalers =intel_gen (data.devid) >=9 ?2 :0 ; } for_each_pipe_static(pipe) igt_subtest_group {igt_output_t *output; - igt_fixture + igt_fixture {igt_display_require_output_on_pipe (&data.display, pipe); +igt_require (get_num_scalers (data.devid, pipe) >0 ); + } + igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))for_each_valid_output_on_pipe (&data.display, pipe, output)test_plane_scaling_on_pipe (&data, pipe, output);
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t] tests/kms_plane_scaling: Move get_num_scalers to a function, v2.
Quoted 6 lines · Maarten Lankhorst
The number of scalers can depend on the pipe, so require at least 1 scaler before running any subtests.
Changes since v1:
- More closely match kernel implementation. (Mika)
Quoted 75 lines
Signed-off-by Maarten Lankhorst <[email protected]>---
tests/kms_plane_scaling.c | 22 ++++++++++++++++------1 file changed, 16 insertions(+), 6 deletions(-)tests/kms_plane_scaling.c +0
-0@@ -38,8 +38,6 @@ typedef struct { int image_w; int image_h;tests/kms_plane_scaling.c +0
-2-int num_scalers; -struct
igt_fbfb1;
structigt_fbfb2;
structigt_fbfb3;tests/kms_plane_scaling.c +0
-0@@ -53,6 +51,18 @@ typedef struct { igt_plane_t *plane4; } data_t;tests/kms_plane_scaling.c +12
-0+static int get_num_scalers (uint32_t devid,enum pipe pipe) +{ +igt_require (intel_gen (devid) >=9 ); + +if (intel_gen (devid) >=10 ) +return 2 ; +else if (pipe !=PIPE_C ) +return 2 ; +else +return 1 ; +} +static void prepare_crtc(data_t *data,
igt_output_t*output, enum pipe pipe,
igt_plane_t*plane, drmModeModeInfo *mode, enumigt_commit_styles)
{tests/kms_plane_scaling.c +0
-0@@ -170,8 +180,6 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output) drmModeModeInfo *mode;int
primary_plane_scaling= 0; /* For now */tests/kms_plane_scaling.c +0
-2-igt_require (d->num_scalers >0 ); -
igt_display_reset(display);
igt_output_set_pipe(output, pipe);
mode =igt_output_get_mode(output);tests/kms_plane_scaling.c +0
-1@@ -310,15 +318,17 @@ igt_main igt_require_pipe_crc(data.drm_fd); igt_display_init(&data.display, data.drm_fd); data.devid = intel_get_drm_devid(data.drm_fd); - data.num_scalers =intel_gen (data.devid) >=9 ?2 :0 ; }
for_each_pipe_static(pipe)igt_subtest_group{igt_output_t*output;tests/kms_plane_scaling.c +1
-1- igt_fixture + igt_fixture {
igt_display_require_output_on_pipe(&data.dis play, pipe);tests/kms_plane_scaling.c +1
-0+ igt_require(get_num_scalers(data.devid,pipe) > 0);
tests/kms_plane_scaling.c +2
-0+ } +
igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))for_each_valid_output_on_pipe(&data.display, pipe, output)
test_plane_scaling_on_pipe(&data, pipe, output);
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 5/8 tests/kms_plane_scaling: Clean up tests to work better with igt_kms, v2.
In reply to Maarten LankhorstThe test only runs on gen9+, so we can safely replace all calls with COMMIT_ATOMIC.
Also perform some cleanups by making fb an array, and cleaning up in prepare_crtc. This way failed subtests won't cause failures in other subtests.
Changes since v1:
- Rebase on top of num_scalers changes.
--- tests/kms_plane_scaling.c | 235 +++++++++++++++++++--------------------------- 1 file changed, 99 insertions(+), 136 deletions(-)
tests/kms_plane_scaling.c +99 -136
@@ -38,17 +38,10 @@ typedef struct {int image_w;int image_h; -struct igt_fb fb1; -struct igt_fb fb2; -struct igt_fb fb3; -int fb_id1; -int fb_id2; -int fb_id3; - +struct igt_fb fb[3 ];igt_plane_t *plane1;igt_plane_t *plane2;igt_plane_t *plane3; -igt_plane_t *plane4; } data_t;static int get_num_scalers (uint32_t devid,enum pipe pipe)
@@ -61,78 +54,60 @@ static int get_num_scalers(uint32_t devid, enum pipe pipe)return 1 ; } -static void prepare_crtc (data_t *data,igt_output_t *output,enum pipe pipe, -igt_plane_t *plane,drmModeModeInfo *mode,enum igt_commit_style s) +static void cleanup_crtc (data_t *data) { -igt_display_t *display = &data->display; - -igt_output_set_pipe (output, pipe); +int i; -/* create the pipe_crc object for this pipe */ igt_pipe_crc_free (data->pipe_crc); - data->pipe_crc =igt_pipe_crc_new (data->drm_fd, pipe,INTEL_PIPE_CRC_SOURCE_AUTO ); - -/* before allocating, free if any older fb */ -if (data->fb_id1) { -igt_remove_fb (data->drm_fd, &data->fb1); - data->fb_id1 =0 ; - } + data->pipe_crc =NULL ; -/* allocate fb for plane 1 */ - data->fb_id1 =igt_create_pattern_fb (data->drm_fd, - mode->hdisplay, mode->vdisplay, -DRM_FORMAT_XRGB8888 , -LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ - &data->fb1); -igt_assert (data->fb_id1); - -/* -* We always set the primary plane to actually enable the pipe as -* there's no way (that works) to light up a pipe with only a sprite -* plane enabled at the moment. -*/ -if (plane->type !=DRM_PLANE_TYPE_PRIMARY ) { -igt_plane_t *primary; +for (i =0 ; i <ARRAY_SIZE (data->fb); i++) { +if (!data->fb[i].fb_id) +continue ; - primary =igt_output_get_plane_type (output,DRM_PLANE_TYPE_PRIMARY ); -igt_plane_set_fb (primary, &data->fb1); +igt_remove_fb (data->drm_fd, &data->fb[i]); + data->fb[i].fb_id =0 ; } - -igt_plane_set_fb (plane, &data->fb1); -igt_display_commit2 (display, s); } -static void cleanup_crtc (data_t *data,igt_output_t *output,igt_plane_t *plane) +static void prepare_crtc (data_t *data,igt_output_t *output,enum pipe pipe, +igt_plane_t *plane,drmModeModeInfo *mode) {igt_display_t *display = &data->display; -igt_pipe_crc_free (data->pipe_crc); - data->pipe_crc =NULL ; +cleanup_crtc (data); -if (data->fb_id1) { -igt_remove_fb (data->drm_fd, &data->fb1); - data->fb_id1 =0 ; - } -if (data->fb_id2) { -igt_remove_fb (data->drm_fd, &data->fb2); - data->fb_id2 =0 ; - } -if (data->fb_id3) { -igt_remove_fb (data->drm_fd, &data->fb3); - data->fb_id3 =0 ; - } +igt_display_reset (display); +igt_output_set_pipe (output, pipe); + +/* create the pipe_crc object for this pipe */ + data->pipe_crc =igt_pipe_crc_new (data->drm_fd, pipe,INTEL_PIPE_CRC_SOURCE_AUTO ); + +/* allocate fb for plane 1 */ +igt_create_pattern_fb (data->drm_fd, mode->hdisplay, mode->vdisplay, +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ + &data->fb[0 ]); + +igt_plane_set_fb (plane, &data->fb[0 ]);if (plane->type !=DRM_PLANE_TYPE_PRIMARY ) {igt_plane_t *primary; +int ret; + +/* Do we succeed without enabling the primary plane? */ + ret =igt_display_try_commit2 (display,COMMIT_ATOMIC ); +if (!ret) +return ; +/* +* Fallback: set the primary plane to actually enable the pipe. +* Some drivers always require the primary plane to be enabled. +*/ primary =igt_output_get_plane_type (output,DRM_PLANE_TYPE_PRIMARY ); -igt_plane_set_fb (primary,NULL ); +igt_plane_set_fb (primary, &data->fb[0 ]); } - -igt_plane_set_fb (plane,NULL ); -igt_output_set_pipe (output,PIPE_ANY ); - -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC ); }/* does iterative scaling on plane2 */
@@ -140,33 +115,32 @@ static void iterate_plane_scaling(data_t *d, drmModeModeInfo *mode) {igt_display_t *display = &d->display; -if (mode->hdisplay >= d->fb2.width) { +if (mode->hdisplay >= d->fb[1 ].width) {int w, h;/* fixed fb */ -igt_fb_set_position (&d->fb2, d->plane2,0 ,0 ); -igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width, d->fb2.height); +igt_fb_set_position (&d->fb[1 ], d->plane2,0 ,0 ); +igt_fb_set_size (&d->fb[1 ], d->plane2, d->fb[1 ].width, d->fb[1 ].height);igt_plane_set_position (d->plane2,0 ,0 );/* adjust plane size */ -for (w = d->fb2.width; w <= mode->hdisplay; w+=10 ) { - h = w * d->fb2.height / d->fb2.width; +for (w = d->fb[1 ].width; w <= mode->hdisplay; w+=10 ) { + h = w * d->fb[1 ].height / d->fb[1 ].width;igt_plane_set_size (d->plane2, w, h); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC ); } }else {int w, h;/* fixed plane */ igt_plane_set_position (d->plane2,0 ,0 );igt_plane_set_size (d->plane2, mode->hdisplay, mode->vdisplay); -igt_fb_set_position (&d->fb2, d->plane2,0 ,0 ); +igt_fb_set_position (&d->fb[1 ], d->plane2,0 ,0 );/* adjust fb size */ -for (w = mode->hdisplay; w <= d->fb2.width; w+=10 ) { +for (w = mode->hdisplay; w <= d->fb[1 ].width; w+=10 ) {/* Source coordinates must not be clipped. */ - h =min (w * mode->hdisplay / mode->vdisplay, d->fb2.height); - -igt_fb_set_size (&d->fb2, d->plane2, w, h); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); + h =min (w * mode->hdisplay / mode->vdisplay, d->fb[1 ].height); +igt_fb_set_size (&d->fb[1 ], d->plane2, w, h); +igt_display_commit2 (display,COMMIT_ATOMIC ); } } }
@@ -178,130 +152,118 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)drmModeModeInfo *mode;int primary_plane_scaling =0 ;/* For now */ -igt_display_reset (display); -igt_output_set_pipe (output, pipe); mode =igt_output_get_mode (output); - d->fb_id2 =igt_create_color_pattern_fb (display->drm_fd,600 ,600 , -DRM_FORMAT_XRGB8888 , -LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ -.5 ,.5 ,.5 , &d->fb2); -igt_assert (d->fb_id2); +/* Set up display with plane 1 */ + d->plane1 = &display->pipes[pipe].planes[0 ]; +prepare_crtc (d, output, pipe, d->plane1, mode); - d->fb_id3 =igt_create_pattern_fb (d->drm_fd, - mode->hdisplay, mode->vdisplay, -DRM_FORMAT_XRGB8888 , -LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ - &d->fb3); -igt_assert (d->fb_id3); +igt_create_color_pattern_fb (display->drm_fd,600 ,600 , +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ +.5 ,.5 ,.5 , &d->fb[1 ]); -/* Set up display with plane 1 */ - d->plane1 =igt_output_get_plane (output,0 ); -prepare_crtc (d, output, pipe, d->plane1, mode,COMMIT_UNIVERSAL ); +igt_create_pattern_fb (d->drm_fd, + mode->hdisplay, mode->vdisplay, +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_X_TILED ,/* tiled */ + &d->fb[2 ]);if (primary_plane_scaling) {/* Primary plane upscaling */ -igt_fb_set_position (&d->fb1, d->plane1,100 ,100 ); -igt_fb_set_size (&d->fb1, d->plane1,500 ,500 ); +igt_fb_set_position (&d->fb[0 ], d->plane1,100 ,100 ); +igt_fb_set_size (&d->fb[0 ], d->plane1,500 ,500 );igt_plane_set_position (d->plane1,0 ,0 );igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );/* Primary plane 1:1 no scaling */ -igt_fb_set_position (&d->fb1, d->plane1,0 ,0 ); -igt_fb_set_size (&d->fb1, d->plane1, d->fb1.width, d->fb1.height); +igt_fb_set_position (&d->fb[0 ], d->plane1,0 ,0 ); +igt_fb_set_size (&d->fb[0 ], d->plane1, d->fb[0 ].width, d->fb[0 ].height);igt_plane_set_position (d->plane1,0 ,0 );igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC ); } -/* Set up fb2->plane2 mapping. */ +/* Set up fb[1]->plane2 mapping. */ d->plane2 =igt_output_get_plane (output,1 ); -igt_plane_set_fb (d->plane2, &d->fb2); +igt_plane_set_fb (d->plane2, &d->fb[1 ]);/* 2nd plane windowed */ -igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); -igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width-200 , d->fb2.height-200 ); +igt_fb_set_position (&d->fb[1 ], d->plane2,100 ,100 ); +igt_fb_set_size (&d->fb[1 ], d->plane2, d->fb[1 ].width-200 , d->fb[1 ].height-200 );igt_plane_set_position (d->plane2,100 ,100 );igt_plane_set_size (d->plane2, mode->hdisplay-200 , mode->vdisplay-200 ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );iterate_plane_scaling (d, mode);/* 2nd plane up scaling */ -igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); -igt_fb_set_size (&d->fb2, d->plane2,500 ,500 ); +igt_fb_set_position (&d->fb[1 ], d->plane2,100 ,100 ); +igt_fb_set_size (&d->fb[1 ], d->plane2,500 ,500 );igt_plane_set_position (d->plane2,10 ,10 );igt_plane_set_size (d->plane2, mode->hdisplay-20 , mode->vdisplay-20 ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );/* 2nd plane downscaling */ -igt_fb_set_position (&d->fb2, d->plane2,0 ,0 ); -igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width, d->fb2.height); +igt_fb_set_position (&d->fb[1 ], d->plane2,0 ,0 ); +igt_fb_set_size (&d->fb[1 ], d->plane2, d->fb[1 ].width, d->fb[1 ].height);igt_plane_set_position (d->plane2,10 ,10 );/* Downscale (10/9)x of original image */ -igt_plane_set_size (d->plane2, (d->fb2.width *10 )/9 , (d->fb2.height *10 )/9 ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_plane_set_size (d->plane2, (d->fb[1 ].width *10 )/9 , (d->fb[1 ].height *10 )/9 ); +igt_display_commit2 (display,COMMIT_ATOMIC );if (primary_plane_scaling) {/* Primary plane up scaling */ -igt_fb_set_position (&d->fb1, d->plane1,100 ,100 ); -igt_fb_set_size (&d->fb1, d->plane1,500 ,500 ); +igt_fb_set_position (&d->fb[0 ], d->plane1,100 ,100 ); +igt_fb_set_size (&d->fb[0 ], d->plane1,500 ,500 );igt_plane_set_position (d->plane1,0 ,0 );igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC ); } -/* Set up fb3->plane3 mapping. */ +/* Set up fb[2]->plane3 mapping. */ d->plane3 =igt_output_get_plane (output,2 ); -igt_plane_set_fb (d->plane3, &d->fb3); +igt_plane_set_fb (d->plane3, &d->fb[2 ]);if (d->plane3->type ==DRM_PLANE_TYPE_CURSOR ) {igt_debug ("Plane-3 doesnt exist on pipe %s\n" ,kmstest_pipe_name (pipe)); - goto cleanup; +return ; }/* 3rd plane windowed - no scaling */ -igt_fb_set_position (&d->fb3, d->plane3,100 ,100 ); -igt_fb_set_size (&d->fb3, d->plane3, d->fb3.width-300 , d->fb3.height-300 ); +igt_fb_set_position (&d->fb[2 ], d->plane3,100 ,100 ); +igt_fb_set_size (&d->fb[2 ], d->plane3, d->fb[2 ].width-300 , d->fb[2 ].height-300 );igt_plane_set_position (d->plane3,100 ,100 );igt_plane_set_size (d->plane3, mode->hdisplay-300 , mode->vdisplay-300 ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );/* Switch scaler from plane 2 to plane 3 */ -igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); -igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width-200 , d->fb2.height-200 ); +igt_fb_set_position (&d->fb[1 ], d->plane2,100 ,100 ); +igt_fb_set_size (&d->fb[1 ], d->plane2, d->fb[1 ].width-200 , d->fb[1 ].height-200 );igt_plane_set_position (d->plane2,100 ,100 ); -igt_plane_set_size (d->plane2, d->fb2.width-200 , d->fb2.height-200 ); +igt_plane_set_size (d->plane2, d->fb[1 ].width-200 , d->fb[1 ].height-200 ); -igt_fb_set_position (&d->fb3, d->plane3,100 ,100 ); -igt_fb_set_size (&d->fb3, d->plane3, d->fb3.width-400 , d->fb3.height-400 ); +igt_fb_set_position (&d->fb[2 ], d->plane3,100 ,100 ); +igt_fb_set_size (&d->fb[2 ], d->plane3, d->fb[2 ].width-400 , d->fb[2 ].height-400 );igt_plane_set_position (d->plane3,10 ,10 );igt_plane_set_size (d->plane3, mode->hdisplay-300 , mode->vdisplay-300 ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );if (primary_plane_scaling) {/* Switch scaler from plane 1 to plane 2 */ -igt_fb_set_position (&d->fb1, d->plane1,0 ,0 ); -igt_fb_set_size (&d->fb1, d->plane1, d->fb1.width, d->fb1.height); +igt_fb_set_position (&d->fb[0 ], d->plane1,0 ,0 ); +igt_fb_set_size (&d->fb[0 ], d->plane1, d->fb[0 ].width, d->fb[0 ].height);igt_plane_set_position (d->plane1,0 ,0 );igt_plane_set_size (d->plane1, mode->hdisplay, mode->vdisplay); -igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); -igt_fb_set_size (&d->fb2, d->plane2, d->fb2.width-500 ,d->fb2.height-500 ); +igt_fb_set_position (&d->fb[1 ], d->plane2,100 ,100 ); +igt_fb_set_size (&d->fb[1 ], d->plane2, d->fb[1 ].width-500 ,d->fb[1 ].height-500 );igt_plane_set_position (d->plane2,100 ,100 );igt_plane_set_size (d->plane2, mode->hdisplay-200 , mode->vdisplay-200 ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC ); } - -cleanup: -/* back to single plane mode */ -igt_plane_set_fb (d->plane2,NULL ); -igt_plane_set_fb (d->plane3,NULL ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); - -cleanup_crtc (d, output, d->plane1); } igt_main
@@ -316,6 +278,7 @@ igt_mainigt_require_pipe_crc (data.drm_fd);igt_display_init (&data.display, data.drm_fd); data.devid =intel_get_drm_devid (data.drm_fd); +igt_require (data.display.is_atomic); } for_each_pipe_static(pipe) igt_subtest_group {
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t v3 5/8] tests/kms_plane_scaling: Clean up tests to work better with igt_kms, v2.
Quoted 10 lines · Maarten Lankhorst
The test only runs on gen9+, so we can safely replace all calls with
COMMIT_ATOMIC.Also perform some cleanups by making fb an array, and cleaning up in
prepare_crtc. This way failed subtests won't cause failures in other subtests.Changes since v1:
- Rebase on top ofnum_scalerschanges.
Quoted 447 lines
Signed-off-by Maarten Lankhorst <[email protected]>---
tests/kms_plane_scaling.c | 235 +++++++++++++++++++-----------------
----------1 file changed, 99 insertions(+), 136 deletions(-)tests/kms_plane_scaling.c +0
-0@@ -38,17 +38,10 @@ typedef struct { int image_w; int image_h;tests/kms_plane_scaling.c +1
-7-struct igt_fb fb1; -struct igt_fb fb2; -struct igt_fb fb3; -int fb_id1; -int fb_id2; -int fb_id3; - +struct igt_fb fb[3 ];
igt_plane_t*plane1;
igt_plane_t*plane2;
igt_plane_t*plane3;tests/kms_plane_scaling.c +0
-1-igt_plane_t *plane4;}
data_t;
static intget_num_scalers(uint32_t devid, enum pipe pipe)tests/kms_plane_scaling.c +0
-0@@ -61,78 +54,60 @@ static int get_num_scalers(uint32_t devid, enum pipe pipe) return 1; }
-static void prepare_crtc(data_t *data,igt_output_t*output, enum pipe pipe,tests/kms_plane_scaling.c +0
-1- igt_plane_t *plane, drmModeModeInfo *mode,enum
igt_commit_styles)
+static voidcleanup_crtc(data_t *data)
{tests/kms_plane_scaling.c +1
-3-igt_display_t *display = &data->display; - -igt_output_set_pipe (output, pipe); +int i;tests/kms_plane_scaling.c +0
-1-/* create the pipe_crc object for this pipe */
igt_pipe_crc_free(data->pipe_crc);tests/kms_plane_scaling.c +0
-1- data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);tests/kms_plane_scaling.c +1
-6- -/* before allocating, free if any older fb */ -if (data->fb_id1) { -igt_remove_fb (data->drm_fd, &data->fb1); - data->fb_id1 =0 ; - } + data->pipe_crc =NULL ;tests/kms_plane_scaling.c +0
-3-/* allocate fb for plane 1 */ - data->fb_id1 = igt_create_pattern_fb(data->drm_fd, - mode->hdisplay, mode-Quoted 1 line
vdisplay,
tests/kms_plane_scaling.c +0
-2- DRM_FORMAT_XRGB8888, - LOCAL_I915_FORMAT_MOD_X
_TILED, /* tiled */tests/kms_plane_scaling.c +0
-5- &data->fb1); -igt_assert (data->fb_id1); - -/* -* We always set the primary plane to actually enable the pipe as
tests/kms_plane_scaling.c +0
-1- * there's no way (that works) to light up a pipe with onlya sprite
tests/kms_plane_scaling.c +3
-4-* plane enabled at the moment. -*/ -if (plane->type !=DRM_PLANE_TYPE_PRIMARY ) { -igt_plane_t *primary; +for (i =0 ; i <ARRAY_SIZE (data->fb); i++) { +if (!data->fb[i].fb_id) +continue ;tests/kms_plane_scaling.c +0
-1- primary = igt_output_get_plane_type(output,
DRM_PLANE_TYPE_PRIMARY);tests/kms_plane_scaling.c +2
-1-igt_plane_set_fb (primary, &data->fb1); +igt_remove_fb (data->drm_fd, &data->fb[i]); + data->fb[i].fb_id =0 ;}
tests/kms_plane_scaling.c +0
-3- -igt_plane_set_fb (plane, &data->fb1); -igt_display_commit2 (display, s);}
-static voidcleanup_crtc(data_t *data, igt_output_t *output, igt_plane_t *plane)
+static void prepare_crtc(data_t *data,igt_output_t*output, enum pipe pipe,tests/kms_plane_scaling.c +1
-0+ igt_plane_t *plane, drmModeModeInfo *mode){
igt_display_t*display =&data->display;tests/kms_plane_scaling.c +1
-2-igt_pipe_crc_free (data->pipe_crc); - data->pipe_crc =NULL ; +cleanup_crtc (data);tests/kms_plane_scaling.c +5
-12-if (data->fb_id1) { -igt_remove_fb (data->drm_fd, &data->fb1); - data->fb_id1 =0 ; - } -if (data->fb_id2) { -igt_remove_fb (data->drm_fd, &data->fb2); - data->fb_id2 =0 ; - } -if (data->fb_id3) { -igt_remove_fb (data->drm_fd, &data->fb3); - data->fb_id3 =0 ; - } +igt_display_reset (display); +igt_output_set_pipe (output, pipe); + +/* create the pipe_crc object for this pipe */ + data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);tests/kms_plane_scaling.c +3
-0+ +/* allocate fb for plane 1 */ + igt_create_pattern_fb(data->drm_fd, mode->hdisplay, mode-Quoted 1 line
vdisplay,
tests/kms_plane_scaling.c +2
-0+ DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_X_TILED, /*tiled */
tests/kms_plane_scaling.c +3
-0+ &data->fb[0]); + +igt_plane_set_fb (plane, &data->fb[0 ]);
if (plane->type!=DRM_PLANE_TYPE_PRIMARY) {igt_plane_t*primary;tests/kms_plane_scaling.c +3
-0+int ret; + +/* Do we succeed without enabling the primary plane? */
tests/kms_plane_scaling.c +1
-0+ ret = igt_display_try_commit2(display,
COMMIT_ATOMIC);tests/kms_plane_scaling.c +2
-0+if (!ret) +return ;tests/kms_plane_scaling.c +2
-0+/* +* Fallback: set the primary plane to actually enable the pipe.
tests/kms_plane_scaling.c +1
-0+ * Some drivers always require the primary plane tobe enabled.
tests/kms_plane_scaling.c +1
-0+*/ primary =
igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);tests/kms_plane_scaling.c +1
-1-igt_plane_set_fb (primary,NULL ); +igt_plane_set_fb (primary, &data->fb[0 ]);}
tests/kms_plane_scaling.c +1
-5- -igt_plane_set_fb (plane,NULL ); -igt_output_set_pipe (output,PIPE_ANY ); - -igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );}
/* does iterative scaling on plane2 */tests/kms_plane_scaling.c +0
-0@@ -140,33 +115,32 @@ static void iterate_plane_scaling(data_t *d, drmModeModeInfo *mode) { igt_display_t *display = &d->display;tests/kms_plane_scaling.c +1
-1-if (mode->hdisplay >= d->fb2.width) { +if (mode->hdisplay >= d->fb[1 ].width) {int w, h;
/* fixed fb */tests/kms_plane_scaling.c +0
-2-igt_fb_set_position (&d->fb2, d->plane2,0 ,0 ); - igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width, d-Quoted 1 line
fb2.height);
tests/kms_plane_scaling.c +2
-0+igt_fb_set_position (&d->fb[1 ], d->plane2,0 ,0 ); + igt_fb_set_size(&d->fb[1], d->plane2, d-Quoted 1 line
fb[1].width, d->fb[1].height);
igt_plane_set_position(d->plane2, 0, 0);
/* adjust plane size */tests/kms_plane_scaling.c +1
-2-for (w = d->fb2.width; w <= mode->hdisplay; w+=10 ) { - h = w * d->fb2.height / d->fb2.width; +for (w = d->fb[1 ].width; w <= mode->hdisplay; w+=10 ){
tests/kms_plane_scaling.c +1
-0+ h = w * d->fb[1 ].height / d->fb[1 ].width;
igt_plane_set_size(d->plane2, w, h);tests/kms_plane_scaling.c +0
-1- igt_display_commit2(display,
COMMIT_UNIVERSAL);tests/kms_plane_scaling.c +1
-0+igt_display_commit2 (display,COMMIT_ATOMIC );}
} else {
int w, h;
/* fixed plane */igt_plane_set_position(d->plane2, 0, 0); igt_plane_set_size(d->plane2,mode->hdisplay, mode-Quoted 1 line
vdisplay);
tests/kms_plane_scaling.c +1
-1-igt_fb_set_position (&d->fb2, d->plane2,0 ,0 ); +igt_fb_set_position (&d->fb[1 ], d->plane2,0 ,0 );
/* adjust fb size */tests/kms_plane_scaling.c +1
-1-for (w = mode->hdisplay; w <= d->fb2.width; w+=10 ) { +for (w = mode->hdisplay; w <= d->fb[1 ].width; w+=10 ){
/* Source coordinates must not be clipped. */tests/kms_plane_scaling.c +0
-1- h = min(w * mode->hdisplay / mode->vdisplay,
d->fb2.height);tests/kms_plane_scaling.c +0
-3- -igt_fb_set_size (&d->fb2, d->plane2, w, h); - igt_display_commit2(display,
COMMIT_UNIVERSAL);tests/kms_plane_scaling.c +1
-0+ h = min(w * mode->hdisplay / mode->vdisplay,d->fb[1].height);
tests/kms_plane_scaling.c +2
-0+igt_fb_set_size (&d->fb[1 ], d->plane2, w, h); +igt_display_commit2 (display,COMMIT_ATOMIC );}
}
}tests/kms_plane_scaling.c +0
-0@@ -178,130 +152,118 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output) drmModeModeInfo *mode;int
primary_plane_scaling= 0; /* For now */tests/kms_plane_scaling.c +0
-2-igt_display_reset (display); -igt_output_set_pipe (output, pipe);mode =
igt_output_get_mode(output);tests/kms_plane_scaling.c +0
-1- d->fb_id2 = igt_create_color_pattern_fb(display->drm_fd,600, 600,
tests/kms_plane_scaling.c +0
-2-DRM_FORMAT_XRGB8888 , -LOCAL_I915_FORMAT_MO
D_X_TILED, /* tiled */tests/kms_plane_scaling.c +0
-1- .5, .5, .5, &d-Quoted 1 line
fb2);
tests/kms_plane_scaling.c +3
-1-igt_assert (d->fb_id2); +/* Set up display with plane 1 */ + d->plane1 = &display->pipes[pipe].planes[0 ]; +prepare_crtc (d, output, pipe, d->plane1, mode);tests/kms_plane_scaling.c +0
-2- d->fb_id3 = igt_create_pattern_fb(d->drm_fd, - mode->hdisplay, mode-Quoted 1 line
vdisplay,
tests/kms_plane_scaling.c +0
-2- DRM_FORMAT_XRGB8888, - LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
tests/kms_plane_scaling.c +3
-2- &d->fb3); -igt_assert (d->fb_id3); + igt_create_color_pattern_fb(display->drm_fd, 600, 600, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_X_TILED,/* tiled */
tests/kms_plane_scaling.c +1
-0+ .5, .5, .5, &d->fb[1]);tests/kms_plane_scaling.c +0
-3-/* Set up display with plane 1 */ - d->plane1 =igt_output_get_plane (output,0 ); - prepare_crtc(d, output, pipe, d->plane1, mode,
COMMIT_UNIVERSAL);tests/kms_plane_scaling.c +4
-0+ igt_create_pattern_fb(d->drm_fd, + mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_X_TILED, /*tiled */
tests/kms_plane_scaling.c +1
-0+ &d->fb[2]);
if (primary_plane_scaling) {
/* Primary plane upscaling */tests/kms_plane_scaling.c +2
-2-igt_fb_set_position (&d->fb1, d->plane1,100 ,100 ); -igt_fb_set_size (&d->fb1, d->plane1,500 ,500 ); +igt_fb_set_position (&d->fb[0 ], d->plane1,100 ,100 ); +igt_fb_set_size (&d->fb[0 ], d->plane1,500 ,500 );
igt_plane_set_position(d->plane1, 0, 0); igt_plane_set_size(d->plane1,mode->hdisplay, mode-Quoted 1 line
vdisplay);
tests/kms_plane_scaling.c +1
-1-igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );
/* Primary plane 1:1 no scaling */tests/kms_plane_scaling.c +0
-2-igt_fb_set_position (&d->fb1, d->plane1,0 ,0 ); - igt_fb_set_size(&d->fb1, d->plane1, d->fb1.width, d-Quoted 1 line
fb1.height);
tests/kms_plane_scaling.c +2
-0+igt_fb_set_position (&d->fb[0 ], d->plane1,0 ,0 ); + igt_fb_set_size(&d->fb[0], d->plane1, d-Quoted 1 line
fb[0].width, d->fb[0].height);
igt_plane_set_position(d->plane1, 0, 0); igt_plane_set_size(d->plane1,mode->hdisplay, mode-Quoted 1 line
vdisplay);
tests/kms_plane_scaling.c +1
-1-igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );}
tests/kms_plane_scaling.c +1
-1-/* Set up fb2->plane2 mapping. */ +/* Set up fb[1]->plane2 mapping. */
d->plane2=igt_output_get_plane(output, 1);tests/kms_plane_scaling.c +1
-1-igt_plane_set_fb (d->plane2, &d->fb2); +igt_plane_set_fb (d->plane2, &d->fb[1 ]);
/* 2nd plane windowed */tests/kms_plane_scaling.c +0
-2-igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); - igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width-200, d-Quoted 1 line
fb2.height-200);
tests/kms_plane_scaling.c +2
-0+igt_fb_set_position (&d->fb[1 ], d->plane2,100 ,100 ); + igt_fb_set_size(&d->fb[1], d->plane2, d->fb[1].width-200, d-Quoted 1 line
fb[1].height-200);
igt_plane_set_position(d->plane2, 100, 100); igt_plane_set_size(d->plane2, mode->hdisplay-200, mode-Quoted 1 line
vdisplay-200);
tests/kms_plane_scaling.c +1
-1-igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );
iterate_plane_scaling(d, mode);
/* 2nd plane up scaling */tests/kms_plane_scaling.c +2
-2-igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); -igt_fb_set_size (&d->fb2, d->plane2,500 ,500 ); +igt_fb_set_position (&d->fb[1 ], d->plane2,100 ,100 ); +igt_fb_set_size (&d->fb[1 ], d->plane2,500 ,500 );
igt_plane_set_position(d->plane2, 10, 10); igt_plane_set_size(d->plane2, mode->hdisplay-20, mode-Quoted 1 line
vdisplay-20);
tests/kms_plane_scaling.c +1
-1-igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );
/* 2nd plane downscaling */tests/kms_plane_scaling.c +0
-2-igt_fb_set_position (&d->fb2, d->plane2,0 ,0 ); - igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width, d-Quoted 1 line
fb2.height);
tests/kms_plane_scaling.c +2
-0+igt_fb_set_position (&d->fb[1 ], d->plane2,0 ,0 ); + igt_fb_set_size(&d->fb[1], d->plane2, d->fb[1].width, d-Quoted 1 line
fb[1].height);
igt_plane_set_position(d->plane2, 10, 10);
/* Downscale (10/9)x of original image */tests/kms_plane_scaling.c +0
-1- igt_plane_set_size(d->plane2, (d->fb2.width * 10)/9, (d-Quoted 1 line
fb2.height * 10)/9);
tests/kms_plane_scaling.c +1
-1-igt_display_commit2 (display,COMMIT_UNIVERSAL ); + igt_plane_set_size(d->plane2, (d->fb[1].width * 10)/9, (d-Quoted 1 line
fb[1].height * 10)/9);
tests/kms_plane_scaling.c +1
-0+igt_display_commit2 (display,COMMIT_ATOMIC );
if (primary_plane_scaling) {
/* Primary plane up scaling */tests/kms_plane_scaling.c +2
-2-igt_fb_set_position (&d->fb1, d->plane1,100 ,100 ); -igt_fb_set_size (&d->fb1, d->plane1,500 ,500 ); +igt_fb_set_position (&d->fb[0 ], d->plane1,100 ,100 ); +igt_fb_set_size (&d->fb[0 ], d->plane1,500 ,500 );
igt_plane_set_position(d->plane1, 0, 0); igt_plane_set_size(d->plane1,mode->hdisplay, mode-Quoted 1 line
vdisplay);
tests/kms_plane_scaling.c +1
-1-igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );}
tests/kms_plane_scaling.c +1
-1-/* Set up fb3->plane3 mapping. */ +/* Set up fb[2]->plane3 mapping. */
d->plane3=igt_output_get_plane(output, 2);tests/kms_plane_scaling.c +1
-1-igt_plane_set_fb (d->plane3, &d->fb3); +igt_plane_set_fb (d->plane3, &d->fb[2 ]);
if(d->plane3->type == DRM_PLANE_TYPE_CURSOR){igt_debug("Plane-3 doesnt exist on pipe %s\n", kmstest_pipe_name(pipe));tests/kms_plane_scaling.c +1
-1- goto cleanup; +return ;}
/* 3rd plane windowed - no scaling */tests/kms_plane_scaling.c +0
-2-igt_fb_set_position (&d->fb3, d->plane3,100 ,100 ); - igt_fb_set_size(&d->fb3, d->plane3, d->fb3.width-300, d-Quoted 1 line
fb3.height-300);
tests/kms_plane_scaling.c +2
-0+igt_fb_set_position (&d->fb[2 ], d->plane3,100 ,100 ); + igt_fb_set_size(&d->fb[2], d->plane3, d->fb[2].width-300, d-Quoted 1 line
fb[2].height-300);
igt_plane_set_position(d->plane3, 100, 100); igt_plane_set_size(d->plane3, mode->hdisplay-300, mode-Quoted 1 line
vdisplay-300);
tests/kms_plane_scaling.c +1
-1-igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );
/* Switch scaler from plane 2 to plane 3 */tests/kms_plane_scaling.c +0
-2-igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); - igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width-200, d-Quoted 1 line
fb2.height-200);
tests/kms_plane_scaling.c +2
-0+igt_fb_set_position (&d->fb[1 ], d->plane2,100 ,100 ); + igt_fb_set_size(&d->fb[1], d->plane2, d->fb[1].width-200, d-Quoted 1 line
fb[1].height-200);
igt_plane_set_position(d->plane2, 100, 100);tests/kms_plane_scaling.c +0
-1- igt_plane_set_size(d->plane2, d->fb2.width-200, d-Quoted 1 line
fb2.height-200);
tests/kms_plane_scaling.c +1
-0+ igt_plane_set_size(d->plane2, d->fb[1].width-200, d-Quoted 1 line
fb[1].height-200);
tests/kms_plane_scaling.c +0
-2-igt_fb_set_position (&d->fb3, d->plane3,100 ,100 ); - igt_fb_set_size(&d->fb3, d->plane3, d->fb3.width-400, d-Quoted 1 line
fb3.height-400);
tests/kms_plane_scaling.c +2
-0+igt_fb_set_position (&d->fb[2 ], d->plane3,100 ,100 ); + igt_fb_set_size(&d->fb[2], d->plane3, d->fb[2].width-400, d-Quoted 1 line
fb[2].height-400);
igt_plane_set_position(d->plane3, 10, 10); igt_plane_set_size(d->plane3, mode->hdisplay-300, mode-Quoted 1 line
vdisplay-300);
tests/kms_plane_scaling.c +1
-1-igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );
if (primary_plane_scaling) {
/* Switch scaler from plane 1 to plane 2 */tests/kms_plane_scaling.c +0
-2-igt_fb_set_position (&d->fb1, d->plane1,0 ,0 ); - igt_fb_set_size(&d->fb1, d->plane1, d->fb1.width, d-Quoted 1 line
fb1.height);
tests/kms_plane_scaling.c +2
-0+igt_fb_set_position (&d->fb[0 ], d->plane1,0 ,0 ); + igt_fb_set_size(&d->fb[0], d->plane1, d-Quoted 1 line
fb[0].width, d->fb[0].height);
igt_plane_set_position(d->plane1, 0, 0); igt_plane_set_size(d->plane1,mode->hdisplay, mode-Quoted 1 line
vdisplay);
tests/kms_plane_scaling.c +0
-2-igt_fb_set_position (&d->fb2, d->plane2,100 ,100 ); - igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width-500,d->fb2.height-500);
tests/kms_plane_scaling.c +2
-0+igt_fb_set_position (&d->fb[1 ], d->plane2,100 ,100 ); + igt_fb_set_size(&d->fb[1], d->plane2, d-Quoted 1 line
fb[1].width-500,d->fb[1].height-500);
igt_plane_set_position(d->plane2, 100, 100);igt_plane_set_size(d->plane2, mode->hdisplay-200, mode->vdisplay-200);tests/kms_plane_scaling.c +1
-1-igt_display_commit2 (display,COMMIT_UNIVERSAL ); +igt_display_commit2 (display,COMMIT_ATOMIC );}
tests/kms_plane_scaling.c +0
-8- -cleanup: -/* back to single plane mode */ -igt_plane_set_fb (d->plane2,NULL ); -igt_plane_set_fb (d->plane3,NULL ); -igt_display_commit2 (display,COMMIT_UNIVERSAL ); - -cleanup_crtc (d, output, d->plane1);}
igt_maintests/kms_plane_scaling.c +1
-0@@ -316,6 +278,7 @@ igt_main igt_require_pipe_crc(data.drm_fd); igt_display_init(&data.display, data.drm_fd); data.devid = intel_get_drm_devid(data.drm_fd); +igt_require (data.display.is_atomic); }
for_each_pipe_static(pipe)igt_subtest_group{
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 6/8 tests/kms_plane_scaling: test scaling with tiling rotation and pixel formats, v2.
In reply to Maarten LankhorstFrom: Jyoti Yadav <[email protected]>
This patch adds subtest for testing scaling in combination with rotation and pixel formats.
Changes since v1:
- Rework test to work with the other changes to kms_plane_scaling. (Maarten)
- Remove hardcodes for MIN/MAX_SRC_WIDTH, and use the value directly. (Maarten)
--- tests/kms_plane_scaling.c | 161 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 160 insertions(+), 1 deletion(-)
tests/kms_plane_scaling.c +160 -1
@@ -54,10 +54,55 @@ static int get_num_scalers(uint32_t devid, enum pipe pipe)return 1 ; } +#define MAX_ROTATION 4 +static igt_rotation_t get_rotation_angle (int rot) +{ +switch (rot) { +case 0 : +return IGT_ROTATION_0 ; +break ; +case 1 : +return IGT_ROTATION_90 ; +break ; +case 2 : +return IGT_ROTATION_180 ; +break ; +case 3 : +return IGT_ROTATION_270 ; +break ; +default : +igt_info ("Unknown/Unsupported Rotation %d\n" , rot); +return IGT_ROTATION_0 ; + } +} + +#define MAX_TILING 4 +static uint64_t get_tiling (int tiling) +{ +switch (tiling) { +case 0 : +return LOCAL_DRM_FORMAT_MOD_NONE ; +break ; +case 1 : +return LOCAL_I915_FORMAT_MOD_X_TILED ; +break ; +case 2 : +return LOCAL_I915_FORMAT_MOD_Y_TILED ; +break ; +case 3 : +return LOCAL_I915_FORMAT_MOD_Yf_TILED; +break ; +default : +igt_info ("Unknown/Unsupported Tiling %d\n" , tiling); +return LOCAL_DRM_FORMAT_MOD_NONE ; + } +} +static void cleanup_crtc (data_t *data) {int i; +igt_display_reset (&data->display);igt_pipe_crc_free (data->pipe_crc); data->pipe_crc =NULL ;
@@ -77,7 +122,6 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,cleanup_crtc (data); -igt_display_reset (display);igt_output_set_pipe (output, pipe);/* create the pipe_crc object for this pipe */
@@ -110,6 +154,112 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,igt_display_commit2 (display,COMMIT_ATOMIC ); } +static void paint_fb (data_t *d,struct igt_fb *fb) +{ +cairo_t *cr; + + cr =igt_get_cairo_ctx (d->drm_fd, fb); +igt_paint_color (cr,0 ,0 , fb->width, fb->height,0.0 ,1.0 ,0.0 ); +igt_assert (cairo_status (cr) ==0 ); +cairo_destroy (cr); +} + +static void check_scaling_pipe_plane_rot (data_t *d,igt_plane_t *plane, +uint32_t pixel_format, +uint64_t tiling,enum pipe pipe, +igt_output_t *output, +igt_rotation_t rot) +{ +igt_display_t *display = &d->display; +int width, height; +drmModeModeInfo *mode; + +cleanup_crtc (d); + +igt_output_set_pipe (output, pipe); + mode =igt_output_get_mode (output); + +/* create buffer in the range of min and max source side limit.*/ + width = height =9 ; +igt_create_fb (display->drm_fd, width, height, + pixel_format, tiling, &d->fb[0 ]); +paint_fb (d, &d->fb[0 ]); +igt_plane_set_fb (plane, &d->fb[0 ]); + +/* Check min to full resolution upscaling */ +igt_fb_set_position (&d->fb[0 ], plane,0 ,0 ); +igt_fb_set_size (&d->fb[0 ], plane, width, height); +igt_plane_set_position (plane,0 ,0 ); +igt_plane_set_size (plane, mode->hdisplay, mode->vdisplay); +igt_plane_set_rotation (plane, rot); +igt_display_commit2 (display,COMMIT_ATOMIC ); + +igt_plane_set_fb (plane,NULL ); +igt_plane_set_position (plane,0 ,0 ); +} + +static void test_scaler_with_rotation_pipe (data_t *d,enum pipe pipe, +igt_output_t *output) +{ +igt_display_t *display = &d->display; +igt_plane_t *plane; + +igt_output_set_pipe (output, pipe); +for_each_plane_on_pipe (display, pipe, plane) { + +if (plane->type ==DRM_PLANE_TYPE_CURSOR ) +continue ; + +for (int i =0 ; i <MAX_ROTATION ; i++) { +igt_rotation_t rot =get_rotation_angle (i); +check_scaling_pipe_plane_rot (d, plane,DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_Y_TILED , + pipe, output, rot); + } + } +} + +static bool can_draw (uint32_t drm_format) +{ +const uint32_t *drm_formats; +int format_count, i; + +igt_get_all_cairo_formats (&drm_formats, &format_count); + +for (i =0 ; i < format_count; i++) +if (drm_formats[i] == drm_format) +return true; + +return false; +} + +static void test_scaler_with_pixel_format_pipe (data_t *d,enum pipe pipe,igt_output_t *output) +{ +igt_display_t *display = &d->display; +igt_plane_t *plane; + +igt_output_set_pipe (output, pipe); + +for_each_plane_on_pipe (display, pipe, plane) { +if (plane->type ==DRM_PLANE_TYPE_CURSOR ) +continue ; + +for (int i =0 ; i <MAX_TILING ; i++) { +uint64_t tiling =get_tiling (i); +int j; + +for (j =0 ; j < plane->drm_plane->count_formats; j++) { +uint32_t format = plane->drm_plane->formats[j]; + +if (can_draw (format)) +check_scaling_pipe_plane_rot (d, plane, + format, tiling, + pipe, output,IGT_ROTATION_0 ); + } + } + } +} +/* does iterative scaling on plane2 */ static void iterate_plane_scaling (data_t *d,drmModeModeInfo *mode) {
@@ -293,6 +443,15 @@ igt_main igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))for_each_valid_output_on_pipe (&data.display, pipe, output)test_plane_scaling_on_pipe (&data, pipe, output); + + igt_subtest_f("pipe-%s-scaler-with-pixel-format", kmstest_pipe_name(pipe)) +for_each_valid_output_on_pipe (&data.display, pipe, output) +test_scaler_with_pixel_format_pipe (&data, pipe, output); + + igt_subtest_f("pipe-%s-scaler-with-rotation", kmstest_pipe_name(pipe)) +for_each_valid_output_on_pipe (&data.display, pipe, output) +test_scaler_with_rotation_pipe (&data, pipe, output); + } igt_fixture
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t v3 6/8] tests/kms_plane_scaling: test scaling with tiling rotation and pixel formats, v2.
Quoted 30 lines · Maarten Lankhorst
From: Jyoti Yadav <[email protected]>
This patch adds subtest for testing scaling in combination with rotation
and pixel formats.Changes since v1:
- Rework test to work with the other changes tokms_plane_scaling. (Maarten)
- Remove hardcodes for MIN/MAX_SRC_WIDTH, and use the value directly. (Maarten)Signed-off-by Jyoti Yadav <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>---
tests/kms_plane_scaling.c | 161
+++++++++++++++++++++++++++++++++++++++++++++-1 file changed, 160 insertions(+), 1 deletion(-)tests/kms_plane_scaling.c +0
-0@@ -54,10 +54,55 @@ static int get_num_scalers(uint32_t devid, enum pipe pipe) return 1; }
tests/kms_plane_scaling.c static int get_num_scalers(uint32_t devid, enum pipe pipe) · line 58
Quoted 2 lines
tests/kms_plane_scaling.c +2
-0+#define MAX_ROTATION 4 +static igt_rotation_t get_rotation_angle (int rot)
To follow the same naming convention as with tiling, this function could be renamed as 'get_rotation()'
Quoted 7 lines
tests/kms_plane_scaling.c +7
-0+{ +switch (rot) { +case 0 : +return IGT_ROTATION_0 ; +break ; +case 1 : +return IGT_ROTATION_90 ;
tests/kms_plane_scaling.c static int get_num_scalers(uint32_t devid, enum pipe pipe) · line 75
Quoted 10 lines
tests/kms_plane_scaling.c +10
-0+break ; +case 2 : +return IGT_ROTATION_180 ; +break ; +case 3 : +return IGT_ROTATION_270 ; +break ; +default : +igt_info ("Unknown/Unsupported Rotation %d\n" , rot); +return IGT_ROTATION_0 ;
Maybe throw an error, igt_assert(0), here instead of return with IGT_ROTATION_0.
Quoted 12 lines
tests/kms_plane_scaling.c +12
-0+ } +} + +#define MAX_TILING 4 +static uint64_t get_tiling (int tiling) +{ +switch (tiling) { +case 0 : +return LOCAL_DRM_FORMAT_MOD_NONE ; +break ; +case 1 : +return LOCAL_I915_FORMAT_MOD_X_TILED ;
tests/kms_plane_scaling.c static int get_num_scalers(uint32_t devid, enum pipe pipe) · line 97
Quoted 10 lines
tests/kms_plane_scaling.c +10
-0+break ; +case 2 : +return LOCAL_I915_FORMAT_MOD_Y_TILED ; +break ; +case 3 : +return LOCAL_I915_FORMAT_MOD_Yf_TILED; +break ; +default : +igt_info ("Unknown/Unsupported Tiling %d\n" , tiling); +return LOCAL_DRM_FORMAT_MOD_NONE ;
Same comment as previous one.
Quoted 129 lines
tests/kms_plane_scaling.c +3
-0+ } +} +static void
cleanup_crtc(data_t *data)
{
int i;tests/kms_plane_scaling.c +1
-0+igt_display_reset (&data->display);
igt_pipe_crc_free(data->pipe_crc);
data->pipe_crc= NULL;tests/kms_plane_scaling.c +0
-0@@ -77,7 +122,6 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
cleanup_crtc(data);tests/kms_plane_scaling.c +0
-1-igt_display_reset (display);
igt_output_set_pipe(output, pipe);
/* create thepipe_crcobject for this pipe */tests/kms_plane_scaling.c +0
-0@@ -110,6 +154,112 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe, igt_display_commit2(display, COMMIT_ATOMIC); }tests/kms_plane_scaling.c +6
-0+static void paint_fb (data_t *d,struct igt_fb *fb) +{ +cairo_t *cr; + + cr =igt_get_cairo_ctx (d->drm_fd, fb); + igt_paint_color(cr, 0, 0, fb->width, fb->height, 0.0, 1.0,0.0);
tests/kms_plane_scaling.c +5
-0+igt_assert (cairo_status (cr) ==0 ); +cairo_destroy (cr); +} + +static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t*plane,
tests/kms_plane_scaling.c +2
-0+ uint32_t pixel_format, + uint64_t tiling, enum pipepipe,
tests/kms_plane_scaling.c +13
-0+ igt_output_t *output, + igt_rotation_t rot) +{ +igt_display_t *display = &d->display; +int width, height; +drmModeModeInfo *mode; + +cleanup_crtc (d); + +igt_output_set_pipe (output, pipe); + mode =igt_output_get_mode (output); + +/* create buffer in the range of min and max source side limit.*/
tests/kms_plane_scaling.c +19
-0+ width = height =9 ; +igt_create_fb (display->drm_fd, width, height, + pixel_format, tiling, &d->fb[0]); +paint_fb (d, &d->fb[0 ]); +igt_plane_set_fb (plane, &d->fb[0 ]); + +/* Check min to full resolution upscaling */ +igt_fb_set_position (&d->fb[0 ], plane,0 ,0 ); +igt_fb_set_size (&d->fb[0 ], plane, width, height); +igt_plane_set_position (plane,0 ,0 ); +igt_plane_set_size (plane, mode->hdisplay, mode->vdisplay); +igt_plane_set_rotation (plane, rot); +igt_display_commit2 (display,COMMIT_ATOMIC ); + +igt_plane_set_fb (plane,NULL ); +igt_plane_set_position (plane,0 ,0 ); +} + +static void test_scaler_with_rotation_pipe(data_t *d, enum pipepipe,
tests/kms_plane_scaling.c +14
-0+ igt_output_t *output) +{ +igt_display_t *display = &d->display; +igt_plane_t *plane; + +igt_output_set_pipe (output, pipe); +for_each_plane_on_pipe (display, pipe, plane) { + +if (plane->type ==DRM_PLANE_TYPE_CURSOR ) +continue ; + +for (int i =0 ; i <MAX_ROTATION ; i++) { +igt_rotation_t rot =get_rotation_angle (i); + check_scaling_pipe_plane_rot(d, plane,
DRM_FORMAT_XRGB8888,tests/kms_plane_scaling.c +1
-0+ LOCAL_I915_FORM
AT_MOD_Y_TILED,tests/kms_plane_scaling.c +1
-0+ pipe, output,rot);
tests/kms_plane_scaling.c +19
-0+ } + } +} + +static bool can_draw (uint32_t drm_format) +{ +const uint32_t *drm_formats; +int format_count, i; + +igt_get_all_cairo_formats (&drm_formats, &format_count); + +for (i =0 ; i < format_count; i++) +if (drm_formats[i] == drm_format) +return true; + +return false; +} + +static void test_scaler_with_pixel_format_pipe(data_t *d, enum pipepipe,
igt_output_t*output)tests/kms_plane_scaling.c +15
-0+{ + igt_display_t *display = &d->display; + igt_plane_t *plane; + + igt_output_set_pipe(output, pipe); + + for_each_plane_on_pipe(display, pipe, plane) { + if (plane->type == DRM_PLANE_TYPE_CURSOR) + continue; + + for (int i = 0; i < MAX_TILING; i++) { + uint64_t tiling = get_tiling(i); + int j; + + for (j = 0; j < plane->drm_plane-
Quoted 1 line
Quoted 1 line
count_formats; j++) {
We could follow the same style for 'j' as for 'i' in the for loops.
Quoted 43 lines
tests/kms_plane_scaling.c +1
-0+ uint32_t format = plane->drm_plane-Quoted 1 line
formats[j];
tests/kms_plane_scaling.c +3
-0+ +if (can_draw (format)) + check_scaling_pipe_plane_rot(d, plane,
tests/kms_plane_scaling.c +1
-0+format, tiling,
tests/kms_plane_scaling.c +1
-0+pipe, output,
IGT_ROTATION_0);tests/kms_plane_scaling.c +5
-0+ } + } + } +} +/* does iterative scaling on plane2 */
static voiditerate_plane_scaling(data_t *d, drmModeModeInfo *mode){tests/kms_plane_scaling.c +2
-0@@ -293,6 +443,15 @@ igt_main igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe)) for_each_valid_output_on_pipe(&data.display, pipe, output) test_plane_scaling_on_pipe(&data, pipe, output); + + igt_subtest_f("pipe-%s-scaler-with-pixel-format",
kmstest_pipe_name(pipe))tests/kms_plane_scaling.c +1
-0+ for_each_valid_output_on_pipe(&data.display,pipe, output)
tests/kms_plane_scaling.c +1
-0+ test_scaler_with_pixel_format_pipe(&data, pipe, output);
tests/kms_plane_scaling.c +2
-0+ + igt_subtest_f("pipe-%s-scaler-with-rotation",
kmstest_pipe_name(pipe))tests/kms_plane_scaling.c +1
-0+ for_each_valid_output_on_pipe(&data.display,pipe, output)
tests/kms_plane_scaling.c +1
-0+ test_scaler_with_rotation_pipe(&data, pipe, output);
+
}
igt_fixture
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 tests/kms_plane_scaling: test scaling with tiling rotation and pixel formats, v3.
In reply to Maarten LankhorstFrom: Jyoti Yadav <[email protected]>
This patch adds subtest for testing scaling in combination with rotation and pixel formats.
Changes since v1:
- Rework test to work with the other changes to kms_plane_scaling. (Maarten)
- Remove hardcodes for MIN/MAX_SRC_WIDTH, and use the value directly. (Maarten) Changes since v2:
- Put rotation and tiling in an array. (Maarten)
--- tests/kms_plane_scaling.c | 130 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 129 insertions(+), 1 deletion(-)
tests/kms_plane_scaling.c +129 -1
@@ -60,6 +60,7 @@ static void cleanup_crtc(data_t *data) {int i; +igt_display_reset (&data->display);igt_pipe_crc_free (data->pipe_crc); data->pipe_crc =NULL ;
@@ -79,7 +80,6 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,cleanup_crtc (data); -igt_display_reset (display);igt_output_set_pipe (output, pipe);/* create the pipe_crc object for this pipe */
@@ -112,6 +112,125 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,igt_display_commit2 (display,COMMIT_ATOMIC ); } +static void paint_fb (data_t *d,struct igt_fb *fb) +{ +cairo_t *cr; + + cr =igt_get_cairo_ctx (d->drm_fd, fb); +igt_paint_color (cr,0 ,0 , fb->width, fb->height,0.0 ,1.0 ,0.0 ); +igt_assert (cairo_status (cr) ==0 ); +cairo_destroy (cr); +} + +static void check_scaling_pipe_plane_rot (data_t *d,igt_plane_t *plane, +uint32_t pixel_format, +uint64_t tiling,enum pipe pipe, +igt_output_t *output, +igt_rotation_t rot) +{ +igt_display_t *display = &d->display; +int width, height; +drmModeModeInfo *mode; + +cleanup_crtc (d); + +igt_output_set_pipe (output, pipe); + mode =igt_output_get_mode (output); + +/* create buffer in the range of min and max source side limit.*/ + width = height =9 ; +igt_create_fb (display->drm_fd, width, height, + pixel_format, tiling, &d->fb[0 ]); +paint_fb (d, &d->fb[0 ]); +igt_plane_set_fb (plane, &d->fb[0 ]); + +/* Check min to full resolution upscaling */ +igt_fb_set_position (&d->fb[0 ], plane,0 ,0 ); +igt_fb_set_size (&d->fb[0 ], plane, width, height); +igt_plane_set_position (plane,0 ,0 ); +igt_plane_set_size (plane, mode->hdisplay, mode->vdisplay); +igt_plane_set_rotation (plane, rot); +igt_display_commit2 (display,COMMIT_ATOMIC ); + +igt_plane_set_fb (plane,NULL ); +igt_plane_set_position (plane,0 ,0 ); +} + +static const igt_rotation_t rotations[] = { +IGT_ROTATION_0 , +IGT_ROTATION_90 , +IGT_ROTATION_180 , +IGT_ROTATION_270 , +}; + +static void test_scaler_with_rotation_pipe (data_t *d,enum pipe pipe, +igt_output_t *output) +{ +igt_display_t *display = &d->display; +igt_plane_t *plane; + +igt_output_set_pipe (output, pipe); +for_each_plane_on_pipe (display, pipe, plane) { +if (plane->type ==DRM_PLANE_TYPE_CURSOR ) +continue ; + +for (int i =0 ; i <ARRAY_SIZE (rotations); i++) { +igt_rotation_t rot = rotations[i]; + +check_scaling_pipe_plane_rot (d, plane,DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_Y_TILED , + pipe, output, rot); + } + } +} + +static bool can_draw (uint32_t drm_format) +{ +const uint32_t *drm_formats; +int format_count, i; + +igt_get_all_cairo_formats (&drm_formats, &format_count); + +for (i =0 ; i < format_count; i++) +if (drm_formats[i] == drm_format) +return true; + +return false; +} + +static const uint64_t tilings[] = { +LOCAL_DRM_FORMAT_MOD_NONE , +LOCAL_I915_FORMAT_MOD_X_TILED , +LOCAL_I915_FORMAT_MOD_Y_TILED , + LOCAL_I915_FORMAT_MOD_Yf_TILED +}; + +static void test_scaler_with_pixel_format_pipe (data_t *d,enum pipe pipe,igt_output_t *output) +{ +igt_display_t *display = &d->display; +igt_plane_t *plane; + +igt_output_set_pipe (output, pipe); + +for_each_plane_on_pipe (display, pipe, plane) { +if (plane->type ==DRM_PLANE_TYPE_CURSOR ) +continue ; + +for (int i =0 ; i <ARRAY_SIZE (tilings); i++) { +uint64_t tiling = tilings[i]; + +for (int j =0 ; j < plane->drm_plane->count_formats; j++) { +uint32_t format = plane->drm_plane->formats[j]; + +if (can_draw (format)) +check_scaling_pipe_plane_rot (d, plane, + format, tiling, + pipe, output,IGT_ROTATION_0 ); + } + } + } +} +/* does iterative scaling on plane2 */ static void iterate_plane_scaling (data_t *d,drmModeModeInfo *mode) {
@@ -295,6 +414,15 @@ igt_main igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))for_each_valid_output_on_pipe (&data.display, pipe, output)test_plane_scaling_on_pipe (&data, pipe, output); + + igt_subtest_f("pipe-%s-scaler-with-pixel-format", kmstest_pipe_name(pipe)) +for_each_valid_output_on_pipe (&data.display, pipe, output) +test_scaler_with_pixel_format_pipe (&data, pipe, output); + + igt_subtest_f("pipe-%s-scaler-with-rotation", kmstest_pipe_name(pipe)) +for_each_valid_output_on_pipe (&data.display, pipe, output) +test_scaler_with_rotation_pipe (&data, pipe, output); + } igt_fixture
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t] tests/kms_plane_scaling: test scaling with tiling rotation and pixel formats, v3.
Quoted 93 lines · Maarten Lankhorst
From: Jyoti Yadav <[email protected]>
This patch adds subtest for testing scaling in combination with rotation
and pixel formats.Changes since v1:
- Rework test to work with the other changes tokms_plane_scaling. (Maarten)
- Remove hardcodes for MIN/MAX_SRC_WIDTH, and use the value directly. (Maarten)
Changes since v2:
- Put rotation and tiling in an array. (Maarten)Signed-off-by Jyoti Yadav <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>---
tests/kms_plane_scaling.c | 130
+++++++++++++++++++++++++++++++++++++++++++++-1 file changed, 129 insertions(+), 1 deletion(-)tests/kms_plane_scaling.c +0
-0@@ -60,6 +60,7 @@ static void cleanup_crtc(data_t *data) { int i;tests/kms_plane_scaling.c +1
-0+igt_display_reset (&data->display);
igt_pipe_crc_free(data->pipe_crc);
data->pipe_crc= NULL;tests/kms_plane_scaling.c +0
-0@@ -79,7 +80,6 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
cleanup_crtc(data);tests/kms_plane_scaling.c +0
-1-igt_display_reset (display);
igt_output_set_pipe(output, pipe);
/* create thepipe_crcobject for this pipe */tests/kms_plane_scaling.c +0
-0@@ -112,6 +112,125 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe, igt_display_commit2(display, COMMIT_ATOMIC); }tests/kms_plane_scaling.c +6
-0+static void paint_fb (data_t *d,struct igt_fb *fb) +{ +cairo_t *cr; + + cr =igt_get_cairo_ctx (d->drm_fd, fb); + igt_paint_color(cr, 0, 0, fb->width, fb->height, 0.0, 1.0,0.0);
tests/kms_plane_scaling.c +5
-0+igt_assert (cairo_status (cr) ==0 ); +cairo_destroy (cr); +} + +static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t*plane,
tests/kms_plane_scaling.c +2
-0+ uint32_t pixel_format, + uint64_t tiling, enum pipepipe,
tests/kms_plane_scaling.c +13
-0+ igt_output_t *output, + igt_rotation_t rot) +{ +igt_display_t *display = &d->display; +int width, height; +drmModeModeInfo *mode; + +cleanup_crtc (d); + +igt_output_set_pipe (output, pipe); + mode =igt_output_get_mode (output); + +/* create buffer in the range of min and max source side limit.*/
tests/kms_plane_scaling.c +14
-0+ width = height =9 ; +igt_create_fb (display->drm_fd, width, height, + pixel_format, tiling, &d->fb[0]); +paint_fb (d, &d->fb[0 ]); +igt_plane_set_fb (plane, &d->fb[0 ]); + +/* Check min to full resolution upscaling */ +igt_fb_set_position (&d->fb[0 ], plane,0 ,0 ); +igt_fb_set_size (&d->fb[0 ], plane, width, height); +igt_plane_set_position (plane,0 ,0 ); +igt_plane_set_size (plane, mode->hdisplay, mode->vdisplay); +igt_plane_set_rotation (plane, rot); +igt_display_commit2 (display,COMMIT_ATOMIC ); +
tests/kms_plane_scaling.c static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe, · line 164
Quoted 10 lines
tests/kms_plane_scaling.c +10
-0+igt_plane_set_fb (plane,NULL ); +igt_plane_set_position (plane,0 ,0 ); +} + +static const igt_rotation_t rotations[] = { +IGT_ROTATION_0 , +IGT_ROTATION_90 , +IGT_ROTATION_180 , +IGT_ROTATION_270 , +};
It's better this way so that we don't have to keep in sync MAX_ROTATIONS and the actual rotation options.
Quoted 107 lines
tests/kms_plane_scaling.c +2
-0+ +static void test_scaler_with_rotation_pipe(data_t *d, enum pipepipe,
tests/kms_plane_scaling.c +14
-0+ igt_output_t *output) +{ +igt_display_t *display = &d->display; +igt_plane_t *plane; + +igt_output_set_pipe (output, pipe); +for_each_plane_on_pipe (display, pipe, plane) { +if (plane->type ==DRM_PLANE_TYPE_CURSOR ) +continue ; + +for (int i =0 ; i <ARRAY_SIZE (rotations); i++) { +igt_rotation_t rot = rotations[i]; + + check_scaling_pipe_plane_rot(d, plane,
DRM_FORMAT_XRGB8888,tests/kms_plane_scaling.c +1
-0+ LOCAL_I915_FORM
AT_MOD_Y_TILED,tests/kms_plane_scaling.c +1
-0+ pipe, output,rot);
tests/kms_plane_scaling.c +26
-0+ } + } +} + +static bool can_draw (uint32_t drm_format) +{ +const uint32_t *drm_formats; +int format_count, i; + +igt_get_all_cairo_formats (&drm_formats, &format_count); + +for (i =0 ; i < format_count; i++) +if (drm_formats[i] == drm_format) +return true; + +return false; +} + +static const uint64_t tilings[] = { +LOCAL_DRM_FORMAT_MOD_NONE , +LOCAL_I915_FORMAT_MOD_X_TILED , +LOCAL_I915_FORMAT_MOD_Y_TILED , + LOCAL_I915_FORMAT_MOD_Yf_TILED +}; + +static void test_scaler_with_pixel_format_pipe(data_t *d, enum pipepipe,
igt_output_t*output)tests/kms_plane_scaling.c +14
-0+{ + igt_display_t *display = &d->display; + igt_plane_t *plane; + + igt_output_set_pipe(output, pipe); + + for_each_plane_on_pipe(display, pipe, plane) { + if (plane->type == DRM_PLANE_TYPE_CURSOR) + continue; + + for (int i = 0; i < ARRAY_SIZE(tilings); i++) { + uint64_t tiling = tilings[i]; + + for (int j = 0; j < plane->drm_plane-Quoted 1 line
count_formats; j++) {tests/kms_plane_scaling.c +1
-0+ uint32_t format = plane->drm_plane-Quoted 1 line
formats[j];
tests/kms_plane_scaling.c +3
-0+ +if (can_draw (format)) + check_scaling_pipe_plane_rot(d, plane,
tests/kms_plane_scaling.c +1
-0+format, tiling,
tests/kms_plane_scaling.c +1
-0+pipe, output,
IGT_ROTATION_0);tests/kms_plane_scaling.c +5
-0+ } + } + } +} +/* does iterative scaling on plane2 */
static voiditerate_plane_scaling(data_t *d, drmModeModeInfo *mode){tests/kms_plane_scaling.c +2
-0@@ -295,6 +414,15 @@ igt_main igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe)) for_each_valid_output_on_pipe(&data.display, pipe, output) test_plane_scaling_on_pipe(&data, pipe, output); + + igt_subtest_f("pipe-%s-scaler-with-pixel-format",
kmstest_pipe_name(pipe))tests/kms_plane_scaling.c +1
-0+ for_each_valid_output_on_pipe(&data.display,pipe, output)
tests/kms_plane_scaling.c +1
-0+ test_scaler_with_pixel_format_pipe(&data, pipe, output);
tests/kms_plane_scaling.c +2
-0+ + igt_subtest_f("pipe-%s-scaler-with-rotation",
kmstest_pipe_name(pipe))tests/kms_plane_scaling.c +1
-0+ for_each_valid_output_on_pipe(&data.display,pipe, output)
tests/kms_plane_scaling.c +1
-0+ test_scaler_with_rotation_pipe(&data, pipe, output);
+
}
igt_fixture
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 7/8 tests/kms_plane_scaling: test scaler with clipping clamping, v3.
In reply to Maarten LankhorstFrom: Jyoti Yadav <[email protected]>
This patch adds subtest to test scaler clipping and clamping scenario.
Changes since v1:
- Modify test to work with the changes to kms_plane_scaling. (Maarten) Changes since v2:
- Use get_num_scalers() to skip when needed.
--- tests/kms_plane_scaling.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
tests/kms_plane_scaling.c +43 -0
@@ -416,6 +416,46 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output) } } +static void +test_scaler_with_clipping_clamping_scenario (data_t *d,enum pipe pipe,igt_output_t *output) +{ +drmModeModeInfo *mode; + +igt_require (get_num_scalers (d->devid, pipe) >=2 ); + + mode =igt_output_get_mode (output); + d->plane1 = &d->display.pipes[pipe].planes[0 ]; +prepare_crtc (d, output, pipe, d->plane1, mode); + +igt_create_pattern_fb (d->drm_fd, + mode->hdisplay, mode->vdisplay, +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_X_TILED , &d->fb[1 ]); + +igt_create_pattern_fb (d->drm_fd, + mode->hdisplay, mode->vdisplay, +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_Y_TILED , &d->fb[2 ]); + +igt_plane_set_fb (d->plane1, &d->fb[1 ]); + d->plane2 =igt_output_get_plane (output,1 ); +igt_plane_set_fb (d->plane2, &d->fb[2 ]); + +igt_fb_set_position (&d->fb[1 ], d->plane1,0 ,0 ); +igt_fb_set_size (&d->fb[1 ], d->plane1,300 ,300 ); +igt_plane_set_position (d->plane1,100 ,400 ); +igt_fb_set_position (&d->fb[2 ], d->plane2,0 ,0 ); +igt_fb_set_size (&d->fb[2 ], d->plane2,400 ,400 ); +igt_plane_set_position (d->plane2,100 ,100 ); + +/* scaled window size is outside the modeset area.*/ +igt_plane_set_size (d->plane1, mode->hdisplay +200 , + mode->vdisplay +200 ); +igt_plane_set_size (d->plane2, mode->hdisplay +100 , + mode->vdisplay +100 ); +igt_display_commit2 (&d->display,COMMIT_ATOMIC ); +} + igt_main {data_t data = {};
@@ -452,6 +492,9 @@ igt_mainfor_each_valid_output_on_pipe (&data.display, pipe, output)test_scaler_with_rotation_pipe (&data, pipe, output); + igt_subtest_f("pipe-%s-scaler-with-clipping-clamping", kmstest_pipe_name(pipe)) +for_each_valid_output_on_pipe (&data.display, pipe, output) +test_scaler_with_clipping_clamping_scenario (&data, pipe, output); } igt_fixture
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t v3 7/8] tests/kms_plane_scaling: test scaler with clipping clamping, v3.
Quoted 11 lines · Maarten Lankhorst
From: Jyoti Yadav <[email protected]>
This patch adds subtest to test scaler clipping and clamping scenario.
Changes since v1:
- Modify test to work with the changes tokms_plane_scaling. (Maarten)
Changes since v2:
- Useget_num_scalers()to skip when needed.
Quoted 79 lines
Signed-off-by Jyoti Yadav <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>---
tests/kms_plane_scaling.c | 43
+++++++++++++++++++++++++++++++++++++++++++1 file changed, 43 insertions(+)tests/kms_plane_scaling.c +0
-0@@ -416,6 +416,46 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output) } }tests/kms_plane_scaling.c +2
-0+static void +test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipepipe,
igt_output_t*output)tests/kms_plane_scaling.c +13
-0+{ +drmModeModeInfo *mode; + +igt_require (get_num_scalers (d->devid, pipe) >=2 ); + + mode =igt_output_get_mode (output); + d->plane1 = &d->display.pipes[pipe].planes[0 ]; +prepare_crtc (d, output, pipe, d->plane1, mode); + + igt_create_pattern_fb(d->drm_fd, + mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_X_TILED, &d-Quoted 1 line
fb[1]);
tests/kms_plane_scaling.c +5
-0+ + igt_create_pattern_fb(d->drm_fd, + mode->hdisplay, mode->vdisplay, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_Y_TILED, &d-Quoted 1 line
fb[2]);
tests/kms_plane_scaling.c +20
-0+ +igt_plane_set_fb (d->plane1, &d->fb[1 ]); + d->plane2 =igt_output_get_plane (output,1 ); +igt_plane_set_fb (d->plane2, &d->fb[2 ]); + +igt_fb_set_position (&d->fb[1 ], d->plane1,0 ,0 ); +igt_fb_set_size (&d->fb[1 ], d->plane1,300 ,300 ); +igt_plane_set_position (d->plane1,100 ,400 ); +igt_fb_set_position (&d->fb[2 ], d->plane2,0 ,0 ); +igt_fb_set_size (&d->fb[2 ], d->plane2,400 ,400 ); +igt_plane_set_position (d->plane2,100 ,100 ); + +/* scaled window size is outside the modeset area.*/ +igt_plane_set_size (d->plane1, mode->hdisplay +200 , + mode->vdisplay + 200); +igt_plane_set_size (d->plane2, mode->hdisplay +100 , + mode->vdisplay + 100); +igt_display_commit2 (&d->display,COMMIT_ATOMIC ); +} +igt_main
{
data_tdata = {};tests/kms_plane_scaling.c +0
-0@@ -452,6 +492,9 @@ igt_main for_each_valid_output_on_pipe(&data.display, pipe, output)
test_scaler_with_rotation_pipe(&data , pipe, output);tests/kms_plane_scaling.c +1
-0+ igt_subtest_f("pipe-%s-scaler-with-clipping-clamping",
kmstest_pipe_name(pipe))tests/kms_plane_scaling.c +1
-0+ for_each_valid_output_on_pipe(&data.display,pipe, output)
tests/kms_plane_scaling.c +1
-0+ test_scaler_with_clipping_clamping_s
cenario(&data, pipe, output);
}
igt_fixture
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 8/8 tests/kms_plane_scaling: test for multi pipe with scaling, v3.
In reply to Maarten LankhorstFrom: Jyoti Yadav <[email protected]>
Add a subtest to display primary and overlay planes on two connected pipes and runs scaling test on both pipes
Changes since v1:
- Commit first before trying any scaling. (Maarten)
- Use the same logic as kms_cursor_legacy to find a pipe and output. (Maarten)
- Rework test to work with how cleanup is handled. (Maarten) Changes since v2:
- Use get_num_scalers() to only use 2 scalers if available. (Maarten)
--- tests/kms_plane_scaling.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-)
tests/kms_plane_scaling.c +92 -1
@@ -38,10 +38,12 @@ typedef struct {int image_w;int image_h; -struct igt_fb fb[3 ]; +struct igt_fb fb[4 ]; +igt_plane_t *plane1;igt_plane_t *plane2;igt_plane_t *plane3; +igt_plane_t *plane4; } data_t;static int get_num_scalers (uint32_t devid,enum pipe pipe)
@@ -456,6 +458,92 @@ test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe, igt_outpuigt_display_commit2 (&d->display,COMMIT_ATOMIC ); } +static void find_connected_pipe (igt_display_t *display,bool second,enum pipe *pipe,igt_output_t **output) +{ +enum pipe first =PIPE_NONE ; +igt_output_t *first_output =NULL ; +bool found = false; + +for_each_pipe_with_valid_output (display, *pipe, *output) { +if (first == *pipe || *output == first_output) +continue ; + +if (second) { + first = *pipe; + first_output = *output; + second = false; +continue ; + } + +return ; + } + +if (first_output) +igt_require_f (found,"No second valid output found\n" ); +else +igt_require_f (found,"No valid outputs found\n" ); +} + +static void test_scaler_with_multi_pipe_plane (data_t *d) +{ +igt_display_t *display = &d->display; +igt_output_t *output1, *output2; +drmModeModeInfo *mode1, *mode2; +enum pipe pipe1, pipe2; + +cleanup_crtc (d); + +find_connected_pipe (display, false, &pipe1, &output1); +find_connected_pipe (display, true, &pipe2, &output2); + +igt_skip_on (!output1 || !output2); + +igt_output_set_pipe (output1, pipe1); +igt_output_set_pipe (output2, pipe2); + + d->plane1 =igt_output_get_plane (output1,0 ); + d->plane2 =get_num_scalers (d->devid, pipe1) >=2 ?igt_output_get_plane (output1,1 ) :NULL ; + d->plane3 =igt_output_get_plane (output2,0 ); + d->plane4 =get_num_scalers (d->devid, pipe2) >=2 ?igt_output_get_plane (output2,1 ) :NULL ; + + mode1 =igt_output_get_mode (output1); + mode2 =igt_output_get_mode (output2); + +igt_create_pattern_fb (d->drm_fd,600 ,600 , +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_Y_TILED , &d->fb[0 ]); + +igt_create_pattern_fb (d->drm_fd,500 ,500 , +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_Y_TILED , &d->fb[1 ]); + +igt_create_pattern_fb (d->drm_fd,700 ,700 , +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_Y_TILED , &d->fb[2 ]); + +igt_create_pattern_fb (d->drm_fd,400 ,400 , +DRM_FORMAT_XRGB8888 , +LOCAL_I915_FORMAT_MOD_Y_TILED , &d->fb[3 ]); + +igt_plane_set_fb (d->plane1, &d->fb[0 ]); +if (d->plane2) +igt_plane_set_fb (d->plane2, &d->fb[1 ]); +igt_plane_set_fb (d->plane3, &d->fb[2 ]); +if (d->plane4) +igt_plane_set_fb (d->plane4, &d->fb[3 ]); +igt_display_commit2 (display,COMMIT_ATOMIC ); + +/* Upscaling Primary */ +igt_plane_set_size (d->plane1, mode1->hdisplay, mode1->vdisplay); +igt_plane_set_size (d->plane3, mode2->hdisplay, mode2->vdisplay); +igt_display_commit2 (display,COMMIT_ATOMIC ); + +/* Upscaling Sprites */ +igt_plane_set_size (d->plane2 ?: d->plane1, mode1->hdisplay, mode1->vdisplay); +igt_plane_set_size (d->plane4 ?: d->plane3, mode2->hdisplay, mode2->vdisplay); +igt_display_commit2 (display,COMMIT_ATOMIC ); +} + igt_main {data_t data = {};
@@ -497,6 +585,9 @@ igt_maintest_scaler_with_clipping_clamping_scenario (&data, pipe, output); } + igt_subtest_f("2x-scaler-multi-pipe") +test_scaler_with_multi_pipe_plane (&data); + igt_fixture igt_display_fini(&data.display); }
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t v3 8/8] tests/kms_plane_scaling: test for multi pipe with scaling, v3.
Quoted 96 lines · Maarten Lankhorst
From: Jyoti Yadav <[email protected]>
Add a subtest to display primary and overlay planes on two connected pipes and runs scaling test on both pipes
Changes since v1:
- Commit first before trying any scaling. (Maarten)
- Use the same logic askms_cursor_legacyto find a pipe and output. (Maarten)
- Rework test to work with how cleanup is handled. (Maarten) Changes since v2:
- Useget_num_scalers()to only use 2 scalers if available. (Maarten)Signed-off-by Jyoti Yadav <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>---
tests/kms_plane_scaling.c | 93
++++++++++++++++++++++++++++++++++++++++++++++-1 file changed, 92 insertions(+), 1 deletion(-)tests/kms_plane_scaling.c +0
-0@@ -38,10 +38,12 @@ typedef struct { int image_w; int image_h;tests/kms_plane_scaling.c +2
-1-struct igt_fb fb[3 ]; +struct igt_fb fb[4 ]; +
igt_plane_t*plane1;
igt_plane_t*plane2;
igt_plane_t*plane3;tests/kms_plane_scaling.c +1
-0+igt_plane_t *plane4;}
data_t;
static intget_num_scalers(uint32_t devid, enum pipe pipe)tests/kms_plane_scaling.c +0
-0@@ -456,6 +458,92 @@test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe,
igt_outpu
igt_display_commit2(&d->display, COMMIT_ATOMIC);
}
+static voidfind_connected_pipe(igt_display_t *display, bool second, enum pipe *pipe, igt_output_t **output)tests/kms_plane_scaling.c +21
-0+{ +enum pipe first =PIPE_NONE ; +igt_output_t *first_output =NULL ; +bool found = false; + +for_each_pipe_with_valid_output (display, *pipe, *output) { +if (first == *pipe || *output == first_output) +continue ; + +if (second) { + first = *pipe; + first_output = *output; + second = false; +continue ; + } + +return ; + } + +if (first_output) + igt_require_f(found, "No second valid outputfound\n");
tests/kms_plane_scaling.c +23
-0+else +igt_require_f (found,"No valid outputs found\n" ); +} + +static void test_scaler_with_multi_pipe_plane (data_t *d) +{ +igt_display_t *display = &d->display; +igt_output_t *output1, *output2; +drmModeModeInfo *mode1, *mode2; +enum pipe pipe1, pipe2; + +cleanup_crtc (d); + +find_connected_pipe (display, false, &pipe1, &output1); +find_connected_pipe (display, true, &pipe2, &output2); + +igt_skip_on (!output1 || !output2); + +igt_output_set_pipe (output1, pipe1); +igt_output_set_pipe (output2, pipe2); + + d->plane1 =igt_output_get_plane (output1,0 ); + d->plane2 = get_num_scalers(d->devid, pipe1) >= 2 ?
igt_output_get_plane(output1, 1): NULL;tests/kms_plane_scaling.c +2
-0+ d->plane3 =igt_output_get_plane (output2,0 ); + d->plane4 = get_num_scalers(d->devid, pipe2) >= 2 ?
Quoted 1 line
igt_output_get_plane(output2, 1): NULL;
Maybe use DRM plane type definitions DRM_PLANE_TYPE_OVERLAY and DRM_PLANE_TYPE_PRIMARY instead of 0 and 1 to better indicate what plane we are referring to.
Quoted 61 lines
tests/kms_plane_scaling.c +7
-0+ + mode1 =igt_output_get_mode (output1); + mode2 =igt_output_get_mode (output2); + + igt_create_pattern_fb(d->drm_fd, 600, 600, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_Y_TILED, &d-Quoted 1 line
fb[0]);
tests/kms_plane_scaling.c +4
-0+ + igt_create_pattern_fb(d->drm_fd, 500, 500, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_Y_TILED, &d-Quoted 1 line
fb[1]);
tests/kms_plane_scaling.c +4
-0+ + igt_create_pattern_fb(d->drm_fd, 700, 700, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_Y_TILED, &d-Quoted 1 line
fb[2]);
tests/kms_plane_scaling.c +4
-0+ + igt_create_pattern_fb(d->drm_fd, 400, 400, + DRM_FORMAT_XRGB8888, + LOCAL_I915_FORMAT_MOD_Y_TILED, &d-Quoted 1 line
fb[3]);
tests/kms_plane_scaling.c +11
-0+ +igt_plane_set_fb (d->plane1, &d->fb[0 ]); +if (d->plane2) +igt_plane_set_fb (d->plane2, &d->fb[1 ]); +igt_plane_set_fb (d->plane3, &d->fb[2 ]); +if (d->plane4) +igt_plane_set_fb (d->plane4, &d->fb[3 ]); +igt_display_commit2 (display,COMMIT_ATOMIC ); + +/* Upscaling Primary */ + igt_plane_set_size(d->plane1, mode1->hdisplay, mode1-Quoted 1 line
vdisplay);
tests/kms_plane_scaling.c +1
-0+ igt_plane_set_size(d->plane3, mode2->hdisplay, mode2-Quoted 1 line
vdisplay);
tests/kms_plane_scaling.c +4
-0+igt_display_commit2 (display,COMMIT_ATOMIC ); + +/* Upscaling Sprites */ + igt_plane_set_size(d->plane2 ?: d->plane1, mode1->hdisplay,
mode1->vdisplay);tests/kms_plane_scaling.c +1
-0+ igt_plane_set_size(d->plane4 ?: d->plane3, mode2->hdisplay,
mode2->vdisplay);tests/kms_plane_scaling.c +3
-0+igt_display_commit2 (display,COMMIT_ATOMIC ); +} +igt_main
{
data_tdata = {};tests/kms_plane_scaling.c +0
-0@@ -497,6 +585,9 @@ igt_main
test_scaler_with_clipping_clamping_scenario(&data, pipe, output);
}tests/kms_plane_scaling.c +3
-0+ igt_subtest_f("2x-scaler-multi-pipe") +test_scaler_with_multi_pipe_plane (&data); +
igt_fixtureigt_display_fini(&data.display); }
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t v3 8/8] tests/kms_plane_scaling: test for multi pipe with scaling, v3.
Op 16-01-18 om 14:46 schreef Mika Kahola:
Quoted 93 lines · Maarten Lankhorst
Quoted 92 lines
From: Jyoti Yadav <[email protected]>
Add a subtest to display primary and overlay planes on two connected pipes and runs scaling test on both pipes
Changes since v1:
- Commit first before trying any scaling. (Maarten)
- Use the same logic askms_cursor_legacyto find a pipe and output. (Maarten)
- Rework test to work with how cleanup is handled. (Maarten) Changes since v2:
- Useget_num_scalers()to only use 2 scalers if available. (Maarten)Signed-off-by Jyoti Yadav <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>---
tests/kms_plane_scaling.c | 93
++++++++++++++++++++++++++++++++++++++++++++++-1 file changed, 92 insertions(+), 1 deletion(-)tests/kms_plane_scaling.c +0
-0@@ -38,10 +38,12 @@ typedef struct { int image_w; int image_h;tests/kms_plane_scaling.c +2
-1-struct igt_fb fb[3 ]; +struct igt_fb fb[4 ]; +
igt_plane_t*plane1;
igt_plane_t*plane2;
igt_plane_t*plane3;tests/kms_plane_scaling.c +1
-0+igt_plane_t *plane4;}
data_t;
static intget_num_scalers(uint32_t devid, enum pipe pipe)tests/kms_plane_scaling.c +0
-0@@ -456,6 +458,92 @@test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe,
igt_outpu
igt_display_commit2(&d->display, COMMIT_ATOMIC);
}
+static voidfind_connected_pipe(igt_display_t *display, bool second, enum pipe *pipe, igt_output_t **output)tests/kms_plane_scaling.c +21
-0+{ +enum pipe first =PIPE_NONE ; +igt_output_t *first_output =NULL ; +bool found = false; + +for_each_pipe_with_valid_output (display, *pipe, *output) { +if (first == *pipe || *output == first_output) +continue ; + +if (second) { + first = *pipe; + first_output = *output; + second = false; +continue ; + } + +return ; + } + +if (first_output) + igt_require_f(found, "No second valid outputfound\n");
tests/kms_plane_scaling.c +22
-0+else +igt_require_f (found,"No valid outputs found\n" ); +} + +static void test_scaler_with_multi_pipe_plane (data_t *d) +{ +igt_display_t *display = &d->display; +igt_output_t *output1, *output2; +drmModeModeInfo *mode1, *mode2; +enum pipe pipe1, pipe2; + +cleanup_crtc (d); + +find_connected_pipe (display, false, &pipe1, &output1); +find_connected_pipe (display, true, &pipe2, &output2); + +igt_skip_on (!output1 || !output2); + +igt_output_set_pipe (output1, pipe1); +igt_output_set_pipe (output2, pipe2); + + d->plane1 =igt_output_get_plane (output1,0 );
Quoted 8 lines
Quoted 5 lines
tests/kms_plane_scaling.c +1
-0+ d->plane2 = get_num_scalers(d->devid, pipe1) >= 2 ?
igt_output_get_plane(output1, 1): NULL;tests/kms_plane_scaling.c +2
-0+ d->plane3 =igt_output_get_plane (output2,0 ); + d->plane4 = get_num_scalers(d->devid, pipe2) >= 2 ?
igt_output_get_plane(output2, 1): NULL;Maybe use DRM plane type definitions
DRM_PLANE_TYPE_OVERLAYandDRM_PLANE_TYPE_PRIMARYinstead of 0 and 1 to better indicate what plane we are referring to.
igt_output_get_plane takes an index, igt_output_get_plane_type takes those definitions. I've been bit a few times by that as well. :)
~Maarten
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Mika Kahola
Reviewed-byRe: [PATCH i-g-t v3 8/8] tests/kms_plane_scaling: test for multi pipe with scaling, v3.
Quoted 112 lines · Maarten Lankhorst
Op 16-01-18 om 14:46 schreef Mika Kahola:
Quoted 103 lines · Maarten Lankhorst
Quoted 101 lines
From: Jyoti Yadav <[email protected]>
Add a subtest to display primary and overlay planes on two connected pipes and runs scaling test on both pipes
Changes since v1:
- Commit first before trying any scaling. (Maarten)
- Use the same logic askms_cursor_legacyto find a pipe and output.
(Maarten)
- Rework test to work with how cleanup is handled. (Maarten) Changes since v2:
- Useget_num_scalers()to only use 2 scalers if available. (Maarten)Signed-off-by Jyoti Yadav <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]om>
---
tests/kms_plane_scaling.c | 93
++++++++++++++++++++++++++++++++++++++++++++++-1 file changed, 92 insertions(+), 1 deletion(-)tests/kms_plane_scaling.c +0
-0@@ -38,10 +38,12 @@ typedef struct { int image_w; int image_h;tests/kms_plane_scaling.c +2
-1-struct igt_fb fb[3 ]; +struct igt_fb fb[4 ]; +
igt_plane_t*plane1;
igt_plane_t*plane2;
igt_plane_t*plane3;tests/kms_plane_scaling.c +1
-0+igt_plane_t *plane4;}
data_t;
static intget_num_scalers(uint32_t devid, enum pipe pipe)tests/kms_plane_scaling.c +0
-0@@ -456,6 +458,92 @@test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe,
igt_outpu
igt_display_commit2(&d->display, COMMIT_ATOMIC); }
+static void find_connected_pipe(igt_display_t *display, bool second,
enum pipe *pipe,igt_output_t**output)tests/kms_plane_scaling.c +6
-0+{ +enum pipe first =PIPE_NONE ; +igt_output_t *first_output =NULL ; +bool found = false; + +for_each_pipe_with_valid_output (display, *pipe, *output){
tests/kms_plane_scaling.c +15
-0+if (first == *pipe || *output == first_output) +continue ; + +if (second) { + first = *pipe; + first_output = *output; + second = false; +continue ; + } + +return ; + } + +if (first_output) + igt_require_f(found, "No second valid outputfound\n");
tests/kms_plane_scaling.c +2
-0+else + igt_require_f(found, "No valid outputsfound\n");
tests/kms_plane_scaling.c +21
-0+} + +static void test_scaler_with_multi_pipe_plane (data_t *d) +{ +igt_display_t *display = &d->display; +igt_output_t *output1, *output2; +drmModeModeInfo *mode1, *mode2; +enum pipe pipe1, pipe2; + +cleanup_crtc (d); + +find_connected_pipe (display, false, &pipe1, &output1); +find_connected_pipe (display, true, &pipe2, &output2); + +igt_skip_on (!output1 || !output2); + +igt_output_set_pipe (output1, pipe1); +igt_output_set_pipe (output2, pipe2); + + d->plane1 =igt_output_get_plane (output1,0 ); + d->plane2 = get_num_scalers(d->devid, pipe1) >= 2 ?Quoted 8 lines
Quoted 4 lines
igt_output_get_plane(output1, 1): NULL;tests/kms_plane_scaling.c +2
-0+ d->plane3 =igt_output_get_plane (output2,0 ); + d->plane4 = get_num_scalers(d->devid, pipe2) >= 2 ?
igt_output_get_plane(output2, 1): NULL;Maybe use DRM plane type definitions
DRM_PLANE_TYPE_OVERLAYandDRM_PLANE_TYPE_PRIMARYinstead of 0 and 1 to better indicate what plane
we are referring to.
Quoted 3 lines
igt_output_get_planetakes an index,igt_output_get_plane_typetakes those definitions.
I've been bit a few times by that as well. :)
yeah, you're absolutely right. Should have read more carefully :)
You can bash my r-b.
Quoted 2 lines
~Maarten
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t v3 8/8] tests/kms_plane_scaling: test for multi pipe with scaling, v3.
Op 16-01-18 om 14:56 schreef Mika Kahola:
Quoted 111 lines · Maarten Lankhorst
Quoted 110 lines
Op 16-01-18 om 14:46 schreef Mika Kahola:
Quoted 109 lines · Maarten Lankhorst
Quoted 103 lines
From: Jyoti Yadav <[email protected]>
Add a subtest to display primary and overlay planes on two connected pipes and runs scaling test on both pipes
Changes since v1:
- Commit first before trying any scaling. (Maarten)
- Use the same logic askms_cursor_legacyto find a pipe and output.
(Maarten)
- Rework test to work with how cleanup is handled. (Maarten) Changes since v2:
- Useget_num_scalers()to only use 2 scalers if available. (Maarten)Signed-off-by Jyoti Yadav <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]om>
---
tests/kms_plane_scaling.c | 93
++++++++++++++++++++++++++++++++++++++++++++++-1 file changed, 92 insertions(+), 1 deletion(-)tests/kms_plane_scaling.c +0
-0@@ -38,10 +38,12 @@ typedef struct { int image_w; int image_h;tests/kms_plane_scaling.c +2
-1-struct igt_fb fb[3 ]; +struct igt_fb fb[4 ]; +
igt_plane_t*plane1;
igt_plane_t*plane2;
igt_plane_t*plane3;tests/kms_plane_scaling.c +1
-0+igt_plane_t *plane4;}
data_t;
static intget_num_scalers(uint32_t devid, enum pipe pipe)tests/kms_plane_scaling.c +0
-0@@ -456,6 +458,92 @@test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe,
igt_outpu
igt_display_commit2(&d->display, COMMIT_ATOMIC); }
+static void find_connected_pipe(igt_display_t *display, bool second,
enum pipe *pipe,igt_output_t**output)tests/kms_plane_scaling.c +6
-0+{ +enum pipe first =PIPE_NONE ; +igt_output_t *first_output =NULL ; +bool found = false; + +for_each_pipe_with_valid_output (display, *pipe, *output){
tests/kms_plane_scaling.c +15
-0+if (first == *pipe || *output == first_output) +continue ; + +if (second) { + first = *pipe; + first_output = *output; + second = false; +continue ; + } + +return ; + } + +if (first_output) + igt_require_f(found, "No second valid outputfound\n");
tests/kms_plane_scaling.c +2
-0+else + igt_require_f(found, "No valid outputsfound\n");
tests/kms_plane_scaling.c +21
-0+} + +static void test_scaler_with_multi_pipe_plane (data_t *d) +{ +igt_display_t *display = &d->display; +igt_output_t *output1, *output2; +drmModeModeInfo *mode1, *mode2; +enum pipe pipe1, pipe2; + +cleanup_crtc (d); + +find_connected_pipe (display, false, &pipe1, &output1); +find_connected_pipe (display, true, &pipe2, &output2); + +igt_skip_on (!output1 || !output2); + +igt_output_set_pipe (output1, pipe1); +igt_output_set_pipe (output2, pipe2); + + d->plane1 =igt_output_get_plane (output1,0 ); + d->plane2 = get_num_scalers(d->devid, pipe1) >= 2 ?
igt_output_get_plane(output1, 1): NULL;tests/kms_plane_scaling.c +2
-0+ d->plane3 =igt_output_get_plane (output2,0 ); + d->plane4 = get_num_scalers(d->devid, pipe2) >= 2 ?Quoted 1 line
igt_output_get_plane(output2, 1): NULL;Maybe use DRM plane type definitions
DRM_PLANE_TYPE_OVERLAYandDRM_PLANE_TYPE_PRIMARYinstead of 0 and 1 to better indicate what plane
we are referring to.
Quoted 8 lines
Quoted 3 lines
igt_output_get_planetakes an index,igt_output_get_plane_typetakes those definitions.
I've been bit a few times by that as well. :)yeah, you're absolutely right. Should have read more carefully :)
You can bash my r-b.
Reviewed-by Mika Kahola <[email protected]>
Thanks for review, pushed.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for kms_plane_scaling tests.
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: kms_plane_scaling tests.
URL : https://patchwork.freedesktop.org/series/36485/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 84a308022028a55903a1916fcee516aab768ed48 tests/kms_plane: Run test for all supported pixel formats, v2.
with latest DRM-Tip kernel build CI_DRM_363337eb04c6fe0c drm-tip: 2018y-01m-15d-14h-18m-36s UTC integration manifest
Testlist changes:
+igt@kms_plane_scaling@2x-scaler-multi-pipe +igt@kms_plane_scaling@pipe-a-plane-scaling +igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-a-scaler-with-rotation +igt@kms_plane_scaling@pipe-b-plane-scaling +igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-b-scaler-with-rotation +igt@kms_plane_scaling@pipe-c-plane-scaling +igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-c-scaler-with-rotation +igt@kms_plane_scaling@pipe-d-plane-scaling +igt@kms_plane_scaling@pipe-d-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-d-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-d-scaler-with-rotation +igt@kms_plane_scaling@pipe-e-plane-scaling +igt@kms_plane_scaling@pipe-e-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-e-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-e-scaler-with-rotation +igt@kms_plane_scaling@pipe-f-plane-scaling +igt@kms_plane_scaling@pipe-f-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-f-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-f-scaler-with-rotation -igt@kms_plane_scaling
Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989 +2fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:421s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:428s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:373s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:490s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:282s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:486s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:493s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:482s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:467s fi-elk-e7500 total:229 pass:172 dwarn:10 dfail:0 fail:0 skip:46 fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:279s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:514s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:394s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:404s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:447s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:414s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:464s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:498s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:452s fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:505s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:582s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:448s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:511s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:527s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:498s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:498s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:534s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:410s Blacklisted hosts: fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:573s fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:473s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_777/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for kms_plane_scaling tests.
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: kms_plane_scaling tests.
URL : https://patchwork.freedesktop.org/series/36485/
State : failure
== Summary ==
Test gem_cpu_reloc:
Subgroup full:
pass -> DMESG-FAIL (shard-hsw)shard-hsw total:2753 pass:1548 dwarn:1 dfail:1 fail:10 skip:1193 time:9048s shard-snb total:2753 pass:1319 dwarn:1 dfail:0 fail:10 skip:1423 time:7891s Blacklisted hosts: shard-apl total:2753 pass:1709 dwarn:3 dfail:0 fail:21 skip:1020 time:13610s shard-kbl total:2702 pass:1789 dwarn:3 dfail:0 fail:23 skip:885 time:10236s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_777/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for kms_plane_scaling tests.
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: kms_plane_scaling tests.
URL : https://patchwork.freedesktop.org/series/36485/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 84a308022028a55903a1916fcee516aab768ed48 tests/kms_plane: Run test for all supported pixel formats, v2.
with latest DRM-Tip kernel build CI_DRM_3635e5e5649796da drm-tip: 2018y-01m-16d-06h-56m-12s UTC integration manifest
Testlist changes:
+igt@kms_plane_scaling@2x-scaler-multi-pipe +igt@kms_plane_scaling@pipe-a-plane-scaling +igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-a-scaler-with-rotation +igt@kms_plane_scaling@pipe-b-plane-scaling +igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-b-scaler-with-rotation +igt@kms_plane_scaling@pipe-c-plane-scaling +igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-c-scaler-with-rotation +igt@kms_plane_scaling@pipe-d-plane-scaling +igt@kms_plane_scaling@pipe-d-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-d-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-d-scaler-with-rotation +igt@kms_plane_scaling@pipe-e-plane-scaling +igt@kms_plane_scaling@pipe-e-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-e-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-e-scaler-with-rotation +igt@kms_plane_scaling@pipe-f-plane-scaling +igt@kms_plane_scaling@pipe-f-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-f-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-f-scaler-with-rotation -igt@kms_plane_scaling
Test debugfs_test:
Subgroup read_all_entries:
dmesg-warn -> DMESG-FAIL (fi-elk-e7500) fdo#103989 +1
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
pass -> FAIL (fi-hsw-4770r) fdo#100368
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS (fi-kbl-r) fdo#104172
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:426s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:429s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:374s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:489s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:282s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:481s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:486s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:471s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:459s fi-elk-e7500 total:224 pass:169 dwarn:8 dfail:1 fail:0 skip:45 fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:277s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:513s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:393s fi-hsw-4770r total:288 pass:260 dwarn:0 dfail:0 fail:1 skip:27 time:393s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:451s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:414s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:462s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:501s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:455s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:505s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:583s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:429s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:512s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:530s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:486s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:476s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:442s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:524s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:404s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:570s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_778/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for kms_plane_scaling tests. (rev2)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: kms_plane_scaling tests. (rev2)
URL : https://patchwork.freedesktop.org/series/36485/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 84a308022028a55903a1916fcee516aab768ed48 tests/kms_plane: Run test for all supported pixel formats, v2.
with latest DRM-Tip kernel build CI_DRM_3635e5e5649796da drm-tip: 2018y-01m-16d-06h-56m-12s UTC integration manifest
Testlist changes:
+igt@kms_plane_scaling@2x-scaler-multi-pipe +igt@kms_plane_scaling@pipe-a-plane-scaling +igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-a-scaler-with-rotation +igt@kms_plane_scaling@pipe-b-plane-scaling +igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-b-scaler-with-rotation +igt@kms_plane_scaling@pipe-c-plane-scaling +igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-c-scaler-with-rotation +igt@kms_plane_scaling@pipe-d-plane-scaling +igt@kms_plane_scaling@pipe-d-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-d-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-d-scaler-with-rotation +igt@kms_plane_scaling@pipe-e-plane-scaling +igt@kms_plane_scaling@pipe-e-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-e-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-e-scaler-with-rotation +igt@kms_plane_scaling@pipe-f-plane-scaling +igt@kms_plane_scaling@pipe-f-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-f-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-f-scaler-with-rotation -igt@kms_plane_scaling
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:421s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:427s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:374s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:491s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:282s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:485s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:487s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:470s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:460s fi-elk-e7500 total:224 pass:168 dwarn:10 dfail:0 fail:0 skip:45 fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:278s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:514s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:394s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:399s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:458s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:418s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:465s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:498s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:455s fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:501s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:581s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:435s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:512s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:532s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:497s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:496s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:434s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:527s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:401s Blacklisted hosts: fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:565s fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:475s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_779/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for kms_plane_scaling tests. (rev2)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: kms_plane_scaling tests. (rev2)
URL : https://patchwork.freedesktop.org/series/36485/
State : failure
== Summary ==
Test kms_cursor_crc:
Subgroup cursor-128x128-suspend:
skip -> PASS (shard-snb) fdo#103880
Test gem_softpin:
Subgroup noreloc-s3:
pass -> DMESG-WARN (shard-snb) fdo#103375
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-spr-indfb-fullscreen:
fail -> PASS (shard-hsw) fdo#101623
Test gem_tiled_swapping:
Subgroup non-threaded:
incomplete -> PASS (shard-snb) fdo#104218
Test kms_busy:
Subgroup basic-modeset-a:
pass -> INCOMPLETE (shard-snb)
Test kms_flip:
Subgroup vblank-vs-modeset-suspend:
pass -> INCOMPLETE (shard-hsw)
Test pm_rc6_residency:
Subgroup rc6-accuracy:
skip -> PASS (shard-snb)
Test gem_eio:
Subgroup in-flight-contexts:
pass -> DMESG-WARN (shard-snb) fdo#104058fdo#103880 https://bugs.freedesktop.org/show_bug.cgi?id=103880
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
shard-hsw total:2746 pass:1544 dwarn:1 dfail:0 fail:10 skip:1190 time:8667s shard-snb total:2732 pass:1308 dwarn:3 dfail:0 fail:11 skip:1409 time:7633s Blacklisted hosts: shard-apl total:2675 pass:1660 dwarn:4 dfail:0 fail:20 skip:990 time:13254s shard-kbl total:2753 pass:1819 dwarn:15 dfail:1 fail:23 skip:895 time:10570s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_779/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for kms_plane_scaling tests. (rev3)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: kms_plane_scaling tests. (rev3)
URL : https://patchwork.freedesktop.org/series/36485/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 7b685d5790c1770eeac43c17d6b207a6df602985 Update NEWS, bump version to 1.21.
with latest DRM-Tip kernel build CI_DRM_3636a0ca279440c8 drm-tip: 2018y-01m-16d-10h-49m-51s UTC integration manifest
Testlist changes:
+igt@kms_plane_scaling@2x-scaler-multi-pipe +igt@kms_plane_scaling@pipe-a-plane-scaling +igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-a-scaler-with-rotation +igt@kms_plane_scaling@pipe-b-plane-scaling +igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-b-scaler-with-rotation +igt@kms_plane_scaling@pipe-c-plane-scaling +igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-c-scaler-with-rotation +igt@kms_plane_scaling@pipe-d-plane-scaling +igt@kms_plane_scaling@pipe-d-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-d-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-d-scaler-with-rotation +igt@kms_plane_scaling@pipe-e-plane-scaling +igt@kms_plane_scaling@pipe-e-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-e-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-e-scaler-with-rotation +igt@kms_plane_scaling@pipe-f-plane-scaling +igt@kms_plane_scaling@pipe-f-scaler-with-clipping-clamping +igt@kms_plane_scaling@pipe-f-scaler-with-pixel-format +igt@kms_plane_scaling@pipe-f-scaler-with-rotation -igt@kms_plane_scaling
Test debugfs_test:
Subgroup read_all_entries:
dmesg-warn -> PASS (fi-elk-e7500) fdo#103989 +1fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:422s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:427s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:379s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:490s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:282s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:485s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:488s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:471s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:459s fi-elk-e7500 total:224 pass:168 dwarn:10 dfail:0 fail:0 skip:45 fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:280s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:518s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:401s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:403s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:413s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:462s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:414s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:460s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:501s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:453s fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:502s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:579s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:434s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:511s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:529s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:494s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:483s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:433s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:522s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:402s Blacklisted hosts: fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:569s fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:476s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_782/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: warning for kms_plane_scaling tests. (rev3)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: kms_plane_scaling tests. (rev3)
URL : https://patchwork.freedesktop.org/series/36485/
State : warning
== Summary ==
Test kms_flip:
Subgroup flip-vs-fences-interruptible:
dmesg-warn -> PASS (shard-hsw) fdo#102614
Subgroup vblank-vs-dpms-suspend-interruptible:
pass -> SKIP (shard-snb)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail -> PASS (shard-snb) fdo#101623
Test perf:
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252
Test gem_tiled_swapping:
Subgroup non-threaded:
incomplete -> PASS (shard-snb) fdo#104218fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
shard-hsw total:2753 pass:1549 dwarn:1 dfail:0 fail:10 skip:1193 time:9091s shard-snb total:2753 pass:1318 dwarn:1 dfail:0 fail:10 skip:1424 time:7835s
Blacklisted hosts:
shard-apl total:2753 pass:1705 dwarn:3 dfail:0 fail:24 skip:1020 time:13567s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_782/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 25 lines · Maarten Lankhorst
This series fixes the current scaler igt test failures and enhances
kms_plane_scalingandkms_planefor covering subtests below:
- verify all the supported pixel formats in planes
- combination of rotation and scaling
- combination of tiling and scaling
- multi-plane/multi-pipe scalingI've cleaned up the previous series sent out by Vidya Srinivas, and split out some patches for clarity.
Changes since previous version:
- Fix test failures on APL.
- Fix test failures on platforms the tests should skip on.Jyoti Yadav (3):
tests/kms_plane_scaling: test scaling with tiling rotation and pixel
formats, v2.
tests/kms_plane_scaling: test scaler with clipping clamping, v3. tests/kms_plane_scaling: test for multi pipe with scaling, v3.Maarten Lankhorst (4):
tests/kms_plane_scaling: Move the actual test to its own function. tests/kms_plane_scaling: Convert from simple test to full test tests/kms_plane_scaling: Moveget_num_scalersto a function. tests/kms_plane_scaling: Clean up tests to work better withigt_kms,
Quoted 4 lines
v2.Mahesh Kumar (1):
tests/kms_plane_scaling: Fix basic scaling test, v3.
Please remember to send igt patches to the new mailing list in the future. Adding it.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx