From 40bf6d03f8b73230790aa03c817d9940d0feb4ab Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Fri, 18 May 2018 23:32:32 +0300 Subject: tests/kms_plane_scaling: Allow clip test to fail with YUV MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit YUV formats require the clipped src coordinates to be suitably aligned. We'd need to very carefully compute the unclipped dst coordinates to guarantee that. That's too much hassle so let's just accept failure in case YUV formats are used. v2: Actually remove the original igt_display_commit2() (Maarten) Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst #irc --- tests/kms_plane_scaling.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/kms_plane_scaling.c') diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c index a8454205..2dd0bda5 100644 --- a/tests/kms_plane_scaling.c +++ b/tests/kms_plane_scaling.c @@ -407,7 +407,16 @@ __test_scaler_with_clipping_clamping_scenario(data_t *d, drmModeModeInfo *mode, mode->vdisplay + 200); igt_plane_set_size(d->plane2, mode->hdisplay + 100, mode->vdisplay + 100); - igt_display_commit2(&d->display, COMMIT_ATOMIC); + + /* + * Can't guarantee that the clipped coordinates are + * suitably aligned for yuv. So allow the commit to fail. + */ + if (igt_format_is_yuv(d->fb[1].drm_format) || + igt_format_is_yuv(d->fb[2].drm_format)) + igt_display_try_commit2(&d->display, COMMIT_ATOMIC); + else + igt_display_commit2(&d->display, COMMIT_ATOMIC); } static void -- cgit v1.2.3