All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black
@ 2018-05-23 18:31 Ville Syrjala
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 2/8] lib: Don't use dumb buffers for YCbCr Ville Syrjala
                   ` (11 more replies)
  0 siblings, 12 replies; 19+ messages in thread
From: Ville Syrjala @ 2018-05-23 18:31 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.

v2: Nuke the debug messages

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

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index a926a08d44e1..4f17f9945419 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -335,6 +335,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,
@@ -369,6 +379,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);
@@ -377,10 +388,23 @@ 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:
+				memset32(ptr, full_range ? 0x80008000 : 0x80108010,
+					 calculated_stride * height / 4);
+				break;
+			case DRM_FORMAT_UYVY:
+			case DRM_FORMAT_VYUY:
+				memset32(ptr, full_range ? 0x00800080 : 0x10801080,
+					 calculated_stride * height / 4);
+				break;
 			}
 			gem_munmap(ptr, size);
 
-- 
2.16.1

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

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

* [igt-dev] [PATCH i-g-t 2/8] lib: Don't use dumb buffers for YCbCr
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
@ 2018-05-23 18:31 ` Ville Syrjala
  2018-06-05  9:51   ` Maarten Lankhorst
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 3/8] lib: Clean up format_desc Ville Syrjala
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 19+ messages in thread
From: Ville Syrjala @ 2018-05-23 18:31 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.

v2: Use igt_format_is_yuv()

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

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 4f17f9945419..c89f7850ed70 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -359,7 +359,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 || igt_format_is_yuv(format->drm_id)) {
 		unsigned calculated_size, calculated_stride;
 
 		if (format->planes > 1)
-- 
2.16.1

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

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

* [igt-dev] [PATCH i-g-t 3/8] lib: Clean up format_desc
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 2/8] lib: Don't use dumb buffers for YCbCr Ville Syrjala
@ 2018-05-23 18:31 ` Ville Syrjala
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 4/8] lib: Use igt_matrix for ycbcr<->rgb conversion Ville Syrjala
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Ville Syrjala @ 2018-05-23 18:31 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 c89f7850ed70..9edee74b57c3 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -57,26 +57,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++)
 
@@ -195,7 +204,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);
@@ -205,7 +214,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;
 
@@ -226,9 +235,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) {
@@ -277,7 +286,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);
@@ -362,7 +371,7 @@ static int create_bo_for_fb(int fd, int width, int height,
 	if (tiling || size || stride || igt_format_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
@@ -425,8 +434,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);
 	}
 }
 
@@ -828,7 +838,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;
 		}
@@ -844,13 +854,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);
@@ -1669,7 +1675,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;
 
 
@@ -1692,7 +1698,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.16.1

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

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

* [igt-dev] [PATCH i-g-t 4/8] lib: Use igt_matrix for ycbcr<->rgb conversion
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 2/8] lib: Don't use dumb buffers for YCbCr Ville Syrjala
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 3/8] lib: Clean up format_desc Ville Syrjala
@ 2018-05-23 18:31 ` Ville Syrjala
  2018-06-06 10:11   ` Maarten Lankhorst
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 5/8] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 19+ messages in thread
From: Ville Syrjala @ 2018-05-23 18:31 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
v3: Deal with the new color_encoding/range enums
v4: Fix the code to actually work, and do things in 2x2 blocks
    Keep the chroma siting comment and pimp it up a bit

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

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 9edee74b57c3..ceaaea70f64b 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_batchbuffer.h"
@@ -1356,6 +1358,21 @@ static uint8_t clamprgb(float val)
 	return clamp(val, 0.0f, 255.0f);
 }
 
+static void read_rgb(struct igt_vec4 *rgb, const uint8_t *rgb24)
+{
+	rgb->d[0] = rgb24[2];
+	rgb->d[1] = rgb24[1];
+	rgb->d[2] = rgb24[0];
+	rgb->d[3] = 1.0f;
+}
+
+static void write_rgb(uint8_t *rgb24, const struct igt_vec4 *rgb)
+{
+	rgb24[2] = clamprgb(rgb->d[0]);
+	rgb24[1] = clamprgb(rgb->d[1]);
+	rgb24[0] = clamprgb(rgb->d[2]);
+}
+
 static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit)
 {
 	int i, j;
@@ -1363,6 +1380,8 @@ 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);
+	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(IGT_COLOR_YCBCR_BT601,
+						    IGT_COLOR_YCBCR_LIMITED_RANGE);
 
 	/*
 	 * Reading from the BO is awfully slow because of lack of read caching,
@@ -1373,30 +1392,49 @@ static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_uplo
 	y = &buf[blit->linear.offsets[0]];
 	uv = &buf[blit->linear.offsets[1]];
 
-	/* 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 */
-
-			y0 = 1.164f * (y[j] - 16.f);
-			y1 = 1.164f * (y[j + planar_stride] - 16.f);
+		for (j = 0; j < fb->width / 2; j++) {
+			/* Convert 2x2 pixel blocks */
+			struct igt_vec4 yuv[4];
+			struct igt_vec4 rgb[4];
+
+			yuv[0].d[0] = y[j * 2 + 0];
+			yuv[1].d[0] = y[j * 2 + 1];
+			yuv[2].d[0] = y[j * 2 + 0 + planar_stride];
+			yuv[3].d[0] = y[j * 2 + 1 + planar_stride];
+
+			yuv[0].d[1] = yuv[1].d[1] = yuv[2].d[1] = yuv[3].d[1] = uv[j * 2 + 0];
+			yuv[0].d[2] = yuv[1].d[2] = yuv[2].d[2] = yuv[3].d[2] = uv[j * 2 + 1];
+			yuv[0].d[3] = yuv[1].d[3] = yuv[2].d[3] = yuv[3].d[3] = 1.0f;
+
+			rgb[0] = igt_matrix_transform(&m, &yuv[0]);
+			rgb[1] = igt_matrix_transform(&m, &yuv[1]);
+			rgb[2] = igt_matrix_transform(&m, &yuv[2]);
+			rgb[3] = igt_matrix_transform(&m, &yuv[3]);
+
+			write_rgb(&rgb24[j * 8 + 0], &rgb[0]);
+			write_rgb(&rgb24[j * 8 + 4], &rgb[1]);
+			write_rgb(&rgb24[j * 8 + 0 + rgb24_stride], &rgb[2]);
+			write_rgb(&rgb24[j * 8 + 4 + rgb24_stride], &rgb[3]);
+		}
 
-			cb = uv[j & ~1] - 128.f;
-			cr = uv[j | 1] - 128.f;
+		if (fb->width & 1) {
+			/* Convert 1x2 pixel block */
+			struct igt_vec4 yuv[2];
+			struct igt_vec4 rgb[2];
 
-			r_ =  0.000f * cb +  1.596f * cr;
-			g_ = -0.392f * cb + -0.813f * cr;
-			b_ =  2.017f * cb +  0.000f * cr;
+			yuv[0].d[0] = y[j * 2 + 0];
+			yuv[1].d[0] = y[j * 2 + 0 + planar_stride];
 
-			rgb24[j * 4 + 2] = clamprgb(y0 + r_);
-			rgb24[j * 4 + 2 + rgb24_stride] = clamprgb(y1 + r_);
+			yuv[0].d[1] = yuv[1].d[1] = uv[j * 2 + 0];
+			yuv[0].d[2] = yuv[1].d[2] = uv[j * 2 + 1];
+			yuv[0].d[3] = yuv[1].d[3] = 1.0f;
 
-			rgb24[j * 4 + 1] = clamprgb(y0 + g_);
-			rgb24[j * 4 + 1 + rgb24_stride] = clamprgb(y1 + g_);
+			rgb[0] = igt_matrix_transform(&m, &yuv[0]);
+			rgb[1] = igt_matrix_transform(&m, &yuv[1]);
 
-			rgb24[j * 4] = clamprgb(y0 + b_);
-			rgb24[j * 4 + rgb24_stride] = clamprgb(y1 + b_);
+			write_rgb(&rgb24[j * 8 + 0], &rgb[0]);
+			write_rgb(&rgb24[j * 8 + 0 + rgb24_stride], &rgb[1]);
 		}
 
 		rgb24 += 2 * rgb24_stride;
@@ -1406,21 +1444,37 @@ 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;
+		for (j = 0; j < fb->width / 2; j++) {
+			/* Convert 2x1 pixel blocks */
+			struct igt_vec4 yuv[2];
+			struct igt_vec4 rgb[2];
+
+			yuv[0].d[0] = y[j * 2 + 0];
+			yuv[1].d[0] = y[j * 2 + 1];
+			yuv[0].d[1] = yuv[1].d[1] = uv[j * 2 + 0];
+			yuv[0].d[2] = yuv[1].d[2] = uv[j * 2 + 1];
+			yuv[0].d[3] = yuv[1].d[3] = 1.0f;
+
+			rgb[0] = igt_matrix_transform(&m, &yuv[0]);
+			rgb[1] = igt_matrix_transform(&m, &yuv[1]);
+
+			write_rgb(&rgb24[j * 8 + 0], &rgb[0]);
+			write_rgb(&rgb24[j * 8 + 4], &rgb[0]);
+		}
+
+		if (fb->width & 1) {
 			/* 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 * 2 + 0];
+			yuv.d[1] = uv[j * 2 + 0];
+			yuv.d[2] = uv[j * 2 + 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_);
+			write_rgb(&rgb24[j * 8 + 0], &rgb);
 		}
 	}
 
@@ -1435,65 +1489,101 @@ 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;
+	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(IGT_COLOR_YCBCR_BT601,
+						    IGT_COLOR_YCBCR_LIMITED_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 (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;
+	for (i = 0; i < fb->height / 2; i++) {
+		for (j = 0; j < fb->width / 2; j++) {
+			/* Convert 2x2 pixel blocks */
+			struct igt_vec4 rgb[4];
+			struct igt_vec4 yuv[4];
+
+			read_rgb(&rgb[0], &rgb24[j * 8 + 0]);
+			read_rgb(&rgb[1], &rgb24[j * 8 + 4]);
+			read_rgb(&rgb[2], &rgb24[j * 8 + 0 + rgb24_stride]);
+			read_rgb(&rgb[3], &rgb24[j * 8 + 4 + rgb24_stride]);
+
+			yuv[0] = igt_matrix_transform(&m, &rgb[0]);
+			yuv[1] = igt_matrix_transform(&m, &rgb[1]);
+			yuv[2] = igt_matrix_transform(&m, &rgb[2]);
+			yuv[3] = igt_matrix_transform(&m, &rgb[3]);
+
+			y[j * 2 + 0] = yuv[0].d[0];
+			y[j * 2 + 1] = yuv[1].d[0];
+			y[j * 2 + 0 + planar_stride] = yuv[2].d[0];
+			y[j * 2 + 1 + planar_stride] = yuv[3].d[0];
 
-			y[j] = (uint8_t)yf;
+			/*
+			 * We assume the MPEG2 chroma siting convention, where
+			 * pixel center for Cb'Cr' is between the left top and
+			 * bottom pixel in a 2x2 block, so take the average.
+			 */
+			uv[j * 2 + 0] = (yuv[0].d[1] + yuv[2].d[1]) / 2.0f;
+			uv[j * 2 + 1] = (yuv[0].d[2] + yuv[2].d[2]) / 2.0f;
 		}
 
-		rgb24 += rgb24_stride;
-		y += planar_stride;
-	}
+		if (fb->width & 1) {
+			/* Convert 1x2 pixel block */
+			struct igt_vec4 rgb[2];
+			struct igt_vec4 yuv[2];
 
-	rgb24 = blit->rgb24.map;
+			read_rgb(&rgb[0], &rgb24[j * 8 + 0]);
+			read_rgb(&rgb[2], &rgb24[j * 8 + 0 + rgb24_stride]);
+
+			yuv[0] = igt_matrix_transform(&m, &rgb[0]);
+			yuv[1] = igt_matrix_transform(&m, &rgb[1]);
+
+			y[j * 2 + 0] = yuv[0].d[0];
+			y[j * 2 + 0 + planar_stride] = yuv[1].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
+			 * We assume the MPEG2 chroma siting convention, where
+			 * 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] = (yuv[0].d[1] + yuv[1].d[1]) / 2.0f;
+			uv[j * 2 + 1] = (yuv[0].d[2] + yuv[1].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 / 2; j++) {
+			/* Convert 2x1 pixel blocks */
+			struct igt_vec4 rgb[2];
+			struct igt_vec4 yuv[2];
+
+			read_rgb(&rgb[0], &rgb24[j * 8 + 0]);
+			read_rgb(&rgb[1], &rgb24[j * 8 + 4]);
+
+			yuv[0] = igt_matrix_transform(&m, &rgb[0]);
+			yuv[1] = igt_matrix_transform(&m, &rgb[1]);
+
+			y[j * 2 + 0] = yuv[0].d[0];
+			y[j * 2 + 1] = yuv[1].d[0];
+			uv[j * 2 + 0] = yuv[0].d[1];
+			uv[j * 2 + 1] = yuv[0].d[2];
+		}
+
+		if (fb->width & 1) {
+			/* Convert single pixel */
+			struct igt_vec4 rgb;
+			struct igt_vec4 yuv;
+
+			read_rgb(&rgb, &rgb24[j * 8 + 0]);
+
+			yuv = igt_matrix_transform(&m, &rgb);
+
+			y[j * 2 + 0] = yuv.d[0];
+			uv[j * 2 + 0] = yuv.d[1];
+			uv[j * 2 + 1] = yuv.d[2];
 		}
 	}
 }
-- 
2.16.1

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

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

* [igt-dev] [PATCH i-g-t 5/8] lib: Add support for rendering into packed YCbCr framebuffers
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
                   ` (2 preceding siblings ...)
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 4/8] lib: Use igt_matrix for ycbcr<->rgb conversion Ville Syrjala
@ 2018-05-23 18:31 ` Ville Syrjala
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 6/8] lib/fb: Add color_encoding/color_range to igt_fb Ville Syrjala
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Ville Syrjala @ 2018-05-23 18:31 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()
v4: Rebase due to color_encoding/range enums
v5: Follow the fixed nv12 code
v6: Use igt_format_is_yuv()

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

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index ceaaea70f64b..70bb435c5eb0 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -87,6 +87,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++)
@@ -1588,16 +1604,159 @@ 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);
+	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(IGT_COLOR_YCBCR_BT601,
+						    IGT_COLOR_YCBCR_LIMITED_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;
+
+	for (i = 0; i < fb->height; i++) {
+		for (j = 0; j < fb->width / 2; j++) {
+			/* Convert 2x1 pixel blocks */
+			struct igt_vec4 yuv[2];
+			struct igt_vec4 rgb[2];
+
+			yuv[0].d[0] = yuyv[j * 4 + swz[0]];
+			yuv[1].d[0] = yuyv[j * 4 + swz[2]];
+			yuv[0].d[1] = yuv[1].d[1] = yuyv[j * 4 + swz[1]];
+			yuv[0].d[2] = yuv[1].d[2] = yuyv[j * 4 + swz[3]];
+			yuv[0].d[3] = yuv[1].d[3] = 1.0f;
+
+			rgb[0] = igt_matrix_transform(&m, &yuv[0]);
+			rgb[1] = igt_matrix_transform(&m, &yuv[1]);
+
+			write_rgb(&rgb24[j * 8 + 0], &rgb[0]);
+			write_rgb(&rgb24[j * 8 + 4], &rgb[1]);
+		}
+
+		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);
+
+			write_rgb(&rgb24[j * 8 + 0], &rgb);
+		}
+
+		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;
+	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(IGT_COLOR_YCBCR_BT601,
+						    IGT_COLOR_YCBCR_LIMITED_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 rgb[2];
+			struct igt_vec4 yuv[2];
+
+			read_rgb(&rgb[0], &rgb24[j * 8 + 0]);
+			read_rgb(&rgb[1], &rgb24[j * 8 + 4]);
+
+			yuv[0] = igt_matrix_transform(&m, &rgb[0]);
+			yuv[1] = igt_matrix_transform(&m, &rgb[1]);
+
+			yuyv[j * 4 + swz[0]] = yuv[0].d[0];
+			yuyv[j * 4 + swz[2]] = yuv[1].d[0];
+			yuyv[j * 4 + swz[1]] = (yuv[0].d[1] + yuv[1].d[1]) / 2.0f;
+			yuyv[j * 4 + swz[3]] = (yuv[0].d[2] + yuv[1].d[2]) / 2.0f;
+		}
+
+		if (fb->width & 1) {
+			struct igt_vec4 rgb;
+			struct igt_vec4 yuv;
+
+			read_rgb(&rgb, &rgb24[j * 8 + 0]);
+
+			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);
 
@@ -1636,10 +1795,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,
@@ -1666,7 +1836,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 (igt_format_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.16.1

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

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

* [igt-dev] [PATCH i-g-t 6/8] lib/fb: Add color_encoding/color_range to igt_fb
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
                   ` (3 preceding siblings ...)
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 5/8] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
@ 2018-05-23 18:31 ` Ville Syrjala
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 7/8] lib/kms: Respect fb color_encoding/color_range Ville Syrjala
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Ville Syrjala @ 2018-05-23 18:31 UTC (permalink / raw)
  To: igt-dev

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

Make igt_fb be aware of the color encoding/range. For now
we still hardcore everything to BT.709 limited range though.

v2: Default to BT.709

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_fb.c | 46 +++++++++++++++++++++++++++++-----------------
 lib/igt_fb.h |  4 ++++
 2 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 70bb435c5eb0..2f1f959cc9c3 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -374,6 +374,8 @@ static void *memset32(void *s, uint32_t c, size_t n)
 
 /* helpers to create nice-looking framebuffers */
 static int create_bo_for_fb(int fd, int width, int height,
+			    enum igt_color_encoding color_encoding,
+			    enum igt_color_range color_range,
 			    struct format_desc_struct *format,
 			    uint64_t tiling, unsigned size, unsigned stride,
 			    unsigned *size_ret, unsigned *stride_ret,
@@ -406,7 +408,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 */
+			bool full_range = color_range == IGT_COLOR_YCBCR_FULL_RANGE;
 
 			bo = gem_create(fd, size);
 			gem_set_tiling(fd, bo, igt_fb_mod_to_tiling(tiling), stride);
@@ -481,7 +483,10 @@ int igt_create_bo_with_dimensions(int fd, int width, int height,
 				  unsigned stride, unsigned *size_ret,
 				  unsigned *stride_ret, bool *is_dumb)
 {
-	return create_bo_for_fb(fd, width, height, lookup_drm_format(format),
+	return create_bo_for_fb(fd, width, height,
+				IGT_COLOR_YCBCR_BT709,
+				IGT_COLOR_YCBCR_LIMITED_RANGE,
+				lookup_drm_format(format),
 				modifier, 0, stride, size_ret, stride_ret, NULL, is_dumb);
 }
 
@@ -823,6 +828,9 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 			   struct igt_fb *fb, unsigned bo_size,
 			   unsigned bo_stride)
 {
+	/* FIXME allow the caller to pass these in */
+	enum igt_color_encoding color_encoding = IGT_COLOR_YCBCR_BT709;
+	enum igt_color_range color_range = IGT_COLOR_YCBCR_LIMITED_RANGE;
 	struct format_desc_struct *f = lookup_drm_format(format);
 	uint32_t fb_id;
 	int i;
@@ -833,8 +841,9 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 
 	igt_debug("%s(width=%d, height=%d, format=0x%x, tiling=0x%"PRIx64", size=%d)\n",
 		  __func__, width, height, format, tiling, bo_size);
-	fb->gem_handle = create_bo_for_fb(fd, width, height, f,
-					  tiling, bo_size, bo_stride,
+	fb->gem_handle = create_bo_for_fb(fd, width, height,
+					  color_encoding, color_range,
+					  f, tiling, bo_size, bo_stride,
 					  &fb->size, &fb->stride,
 					  fb->offsets, &fb->is_dumb);
 	igt_assert(fb->gem_handle > 0);
@@ -873,6 +882,8 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 	fb->fb_id = fb_id;
 	fb->fd = fd;
 	fb->num_planes = f->num_planes;
+	fb->color_encoding = color_encoding;
+	fb->color_range = color_range;
 
 	for (i = 0; i < f->num_planes; i++) {
 		fb->plane_bpp[i] = f->plane_bpp[i];
@@ -1249,11 +1260,12 @@ static void setup_linear_mapping(int fd, struct igt_fb *fb, struct fb_blit_linea
 	 * destination, tiling it at the same time.
 	 */
 	linear->handle = create_bo_for_fb(fd, fb->width, fb->height,
-					       lookup_drm_format(fb->drm_format),
-					       LOCAL_DRM_FORMAT_MOD_NONE, 0,
-					       0, &linear->size,
-					       &linear->stride,
-					       linear->offsets, &linear->is_dumb);
+					  fb->color_encoding, fb->color_range,
+					  lookup_drm_format(fb->drm_format),
+					  LOCAL_DRM_FORMAT_MOD_NONE, 0,
+					  0, &linear->size,
+					  &linear->stride,
+					  linear->offsets, &linear->is_dumb);
 
 	igt_assert(linear->handle > 0);
 
@@ -1396,8 +1408,8 @@ 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);
-	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(IGT_COLOR_YCBCR_BT601,
-						    IGT_COLOR_YCBCR_LIMITED_RANGE);
+	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(fb->color_encoding,
+						    fb->color_range);
 
 	/*
 	 * Reading from the BO is awfully slow because of lack of read caching,
@@ -1505,8 +1517,8 @@ 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;
-	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(IGT_COLOR_YCBCR_BT601,
-						    IGT_COLOR_YCBCR_LIMITED_RANGE);
+	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(fb->color_encoding,
+						    fb->color_range);
 
 	igt_assert_f(fb->drm_format == DRM_FORMAT_NV12,
 		     "Conversion not implemented for !NV12 planar formats\n");
@@ -1633,8 +1645,8 @@ static void convert_yuyv_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_uplo
 	uint8_t *rgb24 = blit->rgb24.map;
 	unsigned rgb24_stride = blit->rgb24.stride, yuyv_stride = blit->linear.stride;
 	uint8_t *buf = malloc(blit->linear.size);
-	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(IGT_COLOR_YCBCR_BT601,
-						    IGT_COLOR_YCBCR_LIMITED_RANGE);
+	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(fb->color_encoding,
+						    fb->color_range);
 
 	/*
 	 * Reading from the BO is awfully slow because of lack of read caching,
@@ -1692,8 +1704,8 @@ static void convert_rgb24_to_yuyv(struct igt_fb *fb, struct fb_convert_blit_uplo
 	const uint8_t *rgb24 = blit->rgb24.map;
 	unsigned rgb24_stride = blit->rgb24.stride;
 	unsigned yuyv_stride = blit->linear.stride;
-	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(IGT_COLOR_YCBCR_BT601,
-						    IGT_COLOR_YCBCR_LIMITED_RANGE);
+	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(fb->color_encoding,
+						    fb->color_range);
 
 	igt_assert_f(fb->drm_format == DRM_FORMAT_YUYV ||
 		     fb->drm_format == DRM_FORMAT_YVYU ||
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 081ed42a99c9..d28bc0c4110a 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -36,6 +36,8 @@
 
 #include <i915_drm.h>
 
+#include "igt_color_encoding.h"
+
 /**
  * igt_fb_t:
  * @fb_id: KMS ID of the framebuffer
@@ -66,6 +68,8 @@ typedef struct igt_fb {
 	uint32_t drm_format;
 	int width;
 	int height;
+	enum igt_color_encoding color_encoding;
+	enum igt_color_range color_range;
 	unsigned int stride;
 	uint64_t tiling;
 	unsigned int size;
-- 
2.16.1

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

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

* [igt-dev] [PATCH i-g-t 7/8] lib/kms: Respect fb color_encoding/color_range
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
                   ` (4 preceding siblings ...)
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 6/8] lib/fb: Add color_encoding/color_range to igt_fb Ville Syrjala
@ 2018-05-23 18:31 ` Ville Syrjala
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 8/8] tests/kms_plane: crc check plane pixel formats Ville Syrjala
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Ville Syrjala @ 2018-05-23 18:31 UTC (permalink / raw)
  To: igt-dev

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

Configure the plane color_encoding/color_range based on what the
fb contents are.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_kms.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_kms.h |  9 +++++++
 2 files changed, 85 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 0cee0c06390b..56fa0dc609a0 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -173,6 +173,8 @@ const char * const igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
 	[IGT_PLANE_TYPE] = "type",
 	[IGT_PLANE_ROTATION] = "rotation",
 	[IGT_PLANE_IN_FORMATS] = "IN_FORMATS",
+	[IGT_PLANE_COLOR_ENCODING] = "COLOR_ENCODING",
+	[IGT_PLANE_COLOR_RANGE] = "COLOR_RANGE",
 };
 
 const char * const igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
@@ -194,6 +196,61 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
 	[IGT_CONNECTOR_BROADCAST_RGB] = "Broadcast RGB",
 };
 
+static const char * const igt_color_encoding_names[IGT_NUM_COLOR_ENCODINGS] = {
+	[IGT_COLOR_YCBCR_BT601] = "ITU-R BT.601 YCbCr",
+	[IGT_COLOR_YCBCR_BT709] = "ITU-R BT.709 YCbCr",
+	[IGT_COLOR_YCBCR_BT2020] = "ITU-R BT.2020 YCbCr",
+};
+
+static const char * const igt_color_range_names[IGT_NUM_COLOR_RANGES] = {
+	[IGT_COLOR_YCBCR_FULL_RANGE] = "YCbCr full range",
+	[IGT_COLOR_YCBCR_LIMITED_RANGE] = "YCbCr limited range",
+};
+
+static void parse_enum_prop(drmModePropertyPtr prop,
+			    int num_enums,
+			    uint64_t values[],
+			    const char * const enum_names[])
+{
+	igt_assert((prop->flags & ~(DRM_MODE_PROP_IMMUTABLE |
+				    DRM_MODE_PROP_ATOMIC)) == DRM_MODE_PROP_ENUM);
+	igt_assert(prop->count_enums == prop->count_values);
+	igt_assert(prop->count_enums >= 1);
+	igt_assert(!!(prop->flags & DRM_MODE_PROP_IMMUTABLE) == (prop->count_enums == 1));
+
+	for (int i = 0; i < prop->count_enums; i++) {
+		for (int j = 0; j < num_enums; j++) {
+			if (strcmp(prop->enums[i].name, enum_names[j]))
+				continue;
+
+			values[j] = prop->enums[i].value;
+		}
+	}
+}
+
+static void
+parse_color_encoding_prop(igt_plane_t *plane, drmModePropertyPtr prop)
+{
+	parse_enum_prop(prop, ARRAY_SIZE(igt_color_encoding_names),
+			plane->color_encoding.values,
+			igt_color_encoding_names);
+}
+
+static void
+parse_color_range_prop(igt_plane_t *plane, drmModePropertyPtr prop)
+{
+	parse_enum_prop(prop, ARRAY_SIZE(igt_color_range_names),
+			plane->color_range.values,
+			igt_color_range_names);
+}
+
+typedef void (*parse_plane_prop_t)(igt_plane_t *plane, drmModePropertyPtr prop);
+
+static const parse_plane_prop_t igt_parse_plane_prop[IGT_NUM_PLANE_PROPS] = {
+	[IGT_PLANE_COLOR_ENCODING] = parse_color_encoding_prop,
+	[IGT_PLANE_COLOR_RANGE] = parse_color_range_prop,
+};
+
 /*
  * Retrieve all the properies specified in props_name and store them into
  * plane->props.
@@ -218,6 +275,9 @@ igt_fill_plane_props(igt_display_t *display, igt_plane_t *plane,
 			if (strcmp(prop->name, prop_names[j]) != 0)
 				continue;
 
+			if (igt_parse_plane_prop[j])
+				igt_parse_plane_prop[j](plane, prop);
+
 			plane->props[j] = props->props[i];
 			break;
 		}
@@ -1721,6 +1781,13 @@ static void igt_plane_reset(igt_plane_t *plane)
 	igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, 0);
 	igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, 0);
 
+	if (igt_plane_has_prop(plane, IGT_PLANE_COLOR_ENCODING))
+		igt_plane_set_prop_value(plane, IGT_PLANE_COLOR_ENCODING,
+					 plane->color_encoding.values[IGT_COLOR_YCBCR_BT601]);
+	if (igt_plane_has_prop(plane, IGT_PLANE_COLOR_RANGE))
+		igt_plane_set_prop_value(plane, IGT_PLANE_COLOR_RANGE,
+					 plane->color_range.values[IGT_COLOR_YCBCR_LIMITED_RANGE]);
+
 	/* Use default rotation */
 	if (igt_plane_has_prop(plane, IGT_PLANE_ROTATION))
 		igt_plane_set_prop_value(plane, IGT_PLANE_ROTATION, IGT_ROTATION_0);
@@ -3546,6 +3613,15 @@ void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb)
 		/* set default src pos/size as fb size */
 		igt_fb_set_position(fb, plane, 0, 0);
 		igt_fb_set_size(fb, plane, fb->width, fb->height);
+
+		if (igt_plane_has_prop(plane, IGT_PLANE_COLOR_ENCODING))
+			igt_plane_set_prop_value(plane,
+						 IGT_PLANE_COLOR_ENCODING,
+						 plane->color_encoding.values[fb->color_encoding]);
+		if (igt_plane_has_prop(plane, IGT_PLANE_COLOR_RANGE))
+			igt_plane_set_prop_value(plane,
+						 IGT_PLANE_COLOR_RANGE,
+						 plane->color_range.values[fb->color_range]);
 	} else {
 		igt_plane_set_size(plane, 0, 0);
 
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 0e75d0c9e6b9..509a0ed2de3d 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -263,6 +263,8 @@ enum igt_atomic_plane_properties {
        IGT_PLANE_TYPE,
        IGT_PLANE_ROTATION,
        IGT_PLANE_IN_FORMATS,
+       IGT_PLANE_COLOR_ENCODING,
+       IGT_PLANE_COLOR_RANGE,
        IGT_NUM_PLANE_PROPS
 };
 
@@ -307,6 +309,13 @@ typedef struct {
 	/* gem handle for fb */
 	uint32_t gem_handle;
 
+	struct {
+		uint64_t values[IGT_NUM_COLOR_ENCODINGS];
+	} color_encoding;
+	struct {
+		uint64_t values[IGT_NUM_COLOR_RANGES];
+	} color_range;
+
 	uint64_t changed;
 	uint32_t props[IGT_NUM_PLANE_PROPS];
 	uint64_t values[IGT_NUM_PLANE_PROPS];
-- 
2.16.1

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

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

* [igt-dev] [PATCH i-g-t 8/8] tests/kms_plane: crc check plane pixel formats
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
                   ` (5 preceding siblings ...)
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 7/8] lib/kms: Respect fb color_encoding/color_range Ville Syrjala
@ 2018-05-23 18:31 ` Ville Syrjala
  2018-05-24 10:48   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
  2018-05-23 19:09 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black Patchwork
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 19+ messages in thread
From: Ville Syrjala @ 2018-05-23 18:31 UTC (permalink / raw)
  To: igt-dev

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

Insted of just trying out each pixel format once, let's try each one
with a set of colors (RGB,CMY,white,black). We'll grab a reference CRC
for each using XRGB8888, and then compare that with the CRC we get
with any other format.

We have to use a solid color fb because chroma subsampling would
generally prevent us from getting a match if we had any color
transitions in the fb contents.

We also abuse the legacy LUT to drop the precision down to 7 bits
so that still errors causes by the RGB<->YCbCr conversion end up
being ignored.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/kms_plane.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 105 insertions(+), 18 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 23173b966eab..bc14bca61701 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -366,21 +366,83 @@ test_plane_panning(data_t *data, enum pipe pipe, unsigned int flags)
 	igt_skip_on(connected_outs == 0);
 }
 
+static const color_t colors[] = {
+	{ 1.0f, 0.0f, 0.0f, },
+	{ 0.0f, 1.0f, 0.0f, },
+	{ 0.0f, 0.0f, 1.0f, },
+	{ 1.0f, 1.0f, 1.0f, },
+	{ 0.0f, 0.0f, 0.0f, },
+	{ 0.0f, 1.0f, 1.0f, },
+	{ 1.0f, 0.0f, 1.0f, },
+	{ 1.0f, 1.0f, 0.0f, },
+};
+
+static void set_legacy_lut(data_t *data, enum pipe pipe,
+			   uint16_t mask)
+{
+	igt_pipe_t *pipe_obj = &data->display.pipes[pipe];
+	drmModeCrtc *crtc;
+	uint16_t *lut;
+	int i, lut_size;
+
+	crtc = drmModeGetCrtc(data->drm_fd, pipe_obj->crtc_id);
+	lut_size = crtc->gamma_size;
+	drmModeFreeCrtc(crtc);
+
+	lut = malloc(sizeof(uint16_t) * lut_size);
+
+	for (i = 0; i < lut_size; i++)
+		lut[i] = (i * 0xffff / (lut_size - 1)) & mask;
+
+	igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, pipe_obj->crtc_id,
+					  lut_size, lut, lut, lut), 0);
+
+	free(lut);
+}
+
+#define IGT_FORMAT_FMT "%c%c%c%c (0x%08x)"
+#define IGT_FORMAT_ARGS(f) ((f) >> 0) & 0xff, ((f) >> 8) & 0xff, \
+		((f) >> 16) & 0xff, ((f) >> 24) & 0xff, (f)
+
+static void test_format_plane_color(data_t *data, enum pipe pipe,
+				    igt_plane_t *plane,
+				    uint32_t format, int width, int height,
+				    int color, igt_crc_t *crc)
+{
+	const color_t *c = &colors[color];
+	struct igt_fb fb;
+
+	igt_create_color_fb(data->drm_fd, width, height,
+			    format, LOCAL_DRM_FORMAT_MOD_NONE,
+			    c->red, c->green, c->blue, &fb);
+
+	igt_plane_set_fb(plane, &fb);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_UNIVERSAL);
+
+	igt_pipe_crc_drain(data->pipe_crc);
+	igt_pipe_crc_get_single(data->pipe_crc, crc);
+
+	igt_plane_set_fb(plane, NULL);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_UNIVERSAL);
+
+	igt_remove_fb(data->drm_fd, &fb);
+}
+
 static void test_format_plane(data_t *data, enum pipe pipe,
 			      igt_output_t *output, igt_plane_t *plane)
 {
 	igt_plane_t *primary;
-	struct igt_fb primary_fb, fb;
+	struct igt_fb primary_fb;
 	drmModeModeInfo *mode;
-	cairo_t *cr;
-	int i;
 	uint32_t format;
 	uint64_t width, height;
+	igt_crc_t ref_crc[ARRAY_SIZE(colors)];
 
 	mode = igt_output_get_mode(output);
 	if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 		width = mode->hdisplay;
 		height = mode->vdisplay;
+		format = DRM_FORMAT_XRGB8888;
 	} else {
 		if (!plane->drm_plane) {
 			igt_debug("Only legacy cursor ioctl supported, skipping cursor plane\n");
@@ -388,6 +450,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 		}
 		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_WIDTH, &width));
 		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_HEIGHT, &height));
+		format = DRM_FORMAT_ARGB8888;
 	}
 
 	igt_debug("Testing connector %s on %s plane %s.%u\n",
@@ -401,35 +464,59 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 	igt_plane_set_fb(primary, &primary_fb);
 
+	igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB, BROADCAST_RGB_FULL);
+
 	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 
-	for (i = 0; i < plane->drm_plane->count_formats; i++) {
+	set_legacy_lut(data, pipe, 0xfc00);
+
+	test_init(data, pipe);
+	igt_pipe_crc_start(data->pipe_crc);
+
+	igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
+		 IGT_FORMAT_ARGS(format),
+		 kmstest_pipe_name(pipe), plane->index);
+
+	for (int i = 0; i < ARRAY_SIZE(colors); i++) {
+		test_format_plane_color(data, pipe, plane,
+					format, width, height,
+					i, &ref_crc[i]);
+	}
+
+	for (int i = 0; i < plane->drm_plane->count_formats; i++) {
+		igt_crc_t crc;
+
 		format = plane->drm_plane->formats[i];
 
+		if (format == DRM_FORMAT_XRGB8888)
+			continue;
+
 		if (!igt_fb_supported_format(format))
 			continue;
 
-		igt_debug("Testing format 0x%x on %s.%u\n",
-			  format, kmstest_pipe_name(pipe), plane->index);
+		igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
+			 IGT_FORMAT_ARGS(format),
+			 kmstest_pipe_name(pipe), plane->index);
 
-		igt_create_fb(data->drm_fd, width, height,
-			      format, LOCAL_DRM_FORMAT_MOD_NONE, &fb);
+		for (int j = 0; j < ARRAY_SIZE(colors); j++) {
+			test_format_plane_color(data, pipe, plane,
+						format, width, height,
+						j, &crc);
 
-		cr = igt_get_cairo_ctx(data->drm_fd, &fb);
-		igt_paint_color(cr, 0, 0, width, height,
-				0.0, 1.0, 0.0);
-		if (width >= 164 && height >= 164)
-			igt_paint_color(cr, 100, 100, 64, 64, 0.0, 0.0, 0.0);
-		igt_put_cairo_ctx(data->drm_fd, &fb, cr);
+			igt_assert_crc_equal(&crc, &ref_crc[j]);
+		}
+	}
 
-		igt_plane_set_fb(plane, &fb);
-		igt_display_commit2(&data->display, COMMIT_UNIVERSAL);
+	igt_pipe_crc_stop(data->pipe_crc);
+	test_fini(data);
 
-		igt_remove_fb(data->drm_fd, &fb);
-	}
+	set_legacy_lut(data, pipe, 0xffff);
 
+	igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB, BROADCAST_RGB_AUTO);
 	igt_plane_set_fb(primary, NULL);
 	igt_plane_set_fb(plane, NULL);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
 	igt_remove_fb(data->drm_fd, &primary_fb);
 }
 
-- 
2.16.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
                   ` (6 preceding siblings ...)
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 8/8] tests/kms_plane: crc check plane pixel formats Ville Syrjala
@ 2018-05-23 19:09 ` Patchwork
  2018-05-23 23:27 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-05-23 19:09 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black
URL   : https://patchwork.freedesktop.org/series/43651/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4225 -> IGTPW_1389 =

== Summary - WARNING ==

  Minor unknown changes coming with IGTPW_1389 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1389, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/43651/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_1389:

  === IGT changes ===

    ==== Warnings ====

    igt@kms_force_connector_basic@force-edid:
      fi-pnv-d510:        SKIP -> PASS +3
      fi-ilk-650:         SKIP -> PASS +3

    igt@kms_force_connector_basic@force-load-detect:
      fi-hsw-4770:        SKIP -> PASS +3
      fi-ivb-3770:        SKIP -> PASS +3
      fi-blb-e6850:       SKIP -> PASS +3

    igt@kms_force_connector_basic@prune-stale-modes:
      fi-gdg-551:         SKIP -> PASS +3

    
== Known issues ==

  Here are the changes found in IGTPW_1389 that come from known issues:

  === IGT changes ===

    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       INCOMPLETE (fdo#103713) -> PASS

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


== Participating hosts (44 -> 38) ==

  Missing    (6): fi-ilk-m540 fi-bxt-dsi fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-skl-6700hq 


== Build changes ==

    * IGT: IGT_4493 -> IGTPW_1389
    * Piglit: piglit_4493 -> piglit_4495

  CI_DRM_4225: 88ca72d89921db7a46dfb1492e2059e04a7b6c5e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1389: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1389/
  IGT_4493: 0b381c7d1067a4fe520b72d4d391d4920834cbe0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4493: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
  piglit_4495: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
                   ` (7 preceding siblings ...)
  2018-05-23 19:09 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black Patchwork
@ 2018-05-23 23:27 ` Patchwork
  2018-05-24 17:15 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black (rev2) Patchwork
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-05-23 23:27 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black
URL   : https://patchwork.freedesktop.org/series/43651/
State : failure

== Summary ==

= CI Bug Log - changes from IGT_4493_full -> IGTPW_1389_full =

== Summary - FAILURE ==

  Serious unknown changes coming with IGTPW_1389_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1389_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/43651/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_1389_full:

  === IGT changes ===

    ==== Possible regressions ====

    igt@kms_plane@pixel-format-pipe-a-planes:
      shard-snb:          PASS -> FAIL +1

    igt@kms_plane@pixel-format-pipe-b-planes:
      shard-hsw:          PASS -> FAIL +2

    
    ==== Warnings ====

    igt@gem_exec_schedule@deep-bsd2:
      shard-kbl:          PASS -> SKIP +1

    igt@kms_force_connector_basic@force-connector-state:
      shard-snb:          SKIP -> PASS +3

    igt@kms_force_connector_basic@force-load-detect:
      shard-hsw:          SKIP -> PASS +3

    
== Known issues ==

  Here are the changes found in IGTPW_1389_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_gtt:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665, fdo#106023)

    igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
      shard-glk:          PASS -> FAIL (fdo#106509)

    igt@kms_flip@2x-flip-vs-expired-vblank:
      shard-glk:          PASS -> FAIL (fdo#105363)

    igt@kms_flip@2x-modeset-vs-vblank-race-interruptible:
      shard-glk:          PASS -> FAIL (fdo#103060)

    igt@kms_flip@2x-plain-flip-ts-check:
      shard-hsw:          PASS -> FAIL (fdo#100368) +1

    igt@kms_vblank@pipe-b-accuracy-idle:
      shard-glk:          PASS -> FAIL (fdo#102583)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_gtt:
      shard-glk:          INCOMPLETE (fdo#103359, k.org#198133) -> PASS +2

    igt@drv_selftest@live_hangcheck:
      shard-apl:          DMESG-FAIL (fdo#106560) -> PASS

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#106023) -> PASS

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
      shard-glk:          FAIL (fdo#105703) -> PASS

    igt@kms_flip@2x-plain-flip-ts-check-interruptible:
      shard-glk:          FAIL (fdo#100368) -> PASS

    igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
      shard-kbl:          DMESG-WARN -> PASS

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-snb:          FAIL (fdo#104724, fdo#103166) -> PASS

    igt@perf@buffer-fill:
      shard-kbl:          DMESG-FAIL (fdo#106064) -> PASS

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102583 https://bugs.freedesktop.org/show_bug.cgi?id=102583
  fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106064 https://bugs.freedesktop.org/show_bug.cgi?id=106064
  fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
  fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (9 -> 5) ==

  Missing    (4): pig-snb-2600 pig-glk-j5005 pig-skl-6600 pig-hsw-4770r 


== Build changes ==

    * IGT: IGT_4493 -> IGTPW_1389
    * Linux: CI_DRM_4222 -> CI_DRM_4225
    * Piglit: piglit_4493 -> piglit_4495

  CI_DRM_4222: e783c316409040dab016975896e718fc36cbd8e6 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4225: 88ca72d89921db7a46dfb1492e2059e04a7b6c5e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1389: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1389/
  IGT_4493: 0b381c7d1067a4fe520b72d4d391d4920834cbe0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4493: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
  piglit_4495: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* [igt-dev] [PATCH i-g-t v2 8/8] tests/kms_plane: crc check plane pixel formats
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 8/8] tests/kms_plane: crc check plane pixel formats Ville Syrjala
@ 2018-05-24 10:48   ` Ville Syrjala
  2018-06-07 15:18     ` Maarten Lankhorst
  0 siblings, 1 reply; 19+ messages in thread
From: Ville Syrjala @ 2018-05-24 10:48 UTC (permalink / raw)
  To: igt-dev

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

Insted of just trying out each pixel format once, let's try each one
with a set of colors (RGB,CMY,white,black). We'll grab a reference CRC
for each using XRGB8888, and then compare that with the CRC we get
with any other format.

We have to use a solid color fb because chroma subsampling would
generally prevent us from getting a match if we had any color
transitions in the fb contents.

We also abuse the legacy LUT to drop the precision down to 7 bits
so that still errors causes by the RGB<->YCbCr conversion end up
being ignored.

v2: don't set Broadcast RGB prop if it's not there

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/kms_plane.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 109 insertions(+), 18 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 23173b966eab..aa2ba64f4896 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -366,21 +366,83 @@ test_plane_panning(data_t *data, enum pipe pipe, unsigned int flags)
 	igt_skip_on(connected_outs == 0);
 }
 
+static const color_t colors[] = {
+	{ 1.0f, 0.0f, 0.0f, },
+	{ 0.0f, 1.0f, 0.0f, },
+	{ 0.0f, 0.0f, 1.0f, },
+	{ 1.0f, 1.0f, 1.0f, },
+	{ 0.0f, 0.0f, 0.0f, },
+	{ 0.0f, 1.0f, 1.0f, },
+	{ 1.0f, 0.0f, 1.0f, },
+	{ 1.0f, 1.0f, 0.0f, },
+};
+
+static void set_legacy_lut(data_t *data, enum pipe pipe,
+			   uint16_t mask)
+{
+	igt_pipe_t *pipe_obj = &data->display.pipes[pipe];
+	drmModeCrtc *crtc;
+	uint16_t *lut;
+	int i, lut_size;
+
+	crtc = drmModeGetCrtc(data->drm_fd, pipe_obj->crtc_id);
+	lut_size = crtc->gamma_size;
+	drmModeFreeCrtc(crtc);
+
+	lut = malloc(sizeof(uint16_t) * lut_size);
+
+	for (i = 0; i < lut_size; i++)
+		lut[i] = (i * 0xffff / (lut_size - 1)) & mask;
+
+	igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, pipe_obj->crtc_id,
+					  lut_size, lut, lut, lut), 0);
+
+	free(lut);
+}
+
+#define IGT_FORMAT_FMT "%c%c%c%c (0x%08x)"
+#define IGT_FORMAT_ARGS(f) ((f) >> 0) & 0xff, ((f) >> 8) & 0xff, \
+		((f) >> 16) & 0xff, ((f) >> 24) & 0xff, (f)
+
+static void test_format_plane_color(data_t *data, enum pipe pipe,
+				    igt_plane_t *plane,
+				    uint32_t format, int width, int height,
+				    int color, igt_crc_t *crc)
+{
+	const color_t *c = &colors[color];
+	struct igt_fb fb;
+
+	igt_create_color_fb(data->drm_fd, width, height,
+			    format, LOCAL_DRM_FORMAT_MOD_NONE,
+			    c->red, c->green, c->blue, &fb);
+
+	igt_plane_set_fb(plane, &fb);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_UNIVERSAL);
+
+	igt_pipe_crc_drain(data->pipe_crc);
+	igt_pipe_crc_get_single(data->pipe_crc, crc);
+
+	igt_plane_set_fb(plane, NULL);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_UNIVERSAL);
+
+	igt_remove_fb(data->drm_fd, &fb);
+}
+
 static void test_format_plane(data_t *data, enum pipe pipe,
 			      igt_output_t *output, igt_plane_t *plane)
 {
 	igt_plane_t *primary;
-	struct igt_fb primary_fb, fb;
+	struct igt_fb primary_fb;
 	drmModeModeInfo *mode;
-	cairo_t *cr;
-	int i;
 	uint32_t format;
 	uint64_t width, height;
+	igt_crc_t ref_crc[ARRAY_SIZE(colors)];
 
 	mode = igt_output_get_mode(output);
 	if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 		width = mode->hdisplay;
 		height = mode->vdisplay;
+		format = DRM_FORMAT_XRGB8888;
 	} else {
 		if (!plane->drm_plane) {
 			igt_debug("Only legacy cursor ioctl supported, skipping cursor plane\n");
@@ -388,6 +450,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 		}
 		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_WIDTH, &width));
 		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_HEIGHT, &height));
+		format = DRM_FORMAT_ARGB8888;
 	}
 
 	igt_debug("Testing connector %s on %s plane %s.%u\n",
@@ -401,35 +464,63 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 	igt_plane_set_fb(primary, &primary_fb);
 
+	if (igt_output_has_prop(output, IGT_CONNECTOR_BROADCAST_RGB))
+		igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB,
+					  BROADCAST_RGB_FULL);
+
 	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 
-	for (i = 0; i < plane->drm_plane->count_formats; i++) {
+	set_legacy_lut(data, pipe, 0xfc00);
+
+	test_init(data, pipe);
+	igt_pipe_crc_start(data->pipe_crc);
+
+	igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
+		 IGT_FORMAT_ARGS(format),
+		 kmstest_pipe_name(pipe), plane->index);
+
+	for (int i = 0; i < ARRAY_SIZE(colors); i++) {
+		test_format_plane_color(data, pipe, plane,
+					format, width, height,
+					i, &ref_crc[i]);
+	}
+
+	for (int i = 0; i < plane->drm_plane->count_formats; i++) {
+		igt_crc_t crc;
+
 		format = plane->drm_plane->formats[i];
 
+		if (format == DRM_FORMAT_XRGB8888)
+			continue;
+
 		if (!igt_fb_supported_format(format))
 			continue;
 
-		igt_debug("Testing format 0x%x on %s.%u\n",
-			  format, kmstest_pipe_name(pipe), plane->index);
+		igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
+			 IGT_FORMAT_ARGS(format),
+			 kmstest_pipe_name(pipe), plane->index);
 
-		igt_create_fb(data->drm_fd, width, height,
-			      format, LOCAL_DRM_FORMAT_MOD_NONE, &fb);
+		for (int j = 0; j < ARRAY_SIZE(colors); j++) {
+			test_format_plane_color(data, pipe, plane,
+						format, width, height,
+						j, &crc);
 
-		cr = igt_get_cairo_ctx(data->drm_fd, &fb);
-		igt_paint_color(cr, 0, 0, width, height,
-				0.0, 1.0, 0.0);
-		if (width >= 164 && height >= 164)
-			igt_paint_color(cr, 100, 100, 64, 64, 0.0, 0.0, 0.0);
-		igt_put_cairo_ctx(data->drm_fd, &fb, cr);
+			igt_assert_crc_equal(&crc, &ref_crc[j]);
+		}
+	}
 
-		igt_plane_set_fb(plane, &fb);
-		igt_display_commit2(&data->display, COMMIT_UNIVERSAL);
+	igt_pipe_crc_stop(data->pipe_crc);
+	test_fini(data);
 
-		igt_remove_fb(data->drm_fd, &fb);
-	}
+	set_legacy_lut(data, pipe, 0xffff);
 
+	if (igt_output_has_prop(output, IGT_CONNECTOR_BROADCAST_RGB))
+		igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB,
+					  BROADCAST_RGB_AUTO);
 	igt_plane_set_fb(primary, NULL);
 	igt_plane_set_fb(plane, NULL);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
 	igt_remove_fb(data->drm_fd, &primary_fb);
 }
 
-- 
2.16.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black (rev2)
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
                   ` (8 preceding siblings ...)
  2018-05-23 23:27 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-05-24 17:15 ` Patchwork
  2018-05-24 23:05 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2018-06-05  9:42 ` [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Maarten Lankhorst
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-05-24 17:15 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black (rev2)
URL   : https://patchwork.freedesktop.org/series/43651/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4227 -> IGTPW_1393 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/43651/revisions/2/mbox/

== Known issues ==

  Here are the changes found in IGTPW_1393 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)
      fi-cnl-psr:         PASS -> DMESG-WARN (fdo#104951)

    
    ==== Possible fixes ====

    igt@kms_flip@basic-flip-vs-wf_vblank:
      fi-hsw-4770:        FAIL (fdo#100368) -> PASS

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951


== Participating hosts (44 -> 39) ==

  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-skl-6700hq 


== Build changes ==

    * IGT: IGT_4495 -> IGTPW_1393
    * Piglit: piglit_4495 -> None

  CI_DRM_4227: a8727d3fe03770e4d523468dfbc487dfe01597d3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1393: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1393/
  IGT_4495: 71c7a5740913d2618f44bca252669efe8a84f4c9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4495: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black (rev2)
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
                   ` (9 preceding siblings ...)
  2018-05-24 17:15 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black (rev2) Patchwork
@ 2018-05-24 23:05 ` Patchwork
  2018-06-05  9:42 ` [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Maarten Lankhorst
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-05-24 23:05 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black (rev2)
URL   : https://patchwork.freedesktop.org/series/43651/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4495_full -> IGTPW_1393_full =

== Summary - WARNING ==

  Minor unknown changes coming with IGTPW_1393_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1393_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/43651/revisions/2/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_1393_full:

  === IGT changes ===

    ==== Warnings ====

    igt@gem_exec_schedule@deep-bsd1:
      shard-kbl:          SKIP -> PASS +1

    igt@gem_exec_schedule@deep-render:
      shard-kbl:          PASS -> SKIP

    
== Known issues ==

  Here are the changes found in IGTPW_1393_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      shard-kbl:          NOTRUN -> DMESG-FAIL (fdo#106560)

    igt@kms_cursor_legacy@flip-vs-cursor-atomic:
      shard-hsw:          PASS -> FAIL (fdo#102670)

    igt@kms_flip@2x-modeset-vs-vblank-race-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#103060)

    igt@kms_flip@flip-vs-expired-vblank:
      shard-glk:          PASS -> FAIL (fdo#102887)

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#105707)

    igt@kms_flip@plain-flip-fb-recreate-interruptible:
      shard-glk:          PASS -> FAIL (fdo#100368)

    igt@kms_flip_tiling@flip-x-tiled:
      shard-glk:          PASS -> FAIL (fdo#104724)

    igt@kms_flip_tiling@flip-y-tiled:
      shard-glk:          PASS -> FAIL (fdo#103822, fdo#104724)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render:
      shard-snb:          PASS -> FAIL (fdo#103167, fdo#104724)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-indfb-pgflip-blt:
      shard-glk:          PASS -> FAIL (fdo#103167, fdo#104724)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_gtt:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@drv_selftest@live_hangcheck:
      shard-apl:          DMESG-FAIL (fdo#106560) -> PASS

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#106023) -> PASS

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
      shard-glk:          FAIL (fdo#105703) -> PASS +1

    igt@kms_flip@2x-flip-vs-expired-vblank:
      shard-glk:          FAIL (fdo#102887) -> PASS +1

    igt@kms_flip@plain-flip-ts-check:
      shard-hsw:          FAIL (fdo#100368) -> PASS

    igt@kms_flip_tiling@flip-to-x-tiled:
      shard-glk:          FAIL (fdo#103822, fdo#104724) -> PASS

    igt@kms_setmode@basic:
      shard-apl:          FAIL (fdo#99912) -> PASS

    
    ==== Warnings ====

    igt@drv_selftest@live_gtt:
      shard-glk:          FAIL -> INCOMPLETE (fdo#103359, k.org#198133)

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
  fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
  fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
  fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
  fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
  fdo#105707 https://bugs.freedesktop.org/show_bug.cgi?id=105707
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * IGT: IGT_4495 -> IGTPW_1393
    * Linux: CI_DRM_4225 -> CI_DRM_4227
    * Piglit: piglit_4495 -> None

  CI_DRM_4225: 88ca72d89921db7a46dfb1492e2059e04a7b6c5e @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4227: a8727d3fe03770e4d523468dfbc487dfe01597d3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1393: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1393/
  IGT_4495: 71c7a5740913d2618f44bca252669efe8a84f4c9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4495: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black
  2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
                   ` (10 preceding siblings ...)
  2018-05-24 23:05 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-06-05  9:42 ` Maarten Lankhorst
  2018-06-05 10:13   ` Ville Syrjälä
  11 siblings, 1 reply; 19+ messages in thread
From: Maarten Lankhorst @ 2018-06-05  9:42 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev

Op 23-05-18 om 20:31 schreef Ville Syrjala:
> 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.
>
> v2: Nuke the debug messages
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  lib/igt_fb.c | 32 ++++++++++++++++++++++++++++----
>  1 file changed, 28 insertions(+), 4 deletions(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index a926a08d44e1..4f17f9945419 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -335,6 +335,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;
> +}
Use wmemset?
>  /* helpers to create nice-looking framebuffers */
>  static int create_bo_for_fb(int fd, int width, int height,
>  			    struct format_desc_struct *format,
> @@ -369,6 +379,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);
> @@ -377,10 +388,23 @@ 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:
> +				memset32(ptr, full_range ? 0x80008000 : 0x80108010,
> +					 calculated_stride * height / 4);
> +				break;
> +			case DRM_FORMAT_UYVY:
> +			case DRM_FORMAT_VYUY:
> +				memset32(ptr, full_range ? 0x00800080 : 0x10801080,
> +					 calculated_stride * height / 4);
> +				break;
>  			}
>  			gem_munmap(ptr, size);
>  


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

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

* Re: [igt-dev] [PATCH i-g-t 2/8] lib: Don't use dumb buffers for YCbCr
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 2/8] lib: Don't use dumb buffers for YCbCr Ville Syrjala
@ 2018-06-05  9:51   ` Maarten Lankhorst
  0 siblings, 0 replies; 19+ messages in thread
From: Maarten Lankhorst @ 2018-06-05  9:51 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev

Op 23-05-18 om 20:31 schreef Ville Syrjala:
> 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.
>
> v2: Use igt_format_is_yuv()
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  lib/igt_fb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 4f17f9945419..c89f7850ed70 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -359,7 +359,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 || igt_format_is_yuv(format->drm_id)) {
>  		unsigned calculated_size, calculated_stride;
>  
>  		if (format->planes > 1)

I fear this will not allow us to support !i915, we should start caring at some point and either move to minigbm or roll special cases for each driver..

But for now it's ok.

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

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

* Re: [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black
  2018-06-05  9:42 ` [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Maarten Lankhorst
@ 2018-06-05 10:13   ` Ville Syrjälä
  2018-06-05 10:33     ` Maarten Lankhorst
  0 siblings, 1 reply; 19+ messages in thread
From: Ville Syrjälä @ 2018-06-05 10:13 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: igt-dev

On Tue, Jun 05, 2018 at 11:42:53AM +0200, Maarten Lankhorst wrote:
> Op 23-05-18 om 20:31 schreef Ville Syrjala:
> > 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.
> >
> > v2: Nuke the debug messages
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  lib/igt_fb.c | 32 ++++++++++++++++++++++++++++----
> >  1 file changed, 28 insertions(+), 4 deletions(-)
> >
> > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > index a926a08d44e1..4f17f9945419 100644
> > --- a/lib/igt_fb.c
> > +++ b/lib/igt_fb.c
> > @@ -335,6 +335,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;
> > +}
> Use wmemset?

Is that actually well defined?

> >  /* helpers to create nice-looking framebuffers */
> >  static int create_bo_for_fb(int fd, int width, int height,
> >  			    struct format_desc_struct *format,
> > @@ -369,6 +379,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);
> > @@ -377,10 +388,23 @@ 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:
> > +				memset32(ptr, full_range ? 0x80008000 : 0x80108010,
> > +					 calculated_stride * height / 4);
> > +				break;
> > +			case DRM_FORMAT_UYVY:
> > +			case DRM_FORMAT_VYUY:
> > +				memset32(ptr, full_range ? 0x00800080 : 0x10801080,
> > +					 calculated_stride * height / 4);
> > +				break;
> >  			}
> >  			gem_munmap(ptr, size);
> >  
> 

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

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

* Re: [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black
  2018-06-05 10:13   ` Ville Syrjälä
@ 2018-06-05 10:33     ` Maarten Lankhorst
  0 siblings, 0 replies; 19+ messages in thread
From: Maarten Lankhorst @ 2018-06-05 10:33 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

Op 05-06-18 om 12:13 schreef Ville Syrjälä:
> On Tue, Jun 05, 2018 at 11:42:53AM +0200, Maarten Lankhorst wrote:
>> Op 23-05-18 om 20:31 schreef Ville Syrjala:
>>> 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.
>>>
>>> v2: Nuke the debug messages
>>>
>>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>> ---
>>>  lib/igt_fb.c | 32 ++++++++++++++++++++++++++++----
>>>  1 file changed, 28 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
>>> index a926a08d44e1..4f17f9945419 100644
>>> --- a/lib/igt_fb.c
>>> +++ b/lib/igt_fb.c
>>> @@ -335,6 +335,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;
>>> +}
>> Use wmemset?
> Is that actually well defined?
Everywhere except on windows, sizeof(wchar_t) == 4.

There's -fshort-wchar, but is only useful for wine (winehq.org), but it doesn't use it for some reason. :/
>>>  /* helpers to create nice-looking framebuffers */
>>>  static int create_bo_for_fb(int fd, int width, int height,
>>>  			    struct format_desc_struct *format,
>>> @@ -369,6 +379,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);
>>> @@ -377,10 +388,23 @@ 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:
>>> +				memset32(ptr, full_range ? 0x80008000 : 0x80108010,
>>> +					 calculated_stride * height / 4);
>>> +				break;
>>> +			case DRM_FORMAT_UYVY:
>>> +			case DRM_FORMAT_VYUY:
>>> +				memset32(ptr, full_range ? 0x00800080 : 0x10801080,
>>> +					 calculated_stride * height / 4);
>>> +				break;
>>>  			}
>>>  			gem_munmap(ptr, size);
>>>  


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

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

* Re: [igt-dev] [PATCH i-g-t 4/8] lib: Use igt_matrix for ycbcr<->rgb conversion
  2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 4/8] lib: Use igt_matrix for ycbcr<->rgb conversion Ville Syrjala
@ 2018-06-06 10:11   ` Maarten Lankhorst
  0 siblings, 0 replies; 19+ messages in thread
From: Maarten Lankhorst @ 2018-06-06 10:11 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev

Op 23-05-18 om 20:31 schreef Ville Syrjala:
> 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.
Hey,

Conversion routines taken out (0s converting):
real    0m22,732s

Unpatched kms_nv12 run:
real    0m27,044s (4.3s converting)

Patched kms_nv12 run:
real    0m37,778s (15s converting)

It's not just making things worse, it's making it 3.5x slower. :/

> v2: Rebase
> v3: Deal with the new color_encoding/range enums
> v4: Fix the code to actually work, and do things in 2x2 blocks
>     Keep the chroma siting comment and pimp it up a bit
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  lib/igt_fb.c | 228 +++++++++++++++++++++++++++++++++++++++++------------------
>  1 file changed, 159 insertions(+), 69 deletions(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 9edee74b57c3..ceaaea70f64b 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_batchbuffer.h"
> @@ -1356,6 +1358,21 @@ static uint8_t clamprgb(float val)
>  	return clamp(val, 0.0f, 255.0f);
>  }
>  
> +static void read_rgb(struct igt_vec4 *rgb, const uint8_t *rgb24)
> +{
> +	rgb->d[0] = rgb24[2];
> +	rgb->d[1] = rgb24[1];
> +	rgb->d[2] = rgb24[0];
> +	rgb->d[3] = 1.0f;
> +}
> +
> +static void write_rgb(uint8_t *rgb24, const struct igt_vec4 *rgb)
> +{
> +	rgb24[2] = clamprgb(rgb->d[0]);
> +	rgb24[1] = clamprgb(rgb->d[1]);
> +	rgb24[0] = clamprgb(rgb->d[2]);
> +}
> +
>  static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit)
>  {
>  	int i, j;
> @@ -1363,6 +1380,8 @@ 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);
> +	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(IGT_COLOR_YCBCR_BT601,
> +						    IGT_COLOR_YCBCR_LIMITED_RANGE);
>  
>  	/*
>  	 * Reading from the BO is awfully slow because of lack of read caching,
> @@ -1373,30 +1392,49 @@ static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_uplo
>  	y = &buf[blit->linear.offsets[0]];
>  	uv = &buf[blit->linear.offsets[1]];
>  
> -	/* 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 */
> -
> -			y0 = 1.164f * (y[j] - 16.f);
> -			y1 = 1.164f * (y[j + planar_stride] - 16.f);
> +		for (j = 0; j < fb->width / 2; j++) {
> +			/* Convert 2x2 pixel blocks */
> +			struct igt_vec4 yuv[4];
> +			struct igt_vec4 rgb[4];
> +
> +			yuv[0].d[0] = y[j * 2 + 0];
> +			yuv[1].d[0] = y[j * 2 + 1];
> +			yuv[2].d[0] = y[j * 2 + 0 + planar_stride];
> +			yuv[3].d[0] = y[j * 2 + 1 + planar_stride];
> +
> +			yuv[0].d[1] = yuv[1].d[1] = yuv[2].d[1] = yuv[3].d[1] = uv[j * 2 + 0];
> +			yuv[0].d[2] = yuv[1].d[2] = yuv[2].d[2] = yuv[3].d[2] = uv[j * 2 + 1];
> +			yuv[0].d[3] = yuv[1].d[3] = yuv[2].d[3] = yuv[3].d[3] = 1.0f;
> +
> +			rgb[0] = igt_matrix_transform(&m, &yuv[0]);
> +			rgb[1] = igt_matrix_transform(&m, &yuv[1]);
> +			rgb[2] = igt_matrix_transform(&m, &yuv[2]);
> +			rgb[3] = igt_matrix_transform(&m, &yuv[3]);
> +
> +			write_rgb(&rgb24[j * 8 + 0], &rgb[0]);
> +			write_rgb(&rgb24[j * 8 + 4], &rgb[1]);
> +			write_rgb(&rgb24[j * 8 + 0 + rgb24_stride], &rgb[2]);
> +			write_rgb(&rgb24[j * 8 + 4 + rgb24_stride], &rgb[3]);
> +		}
>  
> -			cb = uv[j & ~1] - 128.f;
> -			cr = uv[j | 1] - 128.f;
> +		if (fb->width & 1) {
> +			/* Convert 1x2 pixel block */
> +			struct igt_vec4 yuv[2];
> +			struct igt_vec4 rgb[2];
>  
> -			r_ =  0.000f * cb +  1.596f * cr;
> -			g_ = -0.392f * cb + -0.813f * cr;
> -			b_ =  2.017f * cb +  0.000f * cr;
> +			yuv[0].d[0] = y[j * 2 + 0];
> +			yuv[1].d[0] = y[j * 2 + 0 + planar_stride];
>  
> -			rgb24[j * 4 + 2] = clamprgb(y0 + r_);
> -			rgb24[j * 4 + 2 + rgb24_stride] = clamprgb(y1 + r_);
> +			yuv[0].d[1] = yuv[1].d[1] = uv[j * 2 + 0];
> +			yuv[0].d[2] = yuv[1].d[2] = uv[j * 2 + 1];
> +			yuv[0].d[3] = yuv[1].d[3] = 1.0f;
>  
> -			rgb24[j * 4 + 1] = clamprgb(y0 + g_);
> -			rgb24[j * 4 + 1 + rgb24_stride] = clamprgb(y1 + g_);
> +			rgb[0] = igt_matrix_transform(&m, &yuv[0]);
> +			rgb[1] = igt_matrix_transform(&m, &yuv[1]);
>  
> -			rgb24[j * 4] = clamprgb(y0 + b_);
> -			rgb24[j * 4 + rgb24_stride] = clamprgb(y1 + b_);
> +			write_rgb(&rgb24[j * 8 + 0], &rgb[0]);
> +			write_rgb(&rgb24[j * 8 + 0 + rgb24_stride], &rgb[1]);
>  		}
>  
>  		rgb24 += 2 * rgb24_stride;
> @@ -1406,21 +1444,37 @@ 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;
> +		for (j = 0; j < fb->width / 2; j++) {
> +			/* Convert 2x1 pixel blocks */
> +			struct igt_vec4 yuv[2];
> +			struct igt_vec4 rgb[2];
> +
> +			yuv[0].d[0] = y[j * 2 + 0];
> +			yuv[1].d[0] = y[j * 2 + 1];
> +			yuv[0].d[1] = yuv[1].d[1] = uv[j * 2 + 0];
> +			yuv[0].d[2] = yuv[1].d[2] = uv[j * 2 + 1];
> +			yuv[0].d[3] = yuv[1].d[3] = 1.0f;
> +
> +			rgb[0] = igt_matrix_transform(&m, &yuv[0]);
> +			rgb[1] = igt_matrix_transform(&m, &yuv[1]);
> +
> +			write_rgb(&rgb24[j * 8 + 0], &rgb[0]);
> +			write_rgb(&rgb24[j * 8 + 4], &rgb[0]);
> +		}
> +
> +		if (fb->width & 1) {
>  			/* 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 * 2 + 0];
> +			yuv.d[1] = uv[j * 2 + 0];
> +			yuv.d[2] = uv[j * 2 + 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_);
> +			write_rgb(&rgb24[j * 8 + 0], &rgb);
>  		}
>  	}
>  
> @@ -1435,65 +1489,101 @@ 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;
> +	struct igt_mat4 m = igt_rgb_to_ycbcr_matrix(IGT_COLOR_YCBCR_BT601,
> +						    IGT_COLOR_YCBCR_LIMITED_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 (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;
> +	for (i = 0; i < fb->height / 2; i++) {
> +		for (j = 0; j < fb->width / 2; j++) {
> +			/* Convert 2x2 pixel blocks */
> +			struct igt_vec4 rgb[4];
> +			struct igt_vec4 yuv[4];
> +
> +			read_rgb(&rgb[0], &rgb24[j * 8 + 0]);
> +			read_rgb(&rgb[1], &rgb24[j * 8 + 4]);
> +			read_rgb(&rgb[2], &rgb24[j * 8 + 0 + rgb24_stride]);
> +			read_rgb(&rgb[3], &rgb24[j * 8 + 4 + rgb24_stride]);
> +
> +			yuv[0] = igt_matrix_transform(&m, &rgb[0]);
> +			yuv[1] = igt_matrix_transform(&m, &rgb[1]);
> +			yuv[2] = igt_matrix_transform(&m, &rgb[2]);
> +			yuv[3] = igt_matrix_transform(&m, &rgb[3]);
> +
> +			y[j * 2 + 0] = yuv[0].d[0];
> +			y[j * 2 + 1] = yuv[1].d[0];
> +			y[j * 2 + 0 + planar_stride] = yuv[2].d[0];
> +			y[j * 2 + 1 + planar_stride] = yuv[3].d[0];
>  
> -			y[j] = (uint8_t)yf;
> +			/*
> +			 * We assume the MPEG2 chroma siting convention, where
> +			 * pixel center for Cb'Cr' is between the left top and
> +			 * bottom pixel in a 2x2 block, so take the average.
> +			 */
> +			uv[j * 2 + 0] = (yuv[0].d[1] + yuv[2].d[1]) / 2.0f;
> +			uv[j * 2 + 1] = (yuv[0].d[2] + yuv[2].d[2]) / 2.0f;
>  		}
>  
> -		rgb24 += rgb24_stride;
> -		y += planar_stride;
> -	}
> +		if (fb->width & 1) {
> +			/* Convert 1x2 pixel block */
> +			struct igt_vec4 rgb[2];
> +			struct igt_vec4 yuv[2];
>  
> -	rgb24 = blit->rgb24.map;
> +			read_rgb(&rgb[0], &rgb24[j * 8 + 0]);
> +			read_rgb(&rgb[2], &rgb24[j * 8 + 0 + rgb24_stride]);
> +
> +			yuv[0] = igt_matrix_transform(&m, &rgb[0]);
> +			yuv[1] = igt_matrix_transform(&m, &rgb[1]);
> +
> +			y[j * 2 + 0] = yuv[0].d[0];
> +			y[j * 2 + 0 + planar_stride] = yuv[1].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
> +			 * We assume the MPEG2 chroma siting convention, where
> +			 * 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] = (yuv[0].d[1] + yuv[1].d[1]) / 2.0f;
> +			uv[j * 2 + 1] = (yuv[0].d[2] + yuv[1].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 / 2; j++) {
> +			/* Convert 2x1 pixel blocks */
> +			struct igt_vec4 rgb[2];
> +			struct igt_vec4 yuv[2];
> +
> +			read_rgb(&rgb[0], &rgb24[j * 8 + 0]);
> +			read_rgb(&rgb[1], &rgb24[j * 8 + 4]);
> +
> +			yuv[0] = igt_matrix_transform(&m, &rgb[0]);
> +			yuv[1] = igt_matrix_transform(&m, &rgb[1]);
> +
> +			y[j * 2 + 0] = yuv[0].d[0];
> +			y[j * 2 + 1] = yuv[1].d[0];
> +			uv[j * 2 + 0] = yuv[0].d[1];
> +			uv[j * 2 + 1] = yuv[0].d[2];
> +		}
> +
> +		if (fb->width & 1) {
> +			/* Convert single pixel */
> +			struct igt_vec4 rgb;
> +			struct igt_vec4 yuv;
> +
> +			read_rgb(&rgb, &rgb24[j * 8 + 0]);
> +
> +			yuv = igt_matrix_transform(&m, &rgb);
> +
> +			y[j * 2 + 0] = yuv.d[0];
> +			uv[j * 2 + 0] = yuv.d[1];
> +			uv[j * 2 + 1] = yuv.d[2];
>  		}
>  	}
>  }

We could get rid of the height & 1 and width & 1 checks, we only allow an alignment with a multiple of 4 in i915, and I think restricting it to 2x2 in igt won't lose us much...

One thing we should definitely do is making igt_matrix_transform inline, and enable vectorization somehow. The current code is horribly unoptimized. :(

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

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

* Re: [igt-dev] [PATCH i-g-t v2 8/8] tests/kms_plane: crc check plane pixel formats
  2018-05-24 10:48   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
@ 2018-06-07 15:18     ` Maarten Lankhorst
  0 siblings, 0 replies; 19+ messages in thread
From: Maarten Lankhorst @ 2018-06-07 15:18 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev

Op 24-05-18 om 12:48 schreef Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Insted of just trying out each pixel format once, let's try each one
> with a set of colors (RGB,CMY,white,black). We'll grab a reference CRC
> for each using XRGB8888, and then compare that with the CRC we get
> with any other format.
>
> We have to use a solid color fb because chroma subsampling would
> generally prevent us from getting a match if we had any color
> transitions in the fb contents.
>
> We also abuse the legacy LUT to drop the precision down to 7 bits
> so that still errors causes by the RGB<->YCbCr conversion end up
> being ignored.
>
> v2: don't set Broadcast RGB prop if it's not there
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Broadcast RGB is always set to full why are you touching this?

With wmemset in patch 1, and broadcast rgb calls removed on thi sseries:

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

> ---
>  tests/kms_plane.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++--------
>  1 file changed, 109 insertions(+), 18 deletions(-)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 23173b966eab..aa2ba64f4896 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -366,21 +366,83 @@ test_plane_panning(data_t *data, enum pipe pipe, unsigned int flags)
>  	igt_skip_on(connected_outs == 0);
>  }
>  
> +static const color_t colors[] = {
> +	{ 1.0f, 0.0f, 0.0f, },
> +	{ 0.0f, 1.0f, 0.0f, },
> +	{ 0.0f, 0.0f, 1.0f, },
> +	{ 1.0f, 1.0f, 1.0f, },
> +	{ 0.0f, 0.0f, 0.0f, },
> +	{ 0.0f, 1.0f, 1.0f, },
> +	{ 1.0f, 0.0f, 1.0f, },
> +	{ 1.0f, 1.0f, 0.0f, },
> +};
> +
> +static void set_legacy_lut(data_t *data, enum pipe pipe,
> +			   uint16_t mask)
> +{
> +	igt_pipe_t *pipe_obj = &data->display.pipes[pipe];
> +	drmModeCrtc *crtc;
> +	uint16_t *lut;
> +	int i, lut_size;
> +
> +	crtc = drmModeGetCrtc(data->drm_fd, pipe_obj->crtc_id);
> +	lut_size = crtc->gamma_size;
> +	drmModeFreeCrtc(crtc);
> +
> +	lut = malloc(sizeof(uint16_t) * lut_size);
> +
> +	for (i = 0; i < lut_size; i++)
> +		lut[i] = (i * 0xffff / (lut_size - 1)) & mask;
> +
> +	igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, pipe_obj->crtc_id,
> +					  lut_size, lut, lut, lut), 0);
> +
> +	free(lut);
> +}
> +
> +#define IGT_FORMAT_FMT "%c%c%c%c (0x%08x)"
> +#define IGT_FORMAT_ARGS(f) ((f) >> 0) & 0xff, ((f) >> 8) & 0xff, \
> +		((f) >> 16) & 0xff, ((f) >> 24) & 0xff, (f)
> +
> +static void test_format_plane_color(data_t *data, enum pipe pipe,
> +				    igt_plane_t *plane,
> +				    uint32_t format, int width, int height,
> +				    int color, igt_crc_t *crc)
> +{
> +	const color_t *c = &colors[color];
> +	struct igt_fb fb;
> +
> +	igt_create_color_fb(data->drm_fd, width, height,
> +			    format, LOCAL_DRM_FORMAT_MOD_NONE,
> +			    c->red, c->green, c->blue, &fb);
> +
> +	igt_plane_set_fb(plane, &fb);
> +	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> +
> +	igt_pipe_crc_drain(data->pipe_crc);
> +	igt_pipe_crc_get_single(data->pipe_crc, crc);
> +
> +	igt_plane_set_fb(plane, NULL);
> +	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> +
> +	igt_remove_fb(data->drm_fd, &fb);
> +}
> +
>  static void test_format_plane(data_t *data, enum pipe pipe,
>  			      igt_output_t *output, igt_plane_t *plane)
>  {
>  	igt_plane_t *primary;
> -	struct igt_fb primary_fb, fb;
> +	struct igt_fb primary_fb;
>  	drmModeModeInfo *mode;
> -	cairo_t *cr;
> -	int i;
>  	uint32_t format;
>  	uint64_t width, height;
> +	igt_crc_t ref_crc[ARRAY_SIZE(colors)];
>  
>  	mode = igt_output_get_mode(output);
>  	if (plane->type != DRM_PLANE_TYPE_CURSOR) {
>  		width = mode->hdisplay;
>  		height = mode->vdisplay;
> +		format = DRM_FORMAT_XRGB8888;
>  	} else {
>  		if (!plane->drm_plane) {
>  			igt_debug("Only legacy cursor ioctl supported, skipping cursor plane\n");
> @@ -388,6 +450,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
>  		}
>  		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_WIDTH, &width));
>  		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_HEIGHT, &height));
> +		format = DRM_FORMAT_ARGB8888;
>  	}
>  
>  	igt_debug("Testing connector %s on %s plane %s.%u\n",
> @@ -401,35 +464,63 @@ static void test_format_plane(data_t *data, enum pipe pipe,
>  	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
>  	igt_plane_set_fb(primary, &primary_fb);
>  
> +	if (igt_output_has_prop(output, IGT_CONNECTOR_BROADCAST_RGB))
> +		igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB,
> +					  BROADCAST_RGB_FULL);
> +
>  	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
>  
> -	for (i = 0; i < plane->drm_plane->count_formats; i++) {
> +	set_legacy_lut(data, pipe, 0xfc00);
> +
> +	test_init(data, pipe);
> +	igt_pipe_crc_start(data->pipe_crc);
> +
> +	igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
> +		 IGT_FORMAT_ARGS(format),
> +		 kmstest_pipe_name(pipe), plane->index);
> +
> +	for (int i = 0; i < ARRAY_SIZE(colors); i++) {
> +		test_format_plane_color(data, pipe, plane,
> +					format, width, height,
> +					i, &ref_crc[i]);
> +	}
> +
> +	for (int i = 0; i < plane->drm_plane->count_formats; i++) {
> +		igt_crc_t crc;
> +
>  		format = plane->drm_plane->formats[i];
>  
> +		if (format == DRM_FORMAT_XRGB8888)
> +			continue;
> +
>  		if (!igt_fb_supported_format(format))
>  			continue;
>  
> -		igt_debug("Testing format 0x%x on %s.%u\n",
> -			  format, kmstest_pipe_name(pipe), plane->index);
> +		igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
> +			 IGT_FORMAT_ARGS(format),
> +			 kmstest_pipe_name(pipe), plane->index);
>  
> -		igt_create_fb(data->drm_fd, width, height,
> -			      format, LOCAL_DRM_FORMAT_MOD_NONE, &fb);
> +		for (int j = 0; j < ARRAY_SIZE(colors); j++) {
> +			test_format_plane_color(data, pipe, plane,
> +						format, width, height,
> +						j, &crc);
>  
> -		cr = igt_get_cairo_ctx(data->drm_fd, &fb);
> -		igt_paint_color(cr, 0, 0, width, height,
> -				0.0, 1.0, 0.0);
> -		if (width >= 164 && height >= 164)
> -			igt_paint_color(cr, 100, 100, 64, 64, 0.0, 0.0, 0.0);
> -		igt_put_cairo_ctx(data->drm_fd, &fb, cr);
> +			igt_assert_crc_equal(&crc, &ref_crc[j]);
> +		}
> +	}
>  
> -		igt_plane_set_fb(plane, &fb);
> -		igt_display_commit2(&data->display, COMMIT_UNIVERSAL);
> +	igt_pipe_crc_stop(data->pipe_crc);
> +	test_fini(data);
>  
> -		igt_remove_fb(data->drm_fd, &fb);
> -	}
> +	set_legacy_lut(data, pipe, 0xffff);
>  
> +	if (igt_output_has_prop(output, IGT_CONNECTOR_BROADCAST_RGB))
> +		igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB,
> +					  BROADCAST_RGB_AUTO);
>  	igt_plane_set_fb(primary, NULL);
>  	igt_plane_set_fb(plane, NULL);
> +	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
> +
>  	igt_remove_fb(data->drm_fd, &primary_fb);
>  }
>  


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

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

end of thread, other threads:[~2018-06-07 15:18 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-23 18:31 [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Ville Syrjala
2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 2/8] lib: Don't use dumb buffers for YCbCr Ville Syrjala
2018-06-05  9:51   ` Maarten Lankhorst
2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 3/8] lib: Clean up format_desc Ville Syrjala
2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 4/8] lib: Use igt_matrix for ycbcr<->rgb conversion Ville Syrjala
2018-06-06 10:11   ` Maarten Lankhorst
2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 5/8] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 6/8] lib/fb: Add color_encoding/color_range to igt_fb Ville Syrjala
2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 7/8] lib/kms: Respect fb color_encoding/color_range Ville Syrjala
2018-05-23 18:31 ` [igt-dev] [PATCH i-g-t 8/8] tests/kms_plane: crc check plane pixel formats Ville Syrjala
2018-05-24 10:48   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-06-07 15:18     ` Maarten Lankhorst
2018-05-23 19:09 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black Patchwork
2018-05-23 23:27 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-05-24 17:15 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Clear packed YUV formats to black (rev2) Patchwork
2018-05-24 23:05 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-06-05  9:42 ` [igt-dev] [PATCH i-g-t 1/8] lib: Clear packed YUV formats to black Maarten Lankhorst
2018-06-05 10:13   ` Ville Syrjälä
2018-06-05 10:33     ` Maarten Lankhorst

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.