[igt-dev] tests/kms_plane_scaling: Use existing igt_kms apis to paint the fb
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Tue Feb 20 12:35:10 UTC 2018
Op 13-02-18 om 01:29 schreef Carlos Santa:
> itg_kms already defines an api that creates and colors a new fb, let's
> use that instead of recreating that all over again.
>
> Signed-off-by: Carlos Santa <carlos.santa at intel.com>
> CC: Jyoti Yadav <jyoti.r.yadav at intel.com>
> ---
> tests/kms_plane_scaling.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index 7a5470106cd5..4408e5cec622 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -114,15 +114,6 @@ 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_put_cairo_ctx(d->drm_fd, fb, 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,
> @@ -140,9 +131,8 @@ static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane,
>
> /* 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_create_color_fb(display->drm_fd, width, height,
> + pixel_format, tiling, 0.0, 1.0, 0.0, &d->fb[0]);
> igt_plane_set_fb(plane, &d->fb[0]);
>
> /* Check min to full resolution upscaling */
Reviewed and pushed, thanks for your commit.
More information about the igt-dev
mailing list