All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy
@ 2018-10-30 16:20 Ville Syrjala
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 2/5] tests/gem_render_copy: Test Yf tiling Ville Syrjala
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Ville Syrjala @ 2018-10-30 16:20 UTC (permalink / raw)
  To: igt-dev

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

Set up the surface state accordingly to support Yf/Ys tiling.

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

diff --git a/lib/gen8_render.h b/lib/gen8_render.h
index c62047d86b25..372c52679861 100644
--- a/lib/gen8_render.h
+++ b/lib/gen8_render.h
@@ -121,9 +121,11 @@ struct gen8_surface_state
 	struct {
 		uint32_t mip_count:4;
 		uint32_t min_lod:4;
-		uint32_t pad3:6;
+		uint32_t mip_tail_start_lod:4; /* gen9+ */
+		uint32_t pad3:2;
 		uint32_t coherency_type:1;
-		uint32_t pad2:5;
+		uint32_t pad2:3;
+		uint32_t trmode:2; /* gen9+ */
 		uint32_t ewa_disable_for_cube:1;
 		uint32_t y_offset:3;
 		uint32_t pad0:1;
diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
index adbd8124e082..1bebc164d4ab 100644
--- a/lib/rendercopy_gen9.c
+++ b/lib/rendercopy_gen9.c
@@ -199,9 +199,15 @@ gen8_bind_buf(struct intel_batchbuffer *batch, const struct igt_buf *buf,
 	ss->ss0.horizontal_alignment = 1; /* align 4 */
 	if (buf->tiling == I915_TILING_X)
 		ss->ss0.tiled_mode = 2;
-	else if (buf->tiling == I915_TILING_Y)
+	else if (buf->tiling != I915_TILING_NONE)
 		ss->ss0.tiled_mode = 3;
 
+	if (buf->tiling == I915_TILING_Yf)
+		ss->ss5.trmode = 1;
+	else if (buf->tiling == I915_TILING_Ys)
+		ss->ss5.trmode = 2;
+	ss->ss5.mip_tail_start_lod = 1; /* needed with trmode */
+
 	ss->ss8.base_addr = buf->bo->offset64;
 	ss->ss9.base_addr_hi = buf->bo->offset64 >> 32;
 
-- 
2.18.1

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

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

* [igt-dev] [PATCH i-g-t 2/5] tests/gem_render_copy: Test Yf tiling
  2018-10-30 16:20 [igt-dev] [PATCH i-g-t 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Ville Syrjala
@ 2018-10-30 16:20 ` Ville Syrjala
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers Ville Syrjala
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjala @ 2018-10-30 16:20 UTC (permalink / raw)
  To: igt-dev

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

Let's test Yf tiling now that rendercopy can handle it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/i915/gem_render_copy.c | 245 +++++++++++++++++++++++++++--------
 1 file changed, 194 insertions(+), 51 deletions(-)

diff --git a/tests/i915/gem_render_copy.c b/tests/i915/gem_render_copy.c
index 17a6656427f8..1bb1d4ffa37a 100644
--- a/tests/i915/gem_render_copy.c
+++ b/tests/i915/gem_render_copy.c
@@ -72,11 +72,85 @@ static const char *make_filename(const char *filename)
 	return buf;
 }
 
-static void *linear_copy(data_t *data, struct igt_buf *buf)
+static void *yf_ptr(void *ptr,
+		    unsigned int x, unsigned int y,
+		    unsigned int stride, unsigned int cpp)
 {
-	void *map, *linear;
+       x *= cpp;
+
+       return ptr +
+	       ((y & ~0x1f) * stride) +
+	       ((y & 0x10) * 64) +
+	       ((y & 0x8) * 32) +
+	       ((y & 0x7) * 16) +
+	       ((x & ~0x3f) * 32) +
+	       ((x & 0x20) * 16) +
+	       ((x & 0x10) * 8) +
+	       (x & 0xf);
+}
 
-	igt_assert_eq(posix_memalign(&linear, 16, buf->bo->size), 0);
+static void copy_linear_to_yf(data_t *data, struct igt_buf *buf, const uint32_t *linear)
+{
+	int height = igt_buf_height(buf);
+	int width = igt_buf_width(buf);
+	void *map;
+
+	gem_set_domain(data->drm_fd, buf->bo->handle,
+		       I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
+	map = gem_mmap__cpu(data->drm_fd, buf->bo->handle, 0,
+			    buf->bo->size, PROT_READ | PROT_WRITE);
+
+	for (int y = 0; y < height; y++) {
+		for (int x = 0; x < width; x++) {
+			uint32_t *ptr = yf_ptr(map, x, y, buf->stride, 4);
+
+			*ptr = linear[y * width + x];
+		}
+	}
+
+	munmap(map, buf->bo->size);
+}
+
+static void copy_yf_to_linear(data_t *data, struct igt_buf *buf, uint32_t *linear)
+{
+	int height = igt_buf_height(buf);
+	int width = igt_buf_width(buf);
+	void *map;
+
+	gem_set_domain(data->drm_fd, buf->bo->handle,
+		       I915_GEM_DOMAIN_CPU, 0);
+	map = gem_mmap__cpu(data->drm_fd, buf->bo->handle, 0,
+			    buf->bo->size, PROT_READ);
+
+	for (int y = 0; y < height; y++) {
+		for (int x = 0; x < width; x++) {
+			uint32_t *ptr = yf_ptr(map, x, y, buf->stride, 4);
+
+			linear[y * width + x] = *ptr;
+		}
+	}
+
+	munmap(map, buf->bo->size);
+}
+
+static void copy_linear_to_gtt(data_t *data, struct igt_buf *buf, const uint32_t *linear)
+{
+	void *map;
+
+	gem_set_domain(data->drm_fd, buf->bo->handle,
+		       I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
+
+	map = gem_mmap__gtt(data->drm_fd, buf->bo->handle,
+			    buf->bo->size, PROT_READ | PROT_WRITE);
+
+	memcpy(map, linear, buf->bo->size);
+
+	munmap(map, buf->bo->size);
+}
+
+static void copy_gtt_to_linear(data_t *data, struct igt_buf *buf, uint32_t *linear)
+{
+	void *map;
 
 	gem_set_domain(data->drm_fd, buf->bo->handle,
 		       I915_GEM_DOMAIN_GTT, 0);
@@ -87,6 +161,18 @@ static void *linear_copy(data_t *data, struct igt_buf *buf)
 	igt_memcpy_from_wc(linear, map, buf->bo->size);
 
 	munmap(map, buf->bo->size);
+}
+
+static void *linear_copy(data_t *data, struct igt_buf *buf)
+{
+	void *linear;
+
+	igt_assert_eq(posix_memalign(&linear, 16, buf->bo->size), 0);
+
+	if (buf->tiling == I915_TILING_Yf)
+		copy_yf_to_linear(data, buf, linear);
+	else
+		copy_gtt_to_linear(data, buf, linear);
 
 	return linear;
 }
@@ -173,7 +259,7 @@ static void scratch_buf_draw_pattern(data_t *data, struct igt_buf *buf,
 	cairo_surface_t *surface;
 	cairo_pattern_t *pat;
 	cairo_t *cr;
-	void *map, *linear;
+	void *linear;
 
 	linear = linear_copy(data, buf);
 
@@ -216,15 +302,10 @@ static void scratch_buf_draw_pattern(data_t *data, struct igt_buf *buf,
 
 	cairo_surface_destroy(surface);
 
-	gem_set_domain(data->drm_fd, buf->bo->handle,
-		       I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
-
-	map = gem_mmap__gtt(data->drm_fd, buf->bo->handle,
-			    buf->bo->size, PROT_READ | PROT_WRITE);
-
-	memcpy(map, linear, buf->bo->size);
-
-	munmap(map, buf->bo->size);
+	if (buf->tiling == I915_TILING_Yf)
+		copy_linear_to_yf(data, buf, linear);
+	else
+		copy_linear_to_gtt(data, buf, linear);
 
 	free(linear);
 }
@@ -236,36 +317,59 @@ scratch_buf_copy(data_t *data,
 {
 	int width = igt_buf_width(dst);
 	int height  = igt_buf_height(dst);
-	uint32_t *linear_dst, *linear_src;
+	uint32_t *linear_dst;
 
 	igt_assert_eq(igt_buf_width(dst), igt_buf_width(src));
 	igt_assert_eq(igt_buf_height(dst), igt_buf_height(src));
 	igt_assert_eq(dst->bo->size, src->bo->size);
 
+	w = min(w, width - sx);
+	w = min(w, width - dx);
+
+	h = min(h, height - sy);
+	h = min(h, height - dy);
+
 	gem_set_domain(data->drm_fd, dst->bo->handle,
 		       I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
-	gem_set_domain(data->drm_fd, src->bo->handle,
-		       I915_GEM_DOMAIN_GTT, 0);
-
 	linear_dst = gem_mmap__gtt(data->drm_fd, dst->bo->handle,
 				   dst->bo->size, PROT_WRITE);
-	linear_src = gem_mmap__gtt(data->drm_fd, src->bo->handle,
-				   src->bo->size, PROT_READ);
 
-	w = min(w, width - sx);
-	w = min(w, width - dx);
+	if (src->tiling == I915_TILING_Yf) {
+		void *map;
 
-	h = min(h, height - sy);
-	h = min(h, height - dy);
+		gem_set_domain(data->drm_fd, src->bo->handle,
+			       I915_GEM_DOMAIN_CPU, 0);
+		map = gem_mmap__cpu(data->drm_fd, src->bo->handle, 0,
+				    src->bo->size, PROT_READ);
+
+		for (int y = 0; y < h; y++) {
+			for (int x = 0; x < w; x++) {
+				const uint32_t *ptr = yf_ptr(map, sx+x, sy+y, src->stride, 4);
+
+				linear_dst[(dy+y) * width + dx+x] = *ptr;
+			}
+		}
+
+		munmap(map, src->bo->size);
+	} else {
+		uint32_t *linear_src;
+
+		gem_set_domain(data->drm_fd, src->bo->handle,
+			       I915_GEM_DOMAIN_GTT, 0);
 
-	for (int y = 0; y < h; y++) {
-		igt_memcpy_from_wc(&linear_dst[(dy+y) * width + dx],
-				   &linear_src[(sy+y) * width + sx],
-				   w * 4);
+		linear_src = gem_mmap__gtt(data->drm_fd, src->bo->handle,
+					   src->bo->size, PROT_READ);
+
+		for (int y = 0; y < h; y++) {
+			igt_memcpy_from_wc(&linear_dst[(dy+y) * width + dx],
+					   &linear_src[(sy+y) * width + sx],
+					   w * 4);
+		}
+
+		munmap(linear_src, src->bo->size);
 	}
 
 	munmap(linear_dst, dst->bo->size);
-	munmap(linear_src, src->bo->size);
 }
 
 static void scratch_buf_init(data_t *data, struct igt_buf *buf,
@@ -282,7 +386,8 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf,
 		int size;
 
 		igt_require(intel_gen(data->devid) >= 9);
-		igt_assert_eq(tiling, I915_TILING_Y);
+		igt_assert(tiling == I915_TILING_Y ||
+			   tiling == I915_TILING_Yf);
 
 		buf->stride = ALIGN(width * 4, 128);
 		buf->size = buf->stride * height;
@@ -298,8 +403,20 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf,
 
 		buf->bo = drm_intel_bo_alloc(data->bufmgr, "", size, 4096);
 
-		drm_intel_bo_set_tiling(buf->bo, &tiling, buf->stride);
-		igt_assert_eq(tiling, req_tiling);
+		if (tiling == I915_TILING_Y) {
+			drm_intel_bo_set_tiling(buf->bo, &tiling, buf->stride);
+			igt_assert_eq(tiling, req_tiling);
+		}
+	} else if (req_tiling == I915_TILING_Yf) {
+		int size;
+
+		buf->stride = ALIGN(width * 4, 128);
+		buf->size = buf->stride * height;
+		buf->tiling = tiling;
+
+		size = buf->stride * ALIGN(height, 32);
+
+		buf->bo = drm_intel_bo_alloc(data->bufmgr, "", size, 4096);
 	} else {
 		buf->bo = drm_intel_bo_alloc_tiled(data->bufmgr, "",
 						   width, height, 4,
@@ -394,7 +511,7 @@ static void scratch_buf_aux_check(data_t *data,
 		     "Aux surface indicates that nothing was compressed\n");
 }
 
-static void test(data_t *data, uint32_t tiling, bool test_ccs)
+static void test(data_t *data, uint32_t tiling, uint64_t ccs_modifier)
 {
 	struct igt_buf dst, ccs, ref;
 	struct {
@@ -402,7 +519,7 @@ static void test(data_t *data, uint32_t tiling, bool test_ccs)
 		const char *filename;
 		uint32_t tiling;
 		int x, y;
-	} src[3] = {
+	} src[] = {
 		{
 			.filename = "source-linear.png",
 			.tiling = I915_TILING_NONE,
@@ -418,18 +535,31 @@ static void test(data_t *data, uint32_t tiling, bool test_ccs)
 			.tiling = I915_TILING_Y,
 			.x = WIDTH/2+1, .y = 1,
 		},
+		{
+			.filename = "source-yf-tiled.png",
+			.tiling = I915_TILING_Yf,
+			.x = 1, .y = 1,
+		},
 	};
 
 	int opt_dump_aub = igt_aub_dump_enabled();
+	int num_src = ARRAY_SIZE(src);
+
+	/* no Yf before gen9 */
+	if (intel_gen(data->devid) < 9)
+		num_src--;
+
+	if (tiling == I915_TILING_Yf || ccs_modifier)
+		igt_require(intel_gen(data->devid) >= 9);
 
-	for (int i = 0; i < ARRAY_SIZE(src); i++)
+	for (int i = 0; i < num_src; i++)
 		scratch_buf_init(data, &src[i].buf, WIDTH, HEIGHT, src[i].tiling, false);
 	scratch_buf_init(data, &dst, WIDTH, HEIGHT, tiling, false);
-	if (test_ccs)
-		scratch_buf_init(data, &ccs, WIDTH, HEIGHT, I915_TILING_Y, true);
+	if (ccs_modifier)
+		scratch_buf_init(data, &ccs, WIDTH, HEIGHT, ccs_modifier, true);
 	scratch_buf_init(data, &ref, WIDTH, HEIGHT, I915_TILING_NONE, false);
 
-	for (int i = 0; i < ARRAY_SIZE(src); i++)
+	for (int i = 0; i < num_src; i++)
 		scratch_buf_draw_pattern(data, &src[i].buf,
 					 0, 0, WIDTH, HEIGHT,
 					 0, 0, WIDTH, HEIGHT, true);
@@ -440,13 +570,13 @@ static void test(data_t *data, uint32_t tiling, bool test_ccs)
 	scratch_buf_copy(data,
 			 &dst, 0, 0, WIDTH, HEIGHT,
 			 &ref, 0, 0);
-	for (int i = 0; i < ARRAY_SIZE(src); i++)
+	for (int i = 0; i < num_src; i++)
 		scratch_buf_copy(data,
 				 &src[i].buf, WIDTH/4, HEIGHT/4, WIDTH/2-2, HEIGHT/2-2,
 				 &ref, src[i].x, src[i].y);
 
 	if (opt_dump_png) {
-		for (int i = 0; i < ARRAY_SIZE(src); i++)
+		for (int i = 0; i < num_src; i++)
 			scratch_buf_write_to_png(data, &src[i].buf, src[i].filename);
 		scratch_buf_write_to_png(data, &dst, "destination.png");
 		scratch_buf_write_to_png(data, &ref, "reference.png");
@@ -466,24 +596,24 @@ static void test(data_t *data, uint32_t tiling, bool test_ccs)
 	 *	 |dst|src|
 	 *	  -------
 	 */
-	if (test_ccs)
+	if (ccs_modifier)
 		data->render_copy(data->batch, NULL,
 				  &dst, 0, 0, WIDTH, HEIGHT,
 				  &ccs, 0, 0);
 
-	for (int i = 0; i < ARRAY_SIZE(src); i++)
+	for (int i = 0; i < num_src; i++)
 		data->render_copy(data->batch, NULL,
 				  &src[i].buf, WIDTH/4, HEIGHT/4, WIDTH/2-2, HEIGHT/2-2,
-				  test_ccs ? &ccs : &dst, src[i].x, src[i].y);
+				  ccs_modifier ? &ccs : &dst, src[i].x, src[i].y);
 
-	if (test_ccs)
+	if (ccs_modifier)
 		data->render_copy(data->batch, NULL,
 				  &ccs, 0, 0, WIDTH, HEIGHT,
 				  &dst, 0, 0);
 
 	if (opt_dump_png){
 		scratch_buf_write_to_png(data, &dst, "result.png");
-		if (test_ccs) {
+		if (ccs_modifier) {
 			scratch_buf_write_to_png(data, &ccs, "compressed.png");
 			scratch_buf_aux_write_to_png(data, &ccs, "compressed-aux.png");
 		}
@@ -503,7 +633,7 @@ static void test(data_t *data, uint32_t tiling, bool test_ccs)
 		scratch_buf_check(data, &dst, &ref, WIDTH - 10, HEIGHT - 10);
 	}
 
-	if (test_ccs)
+	if (ccs_modifier)
 		scratch_buf_aux_check(data, &ccs);
 }
 
@@ -544,18 +674,31 @@ int main(int argc, char **argv)
 	}
 
 	igt_subtest("linear")
-		test(&data, I915_TILING_NONE, false);
+		test(&data, I915_TILING_NONE, 0);
 	igt_subtest("x-tiled")
-		test(&data, I915_TILING_X, false);
+		test(&data, I915_TILING_X, 0);
 	igt_subtest("y-tiled")
-		test(&data, I915_TILING_Y, false);
+		test(&data, I915_TILING_Y, 0);
+	igt_subtest("yf-tiled")
+		test(&data, I915_TILING_Yf, 0);
 
 	igt_subtest("y-tiled-ccs-to-linear")
-		test(&data, I915_TILING_NONE, true);
+		test(&data, I915_TILING_NONE, I915_TILING_Y);
 	igt_subtest("y-tiled-ccs-to-x-tiled")
-		test(&data, I915_TILING_X, true);
+		test(&data, I915_TILING_X, I915_TILING_Y);
 	igt_subtest("y-tiled-ccs-to-y-tiled")
-		test(&data, I915_TILING_Y, true);
+		test(&data, I915_TILING_Y, I915_TILING_Y);
+	igt_subtest("y-tiled-ccs-to-yf-tiled")
+		test(&data, I915_TILING_Yf, I915_TILING_Y);
+
+	igt_subtest("yf-tiled-ccs-to-linear")
+		test(&data, I915_TILING_NONE, I915_TILING_Yf);
+	igt_subtest("yf-tiled-ccs-to-x-tiled")
+		test(&data, I915_TILING_X, I915_TILING_Yf);
+	igt_subtest("yf-tiled-ccs-to-y-tiled")
+		test(&data, I915_TILING_Y, I915_TILING_Yf);
+	igt_subtest("yf-tiled-ccs-to-yf-tiled")
+		test(&data, I915_TILING_Yf, I915_TILING_Yf);
 
 	igt_fixture {
 		intel_batchbuffer_free(data.batch);
-- 
2.18.1

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

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

* [igt-dev] [PATCH i-g-t 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2018-10-30 16:20 [igt-dev] [PATCH i-g-t 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Ville Syrjala
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 2/5] tests/gem_render_copy: Test Yf tiling Ville Syrjala
@ 2018-10-30 16:20 ` Ville Syrjala
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 4/5] tests/kms_plane: Test all modifiers as well Ville Syrjala
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjala @ 2018-10-30 16:20 UTC (permalink / raw)
  To: igt-dev

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

Plug in rendercopy to the cairo surface stuff so that we can
generate compressed buffers with cairo.

v2: s/modifier_has_ccs/is_ccs_modifier/

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

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 5dca1cfa447a..cbe6d539690d 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -195,6 +195,7 @@ void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
 		}
 		break;
 	case LOCAL_I915_FORMAT_MOD_Y_TILED:
+	case LOCAL_I915_FORMAT_MOD_Y_TILED_CCS:
 		igt_require_intel(fd);
 		if (intel_gen(intel_get_drm_devid(fd)) == 2) {
 			*width_ret = 128;
@@ -208,6 +209,7 @@ void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
 		}
 		break;
 	case LOCAL_I915_FORMAT_MOD_Yf_TILED:
+	case LOCAL_I915_FORMAT_MOD_Yf_TILED_CCS:
 		igt_require_intel(fd);
 		switch (fb_bpp) {
 		case 8:
@@ -233,8 +235,16 @@ void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
 	}
 }
 
+static bool is_ccs_modifier(uint64_t modifier)
+{
+	return modifier == LOCAL_I915_FORMAT_MOD_Y_TILED_CCS ||
+		modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED_CCS;
+}
+
 static unsigned fb_plane_width(const struct igt_fb *fb, int plane)
 {
+	if (is_ccs_modifier(fb->tiling) && plane == 1)
+		return DIV_ROUND_UP(fb->width, 1024) * 128;
 	if (fb->drm_format == DRM_FORMAT_NV12 && plane == 1)
 		return DIV_ROUND_UP(fb->width, 2);
 
@@ -245,11 +255,16 @@ static unsigned fb_plane_bpp(const struct igt_fb *fb, int plane)
 {
 	const struct format_desc_struct *format = lookup_drm_format(fb->drm_format);
 
-	return format->plane_bpp[plane];
+	if (is_ccs_modifier(fb->tiling) && plane == 1)
+		return 8;
+	else
+		return format->plane_bpp[plane];
 }
 
 static unsigned fb_plane_height(const struct igt_fb *fb, int plane)
 {
+	if (is_ccs_modifier(fb->tiling) && plane == 1)
+		return DIV_ROUND_UP(fb->height, 512) * 32;
 	if (fb->drm_format == DRM_FORMAT_NV12 && plane == 1)
 		return DIV_ROUND_UP(fb->height, 2);
 
@@ -260,7 +275,10 @@ static int fb_num_planes(const struct igt_fb *fb)
 {
 	const struct format_desc_struct *format = lookup_drm_format(fb->drm_format);
 
-	return format->num_planes;
+	if (is_ccs_modifier(fb->tiling))
+		return 2;
+	else
+		return format->num_planes;
 }
 
 static void fb_init(struct igt_fb *fb,
@@ -419,8 +437,10 @@ uint64_t igt_fb_mod_to_tiling(uint64_t modifier)
 	case LOCAL_I915_FORMAT_MOD_X_TILED:
 		return I915_TILING_X;
 	case LOCAL_I915_FORMAT_MOD_Y_TILED:
+	case LOCAL_I915_FORMAT_MOD_Y_TILED_CCS:
 		return I915_TILING_Y;
 	case LOCAL_I915_FORMAT_MOD_Yf_TILED:
+	case LOCAL_I915_FORMAT_MOD_Yf_TILED_CCS:
 		return I915_TILING_Yf;
 	default:
 		igt_assert(0);
@@ -1267,8 +1287,53 @@ struct fb_blit_upload {
 	int fd;
 	struct igt_fb *fb;
 	struct fb_blit_linear linear;
+	drm_intel_bufmgr *bufmgr;
+	struct intel_batchbuffer *batch;
 };
 
+static void init_buf(struct fb_blit_upload *blit,
+		     struct igt_buf *buf,
+		     const struct igt_fb *fb,
+		     const char *name)
+{
+	igt_assert_eq(fb->offsets[0], 0);
+
+	buf->bo = gem_handle_to_libdrm_bo(blit->bufmgr, blit->fd,
+					  name, fb->gem_handle);
+	buf->tiling = igt_fb_mod_to_tiling(fb->tiling);
+	buf->stride = fb->strides[0];
+	buf->size = fb->size;
+
+	if (is_ccs_modifier(fb->tiling)) {
+		igt_assert_eq(fb->strides[0] & 127, 0);
+		igt_assert_eq(fb->strides[1] & 127, 0);
+
+		buf->aux.offset = fb->offsets[1];
+		buf->aux.stride = fb->strides[1];
+	}
+}
+
+static void rendercopy(struct fb_blit_upload *blit,
+		       const struct igt_fb *dst_fb,
+		       const struct igt_fb *src_fb)
+{
+	struct igt_buf src = {}, dst = {};
+	igt_render_copyfunc_t render_copy =
+		igt_get_render_copyfunc(intel_get_drm_devid(blit->fd));
+
+	igt_require(render_copy);
+
+	igt_assert_eq(dst_fb->offsets[0], 0);
+	igt_assert_eq(src_fb->offsets[0], 0);
+
+	init_buf(blit, &src, src_fb, "cairo rendercopy src");
+	init_buf(blit, &dst, dst_fb, "cairo rendercopy dst");
+
+	render_copy(blit->batch, NULL,
+		    &src, 0, 0, dst_fb->plane_width[0], dst_fb->plane_height[0],
+		    &dst, 0, 0);
+}
+
 static void blitcopy(const struct igt_fb *dst_fb,
 		     const struct igt_fb *src_fb)
 {
@@ -1306,7 +1371,10 @@ static void free_linear_mapping(struct fb_blit_upload *blit)
 	gem_set_domain(fd, linear->fb.gem_handle,
 		       I915_GEM_DOMAIN_GTT, 0);
 
-	blitcopy(fb, &linear->fb);
+	if (blit->batch)
+		rendercopy(blit, fb, &linear->fb);
+	else
+		blitcopy(fb, &linear->fb);
 
 	gem_sync(fd, linear->fb.gem_handle);
 	gem_close(fd, linear->fb.gem_handle);
@@ -1323,8 +1391,26 @@ static void destroy_cairo_surface__blit(void *arg)
 	free(blit);
 }
 
-static void setup_linear_mapping(int fd, struct igt_fb *fb, struct fb_blit_linear *linear)
+static void destroy_cairo_surface__rendercopy(void *arg)
 {
+	struct fb_blit_upload *blit = arg;
+
+	blit->fb->cairo_surface = NULL;
+
+	free_linear_mapping(blit);
+
+	intel_batchbuffer_free(blit->batch);
+	drm_intel_bufmgr_destroy(blit->bufmgr);
+
+	free(blit);
+}
+
+static void setup_linear_mapping(struct fb_blit_upload *blit)
+{
+	int fd = blit->fd;
+	struct igt_fb *fb = blit->fb;
+	struct fb_blit_linear *linear = &blit->linear;
+
 	/*
 	 * We create a linear BO that we'll map for the CPU to write to (using
 	 * cairo). This linear bo will be then blitted to its final
@@ -1343,7 +1429,10 @@ static void setup_linear_mapping(int fd, struct igt_fb *fb, struct fb_blit_linea
 	gem_set_domain(fd, linear->fb.gem_handle,
 			I915_GEM_DOMAIN_GTT, 0);
 
-	blitcopy(&linear->fb, fb);
+	if (blit->batch)
+		rendercopy(blit, &linear->fb, fb);
+	else
+		blitcopy(&linear->fb, fb);
 
 	gem_sync(fd, linear->fb.gem_handle);
 
@@ -1360,12 +1449,12 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
 	struct fb_blit_upload *blit;
 	cairo_format_t cairo_format;
 
-	blit = malloc(sizeof(*blit));
+	blit = calloc(1, sizeof(*blit));
 	igt_assert(blit);
 
 	blit->fd = fd;
 	blit->fb = fb;
-	setup_linear_mapping(fd, fb, &blit->linear);
+	setup_linear_mapping(blit);
 
 	cairo_format = drm_format_to_cairo(fb->drm_format);
 	fb->cairo_surface =
@@ -1380,6 +1469,36 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
 				    blit, destroy_cairo_surface__blit);
 }
 
+static void create_cairo_surface__rendercopy(int fd, struct igt_fb *fb)
+{
+	struct fb_blit_upload *blit;
+	cairo_format_t cairo_format;
+
+	blit = calloc(1, sizeof(*blit));
+	igt_assert(blit);
+
+	blit->fd = fd;
+	blit->fb = fb;
+
+	blit->bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
+	blit->batch = intel_batchbuffer_alloc(blit->bufmgr,
+					      intel_get_drm_devid(fd));
+
+	setup_linear_mapping(blit);
+
+	cairo_format = drm_format_to_cairo(fb->drm_format);
+	fb->cairo_surface =
+		cairo_image_surface_create_for_data(blit->linear.map,
+						    cairo_format,
+						    fb->width, fb->height,
+						    blit->linear.fb.strides[0]);
+	fb->domain = I915_GEM_DOMAIN_GTT;
+
+	cairo_surface_set_user_data(fb->cairo_surface,
+				    (cairo_user_data_key_t *)create_cairo_surface__rendercopy,
+				    blit, destroy_cairo_surface__rendercopy);
+}
+
 /**
  * igt_dirty_fb:
  * @fd: open drm file descriptor
@@ -1961,9 +2080,8 @@ static void destroy_cairo_surface__convert(void *arg)
 
 static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 {
-	struct fb_convert_blit_upload *blit = malloc(sizeof(*blit));
+	struct fb_convert_blit_upload *blit = calloc(1, sizeof(*blit));
 	struct fb_convert cvt = { 0 };
-
 	igt_assert(blit);
 
 	blit->base.fd = fd;
@@ -1976,7 +2094,7 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 
 	if (fb->tiling == LOCAL_I915_FORMAT_MOD_Y_TILED ||
 	    fb->tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED) {
-		setup_linear_mapping(fd, fb, &blit->base.linear);
+		setup_linear_mapping(&blit->base);
 	} else {
 		blit->base.linear.fb.gem_handle = 0;
 		blit->base.linear.map = map_bo(fd, fb);
@@ -2053,8 +2171,10 @@ cairo_surface_t *igt_get_cairo_surface(int fd, struct igt_fb *fb)
 		    ((f->cairo_id == CAIRO_FORMAT_INVALID) &&
 		     (f->pixman_id != PIXMAN_invalid)))
 			create_cairo_surface__convert(fd, fb);
+		else if (is_ccs_modifier(fb->tiling))
+			create_cairo_surface__rendercopy(fd, fb);
 		else if (fb->tiling == LOCAL_I915_FORMAT_MOD_Y_TILED ||
-		    fb->tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED)
+			 fb->tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED)
 			create_cairo_surface__blit(fd, fb);
 		else
 			create_cairo_surface__gtt(fd, fb);
-- 
2.18.1

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

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

* [igt-dev] [PATCH i-g-t 4/5] tests/kms_plane: Test all modifiers as well
  2018-10-30 16:20 [igt-dev] [PATCH i-g-t 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Ville Syrjala
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 2/5] tests/gem_render_copy: Test Yf tiling Ville Syrjala
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers Ville Syrjala
@ 2018-10-30 16:20 ` Ville Syrjala
  2018-10-31 21:35   ` Dhinakaran Pandiyan
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 5/5] lib/igt_fb: s/tiling/modifier/ where appropriate Ville Syrjala
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjala @ 2018-10-30 16:20 UTC (permalink / raw)
  To: igt-dev

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

Instead of just testing each pixel format let's test every
format+modifier combo.

Obviously testing with solid filled fbs isn't the most effective
way to detect tiling problems, but we can't really do much more if
we want to keep comparing YUV vs. RGB results (unless we start to
render the RGB content in a way that matches the YUV subsampling
behaviour of the hardware).

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

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 45e0a304e8ce..5e498d14856f 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -406,14 +406,15 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
 
 static void test_format_plane_color(data_t *data, enum pipe pipe,
 				    igt_plane_t *plane,
-				    uint32_t format, int width, int height,
+				    uint32_t format, uint64_t modifier,
+				    int width, int height,
 				    int color, igt_crc_t *crc, struct igt_fb *fb)
 {
 	const color_t *c = &colors[color];
 	struct igt_fb old_fb = *fb;
 
 	igt_create_color_fb(data->drm_fd, width, height,
-			    format, LOCAL_DRM_FORMAT_MOD_NONE,
+			    format, modifier,
 			    c->red, c->green, c->blue, fb);
 
 	igt_plane_set_fb(plane, fb);
@@ -432,6 +433,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 	struct igt_fb fb = {};
 	drmModeModeInfo *mode;
 	uint32_t format, ref_format;
+	uint64_t modifier, ref_modifier;
 	uint64_t width, height;
 	igt_crc_t ref_crc[ARRAY_SIZE(colors)];
 
@@ -440,6 +442,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 		width = mode->hdisplay;
 		height = mode->vdisplay;
 		ref_format = format = DRM_FORMAT_XRGB8888;
+		ref_modifier = modifier = DRM_FORMAT_MOD_NONE;
 	} else {
 		if (!plane->drm_plane) {
 			igt_debug("Only legacy cursor ioctl supported, skipping cursor plane\n");
@@ -448,6 +451,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));
 		ref_format = format = DRM_FORMAT_ARGB8888;
+		ref_modifier = modifier = DRM_FORMAT_MOD_NONE;
 	}
 
 	igt_debug("Testing connector %s on %s plane %s.%u\n",
@@ -468,22 +472,25 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 	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),
+	igt_info("Testing format " IGT_FORMAT_FMT " / modifier 0x%" PRIx64 " on %s.%u\n",
+		 IGT_FORMAT_ARGS(format), modifier,
 		 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,
+					format, modifier,
+					width, height,
 					i, &ref_crc[i], &fb);
 	}
 
-	for (int i = 0; i < plane->drm_plane->count_formats; i++) {
+	for (int i = 0; i < plane->format_mod_count; i++) {
 		igt_crc_t crc;
 
-		format = plane->drm_plane->formats[i];
+		format = plane->formats[i];
+		modifier = plane->modifiers[i];
 
-		if (format == ref_format)
+		if (format == ref_format &&
+		    modifier == ref_modifier)
 			continue;
 
 		if (!igt_fb_supported_format(format))
@@ -499,13 +506,14 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 		if (format == DRM_FORMAT_XBGR8888)
 			continue;
 
-		igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
-			 IGT_FORMAT_ARGS(format),
+		igt_info("Testing format " IGT_FORMAT_FMT " / modifier 0x%" PRIx64 " on %s.%u\n",
+			 IGT_FORMAT_ARGS(format), modifier,
 			 kmstest_pipe_name(pipe), plane->index);
 
 		for (int j = 0; j < ARRAY_SIZE(colors); j++) {
 			test_format_plane_color(data, pipe, plane,
-						format, width, height,
+						format, modifier,
+						width, height,
 						j, &crc, &fb);
 
 			igt_assert_crc_equal(&crc, &ref_crc[j]);
-- 
2.18.1

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

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

* [igt-dev] [PATCH i-g-t 5/5] lib/igt_fb: s/tiling/modifier/ where appropriate
  2018-10-30 16:20 [igt-dev] [PATCH i-g-t 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Ville Syrjala
                   ` (2 preceding siblings ...)
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 4/5] tests/kms_plane: Test all modifiers as well Ville Syrjala
@ 2018-10-30 16:20 ` Ville Syrjala
  2018-10-31 22:48   ` Dhinakaran Pandiyan
  2018-10-30 16:44 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Patchwork
  2018-10-30 20:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjala @ 2018-10-30 16:20 UTC (permalink / raw)
  To: igt-dev

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

Rename the igt_fb.tiling to igt_fb.modifier to better reflect
what information it carries. Now it's clear whether we're talking
about a modifier or a i915 tiling thing.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c    | 102 ++++++++++++++++++++++++------------------------
 lib/igt_fb.h    |  22 +++++------
 tests/kms_ccs.c |   2 +-
 3 files changed, 63 insertions(+), 63 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index cbe6d539690d..674f5332b0cc 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -168,7 +168,7 @@ static const struct format_desc_struct *lookup_drm_format(uint32_t drm_format)
 /**
  * igt_get_fb_tile_size:
  * @fd: the DRM file descriptor
- * @tiling: tiling layout of the framebuffer (as framebuffer modifier)
+ * @modifier: tiling layout of the framebuffer (as framebuffer modifier)
  * @fb_bpp: bits per pixel of the framebuffer
  * @width_ret: width of the tile in bytes
  * @height_ret: height of the tile in lines
@@ -176,10 +176,10 @@ static const struct format_desc_struct *lookup_drm_format(uint32_t drm_format)
  * This function returns width and height of a tile based on the given tiling
  * format.
  */
-void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
+void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
 			  unsigned *width_ret, unsigned *height_ret)
 {
-	switch (tiling) {
+	switch (modifier) {
 	case LOCAL_DRM_FORMAT_MOD_NONE:
 		*width_ret = 64;
 		*height_ret = 1;
@@ -243,7 +243,7 @@ static bool is_ccs_modifier(uint64_t modifier)
 
 static unsigned fb_plane_width(const struct igt_fb *fb, int plane)
 {
-	if (is_ccs_modifier(fb->tiling) && plane == 1)
+	if (is_ccs_modifier(fb->modifier) && plane == 1)
 		return DIV_ROUND_UP(fb->width, 1024) * 128;
 	if (fb->drm_format == DRM_FORMAT_NV12 && plane == 1)
 		return DIV_ROUND_UP(fb->width, 2);
@@ -255,7 +255,7 @@ static unsigned fb_plane_bpp(const struct igt_fb *fb, int plane)
 {
 	const struct format_desc_struct *format = lookup_drm_format(fb->drm_format);
 
-	if (is_ccs_modifier(fb->tiling) && plane == 1)
+	if (is_ccs_modifier(fb->modifier) && plane == 1)
 		return 8;
 	else
 		return format->plane_bpp[plane];
@@ -263,7 +263,7 @@ static unsigned fb_plane_bpp(const struct igt_fb *fb, int plane)
 
 static unsigned fb_plane_height(const struct igt_fb *fb, int plane)
 {
-	if (is_ccs_modifier(fb->tiling) && plane == 1)
+	if (is_ccs_modifier(fb->modifier) && plane == 1)
 		return DIV_ROUND_UP(fb->height, 512) * 32;
 	if (fb->drm_format == DRM_FORMAT_NV12 && plane == 1)
 		return DIV_ROUND_UP(fb->height, 2);
@@ -275,7 +275,7 @@ static int fb_num_planes(const struct igt_fb *fb)
 {
 	const struct format_desc_struct *format = lookup_drm_format(fb->drm_format);
 
-	if (is_ccs_modifier(fb->tiling))
+	if (is_ccs_modifier(fb->modifier))
 		return 2;
 	else
 		return format->num_planes;
@@ -296,7 +296,7 @@ static void fb_init(struct igt_fb *fb,
 
 	fb->width = width;
 	fb->height = height;
-	fb->tiling = modifier;
+	fb->modifier = modifier;
 	fb->drm_format = drm_format;
 	fb->fd = fd;
 	fb->num_planes = fb_num_planes(fb);
@@ -315,7 +315,7 @@ static uint32_t calc_plane_stride(struct igt_fb *fb, int plane)
 	uint32_t min_stride = fb->plane_width[plane] *
 		(fb->plane_bpp[plane] / 8);
 
-	if (fb->tiling != LOCAL_DRM_FORMAT_MOD_NONE &&
+	if (fb->modifier != LOCAL_DRM_FORMAT_MOD_NONE &&
 	    intel_gen(intel_get_drm_devid(fb->fd)) <= 3) {
 		uint32_t stride;
 
@@ -334,7 +334,7 @@ static uint32_t calc_plane_stride(struct igt_fb *fb, int plane)
 	} else {
 		unsigned int tile_width, tile_height;
 
-		igt_get_fb_tile_size(fb->fd, fb->tiling, fb->plane_bpp[plane],
+		igt_get_fb_tile_size(fb->fd, fb->modifier, fb->plane_bpp[plane],
 				     &tile_width, &tile_height);
 
 		return ALIGN(min_stride, tile_width);
@@ -343,7 +343,7 @@ static uint32_t calc_plane_stride(struct igt_fb *fb, int plane)
 
 static uint64_t calc_plane_size(struct igt_fb *fb, int plane)
 {
-	if (fb->tiling != LOCAL_DRM_FORMAT_MOD_NONE &&
+	if (fb->modifier != LOCAL_DRM_FORMAT_MOD_NONE &&
 	    intel_gen(intel_get_drm_devid(fb->fd)) <= 3) {
 		uint64_t min_size = (uint64_t) fb->strides[plane] *
 			fb->plane_height[plane];
@@ -364,7 +364,7 @@ static uint64_t calc_plane_size(struct igt_fb *fb, int plane)
 	} else {
 		unsigned int tile_width, tile_height;
 
-		igt_get_fb_tile_size(fb->fd, fb->tiling, fb->plane_bpp[plane],
+		igt_get_fb_tile_size(fb->fd, fb->modifier, fb->plane_bpp[plane],
 				     &tile_width, &tile_height);
 
 		return (uint64_t) fb->strides[plane] *
@@ -396,19 +396,19 @@ static uint64_t calc_fb_size(struct igt_fb *fb)
  * @width: width of the framebuffer in pixels
  * @height: height of the framebuffer in pixels
  * @format: drm fourcc pixel format code
- * @tiling: tiling layout of the framebuffer (as framebuffer modifier)
+ * @modifier: tiling layout of the framebuffer (as framebuffer modifier)
  * @size_ret: returned size for the framebuffer
  * @stride_ret: returned stride for the framebuffer
  *
  * This function returns valid stride and size values for a framebuffer with the
  * specified parameters.
  */
-void igt_calc_fb_size(int fd, int width, int height, uint32_t drm_format, uint64_t tiling,
+void igt_calc_fb_size(int fd, int width, int height, uint32_t drm_format, uint64_t modifier,
 		      uint64_t *size_ret, unsigned *stride_ret)
 {
 	struct igt_fb fb;
 
-	fb_init(&fb, fd, width, height, drm_format, tiling,
+	fb_init(&fb, fd, width, height, drm_format, modifier,
 		IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
 
 	fb.size = calc_fb_size(&fb);
@@ -478,7 +478,7 @@ static int create_bo_for_fb(struct igt_fb *fb)
 {
 	int fd = fb->fd;
 
-	if (fb->tiling || fb->size || fb->strides[0] || igt_format_is_yuv(fb->drm_format)) {
+	if (fb->modifier || fb->size || fb->strides[0] || igt_format_is_yuv(fb->drm_format)) {
 		uint64_t size;
 
 		size = calc_fb_size(fb);
@@ -496,7 +496,7 @@ static int create_bo_for_fb(struct igt_fb *fb)
 			fb->gem_handle = gem_create(fd, fb->size);
 
 			gem_set_tiling(fd, fb->gem_handle,
-				       igt_fb_mod_to_tiling(fb->tiling),
+				       igt_fb_mod_to_tiling(fb->modifier),
 				       fb->strides[0]);
 
 			gem_set_domain(fd, fb->gem_handle,
@@ -909,7 +909,7 @@ void igt_paint_image(cairo_t *cr, const char *filename,
  * @width: width of the framebuffer in pixel
  * @height: height of the framebuffer in pixel
  * @format: drm fourcc pixel format code
- * @tiling: tiling layout of the framebuffer (as framebuffer modifier)
+ * @modifier: tiling layout of the framebuffer (as framebuffer modifier)
  * @fb: pointer to an #igt_fb structure
  * @bo_size: size of the backing bo (0 for automatic size)
  * @bo_stride: stride of the backing bo (0 for automatic stride)
@@ -926,7 +926,7 @@ void igt_paint_image(cairo_t *cr, const char *filename,
  */
 unsigned int
 igt_create_fb_with_bo_size(int fd, int width, int height,
-			   uint32_t format, uint64_t tiling,
+			   uint32_t format, uint64_t modifier,
 			   struct igt_fb *fb, uint64_t bo_size,
 			   unsigned bo_stride)
 {
@@ -935,7 +935,7 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 	enum igt_color_range color_range = IGT_COLOR_YCBCR_LIMITED_RANGE;
 	uint32_t flags = 0;
 
-	fb_init(fb, fd, width, height, format, tiling,
+	fb_init(fb, fd, width, height, format, modifier,
 		color_encoding, color_range);
 
 	for (int i = 0; i < fb->num_planes; i++)
@@ -943,8 +943,8 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 
 	fb->size = bo_size;
 
-	igt_debug("%s(width=%d, height=%d, format=0x%x, tiling=0x%"PRIx64", size=%"PRIu64")\n",
-		  __func__, width, height, format, tiling, bo_size);
+	igt_debug("%s(width=%d, height=%d, format=0x%x, modifier=0x%"PRIx64", size=%"PRIu64")\n",
+		  __func__, width, height, format, modifier, bo_size);
 
 	create_bo_for_fb(fb);
 	igt_assert(fb->gem_handle > 0);
@@ -952,12 +952,12 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 	igt_debug("%s(handle=%d, pitch=%d)\n",
 		  __func__, fb->gem_handle, fb->strides[0]);
 
-	if (fb->tiling || igt_has_fb_modifiers(fd))
+	if (fb->modifier || igt_has_fb_modifiers(fd))
 		flags = LOCAL_DRM_MODE_FB_MODIFIERS;
 
 	do_or_die(__kms_addfb(fb->fd, fb->gem_handle,
 			      fb->width, fb->height,
-			      fb->drm_format, fb->tiling,
+			      fb->drm_format, fb->modifier,
 			      fb->strides, fb->offsets, fb->num_planes, flags,
 			      &fb->fb_id));
 
@@ -970,7 +970,7 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
  * @width: width of the framebuffer in pixel
  * @height: height of the framebuffer in pixel
  * @format: drm fourcc pixel format code
- * @tiling: tiling layout of the framebuffer
+ * @modifier: tiling layout of the framebuffer
  * @fb: pointer to an #igt_fb structure
  *
  * This function allocates a gem buffer object suitable to back a framebuffer
@@ -984,9 +984,9 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
  * The kms id of the created framebuffer.
  */
 unsigned int igt_create_fb(int fd, int width, int height, uint32_t format,
-			   uint64_t tiling, struct igt_fb *fb)
+			   uint64_t modifier, struct igt_fb *fb)
 {
-	return igt_create_fb_with_bo_size(fd, width, height, format, tiling, fb,
+	return igt_create_fb_with_bo_size(fd, width, height, format, modifier, fb,
 					  0, 0);
 }
 
@@ -996,7 +996,7 @@ unsigned int igt_create_fb(int fd, int width, int height, uint32_t format,
  * @width: width of the framebuffer in pixel
  * @height: height of the framebuffer in pixel
  * @format: drm fourcc pixel format code
- * @tiling: tiling layout of the framebuffer
+ * @modifier: tiling layout of the framebuffer
  * @r: red value to use as fill color
  * @g: green value to use as fill color
  * @b: blue value to use as fill color
@@ -1014,14 +1014,14 @@ unsigned int igt_create_fb(int fd, int width, int height, uint32_t format,
  * failure.
  */
 unsigned int igt_create_color_fb(int fd, int width, int height,
-				 uint32_t format, uint64_t tiling,
+				 uint32_t format, uint64_t modifier,
 				 double r, double g, double b,
 				 struct igt_fb *fb /* out */)
 {
 	unsigned int fb_id;
 	cairo_t *cr;
 
-	fb_id = igt_create_fb(fd, width, height, format, tiling, fb);
+	fb_id = igt_create_fb(fd, width, height, format, modifier, fb);
 	igt_assert(fb_id);
 
 	cr = igt_get_cairo_ctx(fd, fb);
@@ -1037,7 +1037,7 @@ unsigned int igt_create_color_fb(int fd, int width, int height,
  * @width: width of the framebuffer in pixel
  * @height: height of the framebuffer in pixel
  * @format: drm fourcc pixel format code
- * @tiling: tiling layout of the framebuffer
+ * @modifier: tiling layout of the framebuffer
  * @fb: pointer to an #igt_fb structure
  *
  * This function allocates a gem buffer object suitable to back a framebuffer
@@ -1052,13 +1052,13 @@ unsigned int igt_create_color_fb(int fd, int width, int height,
  * failure.
  */
 unsigned int igt_create_pattern_fb(int fd, int width, int height,
-				   uint32_t format, uint64_t tiling,
+				   uint32_t format, uint64_t modifier,
 				   struct igt_fb *fb /* out */)
 {
 	unsigned int fb_id;
 	cairo_t *cr;
 
-	fb_id = igt_create_fb(fd, width, height, format, tiling, fb);
+	fb_id = igt_create_fb(fd, width, height, format, modifier, fb);
 	igt_assert(fb_id);
 
 	cr = igt_get_cairo_ctx(fd, fb);
@@ -1074,7 +1074,7 @@ unsigned int igt_create_pattern_fb(int fd, int width, int height,
  * @width: width of the framebuffer in pixel
  * @height: height of the framebuffer in pixel
  * @format: drm fourcc pixel format code
- * @tiling: tiling layout of the framebuffer
+ * @modifier: tiling layout of the framebuffer
  * @r: red value to use as fill color
  * @g: green value to use as fill color
  * @b: blue value to use as fill color
@@ -1093,14 +1093,14 @@ unsigned int igt_create_pattern_fb(int fd, int width, int height,
  * failure.
  */
 unsigned int igt_create_color_pattern_fb(int fd, int width, int height,
-					 uint32_t format, uint64_t tiling,
+					 uint32_t format, uint64_t modifier,
 					 double r, double g, double b,
 					 struct igt_fb *fb /* out */)
 {
 	unsigned int fb_id;
 	cairo_t *cr;
 
-	fb_id = igt_create_fb(fd, width, height, format, tiling, fb);
+	fb_id = igt_create_fb(fd, width, height, format, modifier, fb);
 	igt_assert(fb_id);
 
 	cr = igt_get_cairo_ctx(fd, fb);
@@ -1117,7 +1117,7 @@ unsigned int igt_create_color_pattern_fb(int fd, int width, int height,
  * @width: width of the framebuffer in pixel or 0
  * @height: height of the framebuffer in pixel or 0
  * @format: drm fourcc pixel format code
- * @tiling: tiling layout of the framebuffer
+ * @modifier: tiling layout of the framebuffer
  * @filename: filename of the png image to draw
  * @fb: pointer to an #igt_fb structure
  *
@@ -1129,7 +1129,7 @@ unsigned int igt_create_color_pattern_fb(int fd, int width, int height,
  * failure.
  */
 unsigned int igt_create_image_fb(int fd, int width, int height,
-				 uint32_t format, uint64_t tiling,
+				 uint32_t format, uint64_t modifier,
 				 const char *filename,
 				 struct igt_fb *fb /* out */)
 {
@@ -1145,7 +1145,7 @@ unsigned int igt_create_image_fb(int fd, int width, int height,
 		height = cairo_image_surface_get_height(image);
 	cairo_surface_destroy(image);
 
-	fb_id = igt_create_fb(fd, width, height, format, tiling, fb);
+	fb_id = igt_create_fb(fd, width, height, format, modifier, fb);
 
 	cr = igt_get_cairo_ctx(fd, fb);
 	igt_paint_image(cr, filename, 0, 0, width, height);
@@ -1221,7 +1221,7 @@ static void stereo_fb_layout_from_mode(struct stereo_fb_layout *layout,
  * @drm_fd: open i915 drm file descriptor
  * @mode: A stereo 3D mode.
  * @format: drm fourcc pixel format code
- * @tiling: tiling layout of the framebuffer
+ * @modifier: tiling layout of the framebuffer
  *
  * Create a framebuffer for use with the stereo 3D mode specified by @mode.
  *
@@ -1230,7 +1230,7 @@ static void stereo_fb_layout_from_mode(struct stereo_fb_layout *layout,
  * failure.
  */
 unsigned int igt_create_stereo_fb(int drm_fd, drmModeModeInfo *mode,
-				  uint32_t format, uint64_t tiling)
+				  uint32_t format, uint64_t modifier)
 {
 	struct stereo_fb_layout layout;
 	cairo_t *cr;
@@ -1239,7 +1239,7 @@ unsigned int igt_create_stereo_fb(int drm_fd, drmModeModeInfo *mode,
 
 	stereo_fb_layout_from_mode(&layout, mode);
 	fb_id = igt_create_fb(drm_fd, layout.fb_width, layout.fb_height, format,
-			      tiling, &fb);
+			      modifier, &fb);
 	cr = igt_get_cairo_ctx(drm_fd, &fb);
 
 	igt_paint_image(cr, "1080p-left.png",
@@ -1300,11 +1300,11 @@ static void init_buf(struct fb_blit_upload *blit,
 
 	buf->bo = gem_handle_to_libdrm_bo(blit->bufmgr, blit->fd,
 					  name, fb->gem_handle);
-	buf->tiling = igt_fb_mod_to_tiling(fb->tiling);
+	buf->tiling = igt_fb_mod_to_tiling(fb->modifier);
 	buf->stride = fb->strides[0];
 	buf->size = fb->size;
 
-	if (is_ccs_modifier(fb->tiling)) {
+	if (is_ccs_modifier(fb->modifier)) {
 		igt_assert_eq(fb->strides[0] & 127, 0);
 		igt_assert_eq(fb->strides[1] & 127, 0);
 
@@ -1349,14 +1349,14 @@ static void blitcopy(const struct igt_fb *dst_fb,
 					   src_fb->gem_handle,
 					   src_fb->offsets[i],
 					   src_fb->strides[i],
-					   igt_fb_mod_to_tiling(src_fb->tiling),
+					   igt_fb_mod_to_tiling(src_fb->modifier),
 					   0, 0, /* src_x, src_y */
 					   dst_fb->plane_width[i], dst_fb->plane_height[i],
 					   dst_fb->plane_bpp[i],
 					   dst_fb->gem_handle,
 					   dst_fb->offsets[i],
 					   dst_fb->strides[i],
-					   igt_fb_mod_to_tiling(dst_fb->tiling),
+					   igt_fb_mod_to_tiling(dst_fb->modifier),
 					   0, 0 /* dst_x, dst_y */);
 	}
 }
@@ -2092,8 +2092,8 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 							     &blit->shadow_fb);
 	igt_assert(blit->shadow_ptr);
 
-	if (fb->tiling == LOCAL_I915_FORMAT_MOD_Y_TILED ||
-	    fb->tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED) {
+	if (fb->modifier == LOCAL_I915_FORMAT_MOD_Y_TILED ||
+	    fb->modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED) {
 		setup_linear_mapping(&blit->base);
 	} else {
 		blit->base.linear.fb.gem_handle = 0;
@@ -2171,10 +2171,10 @@ cairo_surface_t *igt_get_cairo_surface(int fd, struct igt_fb *fb)
 		    ((f->cairo_id == CAIRO_FORMAT_INVALID) &&
 		     (f->pixman_id != PIXMAN_invalid)))
 			create_cairo_surface__convert(fd, fb);
-		else if (is_ccs_modifier(fb->tiling))
+		else if (is_ccs_modifier(fb->modifier))
 			create_cairo_surface__rendercopy(fd, fb);
-		else if (fb->tiling == LOCAL_I915_FORMAT_MOD_Y_TILED ||
-			 fb->tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED)
+		else if (fb->modifier == LOCAL_I915_FORMAT_MOD_Y_TILED ||
+			 fb->modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED)
 			create_cairo_surface__blit(fd, fb);
 		else
 			create_cairo_surface__gtt(fd, fb);
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 9f027deba842..7ec37c0cbc25 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -47,7 +47,7 @@
  * @drm_format: DRM FOURCC code
  * @width: width in pixels
  * @height: height in pixels
- * @tiling: tiling mode as a DRM framebuffer modifier
+ * @modifier: tiling mode as a DRM framebuffer modifier
  * @size: size in bytes of the underlying backing storage
  * @cairo_surface: optionally attached cairo drawing surface
  * @domain: current domain for cache flushing tracking on i915.ko
@@ -70,7 +70,7 @@ typedef struct igt_fb {
 	int height;
 	enum igt_color_encoding color_encoding;
 	enum igt_color_range color_range;
-	uint64_t tiling;
+	uint64_t modifier;
 	uint64_t size;
 	cairo_surface_t *cairo_surface;
 	unsigned int domain;
@@ -102,34 +102,34 @@ enum igt_text_align {
 	align_hcenter	= 0x08,
 };
 
-void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
+void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
 			  unsigned *width_ret, unsigned *height_ret);
-void igt_calc_fb_size(int fd, int width, int height, uint32_t format, uint64_t tiling,
+void igt_calc_fb_size(int fd, int width, int height, uint32_t format, uint64_t modifier,
 		      uint64_t *size_ret, unsigned *stride_ret);
 unsigned int
 igt_create_fb_with_bo_size(int fd, int width, int height,
-			   uint32_t format, uint64_t tiling,
+			   uint32_t format, uint64_t modifier,
 			   struct igt_fb *fb, uint64_t bo_size,
 			   unsigned bo_stride);
 unsigned int igt_create_fb(int fd, int width, int height, uint32_t format,
-			   uint64_t tiling, struct igt_fb *fb);
+			   uint64_t modifier, struct igt_fb *fb);
 unsigned int igt_create_color_fb(int fd, int width, int height,
-				 uint32_t format, uint64_t tiling,
+				 uint32_t format, uint64_t modifier,
 				 double r, double g, double b,
 				 struct igt_fb *fb /* out */);
 unsigned int igt_create_pattern_fb(int fd, int width, int height,
-				   uint32_t format, uint64_t tiling,
+				   uint32_t format, uint64_t modifier,
 				   struct igt_fb *fb /* out */);
 unsigned int igt_create_color_pattern_fb(int fd, int width, int height,
-					 uint32_t format, uint64_t tiling,
+					 uint32_t format, uint64_t modifier,
 					 double r, double g, double b,
 					 struct igt_fb *fb /* out */);
 unsigned int igt_create_image_fb(int drm_fd,  int width, int height,
-				 uint32_t format, uint64_t tiling,
+				 uint32_t format, uint64_t modifier,
 				 const char *filename,
 				 struct igt_fb *fb /* out */);
 unsigned int igt_create_stereo_fb(int drm_fd, drmModeModeInfo *mode,
-				  uint32_t format, uint64_t tiling);
+				  uint32_t format, uint64_t modifier);
 unsigned int igt_fb_convert(struct igt_fb *dst, struct igt_fb *src,
 			    uint32_t dst_fourcc);
 void igt_remove_fb(int fd, struct igt_fb *fb);
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 1ed2b4a08c5d..42596a452aaa 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -388,7 +388,7 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
 	fb->width = f.width;
 	fb->height = f.height;
 	fb->strides[0] = f.pitches[0];
-	fb->tiling = f.modifier[0];
+	fb->modifier = f.modifier[0];
 	fb->size = size[0];
 	fb->cairo_surface = NULL;
 	fb->domain = 0;
-- 
2.18.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy
  2018-10-30 16:20 [igt-dev] [PATCH i-g-t 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Ville Syrjala
                   ` (3 preceding siblings ...)
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 5/5] lib/igt_fb: s/tiling/modifier/ where appropriate Ville Syrjala
@ 2018-10-30 16:44 ` Patchwork
  2018-10-30 20:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-10-30 16:44 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy
URL   : https://patchwork.freedesktop.org/series/51770/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5054 -> IGTPW_2020 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s3:
      fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)

    igt@kms_flip@basic-flip-vs-modeset:
      fi-skl-6700hq:      PASS -> DMESG-WARN (fdo#105998) +1

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-byt-clapper:     PASS -> FAIL (fdo#103191, fdo#107362)

    
    ==== Possible fixes ====

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     FAIL (fdo#103167) -> PASS

    
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718


== Participating hosts (46 -> 43) ==

  Additional (1): fi-skl-iommu 
  Missing    (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4699 -> IGTPW_2020

  CI_DRM_5054: dfa9e5c2b4b958e77c1109477b94c5c8615e25cc @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2020: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2020/
  IGT_4699: 1270ec553741ac20c45178d2b26f9a9562ea565f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@gem_render_copy@yf-tiled
+igt@gem_render_copy@yf-tiled-ccs-to-linear
+igt@gem_render_copy@yf-tiled-ccs-to-x-tiled
+igt@gem_render_copy@yf-tiled-ccs-to-yf-tiled
+igt@gem_render_copy@yf-tiled-ccs-to-y-tiled
+igt@gem_render_copy@y-tiled-ccs-to-yf-tiled

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy
  2018-10-30 16:20 [igt-dev] [PATCH i-g-t 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Ville Syrjala
                   ` (4 preceding siblings ...)
  2018-10-30 16:44 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Patchwork
@ 2018-10-30 20:36 ` Patchwork
  5 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-10-30 20:36 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy
URL   : https://patchwork.freedesktop.org/series/51770/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4699_full -> IGTPW_2020_full =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-glk:          PASS -> INCOMPLETE (fdo#103359, fdo#106886, k.org#198133)

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
      shard-apl:          NOTRUN -> DMESG-WARN (fdo#107956)

    igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
      shard-glk:          PASS -> FAIL (fdo#108145)

    igt@kms_color@pipe-a-ctm-max:
      shard-kbl:          PASS -> FAIL (fdo#108147)
      shard-apl:          PASS -> FAIL (fdo#108147)

    igt@kms_cursor_crc@cursor-256x256-random:
      shard-glk:          PASS -> FAIL (fdo#103232) +7
      shard-apl:          PASS -> FAIL (fdo#103232) +1
      shard-kbl:          PASS -> FAIL (fdo#103232)

    igt@kms_cursor_crc@cursor-64x64-suspend:
      shard-apl:          PASS -> FAIL (fdo#103191, fdo#103232)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-pwrite:
      shard-glk:          PASS -> FAIL (fdo#103167) +4

    igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
      shard-apl:          NOTRUN -> FAIL (fdo#108145)

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-apl:          PASS -> FAIL (fdo#103166) +3

    igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
      shard-kbl:          PASS -> FAIL (fdo#103166)

    igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
      shard-glk:          PASS -> FAIL (fdo#103166) +5

    igt@kms_vblank@pipe-a-wait-forked-hang:
      shard-glk:          PASS -> DMESG-WARN (fdo#105763, fdo#106538) +1

    igt@kms_vblank@pipe-c-wait-forked-busy:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103313)

    
    ==== Possible fixes ====

    igt@gem_exec_blt@normal-min:
      shard-apl:          INCOMPLETE (fdo#103927) -> PASS

    igt@gem_userptr_blits@unsync-unmap:
      shard-glk:          DMESG-WARN (fdo#105763, fdo#106538) -> PASS

    igt@kms_cursor_crc@cursor-128x42-onscreen:
      shard-glk:          FAIL (fdo#103232) -> PASS +2

    igt@kms_cursor_crc@cursor-64x21-random:
      shard-apl:          FAIL (fdo#103232) -> PASS +3
      shard-kbl:          FAIL (fdo#103232) -> PASS +1

    igt@kms_draw_crc@draw-method-rgb565-pwrite-ytiled:
      shard-glk:          FAIL (fdo#103184) -> PASS +1

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-kbl:          FAIL (fdo#103167) -> PASS +1

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
      shard-apl:          FAIL (fdo#103167) -> PASS +3

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move:
      shard-glk:          FAIL (fdo#103167) -> PASS +4

    igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-onoff:
      shard-glk:          DMESG-FAIL (fdo#103167, fdo#106538) -> PASS

    igt@kms_plane@plane-position-covered-pipe-a-planes:
      shard-glk:          FAIL (fdo#103166) -> PASS +1

    igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
      shard-apl:          FAIL (fdo#103166) -> PASS

    igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
      shard-kbl:          FAIL (fdo#103166) -> PASS +1

    
    ==== Warnings ====

    igt@kms_content_protection@atomic:
      shard-apl:          DMESG-FAIL (fdo#108549) -> FAIL (fdo#108597) +1

    
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
  fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
  fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
  fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
  fdo#108147 https://bugs.freedesktop.org/show_bug.cgi?id=108147
  fdo#108549 https://bugs.freedesktop.org/show_bug.cgi?id=108549
  fdo#108597 https://bugs.freedesktop.org/show_bug.cgi?id=108597
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


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

  Missing    (1): shard-skl 


== Build changes ==

    * IGT: IGT_4699 -> IGTPW_2020
    * Linux: CI_DRM_5044 -> CI_DRM_5054

  CI_DRM_5044: c4487dca27970879bf67f331614142c749984d65 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_5054: dfa9e5c2b4b958e77c1109477b94c5c8615e25cc @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2020: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2020/
  IGT_4699: 1270ec553741ac20c45178d2b26f9a9562ea565f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t 4/5] tests/kms_plane: Test all modifiers as well
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 4/5] tests/kms_plane: Test all modifiers as well Ville Syrjala
@ 2018-10-31 21:35   ` Dhinakaran Pandiyan
  2018-10-31 21:40     ` Ville Syrjälä
  0 siblings, 1 reply; 10+ messages in thread
From: Dhinakaran Pandiyan @ 2018-10-31 21:35 UTC (permalink / raw)
  To: igt-dev

On Tuesday, October 30, 2018 9:20:37 AM PDT Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Instead of just testing each pixel format let's test every
> format+modifier combo.
> 
> Obviously testing with solid filled fbs isn't the most effective
> way to detect tiling problems, but we can't really do much more if
> we want to keep comparing YUV vs. RGB results (unless we start to
> render the RGB content in a way that matches the YUV subsampling
> behaviour of the hardware).
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  tests/kms_plane.c | 30 +++++++++++++++++++-----------
>  1 file changed, 19 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 45e0a304e8ce..5e498d14856f 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -406,14 +406,15 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
>  
>  static void test_format_plane_color(data_t *data, enum pipe pipe,
>  				    igt_plane_t *plane,
> -				    uint32_t format, int width, int height,
> +				    uint32_t format, uint64_t modifier,
> +				    int width, int height,
>  				    int color, igt_crc_t *crc, struct igt_fb *fb)
>  {
>  	const color_t *c = &colors[color];
>  	struct igt_fb old_fb = *fb;
>  
>  	igt_create_color_fb(data->drm_fd, width, height,
> -			    format, LOCAL_DRM_FORMAT_MOD_NONE,
> +			    format, modifier,
>  			    c->red, c->green, c->blue, fb);
>  
>  	igt_plane_set_fb(plane, fb);
> @@ -432,6 +433,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
>  	struct igt_fb fb = {};
>  	drmModeModeInfo *mode;
>  	uint32_t format, ref_format;
> +	uint64_t modifier, ref_modifier;
>  	uint64_t width, height;
>  	igt_crc_t ref_crc[ARRAY_SIZE(colors)];
>  
> @@ -440,6 +442,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
>  		width = mode->hdisplay;
>  		height = mode->vdisplay;
>  		ref_format = format = DRM_FORMAT_XRGB8888;
> +		ref_modifier = modifier = DRM_FORMAT_MOD_NONE;
>  	} else {
>  		if (!plane->drm_plane) {
>  			igt_debug("Only legacy cursor ioctl supported, skipping cursor plane\n");
> @@ -448,6 +451,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));
>  		ref_format = format = DRM_FORMAT_ARGB8888;
> +		ref_modifier = modifier = DRM_FORMAT_MOD_NONE;
>  	}
>  
>  	igt_debug("Testing connector %s on %s plane %s.%u\n",
> @@ -468,22 +472,25 @@ static void test_format_plane(data_t *data, enum pipe pipe,
>  	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),
> +	igt_info("Testing format " IGT_FORMAT_FMT " / modifier 0x%" PRIx64 " on %s.%u\n",
> +		 IGT_FORMAT_ARGS(format), modifier,
>  		 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,
> +					format, modifier,
Use ref_format and ref_modifier here? 

I'll leave it to you if you want to address that nit.
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

> +					width, height,
>  					i, &ref_crc[i], &fb);
>  	}
>  
> -	for (int i = 0; i < plane->drm_plane->count_formats; i++) {
> +	for (int i = 0; i < plane->format_mod_count; i++) {
>  		igt_crc_t crc;
>  
> -		format = plane->drm_plane->formats[i];
> +		format = plane->formats[i];
> +		modifier = plane->modifiers[i];
>  
> -		if (format == ref_format)
> +		if (format == ref_format &&
> +		    modifier == ref_modifier)
>  			continue;
>  
>  		if (!igt_fb_supported_format(format))
> @@ -499,13 +506,14 @@ static void test_format_plane(data_t *data, enum pipe pipe,
>  		if (format == DRM_FORMAT_XBGR8888)
>  			continue;
>  
> -		igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
> -			 IGT_FORMAT_ARGS(format),
> +		igt_info("Testing format " IGT_FORMAT_FMT " / modifier 0x%" PRIx64 " on %s.%u\n",
> +			 IGT_FORMAT_ARGS(format), modifier,
>  			 kmstest_pipe_name(pipe), plane->index);
>  
>  		for (int j = 0; j < ARRAY_SIZE(colors); j++) {
>  			test_format_plane_color(data, pipe, plane,
> -						format, width, height,
> +						format, modifier,
> +						width, height,
>  						j, &crc, &fb);
>  
>  			igt_assert_crc_equal(&crc, &ref_crc[j]);
> 




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

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

* Re: [igt-dev] [PATCH i-g-t 4/5] tests/kms_plane: Test all modifiers as well
  2018-10-31 21:35   ` Dhinakaran Pandiyan
@ 2018-10-31 21:40     ` Ville Syrjälä
  0 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2018-10-31 21:40 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

On Wed, Oct 31, 2018 at 02:35:12PM -0700, Dhinakaran Pandiyan wrote:
> On Tuesday, October 30, 2018 9:20:37 AM PDT Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Instead of just testing each pixel format let's test every
> > format+modifier combo.
> > 
> > Obviously testing with solid filled fbs isn't the most effective
> > way to detect tiling problems, but we can't really do much more if
> > we want to keep comparing YUV vs. RGB results (unless we start to
> > render the RGB content in a way that matches the YUV subsampling
> > behaviour of the hardware).
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  tests/kms_plane.c | 30 +++++++++++++++++++-----------
> >  1 file changed, 19 insertions(+), 11 deletions(-)
> > 
> > diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> > index 45e0a304e8ce..5e498d14856f 100644
> > --- a/tests/kms_plane.c
> > +++ b/tests/kms_plane.c
> > @@ -406,14 +406,15 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
> >  
> >  static void test_format_plane_color(data_t *data, enum pipe pipe,
> >  				    igt_plane_t *plane,
> > -				    uint32_t format, int width, int height,
> > +				    uint32_t format, uint64_t modifier,
> > +				    int width, int height,
> >  				    int color, igt_crc_t *crc, struct igt_fb *fb)
> >  {
> >  	const color_t *c = &colors[color];
> >  	struct igt_fb old_fb = *fb;
> >  
> >  	igt_create_color_fb(data->drm_fd, width, height,
> > -			    format, LOCAL_DRM_FORMAT_MOD_NONE,
> > +			    format, modifier,
> >  			    c->red, c->green, c->blue, fb);
> >  
> >  	igt_plane_set_fb(plane, fb);
> > @@ -432,6 +433,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
> >  	struct igt_fb fb = {};
> >  	drmModeModeInfo *mode;
> >  	uint32_t format, ref_format;
> > +	uint64_t modifier, ref_modifier;
> >  	uint64_t width, height;
> >  	igt_crc_t ref_crc[ARRAY_SIZE(colors)];
> >  
> > @@ -440,6 +442,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
> >  		width = mode->hdisplay;
> >  		height = mode->vdisplay;
> >  		ref_format = format = DRM_FORMAT_XRGB8888;
> > +		ref_modifier = modifier = DRM_FORMAT_MOD_NONE;
> >  	} else {
> >  		if (!plane->drm_plane) {
> >  			igt_debug("Only legacy cursor ioctl supported, skipping cursor plane\n");
> > @@ -448,6 +451,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));
> >  		ref_format = format = DRM_FORMAT_ARGB8888;
> > +		ref_modifier = modifier = DRM_FORMAT_MOD_NONE;
> >  	}
> >  
> >  	igt_debug("Testing connector %s on %s plane %s.%u\n",
> > @@ -468,22 +472,25 @@ static void test_format_plane(data_t *data, enum pipe pipe,
> >  	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),
> > +	igt_info("Testing format " IGT_FORMAT_FMT " / modifier 0x%" PRIx64 " on %s.%u\n",
> > +		 IGT_FORMAT_ARGS(format), modifier,
> >  		 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,
> > +					format, modifier,
> Use ref_format and ref_modifier here? 

Yeah, seems sensible. I can then avoid the ugly double assignment
as well.

> 
> I'll leave it to you if you want to address that nit.
> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> 
> > +					width, height,
> >  					i, &ref_crc[i], &fb);
> >  	}
> >  
> > -	for (int i = 0; i < plane->drm_plane->count_formats; i++) {
> > +	for (int i = 0; i < plane->format_mod_count; i++) {
> >  		igt_crc_t crc;
> >  
> > -		format = plane->drm_plane->formats[i];
> > +		format = plane->formats[i];
> > +		modifier = plane->modifiers[i];
> >  
> > -		if (format == ref_format)
> > +		if (format == ref_format &&
> > +		    modifier == ref_modifier)
> >  			continue;
> >  
> >  		if (!igt_fb_supported_format(format))
> > @@ -499,13 +506,14 @@ static void test_format_plane(data_t *data, enum pipe pipe,
> >  		if (format == DRM_FORMAT_XBGR8888)
> >  			continue;
> >  
> > -		igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
> > -			 IGT_FORMAT_ARGS(format),
> > +		igt_info("Testing format " IGT_FORMAT_FMT " / modifier 0x%" PRIx64 " on %s.%u\n",
> > +			 IGT_FORMAT_ARGS(format), modifier,
> >  			 kmstest_pipe_name(pipe), plane->index);
> >  
> >  		for (int j = 0; j < ARRAY_SIZE(colors); j++) {
> >  			test_format_plane_color(data, pipe, plane,
> > -						format, width, height,
> > +						format, modifier,
> > +						width, height,
> >  						j, &crc, &fb);
> >  
> >  			igt_assert_crc_equal(&crc, &ref_crc[j]);
> > 
> 
> 
> 

-- 
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] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 5/5] lib/igt_fb: s/tiling/modifier/ where appropriate
  2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 5/5] lib/igt_fb: s/tiling/modifier/ where appropriate Ville Syrjala
@ 2018-10-31 22:48   ` Dhinakaran Pandiyan
  0 siblings, 0 replies; 10+ messages in thread
From: Dhinakaran Pandiyan @ 2018-10-31 22:48 UTC (permalink / raw)
  To: igt-dev

On Tuesday, October 30, 2018 9:20:38 AM PDT Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Rename the igt_fb.tiling to igt_fb.modifier to better reflect
> what information it carries. Now it's clear whether we're talking
> about a modifier or a i915 tiling thing.
> 

Makes sense,
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

We should probably rename the locals in the callers for more clarity. kms_flip_tiling.c, 
kms_rotation_crc.c, pm_rpm.c and kms_available_modes_crc.c store the modifier as
"tiling". Is this something that can be scripted easily?

-DK

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  lib/igt_fb.c    | 102 ++++++++++++++++++++++++------------------------
>  lib/igt_fb.h    |  22 +++++------
>  tests/kms_ccs.c |   2 +-







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

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

end of thread, other threads:[~2018-10-31 22:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-30 16:20 [igt-dev] [PATCH i-g-t 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Ville Syrjala
2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 2/5] tests/gem_render_copy: Test Yf tiling Ville Syrjala
2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers Ville Syrjala
2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 4/5] tests/kms_plane: Test all modifiers as well Ville Syrjala
2018-10-31 21:35   ` Dhinakaran Pandiyan
2018-10-31 21:40     ` Ville Syrjälä
2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 5/5] lib/igt_fb: s/tiling/modifier/ where appropriate Ville Syrjala
2018-10-31 22:48   ` Dhinakaran Pandiyan
2018-10-30 16:44 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Patchwork
2018-10-30 20:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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