summaryrefslogtreecommitdiff
path: root/tests/kms_plane_scaling.c
diff options
context:
space:
mode:
authorMika Kahola <mika.kahola@intel.com>2019-03-20 11:05:49 +0200
committerMika Kahola <mika.kahola@intel.com>2019-03-21 11:03:13 +0200
commit0f9c061247fb7aba21c9459f19f437927a28f32c (patch)
treef050daead632401eff60e1ffd16faff7764e766d /tests/kms_plane_scaling.c
parenta782b09d2847b1ca9484694c1f752cfb972e8400 (diff)
tests/kms_plane_scaling: Ensure minimum height and width for planar uyv formats
Let's ensure that we test with minimum width and height of 16 for all planar uyv formats. References: https://bugs.freedesktop.org/show_bug.cgi?id=110098 Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/kms_plane_scaling.c')
-rw-r--r--tests/kms_plane_scaling.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index d408a203..01f5f7c9 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -60,6 +60,19 @@ static int get_num_scalers(data_t* d, enum pipe pipe)
return 1;
}
+static bool is_planar_yuv_format(uint32_t pixelformat)
+{
+ switch (pixelformat) {
+ case DRM_FORMAT_NV12:
+ case DRM_FORMAT_P010:
+ case DRM_FORMAT_P012:
+ case DRM_FORMAT_P016:
+ return true;
+ default:
+ return false;
+ }
+}
+
static void cleanup_fbs(data_t *data)
{
int i;
@@ -136,7 +149,7 @@ 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 = 8;
- if (pixel_format == DRM_FORMAT_NV12)
+ if (is_planar_yuv_format(pixel_format))
width = height = 16;
igt_create_color_fb(display->drm_fd, width, height,
pixel_format, tiling, 0.0, 1.0, 0.0, &d->fb[0]);