All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: Ensure minimum height and width for planar uyv formats
@ 2019-03-20  9:22 Mika Kahola
  2019-03-20 10:57 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mika Kahola @ 2019-03-20  9:22 UTC (permalink / raw)
  To: igt-dev

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>
---
 tests/kms_plane_scaling.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

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]);
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-03-21  9:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20  9:22 [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: Ensure minimum height and width for planar uyv formats Mika Kahola
2019-03-20 10:57 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-03-20 16:21 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-20 16:35 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
2019-03-21  9:08   ` Kahola, Mika
2019-03-21  9:02 ` Juha-Pekka Heikkila

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.