summaryrefslogtreecommitdiff
path: root/tests/kms_plane_scaling.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-05-18 23:32:32 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-05-23 18:43:07 +0300
commit40bf6d03f8b73230790aa03c817d9940d0feb4ab (patch)
treed50aacfc6d41841bd6c66c166a113bf3d112f449 /tests/kms_plane_scaling.c
parentee5043fada2917aee96469e4319c6ab48267adde (diff)
tests/kms_plane_scaling: Allow clip test to fail with YUV
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ä <ville.syrjala@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #irc
Diffstat (limited to 'tests/kms_plane_scaling.c')
-rw-r--r--tests/kms_plane_scaling.c11
1 files changed, 10 insertions, 1 deletions
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