All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion
@ 2018-02-27 21:21 Ville Syrjala
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 2/8] lib: Clear packed YUV formats to black Ville Syrjala
                   ` (14 more replies)
  0 siblings, 15 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-02-27 21:21 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_aux.h |  7 +++++++
 lib/igt_fb.c  | 11 ++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index 43dd15fe3b32..7f61fc5a458b 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -228,6 +228,13 @@ void intel_require_files(uint64_t count);
 	_a > _b ? _a : _b;		\
 })
 
+#define clamp(x, min, max) ({		\
+	typeof(min) _min = (min);	\
+	typeof(max) _max = (max);	\
+	typeof(x) _x = (x);		\
+	_x < _min ? _min : _x > _max ? _max : _x;	\
+})
+
 #define igt_swap(a, b) do {	\
 	typeof(a) _tmp = (a);	\
 	(a) = (b);		\
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index ecd73053f16f..9af600896e50 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -30,6 +30,7 @@
 #include <inttypes.h>
 
 #include "drmtest.h"
+#include "igt_aux.h"
 #include "igt_fb.h"
 #include "igt_kms.h"
 #include "ioctl_wrappers.h"
@@ -1318,13 +1319,9 @@ struct fb_convert_blit_upload {
 	struct fb_blit_linear linear;
 };
 
-static uint8_t clamprgb(float val) {
-	if (val < 0)
-		return 0;
-	if (val > 255)
-		return 255;
-
-	return (uint8_t)val;
+static uint8_t clamprgb(float val)
+{
+	return clamp(val, 0.0f, 255.0f);
 }
 
 static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit)
-- 
2.13.6

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

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

* [igt-dev] [PATCH i-g-t 2/8] lib: Clear packed YUV formats to black
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
@ 2018-02-27 21:21 ` Ville Syrjala
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 3/8] lib: Don't use dumb buffers for YCbCr Ville Syrjala
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-02-27 21:21 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

As we do for NV12, let's also clear packed YUV formats to black instead
of zero. Avoids unexpected green screens.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 34 ++++++++++++++++++++++++++++++----
 1 file changed, 30 insertions(+), 4 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 9af600896e50..d9c5406cb34e 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -333,6 +333,16 @@ uint64_t igt_fb_tiling_to_mod(uint64_t tiling)
 	}
 }
 
+static void *memset32(void *s, uint32_t c, size_t n)
+{
+	uint32_t *ptr = s;
+
+	for (int i = 0; i < n; i++)
+		*ptr++ = c;
+
+	return s;
+}
+
 /* helpers to create nice-looking framebuffers */
 static int create_bo_for_fb(int fd, int width, int height,
 			    struct format_desc_struct *format,
@@ -367,6 +377,7 @@ static int create_bo_for_fb(int fd, int width, int height,
 
 		if (is_i915_device(fd)) {
 			uint8_t *ptr;
+			bool full_range = false; /* FIXME */
 
 			bo = gem_create(fd, size);
 			gem_set_tiling(fd, bo, igt_fb_mod_to_tiling(tiling), stride);
@@ -375,10 +386,25 @@ static int create_bo_for_fb(int fd, int width, int height,
 			ptr = gem_mmap__gtt(fd, bo, size, PROT_READ | PROT_WRITE);
 			igt_assert(*(uint32_t *)ptr == 0);
 
-			if (format->drm_id == DRM_FORMAT_NV12) {
-				/* component formats have a different zero point */
-				memset(ptr, 16, offsets[1]);
-				memset(ptr + offsets[1], 0x80, (height + 1)/2 * stride);
+			switch (format->drm_id) {
+			case DRM_FORMAT_NV12:
+				memset(ptr + offsets[0], full_range ? 0x00 : 0x10,
+				       calculated_stride * height);
+				memset(ptr + offsets[1], 0x80,
+				       calculated_stride * height/2);
+				break;
+			case DRM_FORMAT_YUYV:
+			case DRM_FORMAT_YVYU:
+				igt_info("clearing yuyv\n");
+				memset32(ptr, full_range ? 0x80008000 : 0x80108010,
+					 calculated_stride * height / 4);
+				break;
+			case DRM_FORMAT_UYVY:
+			case DRM_FORMAT_VYUY:
+				igt_info("clearing uyvy\n");
+				memset32(ptr, full_range ? 0x00800080 : 0x10801080,
+					 calculated_stride * height / 4);
+				break;
 			}
 			gem_munmap(ptr, size);
 
-- 
2.13.6

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

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

* [igt-dev] [PATCH i-g-t 3/8] lib: Don't use dumb buffers for YCbCr
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 2/8] lib: Clear packed YUV formats to black Ville Syrjala
@ 2018-02-27 21:21 ` Ville Syrjala
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 4/8] lib: Clean up format_desc Ville Syrjala
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-02-27 21:21 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We don't do the "black != zero" clearing for dumb buffers, so let's not
use them for YCbCr framebuffers.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index d9c5406cb34e..7b967ac6188b 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -343,6 +343,20 @@ static void *memset32(void *s, uint32_t c, size_t n)
 	return s;
 }
 
+static bool is_yuv(uint32_t format)
+{
+	switch (format) {
+	case DRM_FORMAT_NV12:
+	case DRM_FORMAT_YUYV:
+	case DRM_FORMAT_YVYU:
+	case DRM_FORMAT_UYVY:
+	case DRM_FORMAT_VYUY:
+		return true;
+	default:
+		return false;
+	}
+}
+
 /* helpers to create nice-looking framebuffers */
 static int create_bo_for_fb(int fd, int width, int height,
 			    struct format_desc_struct *format,
@@ -357,7 +371,7 @@ static int create_bo_for_fb(int fd, int width, int height,
 	if (offsets)
 		memset(offsets, 0, ARRAY_SIZE(format->plane_bpp) * sizeof(*offsets));
 
-	if (tiling || size || stride || format->planes > 1) {
+	if (tiling || size || stride || is_yuv(format->drm_id)) {
 		unsigned calculated_size, calculated_stride;
 
 		if (format->planes > 1)
-- 
2.13.6

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

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

* [igt-dev] [PATCH i-g-t 4/8] lib: Clean up format_desc
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 2/8] lib: Clear packed YUV formats to black Ville Syrjala
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 3/8] lib: Don't use dumb buffers for YCbCr Ville Syrjala
@ 2018-02-27 21:21 ` Ville Syrjala
  2018-02-28 18:44   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 5/8] lib: Add igt_matrix Ville Syrjala
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 26+ messages in thread
From: Ville Syrjala @ 2018-02-27 21:21 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Always populate the plane_bpp[] stuff, and use named initializers so
that we can actually see what's being set to what.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 66 +++++++++++++++++++++++++++++++++---------------------------
 1 file changed, 36 insertions(+), 30 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 7b967ac6188b..efb5410bc470 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -55,26 +55,35 @@
  */
 
 /* drm fourcc/cairo format maps */
-#define DF(did, cid, ...)	\
-	{ DRM_FORMAT_##did, CAIRO_FORMAT_##cid, # did, __VA_ARGS__ }
 static struct format_desc_struct {
+	const char *name;
 	uint32_t drm_id;
 	cairo_format_t cairo_id;
-	const char *name;
-	int bpp;
 	int depth;
-	int planes;
+	int num_planes;
 	int plane_bpp[4];
 } format_desc[] = {
-	DF(RGB565,	RGB16_565,	16, 16),
-	//DF(RGB888,	INVALID,	24, 24),
-	DF(XRGB8888,	RGB24,		32, 24),
-	DF(XRGB2101010,	RGB30,		32, 30),
-	DF(ARGB8888,	ARGB32,		32, 32),
-	DF(NV12,	RGB24,		32, -1, 2, {8, 16}),
+	{ .name = "RGB565", .depth = 16, .drm_id = DRM_FORMAT_RGB565,
+	  .cairo_id = CAIRO_FORMAT_RGB16_565,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "XRGB8888", .depth = 16, .drm_id = DRM_FORMAT_XRGB8888,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 32, },
+	},
+	{ .name = "XRGB2101010", .depth = 30, .drm_id = DRM_FORMAT_XRGB2101010,
+	  .cairo_id = CAIRO_FORMAT_RGB30,
+	  .num_planes = 1, .plane_bpp = { 32, },
+	},
+	{ .name = "ARGB8888", .depth = 32, .drm_id = DRM_FORMAT_ARGB8888,
+	  .cairo_id = CAIRO_FORMAT_ARGB32,
+	  .num_planes = 1, .plane_bpp = { 32, },
+	},
+	{ .name = "NV12", .depth = -1, .drm_id = DRM_FORMAT_NV12,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 2, .plane_bpp = { 8, 16, },
+	},
 };
-#undef DF
-
 #define for_each_format(f)	\
 	for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
 
@@ -193,7 +202,7 @@ static void calc_fb_size_planar(int fd, int width, int height,
 
 	*size_ret = 0;
 
-	for (plane = 0; plane < format->planes; plane++) {
+	for (plane = 0; plane < format->num_planes; plane++) {
 		unsigned plane_stride;
 
 		igt_get_fb_tile_size(fd, tiling, format->plane_bpp[plane], &tile_width, &tile_height);
@@ -203,7 +212,7 @@ static void calc_fb_size_planar(int fd, int width, int height,
 			stride = plane_stride;
 	}
 
-	for (plane = 0; plane < format->planes; plane++) {
+	for (plane = 0; plane < format->num_planes; plane++) {
 		if (offsets)
 			offsets[plane] = *size_ret;
 
@@ -224,9 +233,9 @@ static void calc_fb_size_packed(int fd, int width, int height,
 				unsigned *size_ret, unsigned *stride_ret)
 {
 	unsigned int tile_width, tile_height, stride, size;
-	int byte_width = width * (format->bpp / 8);
+	int byte_width = width * (format->plane_bpp[0] / 8);
 
-	igt_get_fb_tile_size(fd, tiling, format->bpp, &tile_width, &tile_height);
+	igt_get_fb_tile_size(fd, tiling, format->plane_bpp[0], &tile_width, &tile_height);
 
 	if (tiling != LOCAL_DRM_FORMAT_MOD_NONE &&
 	    intel_gen(intel_get_drm_devid(fd)) <= 3) {
@@ -275,7 +284,7 @@ void igt_calc_fb_size(int fd, int width, int height, uint32_t drm_format, uint64
 	struct format_desc_struct *format = lookup_drm_format(drm_format);
 	igt_assert(format);
 
-	if (format->planes > 1)
+	if (format->num_planes > 1)
 		calc_fb_size_planar(fd, width, height, format, tiling, size_ret, stride_ret, NULL);
 	else
 		calc_fb_size_packed(fd, width, height, format, tiling, size_ret, stride_ret);
@@ -374,7 +383,7 @@ static int create_bo_for_fb(int fd, int width, int height,
 	if (tiling || size || stride || is_yuv(format->drm_id)) {
 		unsigned calculated_size, calculated_stride;
 
-		if (format->planes > 1)
+		if (format->num_planes > 1)
 			calc_fb_size_planar(fd, width, height, format, tiling,
 					    &calculated_size, &calculated_stride, offsets);
 		else
@@ -439,8 +448,9 @@ static int create_bo_for_fb(int fd, int width, int height,
 		if (is_dumb)
 			*is_dumb = true;
 
-		return kmstest_dumb_create(fd, width, height, format->bpp, stride_ret,
-					   size_ret);
+		return kmstest_dumb_create(fd, width, height,
+					   format->plane_bpp[0],
+					   stride_ret, size_ret);
 	}
 }
 
@@ -842,7 +852,7 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 
 		handles[0] = fb->gem_handle;
 		pitches[0] = fb->stride;
-		for (i = 0; i < f->planes; i++) {
+		for (i = 0; i < f->num_planes; i++) {
 			handles[i] = fb->gem_handle;
 			pitches[i] = fb->stride;
 		}
@@ -858,13 +868,9 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 	fb->drm_format = format;
 	fb->fb_id = fb_id;
 	fb->fd = fd;
-	fb->num_planes = f->planes ?: 1;
-	fb->plane_bpp[0] = f->bpp;
-	fb->plane_height[0] = height;
-	fb->plane_width[0] = width;
+	fb->num_planes = f->num_planes;
 
-	/* if f->planes is set, then plane_bpp is valid too so use that. */
-	for (i = 0; i < f->planes; i++) {
+	for (i = 0; i < f->num_planes; i++) {
 		fb->plane_bpp[i] = f->plane_bpp[i];
 		fb->plane_height[i] = planar_height(f, height, i);
 		fb->plane_width[i] = planar_width(f, width, i);
@@ -1683,7 +1689,7 @@ uint32_t igt_bpp_depth_to_drm_format(int bpp, int depth)
 	struct format_desc_struct *f;
 
 	for_each_format(f)
-		if (f->bpp == bpp && f->depth == depth)
+		if (f->plane_bpp[0] == bpp && f->depth == depth)
 			return f->drm_id;
 
 
@@ -1706,7 +1712,7 @@ uint32_t igt_drm_format_to_bpp(uint32_t drm_format)
 	igt_assert_f(f, "can't find a bpp format for %08x (%s)\n",
 		     drm_format, igt_format_str(drm_format));
 
-	return f->bpp;
+	return f->plane_bpp[0];
 }
 
 /**
-- 
2.13.6

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

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

* [igt-dev] [PATCH i-g-t 5/8] lib: Add igt_matrix
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (2 preceding siblings ...)
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 4/8] lib: Clean up format_desc Ville Syrjala
@ 2018-02-27 21:21 ` Ville Syrjala
  2018-02-27 21:33   ` Chris Wilson
  2018-02-28 17:36   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 6/8] lib: Add igt_color_encoding Ville Syrjala
                   ` (10 subsequent siblings)
  14 siblings, 2 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-02-27 21:21 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add a helper library for basic matrix math.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/Makefile.sources |   2 +
 lib/igt_matrix.c     | 156 +++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_matrix.h     |  56 ++++++++++++++++++
 lib/meson.build      |   1 +
 4 files changed, 215 insertions(+)
 create mode 100644 lib/igt_matrix.c
 create mode 100644 lib/igt_matrix.h

diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index 5b13ef8896c0..622d73d28fcd 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -26,6 +26,8 @@ lib_source_list =	 	\
 	igt_gt.h		\
 	igt_gvt.c		\
 	igt_gvt.h		\
+	igt_matrix.c		\
+	igt_matrix.h		\
 	igt_primes.c		\
 	igt_primes.h		\
 	igt_rand.c		\
diff --git a/lib/igt_matrix.c b/lib/igt_matrix.c
new file mode 100644
index 000000000000..974dbba076c5
--- /dev/null
+++ b/lib/igt_matrix.c
@@ -0,0 +1,156 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "igt_core.h"
+#include "igt_matrix.h"
+
+/**
+ * SECTION:igt_matrix
+ * @short_description: Matrix math library
+ * @title: Matrix
+ * @include: igt.h
+ *
+ * This library contains helper functions for basic matrix math.
+ * The library operates on #igt_mat4 and #igt_vec4 structures.
+ */
+
+/**
+ * igt_matrix_print:
+ * @m: the matrix
+ *
+ * Print out the matrix elements.
+ */
+void igt_matrix_print(const struct igt_mat4 *m)
+{
+	for (int row = 0; row < 4; row++) {
+		igt_info("|");
+		for (int col = 0; col < 4; col++) {
+			igt_info("%4.4f,", m->d[col * 4 + row]);
+		}
+		igt_info("|\n");
+	}
+}
+
+/**
+ * igt_matrix_identity:
+ *
+ * Returns:
+ * An identity matrix.
+ */
+struct igt_mat4 igt_matrix_identity(void)
+{
+	struct igt_mat4 ret = {
+		.d[0 * 4 + 0] = 1.0f,
+		.d[1 * 4 + 1] = 1.0f,
+		.d[2 * 4 + 2] = 1.0f,
+		.d[3 * 4 + 3] = 1.0f,
+	};
+
+	return ret;
+}
+
+/**
+ * igt_matrix_scale:
+ *
+ * Returns:
+ * An scaling matrix.
+ */
+struct igt_mat4 igt_matrix_scale(float x, float y, float z)
+{
+	struct igt_mat4 ret = {
+		.d[0 * 4 + 0] = x,
+		.d[1 * 4 + 1] = y,
+		.d[2 * 4 + 2] = z,
+		.d[3 * 4 + 3] = 1.0f,
+	};
+
+	return ret;
+}
+
+/**
+ * igt_matrix_translate:
+ *
+ * Returns:
+ * A translation matrix.
+ */
+struct igt_mat4 igt_matrix_translate(float x, float y, float z)
+{
+	struct igt_mat4 ret = {
+		.d[0 * 4 + 0] = 1.0f,
+		.d[1 * 4 + 1] = 1.0f,
+		.d[2 * 4 + 2] = 1.0f,
+		.d[3 * 4 + 0] = x,
+		.d[3 * 4 + 1] = y,
+		.d[3 * 4 + 2] = z,
+		.d[3 * 4 + 3] = 1.0f,
+	};
+
+	return ret;
+}
+
+/**
+ * igt_matrix_transform:
+ *
+ * Transform the vector @v by the matrix @m. @m is on the left,
+ * @v on the right.
+ *
+ * Returns:
+ * The transformed vector.
+ */
+struct igt_vec4 igt_matrix_transform(const struct igt_mat4 *m,
+				     const struct igt_vec4 *v)
+{
+	struct igt_vec4 ret = {};
+
+	for (int row = 0; row < 4; row++) {
+		for (int i = 0; i < 4; i++) {
+			ret.d[row] += m->d[i * 4 + row] * v->d[i];
+		}
+	}
+
+	return ret;
+}
+
+/**
+ * igt_matrix_multiply:
+ *
+ * Multiply two matrices together. @a is on the left,
+ * @b on the right.
+ *
+ * Returns:
+ * The resulting matrix.
+ */
+struct igt_mat4 igt_matrix_multiply(const struct igt_mat4 *a,
+				    const struct igt_mat4 *b)
+{
+	struct igt_mat4 ret = {};
+
+	for (int col = 0; col < 4; col++) {
+		for (int row = 0; row < 4; row++) {
+			for (int i = 0; i < 4; i++)
+				ret.d[col * 4 + row] += a->d[i * 4 + row] * b->d[col * 4 + i];
+		}
+	}
+
+	return ret;
+}
diff --git a/lib/igt_matrix.h b/lib/igt_matrix.h
new file mode 100644
index 000000000000..33acb815197b
--- /dev/null
+++ b/lib/igt_matrix.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __IGT_MATRIX_H__
+#define __IGT_MATRIX_H__
+
+/**
+ * igt_vec4:
+ * @d: vector elements
+ *
+ * A 4 element column vector (4x1 matrix).
+ */
+struct igt_vec4 {
+	float d[4];
+};
+
+/**
+ * igt_mat4:
+ * @d: matrix elements
+ *
+ * A 4x4 column major matrix.
+ */
+struct igt_mat4 {
+	float d[16];
+};
+
+void igt_matrix_print(const struct igt_mat4 *m);
+struct igt_mat4 igt_matrix_identity(void);
+struct igt_mat4 igt_matrix_scale(float x, float y, float z);
+struct igt_mat4 igt_matrix_translate(float x, float y, float z);
+struct igt_vec4 igt_matrix_transform(const struct igt_mat4 *m,
+				     const struct igt_vec4 *v);
+struct igt_mat4 igt_matrix_multiply(const struct igt_mat4 *a,
+				    const struct igt_mat4 *b);
+
+#endif /* __IGT_MATRIX_H__ */
diff --git a/lib/meson.build b/lib/meson.build
index a9e53689b35d..8bf6f4433f64 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -9,6 +9,7 @@ lib_sources = [
 	'igt_aux.c',
 	'igt_gt.c',
 	'igt_gvt.c',
+	'igt_matrix.c',
 	'igt_primes.c',
 	'igt_rand.c',
 	'igt_stats.c',
-- 
2.13.6

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

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

* [igt-dev] [PATCH i-g-t 6/8] lib: Add igt_color_encoding
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (3 preceding siblings ...)
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 5/8] lib: Add igt_matrix Ville Syrjala
@ 2018-02-27 21:21 ` Ville Syrjala
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 7/8] lib: Use igt_matrix for ycbcr<->rgb conversion Ville Syrjala
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-02-27 21:21 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add some helpers for generating rgb<->ycbcr conversion matrices.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/Makefile.sources     |   2 +
 lib/igt_color_encoding.c | 148 +++++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_color_encoding.h |  45 ++++++++++++++
 lib/meson.build          |   1 +
 4 files changed, 196 insertions(+)
 create mode 100644 lib/igt_color_encoding.c
 create mode 100644 lib/igt_color_encoding.h

diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index 622d73d28fcd..b8e9c0813a7e 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -21,6 +21,8 @@ lib_source_list =	 	\
 	igt_device.h		\
 	igt_aux.c		\
 	igt_aux.h		\
+	igt_color_encoding.c	\
+	igt_color_encoding.h	\
 	igt_edid_template.h	\
 	igt_gt.c		\
 	igt_gt.h		\
diff --git a/lib/igt_color_encoding.c b/lib/igt_color_encoding.c
new file mode 100644
index 000000000000..a36e29c88b5a
--- /dev/null
+++ b/lib/igt_color_encoding.c
@@ -0,0 +1,148 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "igt_color_encoding.h"
+#include "igt_matrix.h"
+
+const struct igt_color_encoding igt_ycbcr_bt601 = {
+	.name = "ITU-R BT.601 YCbCr",
+	.kr = .299f, .kb = .114f,
+};
+
+const struct igt_color_encoding igt_ycbcr_bt709 = {
+	.name = "ITU-R BT.709 YCbCr",
+	.kr = .2126f, .kb = .0722f,
+};
+
+const struct igt_color_encoding igt_ycbcr_bt2020 = {
+	.name = "ITU-R BT.2020 YCbCr",
+	.kr = .2627f, .kb = .0593f,
+};
+
+static struct igt_mat4 rgb_to_ycbcr_matrix(const struct igt_color_encoding *e)
+{
+	float kr, kg, kb;
+
+	kr = e->kr;
+	kb = e->kb;
+	kg = 1.0f - kr - kb;
+
+	struct igt_mat4 ret = {
+		.d[0 * 4 + 0] = kr,
+		.d[1 * 4 + 0] = kg,
+		.d[2 * 4 + 0] = kb,
+
+		.d[0 * 4 + 1] = -kr / (1.0f - kb),
+		.d[1 * 4 + 1] = -kg / (1.0f - kb),
+		.d[2 * 4 + 1] = 1.0f,
+
+		.d[0 * 4 + 2] = 1.0f,
+		.d[1 * 4 + 2] = -kg / (1.0f - kr),
+		.d[2 * 4 + 2] = -kb / (1.0f - kr),
+
+		.d[3 * 4 + 3] = 1.0f,
+	};
+
+	return ret;
+}
+
+static struct igt_mat4 ycbcr_to_rgb_matrix(const struct igt_color_encoding *e)
+{
+	float kr, kg, kb;
+
+	kr = e->kr;
+	kb = e->kb;
+	kg = 1.0f - kr - kb;
+
+	struct igt_mat4 ret = {
+		.d[0 * 4 + 0] = 1.0f,
+		.d[1 * 4 + 0] = 0.0f,
+		.d[2 * 4 + 0] = 1.0 - kr,
+
+		.d[0 * 4 + 1] = 1.0f,
+		.d[1 * 4 + 1] = -(1.0 - kb) * kb / kg,
+		.d[2 * 4 + 1] = -(1.0 - kr) * kr / kg,
+
+		.d[0 * 4 + 2] = 1.0f,
+		.d[1 * 4 + 2] = 1.0 - kb,
+		.d[2 * 4 + 2] = 0.0f,
+
+		.d[3 * 4 + 3] = 1.0f,
+	};
+
+	return ret;
+}
+
+static struct igt_mat4 ycbcr_limited_to_full_range_matrix(void)
+{
+	struct igt_mat4 t = igt_matrix_translate(-16.0f,
+						 -128.0f,
+						 -128.0f);
+	struct igt_mat4 s = igt_matrix_scale(255.0f / (235.0f - 16.0f),
+					     255.0f / (240.0f - 128.0f),
+					     255.0f / (240.0f - 128.0f));
+
+	return igt_matrix_multiply(&s, &t);
+}
+
+static struct igt_mat4 ycbcr_full_to_limited_range_matrix(void)
+{
+	struct igt_mat4 s = igt_matrix_scale((235.0f - 16.0f) / 255.0f,
+					     (240.0f - 128.0f) / 255.0f,
+					     (240.0f - 128.0f) / 255.0f);
+	struct igt_mat4 t = igt_matrix_translate(16.0f,
+						 128.0f,
+						 128.0f);
+
+	return igt_matrix_multiply(&t, &s);
+}
+
+struct igt_mat4 igt_ycbcr_to_rgb_matrix(const struct igt_color_encoding *e,
+					bool full_range)
+{
+	struct igt_mat4 c, r;
+
+	c = ycbcr_to_rgb_matrix(e);
+
+	if (full_range)
+		r = igt_matrix_translate(0.0f, -128.0f, -128.0f);
+	else
+		r = ycbcr_limited_to_full_range_matrix();
+
+	return igt_matrix_multiply(&c, &r);
+}
+
+struct igt_mat4 igt_rgb_to_ycbcr_matrix(const struct igt_color_encoding *e,
+					bool full_range)
+{
+	struct igt_mat4 c, r;
+
+	c = rgb_to_ycbcr_matrix(e);
+
+	if (full_range)
+		r = igt_matrix_translate(0.0f, 128.0f, 128.0f);
+	else
+		r = ycbcr_full_to_limited_range_matrix();
+
+	return igt_matrix_multiply(&r, &c);
+}
diff --git a/lib/igt_color_encoding.h b/lib/igt_color_encoding.h
new file mode 100644
index 000000000000..e8c6a3cc8bbe
--- /dev/null
+++ b/lib/igt_color_encoding.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __IGT_COLOR_ENCODING_H__
+#define __IGT_COLOR_ENCODING_H__
+
+#include <stdbool.h>
+
+#include "igt_matrix.h"
+
+struct igt_color_encoding {
+	const char *name;
+	float kr, kb;
+};
+
+const struct igt_color_encoding igt_ycbcr_bt709;
+const struct igt_color_encoding igt_ycbcr_bt601;
+const struct igt_color_encoding igt_ycbcr_bt2020;
+
+struct igt_mat4 igt_ycbcr_to_rgb_matrix(const struct igt_color_encoding *e,
+					bool full_range);
+struct igt_mat4 igt_rgb_to_ycbcr_matrix(const struct igt_color_encoding *e,
+					bool full_range);
+
+#endif /* __IGT_COLOR_ENCODING_H__ */
diff --git a/lib/meson.build b/lib/meson.build
index 8bf6f4433f64..0d4cd2ba9cb0 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -4,6 +4,7 @@ lib_sources = [
 	'i915/gem_scheduler.c',
 	'i915/gem_submission.c',
 	'i915/gem_ring.c',
+	'igt_color_encoding.c',
 	'igt_debugfs.c',
 	'igt_device.c',
 	'igt_aux.c',
-- 
2.13.6

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

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

* [igt-dev] [PATCH i-g-t 7/8] lib: Use igt_matrix for ycbcr<->rgb conversion
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (4 preceding siblings ...)
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 6/8] lib: Add igt_color_encoding Ville Syrjala
@ 2018-02-27 21:21 ` Ville Syrjala
  2018-03-02  8:35   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 8/8] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 26+ messages in thread
From: Ville Syrjala @ 2018-02-27 21:21 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Probably horribly inefficient (not that the original code tried to be
particularly efficient), but at least this is now pretty generic so
it'll be super easy to add other color encodings and whatnot.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 135 +++++++++++++++++++++++++++++------------------------------
 1 file changed, 67 insertions(+), 68 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index efb5410bc470..56dcf6d38e7c 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -33,6 +33,8 @@
 #include "igt_aux.h"
 #include "igt_fb.h"
 #include "igt_kms.h"
+#include "igt_color_encoding.h"
+#include "igt_matrix.h"
 #include "ioctl_wrappers.h"
 #include "intel_chipset.h"
 
@@ -1377,6 +1379,9 @@ static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_uplo
 	uint8_t *rgb24 = blit->rgb24.map;
 	unsigned rgb24_stride = blit->rgb24.stride, planar_stride = blit->linear.stride;
 	uint8_t *buf = malloc(blit->linear.size);
+	bool full_range = false; /* FIXME */
+	const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
+	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(e, full_range);
 
 	/*
 	 * Reading from the BO is awfully slow because of lack of read caching,
@@ -1390,27 +1395,27 @@ static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_uplo
 	/* Convert from limited color range BT.601 */
 	for (i = 0; i < fb->height / 2; i++) {
 		for (j = 0; j < fb->width; j++) {
-			float r_, g_, b_, y0, y1, cb, cr;
 			/* Convert 1x2 pixel blocks */
+			struct igt_vec4 yuv0, yuv1;
+			struct igt_vec4 rgb0, rgb1;
 
-			y0 = 1.164f * (y[j] - 16.f);
-			y1 = 1.164f * (y[j + planar_stride] - 16.f);
+			yuv0.d[0] = y[j];
+			yuv1.d[0] = y[j + planar_stride];
+			yuv0.d[1] = yuv1.d[1] = uv[j & ~1];
+			yuv0.d[2] = yuv1.d[2] = uv[j | 1];
+			yuv0.d[3] = yuv1.d[3] = 1.0f;
 
-			cb = uv[j & ~1] - 128.f;
-			cr = uv[j | 1] - 128.f;
+			rgb0 = igt_matrix_transform(&m, &yuv0);
+			rgb1 = igt_matrix_transform(&m, &yuv1);
 
-			r_ =  0.000f * cb +  1.596f * cr;
-			g_ = -0.392f * cb + -0.813f * cr;
-			b_ =  2.017f * cb +  0.000f * cr;
+			rgb24[j * 4 + 2] = clamprgb(rgb0.d[0]);
+			rgb24[j * 4 + 2 + rgb24_stride] = clamprgb(rgb1.d[0]);
 
-			rgb24[j * 4 + 2] = clamprgb(y0 + r_);
-			rgb24[j * 4 + 2 + rgb24_stride] = clamprgb(y1 + r_);
+			rgb24[j * 4 + 1] = clamprgb(rgb0.d[1]);
+			rgb24[j * 4 + 1 + rgb24_stride] = clamprgb(rgb1.d[1]);
 
-			rgb24[j * 4 + 1] = clamprgb(y0 + g_);
-			rgb24[j * 4 + 1 + rgb24_stride] = clamprgb(y1 + g_);
-
-			rgb24[j * 4] = clamprgb(y0 + b_);
-			rgb24[j * 4 + rgb24_stride] = clamprgb(y1 + b_);
+			rgb24[j * 4 + 0] = clamprgb(rgb0.d[2]);
+			rgb24[j * 4 + 0 + rgb24_stride] = clamprgb(rgb1.d[2]);
 		}
 
 		rgb24 += 2 * rgb24_stride;
@@ -1421,20 +1426,20 @@ static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_uplo
 	if (fb->height & 1) {
 		/* Convert last row */
 		for (j = 0; j < fb->width; j++) {
-			float r_, g_, b_, y0, cb, cr;
 			/* Convert single pixel */
+			struct igt_vec4 yuv;
+			struct igt_vec4 rgb;
 
-			cb = uv[j & ~1] - 128.f;
-			cr = uv[j | 1] - 128.f;
+			yuv.d[0] = y[j];
+			yuv.d[1] = uv[j & ~1];
+			yuv.d[2] = uv[j | 1];
+			yuv.d[3] = 1.0f;
 
-			y0 = 1.164f * (y[j] - 16.f);
-			r_ =  0.000f * cb +  1.596f * cr;
-			g_ = -0.392f * cb + -0.813f * cr;
-			b_ =  2.017f * cb +  0.000f * cr;
+			rgb = igt_matrix_transform(&m, &yuv);
 
-			rgb24[j * 4 + 2] = clamprgb(y0 + r_);
-			rgb24[j * 4 + 1] = clamprgb(y0 + g_);
-			rgb24[j * 4] = clamprgb(y0 + b_);
+			rgb24[j * 4 + 2] = clamprgb(rgb.d[0]);
+			rgb24[j * 4 + 1] = clamprgb(rgb.d[1]);
+			rgb24[j * 4] = clamprgb(rgb.d[2]);
 		}
 	}
 
@@ -1449,65 +1454,59 @@ static void convert_rgb24_to_nv12(struct igt_fb *fb, struct fb_convert_blit_uplo
 	const uint8_t *rgb24 = blit->rgb24.map;
 	unsigned rgb24_stride = blit->rgb24.stride;
 	unsigned planar_stride = blit->linear.stride;
+	bool full_range = false; /* FIXME */
+	const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
+	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(e, full_range);
 
 	igt_assert_f(fb->drm_format == DRM_FORMAT_NV12,
 		     "Conversion not implemented for !NV12 planar formats\n");
 
-	for (i = 0; i < fb->plane_height[0]; i++) {
-		/* Use limited color range BT.601 */
+	for (i = 0; i < fb->height / 2; i++) {
+		for (j = 0; j < fb->width; j++) {
+			struct igt_vec4 rgb0, rgb1;
+			struct igt_vec4 yuv0, yuv1;
 
-		for (j = 0; j < fb->plane_width[0]; j++) {
-			float yf = 0.257f * rgb24[j * 4 + 2] +
-				   0.504f * rgb24[j * 4 + 1] +
-				   0.098f * rgb24[j * 4] + 16;
+			rgb0.d[0] = rgb24[j * 4 + 2];
+			rgb0.d[1] = rgb24[j * 4 + 1];
+			rgb0.d[2] = rgb24[j * 4 + 0];
+			rgb0.d[3] = 1.0f;
 
-			y[j] = (uint8_t)yf;
-		}
+			rgb1.d[0] = rgb24[j * 4 + 2 + rgb24_stride];
+			rgb1.d[1] = rgb24[j * 4 + 1 + rgb24_stride];
+			rgb1.d[2] = rgb24[j * 4 + 0 + rgb24_stride];
+			rgb1.d[3] = 1.0f;
 
-		rgb24 += rgb24_stride;
-		y += planar_stride;
-	}
+			yuv0 = igt_matrix_transform(&m, &rgb0);
+			yuv1 = igt_matrix_transform(&m, &rgb1);
 
-	rgb24 = blit->rgb24.map;
+			y[j] = yuv0.d[0];
+			y[j + planar_stride] = yuv1.d[0];
 
-	for (i = 0; i < fb->height / 2; i++) {
-		for (j = 0; j < fb->plane_width[1]; j++) {
-			/*
-			 * Pixel center for Cb'Cr' is between the left top and
-			 * bottom pixel in a 2x2 block, so take the average.
-			 */
-			float uf = -0.148f/2 * rgb24[j * 8 + 2] +
-				   -0.148f/2 * rgb24[j * 8 + 2 + rgb24_stride] +
-				   -0.291f/2 * rgb24[j * 8 + 1] +
-				   -0.291f/2 * rgb24[j * 8 + 1 + rgb24_stride] +
-				    0.439f/2 * rgb24[j * 8] +
-				    0.439f/2 * rgb24[j * 8 + rgb24_stride] + 128;
-			float vf =  0.439f/2 * rgb24[j * 8 + 2] +
-				    0.439f/2 * rgb24[j * 8 + 2 + rgb24_stride] +
-				   -0.368f/2 * rgb24[j * 8 + 1] +
-				   -0.368f/2 * rgb24[j * 8 + 1 + rgb24_stride] +
-				   -0.071f/2 * rgb24[j * 8] +
-				   -0.071f/2 * rgb24[j * 8 + rgb24_stride] + 128;
-			uv[j * 2] = (uint8_t)uf;
-			uv[j * 2 + 1] = (uint8_t)vf;
+			uv[j * 2 + 0] = (yuv0.d[1] + yuv1.d[1]) / 2.0f;
+			uv[j * 2 + 1] = (yuv0.d[2] + yuv1.d[2]) / 2.0f;
 		}
 
 		rgb24 += 2 * rgb24_stride;
+		y += 2 * planar_stride;
 		uv += planar_stride;
 	}
 
 	/* Last row cannot be interpolated between 2 pixels, take the single value */
-	if (i < fb->plane_height[1]) {
-		for (j = 0; j < fb->plane_width[1]; j++) {
-			float uf = -0.148f * rgb24[j * 8 + 2] +
-				   -0.291f * rgb24[j * 8 + 1] +
-				    0.439f * rgb24[j * 8] + 128;
-			float vf =  0.439f * rgb24[j * 8 + 2] +
-				   -0.368f * rgb24[j * 8 + 1] +
-				   -0.071f * rgb24[j * 8] + 128;
-
-			uv[j * 2] = (uint8_t)uf;
-			uv[j * 2 + 1] = (uint8_t)vf;
+	if (fb->height & 1) {
+		for (j = 0; j < fb->width; j++) {
+			struct igt_vec4 rgb;
+			struct igt_vec4 yuv;
+
+			rgb.d[0] = rgb24[j * 4 + 2];
+			rgb.d[1] = rgb24[j * 4 + 1];
+			rgb.d[2] = rgb24[j * 4 + 0];
+			rgb.d[3] = 1.0f;
+
+			yuv = igt_matrix_transform(&m, &rgb);
+
+			y[j] = yuv.d[0];
+			uv[j * 2 + 0] = yuv.d[1];
+			uv[j * 2 + 1] = yuv.d[2];
 		}
 	}
 }
-- 
2.13.6

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

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

* [igt-dev] [PATCH i-g-t 8/8] lib: Add support for rendering into packed YCbCr framebuffers
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (5 preceding siblings ...)
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 7/8] lib: Use igt_matrix for ycbcr<->rgb conversion Ville Syrjala
@ 2018-02-27 21:21 ` Ville Syrjala
  2018-02-27 21:36   ` Chris Wilson
                     ` (2 more replies)
  2018-02-27 23:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Patchwork
                   ` (7 subsequent siblings)
  14 siblings, 3 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-02-27 21:21 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reuse the __convert() cairo stuff to support packed YCbCr framebuffers.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 182 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 172 insertions(+), 10 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 56dcf6d38e7c..20c7788f5f5d 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -85,6 +85,22 @@ static struct format_desc_struct {
 	  .cairo_id = CAIRO_FORMAT_RGB24,
 	  .num_planes = 2, .plane_bpp = { 8, 16, },
 	},
+	{ .name = "YUYV", .depth = -1, .drm_id = DRM_FORMAT_YUYV,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "YVYU", .depth = -1, .drm_id = DRM_FORMAT_YVYU,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "UYVY", .depth = -1, .drm_id = DRM_FORMAT_UYVY,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "VYUY", .depth = -1, .drm_id = DRM_FORMAT_VYUY,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
 };
 #define for_each_format(f)	\
 	for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
@@ -1511,16 +1527,151 @@ static void convert_rgb24_to_nv12(struct igt_fb *fb, struct fb_convert_blit_uplo
 	}
 }
 
+/* { Y0, U, Y1, V } */
+static const unsigned char swizzle_yuyv[] = { 0, 1, 2, 3 };
+static const unsigned char swizzle_yvyu[] = { 0, 3, 2, 1 };
+static const unsigned char swizzle_uyvy[] = { 1, 0, 3, 2 };
+static const unsigned char swizzle_vyuy[] = { 1, 2, 3, 0 };
+
+static const unsigned char *yuyv_swizzle(uint32_t format)
+{
+	switch (format) {
+	default:
+	case DRM_FORMAT_YUYV:
+		return swizzle_yuyv;
+	case DRM_FORMAT_YVYU:
+		return swizzle_yvyu;
+	case DRM_FORMAT_UYVY:
+		return swizzle_uyvy;
+	case DRM_FORMAT_VYUY:
+		return swizzle_vyuy;
+	}
+}
+
+static void convert_yuyv_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit,
+				  const unsigned char swz[4])
+{
+	int i, j;
+	const uint8_t *yuyv;
+	uint8_t *rgb24 = blit->rgb24.map;
+	unsigned rgb24_stride = blit->rgb24.stride, yuyv_stride = blit->linear.stride;
+	uint8_t *buf = malloc(blit->linear.size);
+	bool full_range = false; /* FIXME */
+	const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
+	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(e, full_range);
+
+	igt_assert((fb->width & 1) == 0);
+
+	/*
+	 * Reading from the BO is awfully slow because of lack of read caching,
+	 * it's faster to copy the whole BO to a temporary buffer and convert
+	 * from there.
+	 */
+	memcpy(buf, blit->linear.map, blit->linear.size);
+	yuyv = buf;
+
+	/* Convert from limited color range BT.601 */
+	for (i = 0; i < fb->height; i++) {
+		for (j = 0; j < fb->width / 2; j++) {
+			/* Convert 2x1 pixel blocks */
+			struct igt_vec4 yuv0, yuv1;
+			struct igt_vec4 rgb0, rgb1;
+
+			yuv0.d[0] = yuyv[j * 4 + swz[0]];
+			yuv1.d[0] = yuyv[j * 4 + swz[2]];
+			yuv0.d[1] = yuv1.d[1] = yuyv[j * 4 + swz[1]];
+			yuv0.d[2] = yuv1.d[2] = yuyv[j * 4 + swz[3]];
+			yuv0.d[3] = yuv1.d[3] = 1.0f;
+
+			rgb0 = igt_matrix_transform(&m, &yuv0);
+			rgb1 = igt_matrix_transform(&m, &yuv1);
+
+			rgb24[j * 8 + 2] = clamprgb(rgb0.d[0]);
+			rgb24[j * 8 + 1] = clamprgb(rgb0.d[1]);
+			rgb24[j * 8 + 0] = clamprgb(rgb0.d[2]);
+
+			rgb24[j * 8 + 4 + 2] = clamprgb(rgb1.d[0]);
+			rgb24[j * 8 + 4 + 1] = clamprgb(rgb1.d[1]);
+			rgb24[j * 8 + 4 + 0] = clamprgb(rgb1.d[2]);
+		}
+
+		rgb24 += rgb24_stride;
+		yuyv += yuyv_stride;
+	}
+
+	free(buf);
+}
+
+static void convert_rgb24_to_yuyv(struct igt_fb *fb, struct fb_convert_blit_upload *blit,
+				  const unsigned char swz[4])
+{
+	int i, j;
+	uint8_t *yuyv = blit->linear.map;
+	const uint8_t *rgb24 = blit->rgb24.map;
+	unsigned rgb24_stride = blit->rgb24.stride;
+	unsigned yuyv_stride = blit->linear.stride;
+	bool full_range = false; /* FIXME */
+	const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
+	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(e, full_range);
+
+	igt_assert((fb->width & 1) == 0);
+
+	igt_assert_f(fb->drm_format == DRM_FORMAT_YUYV ||
+		     fb->drm_format == DRM_FORMAT_YVYU ||
+		     fb->drm_format == DRM_FORMAT_UYVY ||
+		     fb->drm_format == DRM_FORMAT_VYUY,
+		     "Conversion not implemented for !YUYV planar formats\n");
+
+	for (i = 0; i < fb->height; i++) {
+		for (j = 0; j < fb->width / 2; j++) {
+			/* Convert 2x1 pixel blocks */
+			struct igt_vec4 rgb0, rgb1;
+			struct igt_vec4 yuv0, yuv1;
+
+			rgb0.d[0] = rgb24[j * 8 + 2];
+			rgb0.d[1] = rgb24[j * 8 + 1];
+			rgb0.d[2] = rgb24[j * 8 + 0];
+			rgb0.d[3] = 1.0f;
+
+			rgb1.d[0] = rgb24[j * 8 + 4 + 2];
+			rgb1.d[1] = rgb24[j * 8 + 4 + 1];
+			rgb1.d[2] = rgb24[j * 8 + 4 + 0];
+			rgb1.d[3] = 1.0f;
+
+			yuv0 = igt_matrix_transform(&m, &rgb0);
+			yuv1 = igt_matrix_transform(&m, &rgb1);
+
+			yuyv[j * 4 + swz[0]] = yuv0.d[0];
+			yuyv[j * 4 + swz[2]] = yuv1.d[0];
+			yuyv[j * 4 + swz[1]] = (yuv0.d[1] + yuv1.d[1]) / 2.0f;
+			yuyv[j * 4 + swz[3]] = (yuv0.d[2] + yuv1.d[2]) / 2.0f;
+		}
+
+		rgb24 += rgb24_stride;
+		yuyv += yuyv_stride;
+	}
+}
+
 static void destroy_cairo_surface__convert(void *arg)
 {
 	struct fb_convert_blit_upload *blit = arg;
 	struct igt_fb *fb = blit->fb;
 
-	/* Convert back to planar! */
-	igt_assert_f(fb->drm_format == DRM_FORMAT_NV12,
-		     "Conversion not implemented for !NV12 planar formats\n");
-
-	convert_rgb24_to_nv12(fb, blit);
+	/* Convert linear rgb back! */
+	switch(fb->drm_format) {
+	case DRM_FORMAT_NV12:
+		convert_rgb24_to_nv12(fb, blit);
+		break;
+	case DRM_FORMAT_YUYV:
+	case DRM_FORMAT_YVYU:
+	case DRM_FORMAT_UYVY:
+	case DRM_FORMAT_VYUY:
+		convert_rgb24_to_yuyv(fb, blit, yuyv_swizzle(fb->drm_format));
+		break;
+	default:
+		igt_assert_f(false, "Conversion not implemented for formats 0x%x\n",
+			     fb->drm_format);
+	}
 
 	munmap(blit->rgb24.map, blit->rgb24.size);
 
@@ -1559,10 +1710,21 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 		memcpy(blit->linear.offsets, fb->offsets, sizeof(fb->offsets));
 	}
 
-	/* Convert to linear! */
-	igt_assert_f(fb->drm_format == DRM_FORMAT_NV12,
-		     "Conversion not implemented for !NV12 planar formats\n");
-	convert_nv12_to_rgb24(fb, blit);
+	/* Convert to linear rgb! */
+	switch(fb->drm_format) {
+	case DRM_FORMAT_NV12:
+		convert_nv12_to_rgb24(fb, blit);
+		break;
+	case DRM_FORMAT_YUYV:
+	case DRM_FORMAT_YVYU:
+	case DRM_FORMAT_UYVY:
+	case DRM_FORMAT_VYUY:
+		convert_yuyv_to_rgb24(fb, blit, yuyv_swizzle(fb->drm_format));
+		break;
+	default:
+		igt_assert_f(false, "Conversion not implemented for formats 0x%x\n",
+			     fb->drm_format);
+	}
 
 	fb->cairo_surface =
 		cairo_image_surface_create_for_data(blit->rgb24.map,
@@ -1589,7 +1751,7 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 cairo_surface_t *igt_get_cairo_surface(int fd, struct igt_fb *fb)
 {
 	if (fb->cairo_surface == NULL) {
-		if (fb->num_planes > 1)
+		if (is_yuv(fb->drm_format))
 			create_cairo_surface__convert(fd, fb);
 		else if (fb->tiling == LOCAL_I915_FORMAT_MOD_Y_TILED ||
 		    fb->tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED)
-- 
2.13.6

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

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

* Re: [igt-dev] [PATCH i-g-t 5/8] lib: Add igt_matrix
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 5/8] lib: Add igt_matrix Ville Syrjala
@ 2018-02-27 21:33   ` Chris Wilson
  2018-02-28 14:57     ` Ville Syrjälä
  2018-02-28 17:36   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
  1 sibling, 1 reply; 26+ messages in thread
From: Chris Wilson @ 2018-02-27 21:33 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev

Quoting Ville Syrjala (2018-02-27 21:21:17)
> +#include "igt_core.h"
> +#include "igt_matrix.h"
> +
> +/**
> + * SECTION:igt_matrix
> + * @short_description: Matrix math library
> + * @title: Matrix
> + * @include: igt.h
> + *
> + * This library contains helper functions for basic matrix math.
> + * The library operates on #igt_mat4 and #igt_vec4 structures.
> + */
> +
> +/**
> + * igt_matrix_print:
> + * @m: the matrix
> + *
> + * Print out the matrix elements.
> + */
> +void igt_matrix_print(const struct igt_mat4 *m)
> +{
> +       for (int row = 0; row < 4; row++) {
> +               igt_info("|");
> +               for (int col = 0; col < 4; col++) {
> +                       igt_info("%4.4f,", m->d[col * 4 + row]);

#define m(row, col) ((col) * 4 + (row)) ?

> +               }
> +               igt_info("|\n");
> +       }
> +}
> +
> +/**
> + * igt_matrix_identity:
> + *
> + * Returns:
> + * An identity matrix.
> + */
> +struct igt_mat4 igt_matrix_identity(void)
> +{
> +       struct igt_mat4 ret = {
> +               .d[0 * 4 + 0] = 1.0f,
> +               .d[1 * 4 + 1] = 1.0f,
> +               .d[2 * 4 + 2] = 1.0f,
> +               .d[3 * 4 + 3] = 1.0f,
> +       };

static ?

Didn't spot any typos.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 8/8] lib: Add support for rendering into packed YCbCr framebuffers
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 8/8] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
@ 2018-02-27 21:36   ` Chris Wilson
  2018-02-28 14:59     ` Ville Syrjälä
  2018-03-01 11:00   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
  2018-03-02  8:35   ` [igt-dev] [PATCH i-g-t v3 " Ville Syrjala
  2 siblings, 1 reply; 26+ messages in thread
From: Chris Wilson @ 2018-02-27 21:36 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev

Quoting Ville Syrjala (2018-02-27 21:21:20)
> +static void convert_yuyv_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit,
> +                                 const unsigned char swz[4])
> +{
> +       int i, j;
> +       const uint8_t *yuyv;
> +       uint8_t *rgb24 = blit->rgb24.map;
> +       unsigned rgb24_stride = blit->rgb24.stride, yuyv_stride = blit->linear.stride;
> +       uint8_t *buf = malloc(blit->linear.size);
> +       bool full_range = false; /* FIXME */
> +       const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
> +       struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(e, full_range);
> +
> +       igt_assert((fb->width & 1) == 0);
> +
> +       /*
> +        * Reading from the BO is awfully slow because of lack of read caching,
> +        * it's faster to copy the whole BO to a temporary buffer and convert
> +        * from there.
> +        */
> +       memcpy(buf, blit->linear.map, blit->linear.size);

Frequent enough to do memcpy_from_wc?
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (6 preceding siblings ...)
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 8/8] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
@ 2018-02-27 23:27 ` Patchwork
  2018-02-28 18:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2) Patchwork
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2018-02-27 23:27 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion
URL   : https://patchwork.freedesktop.org/series/39066/
State : failure

== Summary ==

IGT patchset tested on top of latest successful build
77411862d239916b40e218eeb6519b8f31fc7f1d meson: Get rid of lib_headers

with latest DRM-Tip kernel build CI_DRM_3842
af8578c6d438 drm-tip: 2018y-02m-27d-20h-28m-22s UTC integration manifest

No testlist changes.

---- Possible new issues:

Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                pass       -> FAIL       (fi-bdw-5557u)
                pass       -> FAIL       (fi-bdw-gvtdvm)
                pass       -> FAIL       (fi-blb-e6850)
                pass       -> FAIL       (fi-bsw-n3050)
                pass       -> FAIL       (fi-bwr-2160)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-cfl-8700k)
                pass       -> FAIL       (fi-cfl-s2)
                pass       -> FAIL       (fi-cnl-y3)
                pass       -> FAIL       (fi-gdg-551)
                pass       -> FAIL       (fi-glk-1)
                pass       -> FAIL       (fi-hsw-4770)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-ivb-3770)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-kbl-7560u)
                pass       -> FAIL       (fi-kbl-7567u)
                pass       -> FAIL       (fi-kbl-r)
                pass       -> FAIL       (fi-pnv-d510)
                pass       -> FAIL       (fi-skl-6260u)
                pass       -> FAIL       (fi-skl-6600u)
                pass       -> FAIL       (fi-skl-6700k2)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-guc)
                pass       -> FAIL       (fi-skl-gvtdvm)
                pass       -> FAIL       (fi-snb-2600)
        Subgroup basic-flip-vs-modeset:
                pass       -> FAIL       (fi-bdw-5557u)
                pass       -> FAIL       (fi-bdw-gvtdvm)
                pass       -> FAIL       (fi-blb-e6850)
                pass       -> FAIL       (fi-bsw-n3050)
                pass       -> FAIL       (fi-bwr-2160)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-cfl-8700k)
                pass       -> FAIL       (fi-cfl-s2)
                pass       -> FAIL       (fi-cnl-y3)
                pass       -> FAIL       (fi-gdg-551)
                pass       -> FAIL       (fi-glk-1)
                pass       -> FAIL       (fi-hsw-4770)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-ivb-3770)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-kbl-7560u)
                pass       -> FAIL       (fi-kbl-7567u)
                pass       -> FAIL       (fi-kbl-r)
                pass       -> FAIL       (fi-pnv-d510)
                pass       -> FAIL       (fi-skl-6260u)
                pass       -> FAIL       (fi-skl-6600u)
                pass       -> FAIL       (fi-skl-6700hq)
                pass       -> FAIL       (fi-skl-6700k2)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-guc)
                pass       -> FAIL       (fi-skl-gvtdvm)
                pass       -> FAIL       (fi-snb-2600)
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> FAIL       (fi-bdw-5557u)
                pass       -> FAIL       (fi-bdw-gvtdvm)
                pass       -> FAIL       (fi-blb-e6850)
                pass       -> FAIL       (fi-bsw-n3050)
                pass       -> FAIL       (fi-bwr-2160)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-cfl-8700k)
                pass       -> FAIL       (fi-cfl-s2)
                pass       -> FAIL       (fi-cnl-y3)
                pass       -> FAIL       (fi-gdg-551)
                pass       -> FAIL       (fi-glk-1)
                pass       -> FAIL       (fi-hsw-4770)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-ivb-3770)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-kbl-7560u)
                pass       -> FAIL       (fi-kbl-7567u)
                pass       -> FAIL       (fi-kbl-r)
                pass       -> FAIL       (fi-pnv-d510)
                pass       -> FAIL       (fi-skl-6260u)
                pass       -> FAIL       (fi-skl-6600u)
                pass       -> FAIL       (fi-skl-6700hq)
                pass       -> FAIL       (fi-skl-6700k2)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-guc)
                pass       -> FAIL       (fi-skl-gvtdvm)
                pass       -> FAIL       (fi-snb-2600)
        Subgroup basic-plain-flip:
                pass       -> FAIL       (fi-bdw-5557u)
                pass       -> FAIL       (fi-bdw-gvtdvm)
                pass       -> FAIL       (fi-blb-e6850)
                pass       -> FAIL       (fi-bsw-n3050)
                pass       -> FAIL       (fi-bwr-2160)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-cfl-8700k)
                pass       -> FAIL       (fi-cfl-s2)
                pass       -> FAIL       (fi-cnl-y3)
                pass       -> FAIL       (fi-gdg-551)
                pass       -> FAIL       (fi-glk-1)
                pass       -> FAIL       (fi-hsw-4770)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-ivb-3770)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-kbl-7560u)
                pass       -> FAIL       (fi-kbl-7567u)
                pass       -> FAIL       (fi-kbl-r)
                pass       -> FAIL       (fi-pnv-d510)
                pass       -> FAIL       (fi-skl-6260u)
                pass       -> FAIL       (fi-skl-6600u)
                pass       -> FAIL       (fi-skl-6700hq)
                pass       -> FAIL       (fi-skl-6700k2)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-guc)
                pass       -> FAIL       (fi-skl-gvtdvm)
                pass       -> FAIL       (fi-snb-2600)
Test kms_setmode:
        Subgroup basic-clone-single-crtc:
                pass       -> FAIL       (fi-cfl-s2)
                pass       -> FAIL       (fi-cnl-y3)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-skl-6700k2)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-guc)

---- Known issues:

Test debugfs_test:
        Subgroup read_all_entries:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                pass       -> FAIL       (fi-elk-e7500) fdo#103989 +3
                pass       -> FAIL       (fi-skl-6700hq) fdo#101144

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u     total:288  pass:263  dwarn:0   dfail:0   fail:4   skip:21  time:351s
fi-bdw-gvtdvm    total:288  pass:260  dwarn:0   dfail:0   fail:4   skip:24  time:362s
fi-blb-e6850     total:288  pass:219  dwarn:1   dfail:0   fail:4   skip:64  time:309s
fi-bsw-n3050     total:288  pass:238  dwarn:0   dfail:0   fail:4   skip:46  time:421s
fi-bwr-2160      total:288  pass:179  dwarn:0   dfail:0   fail:4   skip:105 time:209s
fi-bxt-dsi       total:288  pass:254  dwarn:0   dfail:0   fail:4   skip:30  time:409s
fi-bxt-j4205     total:288  pass:255  dwarn:0   dfail:0   fail:4   skip:29  time:417s
fi-byt-j1900     total:288  pass:249  dwarn:0   dfail:0   fail:4   skip:35  time:418s
fi-byt-n2820     total:288  pass:245  dwarn:0   dfail:0   fail:4   skip:39  time:396s
fi-cfl-8700k     total:288  pass:256  dwarn:0   dfail:0   fail:4   skip:28  time:325s
fi-cfl-s2        total:288  pass:257  dwarn:0   dfail:0   fail:5   skip:26  time:469s
fi-cnl-y3        total:288  pass:257  dwarn:0   dfail:0   fail:5   skip:26  time:486s
fi-elk-e7500     total:288  pass:225  dwarn:0   dfail:0   fail:4   skip:59  time:350s
fi-gdg-551       total:288  pass:175  dwarn:0   dfail:0   fail:5   skip:108 time:223s
fi-glk-1         total:288  pass:256  dwarn:0   dfail:0   fail:4   skip:28  time:427s
fi-hsw-4770      total:288  pass:257  dwarn:0   dfail:0   fail:4   skip:27  time:329s
fi-ilk-650       total:288  pass:223  dwarn:0   dfail:0   fail:5   skip:60  time:344s
fi-ivb-3520m     total:288  pass:255  dwarn:0   dfail:0   fail:4   skip:29  time:381s
fi-ivb-3770      total:288  pass:251  dwarn:0   dfail:0   fail:4   skip:33  time:344s
fi-kbl-7500u     total:288  pass:258  dwarn:1   dfail:0   fail:5   skip:24  time:387s
fi-kbl-7560u     total:288  pass:265  dwarn:0   dfail:0   fail:4   skip:19  time:408s
fi-kbl-7567u     total:288  pass:264  dwarn:0   dfail:0   fail:4   skip:20  time:386s
fi-kbl-r         total:288  pass:257  dwarn:0   dfail:0   fail:4   skip:27  time:409s
fi-pnv-d510      total:288  pass:218  dwarn:1   dfail:0   fail:4   skip:65  time:526s
fi-skl-6260u     total:288  pass:264  dwarn:0   dfail:0   fail:4   skip:20  time:362s
fi-skl-6600u     total:288  pass:257  dwarn:0   dfail:0   fail:4   skip:27  time:415s
fi-skl-6700hq    total:288  pass:258  dwarn:0   dfail:0   fail:4   skip:26  time:422s
fi-skl-6700k2    total:288  pass:259  dwarn:0   dfail:0   fail:5   skip:24  time:424s
fi-skl-6770hq    total:288  pass:263  dwarn:0   dfail:0   fail:5   skip:20  time:413s
fi-skl-guc       total:288  pass:255  dwarn:0   dfail:0   fail:5   skip:28  time:347s
fi-skl-gvtdvm    total:288  pass:261  dwarn:0   dfail:0   fail:4   skip:23  time:368s
fi-snb-2520m     total:288  pass:244  dwarn:0   dfail:0   fail:4   skip:40  time:454s
fi-snb-2600      total:288  pass:244  dwarn:0   dfail:0   fail:4   skip:40  time:328s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1015/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 5/8] lib: Add igt_matrix
  2018-02-27 21:33   ` Chris Wilson
@ 2018-02-28 14:57     ` Ville Syrjälä
  2018-02-28 15:01       ` Ville Syrjälä
  0 siblings, 1 reply; 26+ messages in thread
From: Ville Syrjälä @ 2018-02-28 14:57 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Tue, Feb 27, 2018 at 09:33:13PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-02-27 21:21:17)
> > +#include "igt_core.h"
> > +#include "igt_matrix.h"
> > +
> > +/**
> > + * SECTION:igt_matrix
> > + * @short_description: Matrix math library
> > + * @title: Matrix
> > + * @include: igt.h
> > + *
> > + * This library contains helper functions for basic matrix math.
> > + * The library operates on #igt_mat4 and #igt_vec4 structures.
> > + */
> > +
> > +/**
> > + * igt_matrix_print:
> > + * @m: the matrix
> > + *
> > + * Print out the matrix elements.
> > + */
> > +void igt_matrix_print(const struct igt_mat4 *m)
> > +{
> > +       for (int row = 0; row < 4; row++) {
> > +               igt_info("|");
> > +               for (int col = 0; col < 4; col++) {
> > +                       igt_info("%4.4f,", m->d[col * 4 + row]);
> 
> #define m(row, col) ((col) * 4 + (row)) ?

Seems like a sensible idea.

> 
> > +               }
> > +               igt_info("|\n");
> > +       }
> > +}
> > +
> > +/**
> > + * igt_matrix_identity:
> > + *
> > + * Returns:
> > + * An identity matrix.
> > + */
> > +struct igt_mat4 igt_matrix_identity(void)
> > +{
> > +       struct igt_mat4 ret = {
> > +               .d[0 * 4 + 0] = 1.0f,
> > +               .d[1 * 4 + 1] = 1.0f,
> > +               .d[2 * 4 + 2] = 1.0f,
> > +               .d[3 * 4 + 3] = 1.0f,
> > +       };
> 
> static ?

Also const I suppose.

I've not actually checked what kind of a job the compiler does when you
return big blobs like this from functions. Should probably look into
that to make sure the resulting code is not totally insane.

> 
> Didn't spot any typos.
> -Chris

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 8/8] lib: Add support for rendering into packed YCbCr framebuffers
  2018-02-27 21:36   ` Chris Wilson
@ 2018-02-28 14:59     ` Ville Syrjälä
  0 siblings, 0 replies; 26+ messages in thread
From: Ville Syrjälä @ 2018-02-28 14:59 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Tue, Feb 27, 2018 at 09:36:54PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-02-27 21:21:20)
> > +static void convert_yuyv_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit,
> > +                                 const unsigned char swz[4])
> > +{
> > +       int i, j;
> > +       const uint8_t *yuyv;
> > +       uint8_t *rgb24 = blit->rgb24.map;
> > +       unsigned rgb24_stride = blit->rgb24.stride, yuyv_stride = blit->linear.stride;
> > +       uint8_t *buf = malloc(blit->linear.size);
> > +       bool full_range = false; /* FIXME */
> > +       const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
> > +       struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(e, full_range);
> > +
> > +       igt_assert((fb->width & 1) == 0);
> > +
> > +       /*
> > +        * Reading from the BO is awfully slow because of lack of read caching,
> > +        * it's faster to copy the whole BO to a temporary buffer and convert
> > +        * from there.
> > +        */
> > +       memcpy(buf, blit->linear.map, blit->linear.size);
> 
> Frequent enough to do memcpy_from_wc?

I've not measured how bad this actually is, but optimizing memcpies
when possible doesn't seem like a bad idea to me. Maarten?

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 5/8] lib: Add igt_matrix
  2018-02-28 14:57     ` Ville Syrjälä
@ 2018-02-28 15:01       ` Ville Syrjälä
  0 siblings, 0 replies; 26+ messages in thread
From: Ville Syrjälä @ 2018-02-28 15:01 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Wed, Feb 28, 2018 at 04:57:09PM +0200, Ville Syrjälä wrote:
> On Tue, Feb 27, 2018 at 09:33:13PM +0000, Chris Wilson wrote:
> > Quoting Ville Syrjala (2018-02-27 21:21:17)
> > > +#include "igt_core.h"
> > > +#include "igt_matrix.h"
> > > +
> > > +/**
> > > + * SECTION:igt_matrix
> > > + * @short_description: Matrix math library
> > > + * @title: Matrix
> > > + * @include: igt.h
> > > + *
> > > + * This library contains helper functions for basic matrix math.
> > > + * The library operates on #igt_mat4 and #igt_vec4 structures.
> > > + */
> > > +
> > > +/**
> > > + * igt_matrix_print:
> > > + * @m: the matrix
> > > + *
> > > + * Print out the matrix elements.
> > > + */
> > > +void igt_matrix_print(const struct igt_mat4 *m)
> > > +{
> > > +       for (int row = 0; row < 4; row++) {
> > > +               igt_info("|");
> > > +               for (int col = 0; col < 4; col++) {
> > > +                       igt_info("%4.4f,", m->d[col * 4 + row]);
> > 
> > #define m(row, col) ((col) * 4 + (row)) ?
> 
> Seems like a sensible idea.
> 
> > 
> > > +               }
> > > +               igt_info("|\n");
> > > +       }
> > > +}
> > > +
> > > +/**
> > > + * igt_matrix_identity:
> > > + *
> > > + * Returns:
> > > + * An identity matrix.
> > > + */
> > > +struct igt_mat4 igt_matrix_identity(void)
> > > +{
> > > +       struct igt_mat4 ret = {
> > > +               .d[0 * 4 + 0] = 1.0f,
> > > +               .d[1 * 4 + 1] = 1.0f,
> > > +               .d[2 * 4 + 2] = 1.0f,
> > > +               .d[3 * 4 + 3] = 1.0f,
> > > +       };
> > 
> > static ?
> 
> Also const I suppose.
> 
> I've not actually checked what kind of a job the compiler does when you
> return big blobs like this from functions. Should probably look into
> that to make sure the resulting code is not totally insane.

I guess in this case we could just return a pointer instead of
a copy. But that wouldn't be consistent with the rest of the api
so not sure if it's worth it.


-- 
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v2 5/8] lib: Add igt_matrix
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 5/8] lib: Add igt_matrix Ville Syrjala
  2018-02-27 21:33   ` Chris Wilson
@ 2018-02-28 17:36   ` Ville Syrjala
  1 sibling, 0 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-02-28 17:36 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add a helper library for basic matrix math.

v2: Make the identity matrix static const (Chris)
    Add the m(row,col) macro (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/Makefile.sources |   2 +
 lib/igt_matrix.c     | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_matrix.h     |  56 ++++++++++++++++++
 lib/meson.build      |   1 +
 4 files changed, 217 insertions(+)
 create mode 100644 lib/igt_matrix.c
 create mode 100644 lib/igt_matrix.h

diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index 5b13ef8896c0..622d73d28fcd 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -26,6 +26,8 @@ lib_source_list =	 	\
 	igt_gt.h		\
 	igt_gvt.c		\
 	igt_gvt.h		\
+	igt_matrix.c		\
+	igt_matrix.h		\
 	igt_primes.c		\
 	igt_primes.h		\
 	igt_rand.c		\
diff --git a/lib/igt_matrix.c b/lib/igt_matrix.c
new file mode 100644
index 000000000000..3fa6c96cae8a
--- /dev/null
+++ b/lib/igt_matrix.c
@@ -0,0 +1,158 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "igt_core.h"
+#include "igt_matrix.h"
+
+#define m(row, col) ((col) * 4 + (row))
+
+/**
+ * SECTION:igt_matrix
+ * @short_description: Matrix math library
+ * @title: Matrix
+ * @include: igt.h
+ *
+ * This library contains helper functions for basic matrix math.
+ * The library operates on #igt_mat4 and #igt_vec4 structures.
+ */
+
+/**
+ * igt_matrix_print:
+ * @m: the matrix
+ *
+ * Print out the matrix elements.
+ */
+void igt_matrix_print(const struct igt_mat4 *m)
+{
+	for (int row = 0; row < 4; row++) {
+		igt_info("|");
+		for (int col = 0; col < 4; col++) {
+			igt_info("%4.4f,", m->d[m(row, col)]);
+		}
+		igt_info("|\n");
+	}
+}
+
+/**
+ * igt_matrix_identity:
+ *
+ * Returns:
+ * An identity matrix.
+ */
+struct igt_mat4 igt_matrix_identity(void)
+{
+	static const struct igt_mat4 ret = {
+		.d[m(0, 0)] = 1.0f,
+		.d[m(1, 1)] = 1.0f,
+		.d[m(2, 2)] = 1.0f,
+		.d[m(3, 3)] = 1.0f,
+	};
+
+	return ret;
+}
+
+/**
+ * igt_matrix_scale:
+ *
+ * Returns:
+ * An scaling matrix.
+ */
+struct igt_mat4 igt_matrix_scale(float x, float y, float z)
+{
+	struct igt_mat4 ret = {
+		.d[m(0, 0)] = x,
+		.d[m(1, 1)] = y,
+		.d[m(2, 2)] = z,
+		.d[m(3, 3)] = 1.0f,
+	};
+
+	return ret;
+}
+
+/**
+ * igt_matrix_translate:
+ *
+ * Returns:
+ * A translation matrix.
+ */
+struct igt_mat4 igt_matrix_translate(float x, float y, float z)
+{
+	struct igt_mat4 ret = {
+		.d[m(0, 0)] = 1.0f,
+		.d[m(1, 1)] = 1.0f,
+		.d[m(2, 2)] = 1.0f,
+		.d[m(0, 3)] = x,
+		.d[m(1, 3)] = y,
+		.d[m(2, 3)] = z,
+		.d[m(3, 3)] = 1.0f,
+	};
+
+	return ret;
+}
+
+/**
+ * igt_matrix_transform:
+ *
+ * Transform the vector @v by the matrix @m. @m is on the left,
+ * @v on the right.
+ *
+ * Returns:
+ * The transformed vector.
+ */
+struct igt_vec4 igt_matrix_transform(const struct igt_mat4 *m,
+				     const struct igt_vec4 *v)
+{
+	struct igt_vec4 ret = {};
+
+	for (int row = 0; row < 4; row++) {
+		for (int i = 0; i < 4; i++) {
+			ret.d[row] += m->d[m(row, i)] * v->d[i];
+		}
+	}
+
+	return ret;
+}
+
+/**
+ * igt_matrix_multiply:
+ *
+ * Multiply two matrices together. @a is on the left,
+ * @b on the right.
+ *
+ * Returns:
+ * The resulting matrix.
+ */
+struct igt_mat4 igt_matrix_multiply(const struct igt_mat4 *a,
+				    const struct igt_mat4 *b)
+{
+	struct igt_mat4 ret = {};
+
+	for (int col = 0; col < 4; col++) {
+		for (int row = 0; row < 4; row++) {
+			for (int i = 0; i < 4; i++)
+				ret.d[m(row, col)] += a->d[m(row, i)] * b->d[m(i, col)];
+		}
+	}
+
+	return ret;
+}
diff --git a/lib/igt_matrix.h b/lib/igt_matrix.h
new file mode 100644
index 000000000000..33acb815197b
--- /dev/null
+++ b/lib/igt_matrix.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __IGT_MATRIX_H__
+#define __IGT_MATRIX_H__
+
+/**
+ * igt_vec4:
+ * @d: vector elements
+ *
+ * A 4 element column vector (4x1 matrix).
+ */
+struct igt_vec4 {
+	float d[4];
+};
+
+/**
+ * igt_mat4:
+ * @d: matrix elements
+ *
+ * A 4x4 column major matrix.
+ */
+struct igt_mat4 {
+	float d[16];
+};
+
+void igt_matrix_print(const struct igt_mat4 *m);
+struct igt_mat4 igt_matrix_identity(void);
+struct igt_mat4 igt_matrix_scale(float x, float y, float z);
+struct igt_mat4 igt_matrix_translate(float x, float y, float z);
+struct igt_vec4 igt_matrix_transform(const struct igt_mat4 *m,
+				     const struct igt_vec4 *v);
+struct igt_mat4 igt_matrix_multiply(const struct igt_mat4 *a,
+				    const struct igt_mat4 *b);
+
+#endif /* __IGT_MATRIX_H__ */
diff --git a/lib/meson.build b/lib/meson.build
index a9e53689b35d..8bf6f4433f64 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -9,6 +9,7 @@ lib_sources = [
 	'igt_aux.c',
 	'igt_gt.c',
 	'igt_gvt.c',
+	'igt_matrix.c',
 	'igt_primes.c',
 	'igt_rand.c',
 	'igt_stats.c',
-- 
2.13.6

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

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

* [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2)
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (7 preceding siblings ...)
  2018-02-27 23:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Patchwork
@ 2018-02-28 18:28 ` Patchwork
  2018-02-28 19:34 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3) Patchwork
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2018-02-28 18:28 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2)
URL   : https://patchwork.freedesktop.org/series/39066/
State : failure

== Summary ==

IGT patchset tested on top of latest successful build
0d47ec161b4eca1b41c5348604aa05b105e5d1cf tests/perf: Fix build warning

with latest DRM-Tip kernel build CI_DRM_3850
573e919160e5 drm-tip: 2018y-02m-28d-16h-17m-37s UTC integration manifest

No testlist changes.

---- Possible new issues:

Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                pass       -> FAIL       (fi-bdw-5557u)
                pass       -> FAIL       (fi-blb-e6850)
                pass       -> FAIL       (fi-bsw-n3050)
                pass       -> FAIL       (fi-bwr-2160)
                pass       -> FAIL       (fi-bxt-dsi)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-cfl-8700k)
                pass       -> FAIL       (fi-cfl-s2)
                pass       -> FAIL       (fi-cnl-y3)
                pass       -> FAIL       (fi-gdg-551)
                pass       -> FAIL       (fi-glk-1)
                pass       -> FAIL       (fi-hsw-4770)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-ivb-3770)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-kbl-7560u)
                pass       -> FAIL       (fi-kbl-7567u)
                pass       -> FAIL       (fi-kbl-r)
                pass       -> FAIL       (fi-pnv-d510)
                pass       -> FAIL       (fi-skl-6260u)
                pass       -> FAIL       (fi-skl-6600u)
                pass       -> FAIL       (fi-skl-6700k2)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-guc)
                pass       -> FAIL       (fi-skl-gvtdvm)
                pass       -> FAIL       (fi-snb-2520m)
                pass       -> FAIL       (fi-snb-2600)
        Subgroup basic-flip-vs-modeset:
                pass       -> FAIL       (fi-bdw-5557u)
                pass       -> FAIL       (fi-blb-e6850)
                pass       -> FAIL       (fi-bsw-n3050)
                pass       -> FAIL       (fi-bwr-2160)
                pass       -> FAIL       (fi-bxt-dsi)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-cfl-8700k)
                pass       -> FAIL       (fi-cfl-s2)
                pass       -> FAIL       (fi-cnl-y3)
                pass       -> FAIL       (fi-gdg-551)
                pass       -> FAIL       (fi-glk-1)
                pass       -> FAIL       (fi-hsw-4770)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-ivb-3770)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-kbl-7560u)
                pass       -> FAIL       (fi-kbl-7567u)
                pass       -> FAIL       (fi-kbl-r)
                pass       -> FAIL       (fi-pnv-d510)
                pass       -> FAIL       (fi-skl-6260u)
                pass       -> FAIL       (fi-skl-6600u)
                pass       -> FAIL       (fi-skl-6700hq)
                pass       -> FAIL       (fi-skl-6700k2)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-guc)
                pass       -> FAIL       (fi-skl-gvtdvm)
                pass       -> FAIL       (fi-snb-2520m)
                pass       -> FAIL       (fi-snb-2600)
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> FAIL       (fi-bdw-5557u)
                pass       -> FAIL       (fi-blb-e6850)
                pass       -> FAIL       (fi-bsw-n3050)
                pass       -> FAIL       (fi-bwr-2160)
                pass       -> FAIL       (fi-bxt-dsi)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-cfl-8700k)
                pass       -> FAIL       (fi-cnl-y3)
                pass       -> FAIL       (fi-gdg-551)
                pass       -> FAIL       (fi-glk-1)
                pass       -> FAIL       (fi-hsw-4770)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-ivb-3770)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-kbl-7560u)
                pass       -> FAIL       (fi-kbl-7567u)
                pass       -> FAIL       (fi-kbl-r)
                pass       -> FAIL       (fi-pnv-d510)
                pass       -> FAIL       (fi-skl-6260u)
                pass       -> FAIL       (fi-skl-6600u)
                pass       -> FAIL       (fi-skl-6700hq)
                pass       -> FAIL       (fi-skl-6700k2)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-guc)
                pass       -> FAIL       (fi-skl-gvtdvm)
                pass       -> FAIL       (fi-snb-2520m)
                pass       -> FAIL       (fi-snb-2600)
        Subgroup basic-plain-flip:
                pass       -> FAIL       (fi-bdw-5557u)
                pass       -> FAIL       (fi-blb-e6850)
                pass       -> FAIL       (fi-bsw-n3050)
                pass       -> FAIL       (fi-bwr-2160)
                pass       -> FAIL       (fi-bxt-dsi)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-cfl-8700k)
                pass       -> FAIL       (fi-cfl-s2)
                pass       -> FAIL       (fi-cnl-y3)
                pass       -> FAIL       (fi-gdg-551)
                pass       -> FAIL       (fi-glk-1)
                pass       -> FAIL       (fi-hsw-4770)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-ivb-3770)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-kbl-7560u)
                pass       -> FAIL       (fi-kbl-7567u)
                pass       -> FAIL       (fi-kbl-r)
                pass       -> FAIL       (fi-pnv-d510)
                pass       -> FAIL       (fi-skl-6260u)
                pass       -> FAIL       (fi-skl-6600u)
                pass       -> FAIL       (fi-skl-6700hq)
                pass       -> FAIL       (fi-skl-6700k2)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-guc)
                pass       -> FAIL       (fi-skl-gvtdvm)
                pass       -> FAIL       (fi-snb-2520m)
                pass       -> FAIL       (fi-snb-2600)
Test kms_setmode:
        Subgroup basic-clone-single-crtc:
                pass       -> FAIL       (fi-cfl-s2)
                pass       -> FAIL       (fi-cnl-y3)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-skl-6700k2)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-guc)

---- Known issues:

Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                pass       -> FAIL       (fi-elk-e7500) fdo#103989 +3
                pass       -> FAIL       (fi-skl-6700hq) fdo#101144
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> FAIL       (fi-cfl-s2) fdo#100368

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368

fi-bdw-5557u     total:288  pass:263  dwarn:0   dfail:0   fail:4   skip:21  time:353s
fi-blb-e6850     total:288  pass:219  dwarn:1   dfail:0   fail:4   skip:64  time:310s
fi-bsw-n3050     total:288  pass:238  dwarn:0   dfail:0   fail:4   skip:46  time:422s
fi-bwr-2160      total:288  pass:179  dwarn:0   dfail:0   fail:4   skip:105 time:210s
fi-bxt-dsi       total:288  pass:254  dwarn:0   dfail:0   fail:4   skip:30  time:410s
fi-bxt-j4205     total:288  pass:255  dwarn:0   dfail:0   fail:4   skip:29  time:422s
fi-byt-j1900     total:288  pass:249  dwarn:0   dfail:0   fail:4   skip:35  time:418s
fi-byt-n2820     total:288  pass:245  dwarn:0   dfail:0   fail:4   skip:39  time:398s
fi-cfl-8700k     total:288  pass:256  dwarn:0   dfail:0   fail:4   skip:28  time:326s
fi-cfl-s2        total:288  pass:257  dwarn:0   dfail:0   fail:5   skip:26  time:469s
fi-cnl-y3        total:288  pass:257  dwarn:0   dfail:0   fail:5   skip:26  time:483s
fi-elk-e7500     total:288  pass:225  dwarn:0   dfail:0   fail:4   skip:59  time:352s
fi-gdg-551       total:288  pass:175  dwarn:0   dfail:0   fail:5   skip:108 time:221s
fi-glk-1         total:288  pass:256  dwarn:0   dfail:0   fail:4   skip:28  time:423s
fi-hsw-4770      total:288  pass:257  dwarn:0   dfail:0   fail:4   skip:27  time:322s
fi-ilk-650       total:288  pass:223  dwarn:0   dfail:0   fail:5   skip:60  time:343s
fi-ivb-3520m     total:288  pass:255  dwarn:0   dfail:0   fail:4   skip:29  time:383s
fi-ivb-3770      total:288  pass:251  dwarn:0   dfail:0   fail:4   skip:33  time:345s
fi-kbl-7500u     total:288  pass:258  dwarn:1   dfail:0   fail:5   skip:24  time:378s
fi-kbl-7560u     total:288  pass:265  dwarn:0   dfail:0   fail:4   skip:19  time:407s
fi-kbl-7567u     total:288  pass:264  dwarn:0   dfail:0   fail:4   skip:20  time:385s
fi-kbl-r         total:288  pass:257  dwarn:0   dfail:0   fail:4   skip:27  time:406s
fi-pnv-d510      total:288  pass:218  dwarn:1   dfail:0   fail:4   skip:65  time:531s
fi-skl-6260u     total:288  pass:264  dwarn:0   dfail:0   fail:4   skip:20  time:359s
fi-skl-6600u     total:288  pass:257  dwarn:0   dfail:0   fail:4   skip:27  time:414s
fi-skl-6700hq    total:288  pass:258  dwarn:0   dfail:0   fail:4   skip:26  time:422s
fi-skl-6700k2    total:288  pass:259  dwarn:0   dfail:0   fail:5   skip:24  time:422s
fi-skl-6770hq    total:288  pass:263  dwarn:0   dfail:0   fail:5   skip:20  time:402s
fi-skl-guc       total:288  pass:255  dwarn:0   dfail:0   fail:5   skip:28  time:342s
fi-skl-gvtdvm    total:288  pass:261  dwarn:0   dfail:0   fail:4   skip:23  time:367s
fi-snb-2520m     total:288  pass:244  dwarn:0   dfail:0   fail:4   skip:40  time:446s
fi-snb-2600      total:288  pass:244  dwarn:0   dfail:0   fail:4   skip:40  time:331s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1028/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v2 4/8] lib: Clean up format_desc
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 4/8] lib: Clean up format_desc Ville Syrjala
@ 2018-02-28 18:44   ` Ville Syrjala
  0 siblings, 0 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-02-28 18:44 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Always populate the plane_bpp[] stuff, and use named initializers so
that we can actually see what's being set to what.

v2: Fix depth for xrgb8888

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 66 +++++++++++++++++++++++++++++++++---------------------------
 1 file changed, 36 insertions(+), 30 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 7b967ac6188b..f5d54f136f85 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -55,26 +55,35 @@
  */
 
 /* drm fourcc/cairo format maps */
-#define DF(did, cid, ...)	\
-	{ DRM_FORMAT_##did, CAIRO_FORMAT_##cid, # did, __VA_ARGS__ }
 static struct format_desc_struct {
+	const char *name;
 	uint32_t drm_id;
 	cairo_format_t cairo_id;
-	const char *name;
-	int bpp;
 	int depth;
-	int planes;
+	int num_planes;
 	int plane_bpp[4];
 } format_desc[] = {
-	DF(RGB565,	RGB16_565,	16, 16),
-	//DF(RGB888,	INVALID,	24, 24),
-	DF(XRGB8888,	RGB24,		32, 24),
-	DF(XRGB2101010,	RGB30,		32, 30),
-	DF(ARGB8888,	ARGB32,		32, 32),
-	DF(NV12,	RGB24,		32, -1, 2, {8, 16}),
+	{ .name = "RGB565", .depth = 16, .drm_id = DRM_FORMAT_RGB565,
+	  .cairo_id = CAIRO_FORMAT_RGB16_565,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "XRGB8888", .depth = 24, .drm_id = DRM_FORMAT_XRGB8888,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 32, },
+	},
+	{ .name = "XRGB2101010", .depth = 30, .drm_id = DRM_FORMAT_XRGB2101010,
+	  .cairo_id = CAIRO_FORMAT_RGB30,
+	  .num_planes = 1, .plane_bpp = { 32, },
+	},
+	{ .name = "ARGB8888", .depth = 32, .drm_id = DRM_FORMAT_ARGB8888,
+	  .cairo_id = CAIRO_FORMAT_ARGB32,
+	  .num_planes = 1, .plane_bpp = { 32, },
+	},
+	{ .name = "NV12", .depth = -1, .drm_id = DRM_FORMAT_NV12,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 2, .plane_bpp = { 8, 16, },
+	},
 };
-#undef DF
-
 #define for_each_format(f)	\
 	for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
 
@@ -193,7 +202,7 @@ static void calc_fb_size_planar(int fd, int width, int height,
 
 	*size_ret = 0;
 
-	for (plane = 0; plane < format->planes; plane++) {
+	for (plane = 0; plane < format->num_planes; plane++) {
 		unsigned plane_stride;
 
 		igt_get_fb_tile_size(fd, tiling, format->plane_bpp[plane], &tile_width, &tile_height);
@@ -203,7 +212,7 @@ static void calc_fb_size_planar(int fd, int width, int height,
 			stride = plane_stride;
 	}
 
-	for (plane = 0; plane < format->planes; plane++) {
+	for (plane = 0; plane < format->num_planes; plane++) {
 		if (offsets)
 			offsets[plane] = *size_ret;
 
@@ -224,9 +233,9 @@ static void calc_fb_size_packed(int fd, int width, int height,
 				unsigned *size_ret, unsigned *stride_ret)
 {
 	unsigned int tile_width, tile_height, stride, size;
-	int byte_width = width * (format->bpp / 8);
+	int byte_width = width * (format->plane_bpp[0] / 8);
 
-	igt_get_fb_tile_size(fd, tiling, format->bpp, &tile_width, &tile_height);
+	igt_get_fb_tile_size(fd, tiling, format->plane_bpp[0], &tile_width, &tile_height);
 
 	if (tiling != LOCAL_DRM_FORMAT_MOD_NONE &&
 	    intel_gen(intel_get_drm_devid(fd)) <= 3) {
@@ -275,7 +284,7 @@ void igt_calc_fb_size(int fd, int width, int height, uint32_t drm_format, uint64
 	struct format_desc_struct *format = lookup_drm_format(drm_format);
 	igt_assert(format);
 
-	if (format->planes > 1)
+	if (format->num_planes > 1)
 		calc_fb_size_planar(fd, width, height, format, tiling, size_ret, stride_ret, NULL);
 	else
 		calc_fb_size_packed(fd, width, height, format, tiling, size_ret, stride_ret);
@@ -374,7 +383,7 @@ static int create_bo_for_fb(int fd, int width, int height,
 	if (tiling || size || stride || is_yuv(format->drm_id)) {
 		unsigned calculated_size, calculated_stride;
 
-		if (format->planes > 1)
+		if (format->num_planes > 1)
 			calc_fb_size_planar(fd, width, height, format, tiling,
 					    &calculated_size, &calculated_stride, offsets);
 		else
@@ -439,8 +448,9 @@ static int create_bo_for_fb(int fd, int width, int height,
 		if (is_dumb)
 			*is_dumb = true;
 
-		return kmstest_dumb_create(fd, width, height, format->bpp, stride_ret,
-					   size_ret);
+		return kmstest_dumb_create(fd, width, height,
+					   format->plane_bpp[0],
+					   stride_ret, size_ret);
 	}
 }
 
@@ -842,7 +852,7 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 
 		handles[0] = fb->gem_handle;
 		pitches[0] = fb->stride;
-		for (i = 0; i < f->planes; i++) {
+		for (i = 0; i < f->num_planes; i++) {
 			handles[i] = fb->gem_handle;
 			pitches[i] = fb->stride;
 		}
@@ -858,13 +868,9 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 	fb->drm_format = format;
 	fb->fb_id = fb_id;
 	fb->fd = fd;
-	fb->num_planes = f->planes ?: 1;
-	fb->plane_bpp[0] = f->bpp;
-	fb->plane_height[0] = height;
-	fb->plane_width[0] = width;
+	fb->num_planes = f->num_planes;
 
-	/* if f->planes is set, then plane_bpp is valid too so use that. */
-	for (i = 0; i < f->planes; i++) {
+	for (i = 0; i < f->num_planes; i++) {
 		fb->plane_bpp[i] = f->plane_bpp[i];
 		fb->plane_height[i] = planar_height(f, height, i);
 		fb->plane_width[i] = planar_width(f, width, i);
@@ -1683,7 +1689,7 @@ uint32_t igt_bpp_depth_to_drm_format(int bpp, int depth)
 	struct format_desc_struct *f;
 
 	for_each_format(f)
-		if (f->bpp == bpp && f->depth == depth)
+		if (f->plane_bpp[0] == bpp && f->depth == depth)
 			return f->drm_id;
 
 
@@ -1706,7 +1712,7 @@ uint32_t igt_drm_format_to_bpp(uint32_t drm_format)
 	igt_assert_f(f, "can't find a bpp format for %08x (%s)\n",
 		     drm_format, igt_format_str(drm_format));
 
-	return f->bpp;
+	return f->plane_bpp[0];
 }
 
 /**
-- 
2.13.6

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3)
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (8 preceding siblings ...)
  2018-02-28 18:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2) Patchwork
@ 2018-02-28 19:34 ` Patchwork
  2018-02-28 23:20 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2) Patchwork
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2018-02-28 19:34 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3)
URL   : https://patchwork.freedesktop.org/series/39066/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
0d47ec161b4eca1b41c5348604aa05b105e5d1cf tests/perf: Fix build warning

with latest DRM-Tip kernel build CI_DRM_3850
573e919160e5 drm-tip: 2018y-02m-28d-16h-17m-37s UTC integration manifest

No testlist changes.

---- Known issues:

Test debugfs_test:
        Subgroup read_all_entries:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test kms_chamelium:
        Subgroup dp-edid-read:
                pass       -> FAIL       (fi-kbl-7500u) fdo#102505

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#102505 https://bugs.freedesktop.org/show_bug.cgi?id=102505

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:419s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:374s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:488s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:286s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:483s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:482s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:476s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:460s
fi-cfl-8700k     total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:393s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:563s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:569s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:416s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:286s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:507s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:389s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:410s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:461s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:418s
fi-kbl-7500u     total:288  pass:262  dwarn:1   dfail:0   fail:1   skip:24  time:452s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:492s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:458s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:493s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:587s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:429s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:503s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:518s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:487s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:477s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:409s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:429s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:392s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1029/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2)
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (9 preceding siblings ...)
  2018-02-28 19:34 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3) Patchwork
@ 2018-02-28 23:20 ` Patchwork
  2018-03-01  0:33 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3) Patchwork
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2018-02-28 23:20 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2)
URL   : https://patchwork.freedesktop.org/series/39066/
State : failure

== Summary ==

---- Possible new issues:

Test kms_3d:
                pass       -> FAIL       (shard-snb)
Test kms_chv_cursor_fail:
        Subgroup pipe-b-64x64-left-edge:
                pass       -> DMESG-WARN (shard-snb)
Test kms_draw_crc:
        Subgroup draw-method-xrgb8888-mmap-cpu-xtiled:
                skip       -> PASS       (shard-snb)
Test kms_flip:
        Subgroup 2x-absolute-wf_vblank:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-absolute-wf_vblank-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-blocking-absolute-wf_vblank:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-blocking-absolute-wf_vblank-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-busy-flip:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-busy-flip-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-bad-tiling:
                skip       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-bad-tiling-interruptible:
                skip       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-dpms:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-dpms-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-dpms-off-vs-modeset:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-dpms-off-vs-modeset-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-fences:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-fences-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-modeset:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-modeset-vs-hang:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-modeset-vs-hang-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-panning:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-panning-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-panning-vs-hang:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-panning-vs-hang-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-rmfb:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-flip-vs-rmfb-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-nonexisting-fb:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-nonexisting-fb-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-plain-flip:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-plain-flip-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-single-buffer-flip-vs-dpms-off-vs-modeset:
                pass       -> FAIL       (shard-hsw)
        Subgroup 2x-single-buffer-flip-vs-dpms-off-vs-modeset-interruptible:
                pass       -> FAIL       (shard-hsw)
        Subgroup absolute-wf_vblank:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-snb)
        Subgroup absolute-wf_vblank-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup basic-flip-vs-dpms:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-snb)
        Subgroup basic-flip-vs-modeset:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup basic-plain-flip:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup blocking-absolute-wf_vblank:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup blocking-absolute-wf_vblank-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup bo-too-big:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup bo-too-big-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup busy-flip:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup busy-flip-interruptible:
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup dpms-off-confusion:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup dpms-off-confusion-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup flip-vs-bad-tiling:
                skip       -> FAIL       (shard-apl)
                skip       -> FAIL       (shard-hsw)
                skip       -> FAIL       (shard-snb)
        Subgroup flip-vs-bad-tiling-interruptible:
                skip       -> FAIL       (shard-apl)
                skip       -> FAIL       (shard-hsw)
                skip       -> FAIL       (shard-snb)
        Subgroup flip-vs-dpms-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup flip-vs-dpms-off-vs-modeset:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-snb)
        Subgroup flip-vs-dpms-off-vs-modeset-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup flip-vs-fences:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup flip-vs-fences-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-snb)
        Subgroup flip-vs-modeset-interruptible:
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup flip-vs-modeset-vs-hang:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
        Subgroup flip-vs-modeset-vs-hang-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
        Subgroup flip-vs-panning:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-snb)
        Subgroup flip-vs-panning-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup flip-vs-panning-vs-hang:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
        Subgroup flip-vs-panning-vs-hang-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
        Subgroup flip-vs-rmfb:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup flip-vs-rmfb-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup nonexisting-fb:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup nonexisting-fb-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup plain-flip-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup single-buffer-flip-vs-dpms-off-vs-modeset:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
        Subgroup single-buffer-flip-vs-dpms-off-vs-modeset-interruptible:
                pass       -> FAIL       (shard-apl)
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)
Test kms_plane_scaling:
        Subgroup pipe-a-scaler-with-pixel-format:
                pass       -> FAIL       (shard-apl)
        Subgroup pipe-a-scaler-with-rotation:
                pass       -> FAIL       (shard-apl)
        Subgroup pipe-b-scaler-with-pixel-format:
                pass       -> FAIL       (shard-apl)
        Subgroup pipe-b-scaler-with-rotation:
                pass       -> FAIL       (shard-apl)
        Subgroup pipe-c-scaler-with-rotation:
                pass       -> FAIL       (shard-apl)
Test kms_setmode:
        Subgroup basic-clone-single-crtc:
                pass       -> FAIL       (shard-hsw)
        Subgroup clone-exclusive-crtc:
                pass       -> FAIL       (shard-hsw)
        Subgroup invalid-clone-exclusive-crtc:
                pass       -> FAIL       (shard-hsw)
        Subgroup invalid-clone-single-crtc:
                pass       -> FAIL       (shard-hsw)
        Subgroup invalid-clone-single-crtc-stealing:
                pass       -> FAIL       (shard-hsw)
Test testdisplay:
                pass       -> FAIL       (shard-hsw)
                pass       -> FAIL       (shard-snb)

---- Known issues:

Test kms_chv_cursor_fail:
        Subgroup pipe-b-256x256-left-edge:
                pass       -> DMESG-WARN (shard-snb) fdo#105185
Test kms_flip:
        Subgroup 2x-wf_vblank-ts-check-interruptible:
                pass       -> FAIL       (shard-hsw) fdo#103928 +4
        Subgroup busy-flip-interruptible:
                pass       -> FAIL       (shard-apl) fdo#103257
        Subgroup dpms-vs-vblank-race:
                pass       -> FAIL       (shard-snb) fdo#103060 +14
        Subgroup flip-vs-absolute-wf_vblank:
                pass       -> FAIL       (shard-snb) fdo#100368 +40
        Subgroup flip-vs-expired-vblank-interruptible:
                pass       -> FAIL       (shard-snb) fdo#102887 +7
        Subgroup flip-vs-fences-interruptible:
                pass       -> FAIL       (shard-hsw) fdo#102614 +3
        Subgroup flip-vs-modeset-interruptible:
                pass       -> FAIL       (shard-apl) fdo#104850
        Subgroup flip-vs-modeset-vs-hang:
                pass       -> FAIL       (shard-snb) fdo#103821 +2
        Subgroup flip-vs-modeset-vs-hang-interruptible:
                pass       -> FAIL       (shard-snb) fdo#104311
        Subgroup flip-vs-panning:
                pass       -> FAIL       (shard-hsw) fdo#103540 +1
Test kms_sysfs_edid_timing:
                warn       -> PASS       (shard-apl) fdo#100047
Test perf:
        Subgroup enable-disable:
                pass       -> FAIL       (shard-apl) fdo#103715
Test testdisplay:
                pass       -> FAIL       (shard-apl) fdo#104727 +1

fdo#105185 https://bugs.freedesktop.org/show_bug.cgi?id=105185
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#103257 https://bugs.freedesktop.org/show_bug.cgi?id=103257
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#104850 https://bugs.freedesktop.org/show_bug.cgi?id=104850
fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821
fdo#104311 https://bugs.freedesktop.org/show_bug.cgi?id=104311
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#103715 https://bugs.freedesktop.org/show_bug.cgi?id=103715
fdo#104727 https://bugs.freedesktop.org/show_bug.cgi?id=104727

shard-apl        total:3460 pass:1762 dwarn:1   dfail:0   fail:67  skip:1630 time:11039s
shard-hsw        total:3460 pass:1665 dwarn:1   dfail:0   fail:107 skip:1686 time:8654s
shard-snb        total:3460 pass:1305 dwarn:3   dfail:0   fail:55  skip:2097 time:5441s
Blacklisted hosts:
shard-kbl        total:3407 pass:1855 dwarn:1   dfail:0   fail:67  skip:1483 time:7778s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1028/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3)
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (10 preceding siblings ...)
  2018-02-28 23:20 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2) Patchwork
@ 2018-03-01  0:33 ` Patchwork
  2018-03-01 16:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev4) Patchwork
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2018-03-01  0:33 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3)
URL   : https://patchwork.freedesktop.org/series/39066/
State : failure

== Summary ==

---- Possible new issues:

Test kms_draw_crc:
        Subgroup draw-method-xrgb8888-mmap-cpu-xtiled:
                skip       -> PASS       (shard-snb)
Test kms_plane_scaling:
        Subgroup pipe-a-scaler-with-pixel-format:
                pass       -> FAIL       (shard-apl)
        Subgroup pipe-a-scaler-with-rotation:
                pass       -> FAIL       (shard-apl)
        Subgroup pipe-b-scaler-with-pixel-format:
                pass       -> FAIL       (shard-apl)
        Subgroup pipe-b-scaler-with-rotation:
                pass       -> FAIL       (shard-apl)
        Subgroup pipe-c-scaler-with-rotation:
                pass       -> FAIL       (shard-apl)

---- Known issues:

Test kms_flip:
        Subgroup dpms-vs-vblank-race-interruptible:
                fail       -> PASS       (shard-hsw) fdo#103060
        Subgroup plain-flip-ts-check:
                fail       -> PASS       (shard-hsw) fdo#100368 +1
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-pri-indfb-multidraw:
                pass       -> FAIL       (shard-snb) fdo#103167
Test kms_plane_scaling:
        Subgroup pipe-c-scaler-with-pixel-format:
                pass       -> FAIL       (shard-apl) fdo#104727
Test kms_rotation_crc:
        Subgroup sprite-rotation-180:
                pass       -> FAIL       (shard-snb) fdo#103925 +1
Test kms_sysfs_edid_timing:
                warn       -> PASS       (shard-apl) fdo#100047
Test perf:
        Subgroup buffer-fill:
                pass       -> FAIL       (shard-apl) fdo#103755

fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#104727 https://bugs.freedesktop.org/show_bug.cgi?id=104727
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#103755 https://bugs.freedesktop.org/show_bug.cgi?id=103755

shard-apl        total:3460 pass:1813 dwarn:1   dfail:0   fail:14  skip:1632 time:12298s
shard-hsw        total:3460 pass:1767 dwarn:1   dfail:0   fail:1   skip:1690 time:11845s
shard-snb        total:3460 pass:1356 dwarn:1   dfail:0   fail:4   skip:2099 time:6572s
Blacklisted hosts:
shard-kbl        total:3360 pass:1885 dwarn:1   dfail:0   fail:14  skip:1458 time:9194s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1029/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v2 8/8] lib: Add support for rendering into packed YCbCr framebuffers
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 8/8] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
  2018-02-27 21:36   ` Chris Wilson
@ 2018-03-01 11:00   ` Ville Syrjala
  2018-03-02  8:35   ` [igt-dev] [PATCH i-g-t v3 " Ville Syrjala
  2 siblings, 0 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-03-01 11:00 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reuse the __convert() cairo stuff to support packed YCbCr framebuffers.

v2: Allow odd fb width since some tests want it

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 198 insertions(+), 10 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 5fce7662d56f..43bfbf78eacc 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -85,6 +85,22 @@ static struct format_desc_struct {
 	  .cairo_id = CAIRO_FORMAT_RGB24,
 	  .num_planes = 2, .plane_bpp = { 8, 16, },
 	},
+	{ .name = "YUYV", .depth = -1, .drm_id = DRM_FORMAT_YUYV,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "YVYU", .depth = -1, .drm_id = DRM_FORMAT_YVYU,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "UYVY", .depth = -1, .drm_id = DRM_FORMAT_UYVY,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "VYUY", .depth = -1, .drm_id = DRM_FORMAT_VYUY,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
 };
 #define for_each_format(f)	\
 	for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
@@ -1511,16 +1527,177 @@ static void convert_rgb24_to_nv12(struct igt_fb *fb, struct fb_convert_blit_uplo
 	}
 }
 
+/* { Y0, U, Y1, V } */
+static const unsigned char swizzle_yuyv[] = { 0, 1, 2, 3 };
+static const unsigned char swizzle_yvyu[] = { 0, 3, 2, 1 };
+static const unsigned char swizzle_uyvy[] = { 1, 0, 3, 2 };
+static const unsigned char swizzle_vyuy[] = { 1, 2, 3, 0 };
+
+static const unsigned char *yuyv_swizzle(uint32_t format)
+{
+	switch (format) {
+	default:
+	case DRM_FORMAT_YUYV:
+		return swizzle_yuyv;
+	case DRM_FORMAT_YVYU:
+		return swizzle_yvyu;
+	case DRM_FORMAT_UYVY:
+		return swizzle_uyvy;
+	case DRM_FORMAT_VYUY:
+		return swizzle_vyuy;
+	}
+}
+
+static void convert_yuyv_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit,
+				  const unsigned char swz[4])
+{
+	int i, j;
+	const uint8_t *yuyv;
+	uint8_t *rgb24 = blit->rgb24.map;
+	unsigned rgb24_stride = blit->rgb24.stride, yuyv_stride = blit->linear.stride;
+	uint8_t *buf = malloc(blit->linear.size);
+	bool full_range = false; /* FIXME */
+	const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
+	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(e, full_range);
+
+	/*
+	 * Reading from the BO is awfully slow because of lack of read caching,
+	 * it's faster to copy the whole BO to a temporary buffer and convert
+	 * from there.
+	 */
+	memcpy(buf, blit->linear.map, blit->linear.size);
+	yuyv = buf;
+
+	/* Convert from limited color range BT.601 */
+	for (i = 0; i < fb->height; i++) {
+		for (j = 0; j < fb->width / 2; j++) {
+			/* Convert 2x1 pixel blocks */
+			struct igt_vec4 yuv0, yuv1;
+			struct igt_vec4 rgb0, rgb1;
+
+			yuv0.d[0] = yuyv[j * 4 + swz[0]];
+			yuv1.d[0] = yuyv[j * 4 + swz[2]];
+			yuv0.d[1] = yuv1.d[1] = yuyv[j * 4 + swz[1]];
+			yuv0.d[2] = yuv1.d[2] = yuyv[j * 4 + swz[3]];
+			yuv0.d[3] = yuv1.d[3] = 1.0f;
+
+			rgb0 = igt_matrix_transform(&m, &yuv0);
+			rgb1 = igt_matrix_transform(&m, &yuv1);
+
+			rgb24[j * 8 + 2] = clamprgb(rgb0.d[0]);
+			rgb24[j * 8 + 1] = clamprgb(rgb0.d[1]);
+			rgb24[j * 8 + 0] = clamprgb(rgb0.d[2]);
+
+			rgb24[j * 8 + 4 + 2] = clamprgb(rgb1.d[0]);
+			rgb24[j * 8 + 4 + 1] = clamprgb(rgb1.d[1]);
+			rgb24[j * 8 + 4 + 0] = clamprgb(rgb1.d[2]);
+		}
+		if (fb->width & 1) {
+			struct igt_vec4 yuv;
+			struct igt_vec4 rgb;
+
+			yuv.d[0] = yuyv[j * 4 + swz[0]];
+			yuv.d[1] = yuyv[j * 4 + swz[1]];
+			yuv.d[2] = yuyv[j * 4 + swz[3]];
+			yuv.d[3] = 1.0f;
+
+			rgb = igt_matrix_transform(&m, &yuv);
+
+			rgb24[j * 8 + 2] = clamprgb(rgb.d[0]);
+			rgb24[j * 8 + 1] = clamprgb(rgb.d[1]);
+			rgb24[j * 8 + 0] = clamprgb(rgb.d[2]);
+		}
+
+		rgb24 += rgb24_stride;
+		yuyv += yuyv_stride;
+	}
+
+	free(buf);
+}
+
+static void convert_rgb24_to_yuyv(struct igt_fb *fb, struct fb_convert_blit_upload *blit,
+				  const unsigned char swz[4])
+{
+	int i, j;
+	uint8_t *yuyv = blit->linear.map;
+	const uint8_t *rgb24 = blit->rgb24.map;
+	unsigned rgb24_stride = blit->rgb24.stride;
+	unsigned yuyv_stride = blit->linear.stride;
+	bool full_range = false; /* FIXME */
+	const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
+	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(e, full_range);
+
+	igt_assert_f(fb->drm_format == DRM_FORMAT_YUYV ||
+		     fb->drm_format == DRM_FORMAT_YVYU ||
+		     fb->drm_format == DRM_FORMAT_UYVY ||
+		     fb->drm_format == DRM_FORMAT_VYUY,
+		     "Conversion not implemented for !YUYV planar formats\n");
+
+	for (i = 0; i < fb->height; i++) {
+		for (j = 0; j < fb->width / 2; j++) {
+			/* Convert 2x1 pixel blocks */
+			struct igt_vec4 rgb0, rgb1;
+			struct igt_vec4 yuv0, yuv1;
+
+			rgb0.d[0] = rgb24[j * 8 + 2];
+			rgb0.d[1] = rgb24[j * 8 + 1];
+			rgb0.d[2] = rgb24[j * 8 + 0];
+			rgb0.d[3] = 1.0f;
+
+			rgb1.d[0] = rgb24[j * 8 + 4 + 2];
+			rgb1.d[1] = rgb24[j * 8 + 4 + 1];
+			rgb1.d[2] = rgb24[j * 8 + 4 + 0];
+			rgb1.d[3] = 1.0f;
+
+			yuv0 = igt_matrix_transform(&m, &rgb0);
+			yuv1 = igt_matrix_transform(&m, &rgb1);
+
+			yuyv[j * 4 + swz[0]] = yuv0.d[0];
+			yuyv[j * 4 + swz[2]] = yuv1.d[0];
+			yuyv[j * 4 + swz[1]] = (yuv0.d[1] + yuv1.d[1]) / 2.0f;
+			yuyv[j * 4 + swz[3]] = (yuv0.d[2] + yuv1.d[2]) / 2.0f;
+		}
+		if (fb->width & 1) {
+			struct igt_vec4 rgb;
+			struct igt_vec4 yuv;
+
+			rgb.d[0] = rgb24[j * 8 + 2];
+			rgb.d[1] = rgb24[j * 8 + 1];
+			rgb.d[2] = rgb24[j * 8 + 0];
+			rgb.d[3] = 1.0f;
+
+			yuv = igt_matrix_transform(&m, &rgb);
+
+			yuyv[j * 4 + swz[0]] = yuv.d[0];
+			yuyv[j * 4 + swz[1]] = yuv.d[1];
+			yuyv[j * 4 + swz[3]] = yuv.d[2];
+		}
+
+		rgb24 += rgb24_stride;
+		yuyv += yuyv_stride;
+	}
+}
+
 static void destroy_cairo_surface__convert(void *arg)
 {
 	struct fb_convert_blit_upload *blit = arg;
 	struct igt_fb *fb = blit->fb;
 
-	/* Convert back to planar! */
-	igt_assert_f(fb->drm_format == DRM_FORMAT_NV12,
-		     "Conversion not implemented for !NV12 planar formats\n");
-
-	convert_rgb24_to_nv12(fb, blit);
+	/* Convert linear rgb back! */
+	switch(fb->drm_format) {
+	case DRM_FORMAT_NV12:
+		convert_rgb24_to_nv12(fb, blit);
+		break;
+	case DRM_FORMAT_YUYV:
+	case DRM_FORMAT_YVYU:
+	case DRM_FORMAT_UYVY:
+	case DRM_FORMAT_VYUY:
+		convert_rgb24_to_yuyv(fb, blit, yuyv_swizzle(fb->drm_format));
+		break;
+	default:
+		igt_assert_f(false, "Conversion not implemented for formats 0x%x\n",
+			     fb->drm_format);
+	}
 
 	munmap(blit->rgb24.map, blit->rgb24.size);
 
@@ -1559,10 +1736,21 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 		memcpy(blit->linear.offsets, fb->offsets, sizeof(fb->offsets));
 	}
 
-	/* Convert to linear! */
-	igt_assert_f(fb->drm_format == DRM_FORMAT_NV12,
-		     "Conversion not implemented for !NV12 planar formats\n");
-	convert_nv12_to_rgb24(fb, blit);
+	/* Convert to linear rgb! */
+	switch(fb->drm_format) {
+	case DRM_FORMAT_NV12:
+		convert_nv12_to_rgb24(fb, blit);
+		break;
+	case DRM_FORMAT_YUYV:
+	case DRM_FORMAT_YVYU:
+	case DRM_FORMAT_UYVY:
+	case DRM_FORMAT_VYUY:
+		convert_yuyv_to_rgb24(fb, blit, yuyv_swizzle(fb->drm_format));
+		break;
+	default:
+		igt_assert_f(false, "Conversion not implemented for formats 0x%x\n",
+			     fb->drm_format);
+	}
 
 	fb->cairo_surface =
 		cairo_image_surface_create_for_data(blit->rgb24.map,
@@ -1589,7 +1777,7 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 cairo_surface_t *igt_get_cairo_surface(int fd, struct igt_fb *fb)
 {
 	if (fb->cairo_surface == NULL) {
-		if (fb->num_planes > 1)
+		if (is_yuv(fb->drm_format))
 			create_cairo_surface__convert(fd, fb);
 		else if (fb->tiling == LOCAL_I915_FORMAT_MOD_Y_TILED ||
 		    fb->tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED)
-- 
2.13.6

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

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

* [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev4)
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (11 preceding siblings ...)
  2018-03-01  0:33 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3) Patchwork
@ 2018-03-01 16:33 ` Patchwork
  2018-03-02 17:30 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev6) Patchwork
  2018-03-02 21:09 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  14 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2018-03-01 16:33 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev4)
URL   : https://patchwork.freedesktop.org/series/39066/
State : failure

== Summary ==

Applying: lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion
Using index info to reconstruct a base tree...
M	lib/igt_fb.c
Falling back to patching base and 3-way merge...
Auto-merging lib/igt_fb.c
Applying: lib: Clear packed YUV formats to black
Applying: lib: Don't use dumb buffers for YCbCr
Applying: lib: Clean up format_desc
Applying: lib: Add igt_matrix
Applying: lib: Add igt_color_encoding
Applying: lib: Use igt_matrix for ycbcr<->rgb conversion
Using index info to reconstruct a base tree...
M	lib/igt_fb.c
Falling back to patching base and 3-way merge...
Auto-merging lib/igt_fb.c
CONFLICT (content): Merge conflict in lib/igt_fb.c
Patch failed at 0007 lib: Use igt_matrix for ycbcr<->rgb conversion
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

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

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

* [igt-dev] [PATCH i-g-t v2 7/8] lib: Use igt_matrix for ycbcr<->rgb conversion
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 7/8] lib: Use igt_matrix for ycbcr<->rgb conversion Ville Syrjala
@ 2018-03-02  8:35   ` Ville Syrjala
  0 siblings, 0 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-03-02  8:35 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Probably horribly inefficient (not that the original code tried to be
particularly efficient), but at least this is now pretty generic so
it'll be super easy to add other color encodings and whatnot.

v2: Rebase

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 135 +++++++++++++++++++++++++++++------------------------------
 1 file changed, 67 insertions(+), 68 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 5e63637fc610..849675b2be49 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -31,8 +31,10 @@
 
 #include "drmtest.h"
 #include "igt_aux.h"
+#include "igt_color_encoding.h"
 #include "igt_fb.h"
 #include "igt_kms.h"
+#include "igt_matrix.h"
 #include "igt_x86.h"
 #include "ioctl_wrappers.h"
 #include "intel_chipset.h"
@@ -1378,6 +1380,9 @@ static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_uplo
 	uint8_t *rgb24 = blit->rgb24.map;
 	unsigned rgb24_stride = blit->rgb24.stride, planar_stride = blit->linear.stride;
 	uint8_t *buf = malloc(blit->linear.size);
+	bool full_range = false; /* FIXME */
+	const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
+	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(e, full_range);
 
 	/*
 	 * Reading from the BO is awfully slow because of lack of read caching,
@@ -1391,27 +1396,27 @@ static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_uplo
 	/* Convert from limited color range BT.601 */
 	for (i = 0; i < fb->height / 2; i++) {
 		for (j = 0; j < fb->width; j++) {
-			float r_, g_, b_, y0, y1, cb, cr;
 			/* Convert 1x2 pixel blocks */
+			struct igt_vec4 yuv0, yuv1;
+			struct igt_vec4 rgb0, rgb1;
 
-			y0 = 1.164f * (y[j] - 16.f);
-			y1 = 1.164f * (y[j + planar_stride] - 16.f);
+			yuv0.d[0] = y[j];
+			yuv1.d[0] = y[j + planar_stride];
+			yuv0.d[1] = yuv1.d[1] = uv[j & ~1];
+			yuv0.d[2] = yuv1.d[2] = uv[j | 1];
+			yuv0.d[3] = yuv1.d[3] = 1.0f;
 
-			cb = uv[j & ~1] - 128.f;
-			cr = uv[j | 1] - 128.f;
+			rgb0 = igt_matrix_transform(&m, &yuv0);
+			rgb1 = igt_matrix_transform(&m, &yuv1);
 
-			r_ =  0.000f * cb +  1.596f * cr;
-			g_ = -0.392f * cb + -0.813f * cr;
-			b_ =  2.017f * cb +  0.000f * cr;
+			rgb24[j * 4 + 2] = clamprgb(rgb0.d[0]);
+			rgb24[j * 4 + 2 + rgb24_stride] = clamprgb(rgb1.d[0]);
 
-			rgb24[j * 4 + 2] = clamprgb(y0 + r_);
-			rgb24[j * 4 + 2 + rgb24_stride] = clamprgb(y1 + r_);
+			rgb24[j * 4 + 1] = clamprgb(rgb0.d[1]);
+			rgb24[j * 4 + 1 + rgb24_stride] = clamprgb(rgb1.d[1]);
 
-			rgb24[j * 4 + 1] = clamprgb(y0 + g_);
-			rgb24[j * 4 + 1 + rgb24_stride] = clamprgb(y1 + g_);
-
-			rgb24[j * 4] = clamprgb(y0 + b_);
-			rgb24[j * 4 + rgb24_stride] = clamprgb(y1 + b_);
+			rgb24[j * 4 + 0] = clamprgb(rgb0.d[2]);
+			rgb24[j * 4 + 0 + rgb24_stride] = clamprgb(rgb1.d[2]);
 		}
 
 		rgb24 += 2 * rgb24_stride;
@@ -1422,20 +1427,20 @@ static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_uplo
 	if (fb->height & 1) {
 		/* Convert last row */
 		for (j = 0; j < fb->width; j++) {
-			float r_, g_, b_, y0, cb, cr;
 			/* Convert single pixel */
+			struct igt_vec4 yuv;
+			struct igt_vec4 rgb;
 
-			cb = uv[j & ~1] - 128.f;
-			cr = uv[j | 1] - 128.f;
+			yuv.d[0] = y[j];
+			yuv.d[1] = uv[j & ~1];
+			yuv.d[2] = uv[j | 1];
+			yuv.d[3] = 1.0f;
 
-			y0 = 1.164f * (y[j] - 16.f);
-			r_ =  0.000f * cb +  1.596f * cr;
-			g_ = -0.392f * cb + -0.813f * cr;
-			b_ =  2.017f * cb +  0.000f * cr;
+			rgb = igt_matrix_transform(&m, &yuv);
 
-			rgb24[j * 4 + 2] = clamprgb(y0 + r_);
-			rgb24[j * 4 + 1] = clamprgb(y0 + g_);
-			rgb24[j * 4] = clamprgb(y0 + b_);
+			rgb24[j * 4 + 2] = clamprgb(rgb.d[0]);
+			rgb24[j * 4 + 1] = clamprgb(rgb.d[1]);
+			rgb24[j * 4] = clamprgb(rgb.d[2]);
 		}
 	}
 
@@ -1450,65 +1455,59 @@ static void convert_rgb24_to_nv12(struct igt_fb *fb, struct fb_convert_blit_uplo
 	const uint8_t *rgb24 = blit->rgb24.map;
 	unsigned rgb24_stride = blit->rgb24.stride;
 	unsigned planar_stride = blit->linear.stride;
+	bool full_range = false; /* FIXME */
+	const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
+	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(e, full_range);
 
 	igt_assert_f(fb->drm_format == DRM_FORMAT_NV12,
 		     "Conversion not implemented for !NV12 planar formats\n");
 
-	for (i = 0; i < fb->plane_height[0]; i++) {
-		/* Use limited color range BT.601 */
+	for (i = 0; i < fb->height / 2; i++) {
+		for (j = 0; j < fb->width; j++) {
+			struct igt_vec4 rgb0, rgb1;
+			struct igt_vec4 yuv0, yuv1;
 
-		for (j = 0; j < fb->plane_width[0]; j++) {
-			float yf = 0.257f * rgb24[j * 4 + 2] +
-				   0.504f * rgb24[j * 4 + 1] +
-				   0.098f * rgb24[j * 4] + 16;
+			rgb0.d[0] = rgb24[j * 4 + 2];
+			rgb0.d[1] = rgb24[j * 4 + 1];
+			rgb0.d[2] = rgb24[j * 4 + 0];
+			rgb0.d[3] = 1.0f;
 
-			y[j] = (uint8_t)yf;
-		}
+			rgb1.d[0] = rgb24[j * 4 + 2 + rgb24_stride];
+			rgb1.d[1] = rgb24[j * 4 + 1 + rgb24_stride];
+			rgb1.d[2] = rgb24[j * 4 + 0 + rgb24_stride];
+			rgb1.d[3] = 1.0f;
 
-		rgb24 += rgb24_stride;
-		y += planar_stride;
-	}
+			yuv0 = igt_matrix_transform(&m, &rgb0);
+			yuv1 = igt_matrix_transform(&m, &rgb1);
 
-	rgb24 = blit->rgb24.map;
+			y[j] = yuv0.d[0];
+			y[j + planar_stride] = yuv1.d[0];
 
-	for (i = 0; i < fb->height / 2; i++) {
-		for (j = 0; j < fb->plane_width[1]; j++) {
-			/*
-			 * Pixel center for Cb'Cr' is between the left top and
-			 * bottom pixel in a 2x2 block, so take the average.
-			 */
-			float uf = -0.148f/2 * rgb24[j * 8 + 2] +
-				   -0.148f/2 * rgb24[j * 8 + 2 + rgb24_stride] +
-				   -0.291f/2 * rgb24[j * 8 + 1] +
-				   -0.291f/2 * rgb24[j * 8 + 1 + rgb24_stride] +
-				    0.439f/2 * rgb24[j * 8] +
-				    0.439f/2 * rgb24[j * 8 + rgb24_stride] + 128;
-			float vf =  0.439f/2 * rgb24[j * 8 + 2] +
-				    0.439f/2 * rgb24[j * 8 + 2 + rgb24_stride] +
-				   -0.368f/2 * rgb24[j * 8 + 1] +
-				   -0.368f/2 * rgb24[j * 8 + 1 + rgb24_stride] +
-				   -0.071f/2 * rgb24[j * 8] +
-				   -0.071f/2 * rgb24[j * 8 + rgb24_stride] + 128;
-			uv[j * 2] = (uint8_t)uf;
-			uv[j * 2 + 1] = (uint8_t)vf;
+			uv[j * 2 + 0] = (yuv0.d[1] + yuv1.d[1]) / 2.0f;
+			uv[j * 2 + 1] = (yuv0.d[2] + yuv1.d[2]) / 2.0f;
 		}
 
 		rgb24 += 2 * rgb24_stride;
+		y += 2 * planar_stride;
 		uv += planar_stride;
 	}
 
 	/* Last row cannot be interpolated between 2 pixels, take the single value */
-	if (i < fb->plane_height[1]) {
-		for (j = 0; j < fb->plane_width[1]; j++) {
-			float uf = -0.148f * rgb24[j * 8 + 2] +
-				   -0.291f * rgb24[j * 8 + 1] +
-				    0.439f * rgb24[j * 8] + 128;
-			float vf =  0.439f * rgb24[j * 8 + 2] +
-				   -0.368f * rgb24[j * 8 + 1] +
-				   -0.071f * rgb24[j * 8] + 128;
-
-			uv[j * 2] = (uint8_t)uf;
-			uv[j * 2 + 1] = (uint8_t)vf;
+	if (fb->height & 1) {
+		for (j = 0; j < fb->width; j++) {
+			struct igt_vec4 rgb;
+			struct igt_vec4 yuv;
+
+			rgb.d[0] = rgb24[j * 4 + 2];
+			rgb.d[1] = rgb24[j * 4 + 1];
+			rgb.d[2] = rgb24[j * 4 + 0];
+			rgb.d[3] = 1.0f;
+
+			yuv = igt_matrix_transform(&m, &rgb);
+
+			y[j] = yuv.d[0];
+			uv[j * 2 + 0] = yuv.d[1];
+			uv[j * 2 + 1] = yuv.d[2];
 		}
 	}
 }
-- 
2.13.6

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

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

* [igt-dev] [PATCH i-g-t v3 8/8] lib: Add support for rendering into packed YCbCr framebuffers
  2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 8/8] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
  2018-02-27 21:36   ` Chris Wilson
  2018-03-01 11:00   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
@ 2018-03-02  8:35   ` Ville Syrjala
  2 siblings, 0 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-03-02  8:35 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reuse the __convert() cairo stuff to support packed YCbCr framebuffers.

v2: Allow odd fb width since some tests want it
v3: Use igt_memcpy_from_wc()

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 198 insertions(+), 10 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 849675b2be49..f2723532f200 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -86,6 +86,22 @@ static struct format_desc_struct {
 	  .cairo_id = CAIRO_FORMAT_RGB24,
 	  .num_planes = 2, .plane_bpp = { 8, 16, },
 	},
+	{ .name = "YUYV", .depth = -1, .drm_id = DRM_FORMAT_YUYV,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "YVYU", .depth = -1, .drm_id = DRM_FORMAT_YVYU,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "UYVY", .depth = -1, .drm_id = DRM_FORMAT_UYVY,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
+	{ .name = "VYUY", .depth = -1, .drm_id = DRM_FORMAT_VYUY,
+	  .cairo_id = CAIRO_FORMAT_RGB24,
+	  .num_planes = 1, .plane_bpp = { 16, },
+	},
 };
 #define for_each_format(f)	\
 	for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
@@ -1512,16 +1528,177 @@ static void convert_rgb24_to_nv12(struct igt_fb *fb, struct fb_convert_blit_uplo
 	}
 }
 
+/* { Y0, U, Y1, V } */
+static const unsigned char swizzle_yuyv[] = { 0, 1, 2, 3 };
+static const unsigned char swizzle_yvyu[] = { 0, 3, 2, 1 };
+static const unsigned char swizzle_uyvy[] = { 1, 0, 3, 2 };
+static const unsigned char swizzle_vyuy[] = { 1, 2, 3, 0 };
+
+static const unsigned char *yuyv_swizzle(uint32_t format)
+{
+	switch (format) {
+	default:
+	case DRM_FORMAT_YUYV:
+		return swizzle_yuyv;
+	case DRM_FORMAT_YVYU:
+		return swizzle_yvyu;
+	case DRM_FORMAT_UYVY:
+		return swizzle_uyvy;
+	case DRM_FORMAT_VYUY:
+		return swizzle_vyuy;
+	}
+}
+
+static void convert_yuyv_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit,
+				  const unsigned char swz[4])
+{
+	int i, j;
+	const uint8_t *yuyv;
+	uint8_t *rgb24 = blit->rgb24.map;
+	unsigned rgb24_stride = blit->rgb24.stride, yuyv_stride = blit->linear.stride;
+	uint8_t *buf = malloc(blit->linear.size);
+	bool full_range = false; /* FIXME */
+	const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
+	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(e, full_range);
+
+	/*
+	 * Reading from the BO is awfully slow because of lack of read caching,
+	 * it's faster to copy the whole BO to a temporary buffer and convert
+	 * from there.
+	 */
+	igt_memcpy_from_wc(buf, blit->linear.map, blit->linear.size);
+	yuyv = buf;
+
+	/* Convert from limited color range BT.601 */
+	for (i = 0; i < fb->height; i++) {
+		for (j = 0; j < fb->width / 2; j++) {
+			/* Convert 2x1 pixel blocks */
+			struct igt_vec4 yuv0, yuv1;
+			struct igt_vec4 rgb0, rgb1;
+
+			yuv0.d[0] = yuyv[j * 4 + swz[0]];
+			yuv1.d[0] = yuyv[j * 4 + swz[2]];
+			yuv0.d[1] = yuv1.d[1] = yuyv[j * 4 + swz[1]];
+			yuv0.d[2] = yuv1.d[2] = yuyv[j * 4 + swz[3]];
+			yuv0.d[3] = yuv1.d[3] = 1.0f;
+
+			rgb0 = igt_matrix_transform(&m, &yuv0);
+			rgb1 = igt_matrix_transform(&m, &yuv1);
+
+			rgb24[j * 8 + 2] = clamprgb(rgb0.d[0]);
+			rgb24[j * 8 + 1] = clamprgb(rgb0.d[1]);
+			rgb24[j * 8 + 0] = clamprgb(rgb0.d[2]);
+
+			rgb24[j * 8 + 4 + 2] = clamprgb(rgb1.d[0]);
+			rgb24[j * 8 + 4 + 1] = clamprgb(rgb1.d[1]);
+			rgb24[j * 8 + 4 + 0] = clamprgb(rgb1.d[2]);
+		}
+		if (fb->width & 1) {
+			struct igt_vec4 yuv;
+			struct igt_vec4 rgb;
+
+			yuv.d[0] = yuyv[j * 4 + swz[0]];
+			yuv.d[1] = yuyv[j * 4 + swz[1]];
+			yuv.d[2] = yuyv[j * 4 + swz[3]];
+			yuv.d[3] = 1.0f;
+
+			rgb = igt_matrix_transform(&m, &yuv);
+
+			rgb24[j * 8 + 2] = clamprgb(rgb.d[0]);
+			rgb24[j * 8 + 1] = clamprgb(rgb.d[1]);
+			rgb24[j * 8 + 0] = clamprgb(rgb.d[2]);
+		}
+
+		rgb24 += rgb24_stride;
+		yuyv += yuyv_stride;
+	}
+
+	free(buf);
+}
+
+static void convert_rgb24_to_yuyv(struct igt_fb *fb, struct fb_convert_blit_upload *blit,
+				  const unsigned char swz[4])
+{
+	int i, j;
+	uint8_t *yuyv = blit->linear.map;
+	const uint8_t *rgb24 = blit->rgb24.map;
+	unsigned rgb24_stride = blit->rgb24.stride;
+	unsigned yuyv_stride = blit->linear.stride;
+	bool full_range = false; /* FIXME */
+	const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
+	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(e, full_range);
+
+	igt_assert_f(fb->drm_format == DRM_FORMAT_YUYV ||
+		     fb->drm_format == DRM_FORMAT_YVYU ||
+		     fb->drm_format == DRM_FORMAT_UYVY ||
+		     fb->drm_format == DRM_FORMAT_VYUY,
+		     "Conversion not implemented for !YUYV planar formats\n");
+
+	for (i = 0; i < fb->height; i++) {
+		for (j = 0; j < fb->width / 2; j++) {
+			/* Convert 2x1 pixel blocks */
+			struct igt_vec4 rgb0, rgb1;
+			struct igt_vec4 yuv0, yuv1;
+
+			rgb0.d[0] = rgb24[j * 8 + 2];
+			rgb0.d[1] = rgb24[j * 8 + 1];
+			rgb0.d[2] = rgb24[j * 8 + 0];
+			rgb0.d[3] = 1.0f;
+
+			rgb1.d[0] = rgb24[j * 8 + 4 + 2];
+			rgb1.d[1] = rgb24[j * 8 + 4 + 1];
+			rgb1.d[2] = rgb24[j * 8 + 4 + 0];
+			rgb1.d[3] = 1.0f;
+
+			yuv0 = igt_matrix_transform(&m, &rgb0);
+			yuv1 = igt_matrix_transform(&m, &rgb1);
+
+			yuyv[j * 4 + swz[0]] = yuv0.d[0];
+			yuyv[j * 4 + swz[2]] = yuv1.d[0];
+			yuyv[j * 4 + swz[1]] = (yuv0.d[1] + yuv1.d[1]) / 2.0f;
+			yuyv[j * 4 + swz[3]] = (yuv0.d[2] + yuv1.d[2]) / 2.0f;
+		}
+		if (fb->width & 1) {
+			struct igt_vec4 rgb;
+			struct igt_vec4 yuv;
+
+			rgb.d[0] = rgb24[j * 8 + 2];
+			rgb.d[1] = rgb24[j * 8 + 1];
+			rgb.d[2] = rgb24[j * 8 + 0];
+			rgb.d[3] = 1.0f;
+
+			yuv = igt_matrix_transform(&m, &rgb);
+
+			yuyv[j * 4 + swz[0]] = yuv.d[0];
+			yuyv[j * 4 + swz[1]] = yuv.d[1];
+			yuyv[j * 4 + swz[3]] = yuv.d[2];
+		}
+
+		rgb24 += rgb24_stride;
+		yuyv += yuyv_stride;
+	}
+}
+
 static void destroy_cairo_surface__convert(void *arg)
 {
 	struct fb_convert_blit_upload *blit = arg;
 	struct igt_fb *fb = blit->fb;
 
-	/* Convert back to planar! */
-	igt_assert_f(fb->drm_format == DRM_FORMAT_NV12,
-		     "Conversion not implemented for !NV12 planar formats\n");
-
-	convert_rgb24_to_nv12(fb, blit);
+	/* Convert linear rgb back! */
+	switch(fb->drm_format) {
+	case DRM_FORMAT_NV12:
+		convert_rgb24_to_nv12(fb, blit);
+		break;
+	case DRM_FORMAT_YUYV:
+	case DRM_FORMAT_YVYU:
+	case DRM_FORMAT_UYVY:
+	case DRM_FORMAT_VYUY:
+		convert_rgb24_to_yuyv(fb, blit, yuyv_swizzle(fb->drm_format));
+		break;
+	default:
+		igt_assert_f(false, "Conversion not implemented for formats 0x%x\n",
+			     fb->drm_format);
+	}
 
 	munmap(blit->rgb24.map, blit->rgb24.size);
 
@@ -1560,10 +1737,21 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 		memcpy(blit->linear.offsets, fb->offsets, sizeof(fb->offsets));
 	}
 
-	/* Convert to linear! */
-	igt_assert_f(fb->drm_format == DRM_FORMAT_NV12,
-		     "Conversion not implemented for !NV12 planar formats\n");
-	convert_nv12_to_rgb24(fb, blit);
+	/* Convert to linear rgb! */
+	switch(fb->drm_format) {
+	case DRM_FORMAT_NV12:
+		convert_nv12_to_rgb24(fb, blit);
+		break;
+	case DRM_FORMAT_YUYV:
+	case DRM_FORMAT_YVYU:
+	case DRM_FORMAT_UYVY:
+	case DRM_FORMAT_VYUY:
+		convert_yuyv_to_rgb24(fb, blit, yuyv_swizzle(fb->drm_format));
+		break;
+	default:
+		igt_assert_f(false, "Conversion not implemented for formats 0x%x\n",
+			     fb->drm_format);
+	}
 
 	fb->cairo_surface =
 		cairo_image_surface_create_for_data(blit->rgb24.map,
@@ -1590,7 +1778,7 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 cairo_surface_t *igt_get_cairo_surface(int fd, struct igt_fb *fb)
 {
 	if (fb->cairo_surface == NULL) {
-		if (fb->num_planes > 1)
+		if (is_yuv(fb->drm_format))
 			create_cairo_surface__convert(fd, fb);
 		else if (fb->tiling == LOCAL_I915_FORMAT_MOD_Y_TILED ||
 		    fb->tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED)
-- 
2.13.6

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev6)
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (12 preceding siblings ...)
  2018-03-01 16:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev4) Patchwork
@ 2018-03-02 17:30 ` Patchwork
  2018-03-02 21:09 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  14 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2018-03-02 17:30 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev6)
URL   : https://patchwork.freedesktop.org/series/39066/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
bddfb8dd3c1767f13d2af578d5c3d897fddf0dcd igt/gem_ctx_switch: Exercise all engines at once

with latest DRM-Tip kernel build CI_DRM_3867
4f4e4dd52a30 drm-tip: 2018y-03m-02d-16h-28m-21s UTC integration manifest

No testlist changes.

---- Known issues:

Test debugfs_test:
        Subgroup read_all_entries:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:420s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:374s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:488s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:280s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:483s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:470s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:455s
fi-cfl-8700k     total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:394s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:567s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:585s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:414s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:289s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:514s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:387s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:412s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:455s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:411s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:453s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:491s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:450s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:493s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:588s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:426s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:503s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:520s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:486s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:486s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:406s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:431s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:394s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1040/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev6)
  2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
                   ` (13 preceding siblings ...)
  2018-03-02 17:30 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev6) Patchwork
@ 2018-03-02 21:09 ` Patchwork
  14 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2018-03-02 21:09 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev6)
URL   : https://patchwork.freedesktop.org/series/39066/
State : success

== Summary ==

---- Known issues:

Test gem_eio:
        Subgroup in-flight:
                incomplete -> PASS       (shard-apl) fdo#104945
Test kms_chv_cursor_fail:
        Subgroup pipe-b-128x128-left-edge:
                pass       -> DMESG-WARN (shard-snb) fdo#105185
Test kms_fbcon_fbt:
        Subgroup fbc-suspend:
                incomplete -> PASS       (shard-hsw) fdo#105087
Test kms_flip:
        Subgroup modeset-vs-vblank-race:
                pass       -> FAIL       (shard-hsw) fdo#103060 +1

fdo#104945 https://bugs.freedesktop.org/show_bug.cgi?id=104945
fdo#105185 https://bugs.freedesktop.org/show_bug.cgi?id=105185
fdo#105087 https://bugs.freedesktop.org/show_bug.cgi?id=105087
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060

shard-apl        total:3463 pass:1822 dwarn:1   dfail:0   fail:7   skip:1632 time:12725s
shard-hsw        total:3463 pass:1768 dwarn:1   dfail:0   fail:3   skip:1690 time:12075s
shard-snb        total:3463 pass:1360 dwarn:3   dfail:0   fail:1   skip:2099 time:7083s
Blacklisted hosts:
shard-kbl        total:3335 pass:1872 dwarn:1   dfail:0   fail:8   skip:1452 time:9274s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1040/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2018-03-02 21:09 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 2/8] lib: Clear packed YUV formats to black Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 3/8] lib: Don't use dumb buffers for YCbCr Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 4/8] lib: Clean up format_desc Ville Syrjala
2018-02-28 18:44   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 5/8] lib: Add igt_matrix Ville Syrjala
2018-02-27 21:33   ` Chris Wilson
2018-02-28 14:57     ` Ville Syrjälä
2018-02-28 15:01       ` Ville Syrjälä
2018-02-28 17:36   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 6/8] lib: Add igt_color_encoding Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 7/8] lib: Use igt_matrix for ycbcr<->rgb conversion Ville Syrjala
2018-03-02  8:35   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 8/8] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
2018-02-27 21:36   ` Chris Wilson
2018-02-28 14:59     ` Ville Syrjälä
2018-03-01 11:00   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-03-02  8:35   ` [igt-dev] [PATCH i-g-t v3 " Ville Syrjala
2018-02-27 23:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Patchwork
2018-02-28 18:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2) Patchwork
2018-02-28 19:34 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3) Patchwork
2018-02-28 23:20 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2) Patchwork
2018-03-01  0:33 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3) Patchwork
2018-03-01 16:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev4) Patchwork
2018-03-02 17:30 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev6) Patchwork
2018-03-02 21:09 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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.