[Intel-gfx] [PATCH i-g-t v2 3/9] tests/kms_plane_scaling: Fix basic scaling test, v2.
Mika Kahola
mika.kahola at intel.com
Mon Jan 15 09:01:40 UTC 2018
On Fri, 2018-01-12 at 11:21 +0100, Maarten Lankhorst wrote:
> From: Mahesh Kumar <mahesh1.kumar at intel.com>
>
> 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.
>
> 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.
>
Reviewed-by: Mika Kahola <mika.kahola at intel.com>
> Signed-off-by: Mahesh Kumar <mahesh1.kumar at intel.com>
> Signed-off-by: Jyoti Yadav <jyoti.r.yadav at intel.com>
> Signed-off-by: Vidya Srinivas <vidya.srinivas at intel.com>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
> tests/kms_plane_scaling.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index 37e05158b968..5487f89e5149 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -231,7 +231,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 +249,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 +287,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);
--
Mika Kahola - Intel OTC
More information about the Intel-gfx
mailing list