All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [HAX 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy
@ 2019-02-21  2:41 Dhinakaran Pandiyan
  2019-02-21  2:41 ` [igt-dev] [HAX 2/5] tests/gem_render_copy: Test Yf tiling Dhinakaran Pandiyan
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Dhinakaran Pandiyan @ 2019-02-21  2:41 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>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@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 c62047d8..372c5267 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 e3d95a68..8514c991 100644
--- a/lib/rendercopy_gen9.c
+++ b/lib/rendercopy_gen9.c
@@ -204,9 +204,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.17.1

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

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

* [igt-dev] [HAX 2/5] tests/gem_render_copy: Test Yf tiling
  2019-02-21  2:41 [igt-dev] [HAX 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
@ 2019-02-21  2:41 ` Dhinakaran Pandiyan
  2019-02-21  2:41 ` [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers Dhinakaran Pandiyan
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Dhinakaran Pandiyan @ 2019-02-21  2:41 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.

v2: From DK
Set bpp for Yf buffer.

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

diff --git a/tests/i915/gem_render_copy.c b/tests/i915/gem_render_copy.c
index 0cd4e50f..afe2df05 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;
@@ -299,8 +404,21 @@ 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;
+		buf->bpp = 32;
+
+		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,
@@ -396,7 +514,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 {
@@ -404,7 +522,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,
@@ -420,18 +538,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);
@@ -442,13 +573,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");
@@ -468,24 +599,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");
 		}
@@ -505,7 +636,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);
 }
 
@@ -546,18 +677,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.17.1

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

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

* [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-21  2:41 [igt-dev] [HAX 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
  2019-02-21  2:41 ` [igt-dev] [HAX 2/5] tests/gem_render_copy: Test Yf tiling Dhinakaran Pandiyan
@ 2019-02-21  2:41 ` Dhinakaran Pandiyan
  2019-02-21 13:58   ` Ville Syrjälä
  2019-02-21 14:06   ` Ville Syrjälä
  2019-02-21  2:41 ` [igt-dev] [HAX 4/5] lib/igt_fb: s/tiling/modifier/ where appropriate Dhinakaran Pandiyan
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 20+ messages in thread
From: Dhinakaran Pandiyan @ 2019-02-21  2:41 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/

v3: From DK
Set buf.bpp when initializing and rebase.

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

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 462afec2..e0288282 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -290,6 +290,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;
@@ -303,6 +304,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:
@@ -328,10 +330,21 @@ 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)
 {
 	const struct format_desc_struct *format = lookup_drm_format(fb->drm_format);
 
+	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);
+
 	if (plane == 0)
 		return fb->width;
 
@@ -342,13 +355,21 @@ 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)
 {
 	const struct format_desc_struct *format = lookup_drm_format(fb->drm_format);
 
+	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);
+
 	if (plane == 0)
 		return fb->height;
 
@@ -359,7 +380,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,
@@ -518,8 +542,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);
@@ -1405,8 +1431,54 @@ 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->bpp = fb->plane_bpp[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)
 {
@@ -1444,7 +1516,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);
@@ -1461,8 +1536,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
@@ -1481,7 +1574,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);
 
@@ -1498,12 +1594,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 =
@@ -1518,6 +1614,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
@@ -2278,8 +2404,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 cvt = { };
+	struct fb_convert_blit_upload *blit = calloc(1, sizeof(*blit));
+	struct fb_convert cvt = { 0 };
 	const struct format_desc_struct *f = lookup_drm_format(fb->drm_format);
 	unsigned drm_format;
 	cairo_format_t cairo_id;
@@ -2318,7 +2444,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 = *fb;
 		blit->base.linear.fb.gem_handle = 0;
@@ -2397,8 +2523,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.17.1

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

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

* [igt-dev] [HAX 4/5] lib/igt_fb: s/tiling/modifier/ where appropriate
  2019-02-21  2:41 [igt-dev] [HAX 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
  2019-02-21  2:41 ` [igt-dev] [HAX 2/5] tests/gem_render_copy: Test Yf tiling Dhinakaran Pandiyan
  2019-02-21  2:41 ` [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers Dhinakaran Pandiyan
@ 2019-02-21  2:41 ` Dhinakaran Pandiyan
  2019-02-21  2:41 ` [igt-dev] [HAX 5/5] tests/kms_ccs: Generate compressed surfaces with renderopy Dhinakaran Pandiyan
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Dhinakaran Pandiyan @ 2019-02-21  2:41 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>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@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 e0288282..6072f70e 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -259,7 +259,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
@@ -267,10 +267,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:
 		if (is_i915_device(fd))
 			*width_ret = 64;
@@ -340,7 +340,7 @@ static unsigned fb_plane_width(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 DIV_ROUND_UP(fb->width, 1024) * 128;
 	if (fb->drm_format == DRM_FORMAT_NV12 && plane == 1)
 		return DIV_ROUND_UP(fb->width, 2);
@@ -355,7 +355,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];
@@ -365,7 +365,7 @@ static unsigned fb_plane_height(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 DIV_ROUND_UP(fb->height, 512) * 32;
 	if (fb->drm_format == DRM_FORMAT_NV12 && plane == 1)
 		return DIV_ROUND_UP(fb->height, 2);
@@ -380,7 +380,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;
@@ -401,7 +401,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);
@@ -420,7 +420,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;
 
@@ -439,7 +439,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);
@@ -448,7 +448,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];
@@ -469,7 +469,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] *
@@ -501,19 +501,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);
@@ -637,7 +637,7 @@ static int create_bo_for_fb(struct igt_fb *fb)
 	int fd = fb->fd;
 
 	if (is_i915_device(fd) &&
-	   (fb->tiling || fb->size || fb->strides[0] || igt_format_is_yuv(fb->drm_format))) {
+	    (fb->modifier || fb->size || fb->strides[0] || igt_format_is_yuv(fb->drm_format))) {
 		uint64_t size;
 
 		size = calc_fb_size(fb);
@@ -649,7 +649,7 @@ static int create_bo_for_fb(struct igt_fb *fb)
 		fb->is_dumb = false;
 		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]);
 
 		goto out;
@@ -1053,7 +1053,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)
@@ -1070,7 +1070,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)
 {
@@ -1079,7 +1079,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++)
@@ -1087,8 +1087,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);
@@ -1096,12 +1096,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));
 
@@ -1114,7 +1114,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
@@ -1128,9 +1128,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);
 }
 
@@ -1140,7 +1140,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
@@ -1158,14 +1158,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);
@@ -1181,7 +1181,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
@@ -1196,13 +1196,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);
@@ -1218,7 +1218,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
@@ -1237,14 +1237,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);
@@ -1261,7 +1261,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
  *
@@ -1273,7 +1273,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 */)
 {
@@ -1289,7 +1289,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);
@@ -1365,7 +1365,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.
  *
@@ -1374,7 +1374,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;
@@ -1383,7 +1383,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",
@@ -1444,12 +1444,12 @@ 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->bpp = fb->plane_bpp[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);
 
@@ -1494,14 +1494,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 */);
 	}
 }
@@ -2442,8 +2442,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 = *fb;
@@ -2523,10 +2523,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 8c683db5..a5a1a2ba 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -53,7 +53,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
@@ -76,7 +76,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;
@@ -108,34 +108,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 1ed2b4a0..42596a45 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.17.1

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

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

* [igt-dev] [HAX 5/5] tests/kms_ccs: Generate compressed surfaces with renderopy
  2019-02-21  2:41 [igt-dev] [HAX 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
                   ` (2 preceding siblings ...)
  2019-02-21  2:41 ` [igt-dev] [HAX 4/5] lib/igt_fb: s/tiling/modifier/ where appropriate Dhinakaran Pandiyan
@ 2019-02-21  2:41 ` Dhinakaran Pandiyan
  2019-02-21 10:41 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Patchwork
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Dhinakaran Pandiyan @ 2019-02-21  2:41 UTC (permalink / raw)
  To: igt-dev

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 lib/igt_fb.c    |   8 +++
 lib/igt_fb.h    |   3 +
 tests/kms_ccs.c | 182 ++++++++++--------------------------------------
 3 files changed, 47 insertions(+), 146 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 6072f70e..ea57d0f0 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -693,6 +693,14 @@ out:
 	return fb->gem_handle;
 }
 
+void igt_create_bo_for_fb(int fd, int width, int height,
+			  uint32_t format, uint64_t modifier,
+			  struct igt_fb *fb /* out */) {
+	fb_init(fb, fd, width, height, format, modifier,
+		IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
+	create_bo_for_fb(fb);
+}
+
 /**
  * igt_create_bo_with_dimensions:
  * @fd: open drm file descriptor
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index a5a1a2ba..8645ab27 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -143,6 +143,9 @@ int igt_dirty_fb(int fd, struct igt_fb *fb);
 void *igt_fb_map_buffer(int fd, struct igt_fb *fb);
 void igt_fb_unmap_buffer(struct igt_fb *fb, void *buffer);
 
+void igt_create_bo_for_fb(int fd, int width, int height,
+			  uint32_t format, uint64_t modifier,
+			  struct igt_fb *fb);
 int igt_create_bo_with_dimensions(int fd, int width, int height, uint32_t format,
 				  uint64_t modifier, unsigned stride,
 				  uint64_t *size_ret, unsigned *stride_ret,
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 42596a45..3555edc9 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -192,104 +192,32 @@ static bool plane_has_format_with_ccs(data_t *data, igt_plane_t *plane, uint32_t
 	return false;
 }
 
-static void render_fb(data_t *data, uint32_t gem_handle, unsigned int size,
-		      enum test_fb_flags fb_flags,
-		      int height, unsigned int stride)
+static void addfb_init(struct igt_fb *fb, struct drm_mode_fb_cmd2 *f)
 {
-	uint32_t *ptr;
-	unsigned int half_height, half_size;
-	uint32_t uncompressed_color = data->plane ? GREEN : RED;
-	uint32_t compressed_color =
-		data->plane ? COMPRESSED_GREEN : COMPRESSED_RED;
-	uint32_t bad_color = RED;
 	int i;
 
-	ptr = gem_mmap__cpu(data->drm_fd, gem_handle, 0, size,
-			    PROT_READ | PROT_WRITE);
+	f->width = fb->width;
+	f->height = fb->height;
+	f->pixel_format = fb->drm_format;
+	f->flags = LOCAL_DRM_MODE_FB_MODIFIERS;
 
-	if (fb_flags & FB_COMPRESSED) {
-		/* In the compressed case, we want the top half of the
-		 * surface to be uncompressed and the bottom half to be
-		 * compressed.
-		 *
-		 * We need to cut the surface on a CCS cache-line boundary,
-		 * otherwise, we're going to be in trouble when we try to
-		 * generate CCS data for the surface.  A cache line in the
-		 * CCS is 16x16 cache-line-pairs in the main surface.  16
-		 * cache lines is 64 rows high.
-		 */
-		half_height = ALIGN(height, 128) / 2;
-		half_size = half_height * stride;
-		for (i = 0; i < size / 4; i++) {
-			if (i < half_size / 4)
-				ptr[i] = uncompressed_color;
-			else
-				ptr[i] = compressed_color;
-		}
-	} else {
-		/* When we're displaying the primary plane underneath a
-		 * sprite plane, cut out a 128 x 128 area (less than the sprite)
-		 * plane size which we paint red, so we know easily if it's
-		 * bad.
-		 */
-		for (i = 0; i < size / 4; i++) {
-			if ((fb_flags & FB_HAS_PLANE) &&
-			    (i / (stride / 4)) < 128 &&
-			    (i % (stride / 4)) < 128) {
-				ptr[i] = bad_color;
-			} else {
-				ptr[i] = uncompressed_color;
-			}
-		}
+	for (i = 0; i < fb->num_planes; i++) {
+		f->handles[i] = fb->gem_handle;
+		f->modifier[i] = fb->modifier;
+		f->pitches[i] = fb->strides[i];
+		f->offsets[i] = fb->offsets[i];
 	}
-
-	munmap(ptr, size);
-}
-
-static unsigned int
-y_tile_y_pos(unsigned int offset, unsigned int stride)
-{
-	unsigned int y_tiles, y;
-	y_tiles = (offset / 4096) / (stride / 128);
-	y = y_tiles * 32 + ((offset & 0x1f0) >> 4);
-	return y;
-}
-
-static void render_ccs(data_t *data, uint32_t gem_handle,
-		       uint32_t offset, uint32_t size,
-		       int height, unsigned int ccs_stride)
-{
-	unsigned int half_height, ccs_half_height;
-	uint8_t *ptr;
-	int i;
-
-	half_height = ALIGN(height, 128) / 2;
-	ccs_half_height = half_height / 16;
-
-	ptr = gem_mmap__cpu(data->drm_fd, gem_handle, offset, size,
-			    PROT_READ | PROT_WRITE);
-
-	for (i = 0; i < size; i++) {
-		if (y_tile_y_pos(i, ccs_stride) < ccs_half_height)
-			ptr[i] = CCS_UNCOMPRESSED;
-		else
-			ptr[i] = CCS_COMPRESSED;
-	}
-
-	munmap(ptr, size);
 }
 
 static void generate_fb(data_t *data, struct igt_fb *fb,
 			int width, int height,
 			enum test_fb_flags fb_flags)
 {
-	struct local_drm_mode_fb_cmd2 f = {};
-	unsigned int size[2];
+	struct drm_mode_fb_cmd2 f = {};
+	uint32_t format;
 	uint64_t modifier;
+	cairo_t *cr;
 	int ret;
-	uint32_t ccs_handle;
-
-	memset(fb, 0, sizeof(*fb));
 
 	/* Use either compressed or Y-tiled to test. However, given the lack of
 	 * available bandwidth, we use linear for the primary plane when
@@ -303,74 +231,47 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
 	else
 		modifier = 0;
 
-	f.flags = LOCAL_DRM_MODE_FB_MODIFIERS;
-	f.width = width;
-	f.height = height;
-
 	if (data->flags & TEST_BAD_PIXEL_FORMAT)
-		f.pixel_format = DRM_FORMAT_RGB565;
+		format = DRM_FORMAT_RGB565;
 	else
-		f.pixel_format = DRM_FORMAT_XRGB8888;
+		format = DRM_FORMAT_XRGB8888;
 
-	f.pitches[0] = ALIGN(width * 4, 128);
-	f.modifier[0] = modifier;
-	f.offsets[0] = 0;
-	size[0] = f.pitches[0] * ALIGN(height, 32);
+	igt_create_bo_for_fb(data->drm_fd, width, height, format, modifier, fb);
+	igt_assert(fb->gem_handle > 0);
 
-	if (fb_flags & FB_COMPRESSED) {
-		/* From the Sky Lake PRM, Vol 12, "Color Control Surface":
-		 *
-		 *    "The compression state of the cache-line pair is
-		 *    specified by 2 bits in the CCS.  Each CCS cache-line
-		 *    represents an area on the main surface of 16x16 sets
-		 *    of 128 byte Y-tiled cache-line-pairs. CCS is always Y
-		 *    tiled."
-		 *
-		 * A "cache-line-pair" for a Y-tiled surface is two
-		 * horizontally adjacent cache lines.  When operating in
-		 * bytes and rows, this gives us a scale-down factor of
-		 * 32x16.  Since the main surface has a 32-bit format, we
-		 * need to multiply width by 4 to get bytes.
-		 */
-		int ccs_width = ALIGN(width * 4, 32) / 32;
-		int ccs_height = ALIGN(height, 16) / 16;
-		int ccs_pitches = ALIGN(ccs_width * 1, 128);
-		int ccs_offsets = size[0];
+	addfb_init(fb, &f);
 
+	if (fb_flags & FB_COMPRESSED) {
 		if (fb_flags & FB_MISALIGN_AUX_STRIDE) {
 			igt_skip_on_f(width <= 1024,
 				      "FB already has the smallest possible stride\n");
-			ccs_pitches -= 64;
+			f.pitches[1] -= 64;
 		}
-		else if (fb_flags & FB_SMALL_AUX_STRIDE) {
+
+		if (fb_flags & FB_SMALL_AUX_STRIDE) {
 			igt_skip_on_f(width <= 1024,
 				      "FB already has the smallest possible stride\n");
-			ccs_pitches = ALIGN(ccs_width/2, 128);
+			f.pitches[1] = ALIGN(f.pitches[1]/2, 128);
 		}
 
-		size[1] = ccs_pitches * ALIGN(ccs_height, 32);
-
-		f.handles[0] = gem_create(data->drm_fd, size[0] + size[1]);
-		if (data->flags & TEST_BAD_CCS_HANDLE) {
-			/* Put the CCS buffer on a different BO. */
-			ccs_handle = gem_create(data->drm_fd, size[0] + size[1]);
-		} else
-			ccs_handle = f.handles[0];
+		if (fb_flags & FB_ZERO_AUX_STRIDE)
+			f.pitches[1] = 0;
 
-		if (!(data->flags & TEST_NO_AUX_BUFFER)) {
-			f.modifier[1] = modifier;
-			f.handles[1] = ccs_handle;
-			f.offsets[1] = ccs_offsets;
-			f.pitches[1] = (fb_flags & FB_ZERO_AUX_STRIDE)? 0:ccs_pitches;
+		/* Put the CCS buffer on a different BO. */
+		if (data->flags & TEST_BAD_CCS_HANDLE)
+			f.handles[1] = gem_create(data->drm_fd, fb->size);
 
-			render_ccs(data, f.handles[1], f.offsets[1], size[1],
-				   height, ccs_pitches);
+		if (data->flags & TEST_NO_AUX_BUFFER) {
+			f.handles[1] = 0;
+			f.modifier[1] = 0;
+			f.pitches[1] = 0;
+			f.offsets[1] = 0;
 		}
-	} else {
-		f.handles[0] = gem_create(data->drm_fd, size[0]);
 	}
 
-	render_fb(data, f.handles[0], size[0], fb_flags, height, f.pitches[0]);
+	cr = igt_get_cairo_ctx(data->drm_fd, fb);
+	igt_paint_color(cr, 0, 0, width, height, 1.0, 0.0, 0.0);
+	igt_put_cairo_ctx(data->drm_fd, fb, cr);
 
 	ret = drmIoctl(data->drm_fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f);
 	if (data->flags & TEST_FAIL_ON_ADDFB2) {
@@ -381,17 +282,6 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
 		igt_assert_eq(ret, 0);
 
 	fb->fb_id = f.fb_id;
-	fb->fd = data->drm_fd;
-	fb->gem_handle = f.handles[0];
-	fb->is_dumb = false;
-	fb->drm_format = f.pixel_format;
-	fb->width = f.width;
-	fb->height = f.height;
-	fb->strides[0] = f.pitches[0];
-	fb->modifier = f.modifier[0];
-	fb->size = size[0];
-	fb->cairo_surface = NULL;
-	fb->domain = 0;
 }
 
 static bool try_config(data_t *data, enum test_fb_flags fb_flags,
-- 
2.17.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy
  2019-02-21  2:41 [igt-dev] [HAX 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
                   ` (3 preceding siblings ...)
  2019-02-21  2:41 ` [igt-dev] [HAX 5/5] tests/kms_ccs: Generate compressed surfaces with renderopy Dhinakaran Pandiyan
@ 2019-02-21 10:41 ` Patchwork
  2019-02-21 15:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2019-02-21 10:41 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_5645 -> IGTPW_2465
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  * igt@prime_vgem@basic-fence-flip:
    - fi-hsw-4770r:       PASS -> FAIL [fdo#104008]

  
#### Possible fixes ####

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS

  
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
  [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 -> 38)
------------------------------

  Missing    (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-gdg-551 fi-pnv-d510 fi-snb-2600 


Build changes
-------------

    * IGT: IGT_4846 -> IGTPW_2465

  CI_DRM_5645: c67ed483692270fa9c8402d172d54b6c1335b7f7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2465: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2465/
  IGT_4846: 5aa3651ce2f5f562dad74f3e9d1ba47844e7a998 @ 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_2465/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-21  2:41 ` [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers Dhinakaran Pandiyan
@ 2019-02-21 13:58   ` Ville Syrjälä
  2019-02-21 14:06   ` Ville Syrjälä
  1 sibling, 0 replies; 20+ messages in thread
From: Ville Syrjälä @ 2019-02-21 13:58 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran Pandiyan wrote:
> 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/
> 
> v3: From DK
> Set buf.bpp when initializing and rebase.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  lib/igt_fb.c | 150 +++++++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 139 insertions(+), 11 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 462afec2..e0288282 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -290,6 +290,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;
> @@ -303,6 +304,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:
> @@ -328,10 +330,21 @@ 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)
>  {
>  	const struct format_desc_struct *format = lookup_drm_format(fb->drm_format);
>  
> +	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);

This nv12 thing doesn't seem relevant to the patch.

> +
>  	if (plane == 0)
>  		return fb->width;
>  
> @@ -342,13 +355,21 @@ 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)
>  {
>  	const struct format_desc_struct *format = lookup_drm_format(fb->drm_format);
>  
> +	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);
> +
>  	if (plane == 0)
>  		return fb->height;
>  
> @@ -359,7 +380,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,
> @@ -518,8 +542,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);
> @@ -1405,8 +1431,54 @@ 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->bpp = fb->plane_bpp[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)
>  {
> @@ -1444,7 +1516,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);
> @@ -1461,8 +1536,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
> @@ -1481,7 +1574,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);
>  
> @@ -1498,12 +1594,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 =
> @@ -1518,6 +1614,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
> @@ -2278,8 +2404,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 cvt = { };
> +	struct fb_convert_blit_upload *blit = calloc(1, sizeof(*blit));
> +	struct fb_convert cvt = { 0 };

Ugly 0.

>  	const struct format_desc_struct *f = lookup_drm_format(fb->drm_format);
>  	unsigned drm_format;
>  	cairo_format_t cairo_id;
> @@ -2318,7 +2444,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 = *fb;
>  		blit->base.linear.fb.gem_handle = 0;
> @@ -2397,8 +2523,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.17.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-21  2:41 ` [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers Dhinakaran Pandiyan
  2019-02-21 13:58   ` Ville Syrjälä
@ 2019-02-21 14:06   ` Ville Syrjälä
  2019-02-21 23:20     ` Dhinakaran Pandiyan
  1 sibling, 1 reply; 20+ messages in thread
From: Ville Syrjälä @ 2019-02-21 14:06 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran Pandiyan wrote:
> @@ -2397,8 +2523,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);

Oh, and this reminds me that we still have the <32k byte blitter stride
problem, which I tried to address a bit in
https://patchwork.freedesktop.org/patch/248543/
by using gtt mmaps instead. However that failed for Yf since fences can't
handle Yf. My initial idea was to cpu mmap and tile/detile manually,
but we could actually consider using rendercopy instead.

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy
  2019-02-21  2:41 [igt-dev] [HAX 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
                   ` (4 preceding siblings ...)
  2019-02-21 10:41 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Patchwork
@ 2019-02-21 15:46 ` Patchwork
  2019-02-21 18:25 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy (rev2) Patchwork
  2019-02-22  7:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2019-02-21 15:46 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_5645_full -> IGTPW_2465_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

New tests
---------

  New tests have been introduced between CI_DRM_5645_full and IGTPW_2465_full:

### New IGT tests (6) ###

  * igt@gem_render_copy@y-tiled-ccs-to-yf-tiled:
    - Statuses : 3 pass(s) 2 skip(s)
    - Exec time: [0.0, 0.25] s

  * igt@gem_render_copy@yf-tiled:
    - Statuses : 3 pass(s) 2 skip(s)
    - Exec time: [0.0, 0.24] s

  * igt@gem_render_copy@yf-tiled-ccs-to-linear:
    - Statuses : 3 pass(s) 2 skip(s)
    - Exec time: [0.0, 0.24] s

  * igt@gem_render_copy@yf-tiled-ccs-to-x-tiled:
    - Statuses : 3 pass(s) 2 skip(s)
    - Exec time: [0.0, 0.43] s

  * igt@gem_render_copy@yf-tiled-ccs-to-y-tiled:
    - Statuses : 3 pass(s) 2 skip(s)
    - Exec time: [0.0, 0.24] s

  * igt@gem_render_copy@yf-tiled-ccs-to-yf-tiled:
    - Statuses : 3 pass(s) 1 skip(s)
    - Exec time: [0.0, 0.25] s

  

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_reloc@basic-cpu-gtt-active:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#103558] / [fdo#105602] +3

  * igt@gem_stolen@stolen-pwrite:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +13

  * igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
    - shard-kbl:          PASS -> FAIL [fdo#109660]

  * igt@kms_busy@extended-modeset-hang-newfb-render-a:
    - shard-snb:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-modeset-hang-newfb-render-f:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2

  * igt@kms_ccs@pipe-c-bad-aux-stride:
    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] +21

  * igt@kms_chv_cursor_fail@pipe-c-256x256-bottom-edge:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +12

  * igt@kms_color@pipe-b-ctm-max:
    - shard-apl:          PASS -> FAIL [fdo#108147]

  * igt@kms_cursor_crc@cursor-256x85-sliding:
    - shard-kbl:          PASS -> FAIL [fdo#103232] +2

  * igt@kms_cursor_crc@cursor-64x21-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +5
    - shard-glk:          NOTRUN -> FAIL [fdo#103232]

  * igt@kms_cursor_crc@cursor-alpha-opaque:
    - shard-kbl:          PASS -> FAIL [fdo#109350]

  * igt@kms_cursor_crc@cursor-size-change:
    - shard-glk:          PASS -> FAIL [fdo#103232]

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
    - shard-hsw:          PASS -> FAIL [fdo#105767]

  * igt@kms_flip@flip-vs-blocking-wf-vblank:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#103313] / [fdo#103558] / [fdo#105602]

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-apl:          PASS -> FAIL [fdo#102887] / [fdo#105363]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite:
    - shard-apl:          PASS -> FAIL [fdo#103167] +1

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
    - shard-glk:          PASS -> FAIL [fdo#103167] +6

  * igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-wc:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +49

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-indfb-msflip-blt:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +180

  * igt@kms_plane@pixel-format-pipe-c-planes-source-clamping:
    - shard-glk:          PASS -> FAIL [fdo#108948]

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
    - shard-apl:          PASS -> FAIL [fdo#103166]

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-glk:          NOTRUN -> FAIL [fdo#103166]

  * igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
    - shard-kbl:          PASS -> DMESG-FAIL [fdo#105763]

  * igt@kms_universal_plane@disable-primary-vs-flip-pipe-e:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#103313] / [fdo#103558] / [fdo#105079] / [fdo#105602]

  * igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm:
    - shard-apl:          PASS -> FAIL [fdo#104894]

  * igt@perf@oa-formats:
    - shard-hsw:          PASS -> INCOMPLETE [fdo#103540]

  * igt@prime_vgem@coherency-gtt:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +4

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@rcs0-s3:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  * igt@kms_cursor_crc@cursor-64x21-onscreen:
    - shard-kbl:          FAIL [fdo#103232] -> PASS +1

  * igt@kms_cursor_crc@cursor-64x64-dpms:
    - shard-apl:          FAIL [fdo#103232] -> PASS +2

  * igt@kms_flip@2x-modeset-vs-vblank-race:
    - shard-glk:          FAIL [fdo#103060] -> PASS

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-hsw:          INCOMPLETE [fdo#103540] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
    - shard-apl:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
    - shard-glk:          FAIL [fdo#103167] -> PASS +5

  * igt@kms_frontbuffer_tracking@fbc-1p-rte:
    - shard-glk:          FAIL [fdo#103167] / [fdo#105682] -> PASS
    - shard-kbl:          FAIL [fdo#103167] / [fdo#105682] -> PASS
    - shard-apl:          FAIL [fdo#103167] / [fdo#105682] -> PASS

  * igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
    - shard-glk:          FAIL [fdo#108948] -> PASS

  * igt@kms_plane@plane-position-covered-pipe-a-planes:
    - shard-glk:          FAIL [fdo#103166] -> PASS +2

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-apl:          FAIL [fdo#103166] -> PASS +4
    - shard-kbl:          FAIL [fdo#103166] -> PASS +4

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          FAIL [fdo#109016] -> PASS

  * igt@kms_vblank@pipe-c-ts-continuation-modeset-hang:
    - shard-apl:          FAIL [fdo#104894] -> PASS

  * igt@syncobj_wait@multi-wait-all-for-submit-submitted-signaled:
    - shard-snb:          DMESG-WARN [fdo#107469] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
  [fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103313]: https://bugs.freedesktop.org/show_bug.cgi?id=103313
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#107469]: https://bugs.freedesktop.org/show_bug.cgi?id=107469
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
  [fdo#109660]: https://bugs.freedesktop.org/show_bug.cgi?id=109660


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


Build changes
-------------

    * IGT: IGT_4846 -> IGTPW_2465
    * Piglit: piglit_4509 -> None

  CI_DRM_5645: c67ed483692270fa9c8402d172d54b6c1335b7f7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2465: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2465/
  IGT_4846: 5aa3651ce2f5f562dad74f3e9d1ba47844e7a998 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy (rev2)
  2019-02-21  2:41 [igt-dev] [HAX 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
                   ` (5 preceding siblings ...)
  2019-02-21 15:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-02-21 18:25 ` Patchwork
  2019-02-22  7:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2019-02-21 18:25 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

Series: series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy (rev2)
URL   : https://patchwork.freedesktop.org/series/57000/
State : success

== Summary ==

CI Bug Log - changes from IGT_4850 -> IGTPW_2472
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_execlists:
    - fi-apl-guc:         PASS -> INCOMPLETE [fdo#103927] / [fdo#109720]

  * igt@prime_vgem@basic-fence-flip:
    - fi-gdg-551:         PASS -> FAIL [fdo#103182] +1

  * igt@runner@aborted:
    - fi-apl-guc:         NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105998]: https://bugs.freedesktop.org/show_bug.cgi?id=105998
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109294]: https://bugs.freedesktop.org/show_bug.cgi?id=109294
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109527]: https://bugs.freedesktop.org/show_bug.cgi?id=109527
  [fdo#109528]: https://bugs.freedesktop.org/show_bug.cgi?id=109528
  [fdo#109530]: https://bugs.freedesktop.org/show_bug.cgi?id=109530
  [fdo#109567]: https://bugs.freedesktop.org/show_bug.cgi?id=109567
  [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720


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

  Additional (1): fi-icl-y 
  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-bdw-samus 


Build changes
-------------

    * IGT: IGT_4850 -> IGTPW_2472

  CI_DRM_5650: a4c5c4791699aeebfff694c222c76abb61900fca @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2472: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2472/
  IGT_4850: 8ca0b308acdcf53fac3cf2ea3861f5f911b16986 @ 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_2472/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-21 14:06   ` Ville Syrjälä
@ 2019-02-21 23:20     ` Dhinakaran Pandiyan
  2019-02-22 17:12       ` Ville Syrjälä
  2019-02-22 17:26       ` Ville Syrjälä
  0 siblings, 2 replies; 20+ messages in thread
From: Dhinakaran Pandiyan @ 2019-02-21 23:20 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

On Thu, 2019-02-21 at 16:06 +0200, Ville Syrjälä wrote:
> On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran Pandiyan wrote:
> > @@ -2397,8 +2523,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);
All BGR formats will take this path and it somehow results in Yf-CCS
tests specifically failing.


> > +		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);
> 
> Oh, and this reminds me that we still have the <32k byte blitter
> stride
> problem, which I tried to address a bit in
> https://patchwork.freedesktop.org/patch/248543/
> by using gtt mmaps instead. However that failed for Yf since fences
> can't
> handle Yf.
Wonder if this has got something to do with BGR format failures.

>  My initial idea was to cpu mmap and tile/detile manually,
> but we could actually consider using rendercopy instead.
> 

More work for Yf then.
-DK

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy (rev2)
  2019-02-21  2:41 [igt-dev] [HAX 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
                   ` (6 preceding siblings ...)
  2019-02-21 18:25 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy (rev2) Patchwork
@ 2019-02-22  7:44 ` Patchwork
  7 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2019-02-22  7:44 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

Series: series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy (rev2)
URL   : https://patchwork.freedesktop.org/series/57000/
State : success

== Summary ==

CI Bug Log - changes from IGT_4850_full -> IGTPW_2472_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

New tests
---------

  New tests have been introduced between IGT_4850_full and IGTPW_2472_full:

### New IGT tests (6) ###

  * igt@gem_render_copy@y-tiled-ccs-to-yf-tiled:
    - Statuses : 3 pass(s) 1 skip(s)
    - Exec time: [0.0, 0.27] s

  * igt@gem_render_copy@yf-tiled:
    - Statuses : 3 pass(s) 1 skip(s)
    - Exec time: [0.0, 0.24] s

  * igt@gem_render_copy@yf-tiled-ccs-to-linear:
    - Statuses : 3 pass(s) 1 skip(s)
    - Exec time: [0.0, 0.24] s

  * igt@gem_render_copy@yf-tiled-ccs-to-x-tiled:
    - Statuses : 3 pass(s) 1 skip(s)
    - Exec time: [0.0, 0.24] s

  * igt@gem_render_copy@yf-tiled-ccs-to-y-tiled:
    - Statuses : 3 pass(s) 1 skip(s)
    - Exec time: [0.0, 0.24] s

  * igt@gem_render_copy@yf-tiled-ccs-to-yf-tiled:
    - Statuses : 3 pass(s) 1 skip(s)
    - Exec time: [0.0, 0.24] s

  

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_pm_backlight@fade:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +12

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-e:
    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_color@pipe-a-degamma:
    - shard-apl:          PASS -> FAIL [fdo#104782] / [fdo#108145]

  * igt@kms_color@pipe-b-legacy-gamma:
    - shard-glk:          PASS -> FAIL [fdo#104782]

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-apl:          PASS -> FAIL [fdo#103191] / [fdo#103232]

  * igt@kms_cursor_crc@cursor-256x85-sliding:
    - shard-kbl:          PASS -> FAIL [fdo#103232] +1

  * igt@kms_cursor_crc@cursor-64x21-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +2

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-apl:          PASS -> FAIL [fdo#103167] +1

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
    - shard-kbl:          PASS -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
    - shard-glk:          PASS -> FAIL [fdo#103167] +7

  * igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
    - shard-apl:          PASS -> FAIL [fdo#108948]
    - shard-glk:          PASS -> FAIL [fdo#108948]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
    - shard-glk:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
    - shard-glk:          PASS -> FAIL [fdo#103166] +8
    - shard-kbl:          PASS -> FAIL [fdo#103166] +1

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-apl:          PASS -> FAIL [fdo#103166] +7

  * igt@kms_psr@primary_page_flip:
    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] +19

  * igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm:
    - shard-apl:          PASS -> FAIL [fdo#104894] +1

  * igt@perf_pmu@most-busy-idle-check-all-vcs1:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +16

  * igt@perf_pmu@rc6-runtime-pm:
    - shard-glk:          PASS -> FAIL [fdo#105010]

  
#### Possible fixes ####

  * igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
    - shard-apl:          FAIL [fdo#109660] -> PASS
    - shard-kbl:          FAIL [fdo#109660] -> PASS

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
    - shard-glk:          FAIL [fdo#108145] -> PASS
    - shard-kbl:          FAIL [fdo#107725] / [fdo#108145] -> PASS

  * igt@kms_color@pipe-c-ctm-max:
    - shard-apl:          FAIL [fdo#108147] -> PASS

  * igt@kms_cursor_crc@cursor-256x256-random:
    - shard-apl:          FAIL [fdo#103232] -> PASS +4

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-hsw:          INCOMPLETE [fdo#103540] -> PASS

  * igt@kms_cursor_crc@cursor-size-change:
    - shard-kbl:          FAIL [fdo#103232] -> PASS +1

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
    - shard-hsw:          FAIL [fdo#105767] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
    - shard-apl:          FAIL [fdo#103167] -> PASS +2
    - shard-kbl:          FAIL [fdo#103167] -> PASS

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

  * igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
    - shard-apl:          FAIL [fdo#108948] -> PASS

  * igt@kms_plane@pixel-format-pipe-c-planes:
    - shard-apl:          FAIL [fdo#103166] -> PASS +2

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
    - shard-glk:          FAIL [fdo#103166] -> PASS +1

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          FAIL [fdo#109016] -> PASS

  * igt@kms_universal_plane@universal-plane-pipe-c-functional:
    - shard-kbl:          FAIL [fdo#103166] -> PASS +2

  
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109660]: https://bugs.freedesktop.org/show_bug.cgi?id=109660


Participating hosts (6 -> 4)
------------------------------

  Missing    (2): shard-skl shard-iclb 


Build changes
-------------

    * IGT: IGT_4850 -> IGTPW_2472

  CI_DRM_5650: a4c5c4791699aeebfff694c222c76abb61900fca @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2472: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2472/
  IGT_4850: 8ca0b308acdcf53fac3cf2ea3861f5f911b16986 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-21 23:20     ` Dhinakaran Pandiyan
@ 2019-02-22 17:12       ` Ville Syrjälä
  2019-02-22 17:26       ` Ville Syrjälä
  1 sibling, 0 replies; 20+ messages in thread
From: Ville Syrjälä @ 2019-02-22 17:12 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

On Thu, Feb 21, 2019 at 03:20:35PM -0800, Dhinakaran Pandiyan wrote:
> On Thu, 2019-02-21 at 16:06 +0200, Ville Syrjälä wrote:
> > On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran Pandiyan wrote:
> > > @@ -2397,8 +2523,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);
> All BGR formats will take this path and it somehow results in Yf-CCS
> tests specifically failing.

What kinda of failure we talking here?

> 
> 
> > > +		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);
> > 
> > Oh, and this reminds me that we still have the <32k byte blitter
> > stride
> > problem, which I tried to address a bit in
> > https://patchwork.freedesktop.org/patch/248543/
> > by using gtt mmaps instead. However that failed for Yf since fences
> > can't
> > handle Yf.
> Wonder if this has got something to do with BGR format failures.

Shouldn't matter when CCS is involved since we always use rendercopy for
that.

> 
> >  My initial idea was to cpu mmap and tile/detile manually,
> > but we could actually consider using rendercopy instead.
> > 
> 
> More work for Yf then.
> -DK

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

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-21 23:20     ` Dhinakaran Pandiyan
  2019-02-22 17:12       ` Ville Syrjälä
@ 2019-02-22 17:26       ` Ville Syrjälä
  2019-02-22 17:29         ` Pandiyan, Dhinakaran
  2019-02-22 18:37         ` Dhinakaran Pandiyan
  1 sibling, 2 replies; 20+ messages in thread
From: Ville Syrjälä @ 2019-02-22 17:26 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

On Thu, Feb 21, 2019 at 03:20:35PM -0800, Dhinakaran Pandiyan wrote:
> On Thu, 2019-02-21 at 16:06 +0200, Ville Syrjälä wrote:
> > On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran Pandiyan wrote:
> > > @@ -2397,8 +2523,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);
> All BGR formats will take this path and it somehow results in Yf-CCS
> tests specifically failing.

Hmm. Should be a matter of 

 if (...
+    is_ccs) {
	setup_linear_mapping();
 } else {
	...

no? Or was that already in there?

It is slightly suboptimal since in theory we could just use 
rendercopy to do the full conversion for us, skipping the expensive
software step. IIRC I briefly mentioned this option when Maarten
was adding the !32bpp support to rendercopy. Anyways, we could
consider doing that in the future if we are willing to expand
our use of rendercopy. The counter argument is that it's one
more extra thing that could fail.

> 
> 
> > > +		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);
> > 
> > Oh, and this reminds me that we still have the <32k byte blitter
> > stride
> > problem, which I tried to address a bit in
> > https://patchwork.freedesktop.org/patch/248543/
> > by using gtt mmaps instead. However that failed for Yf since fences
> > can't
> > handle Yf.
> Wonder if this has got something to do with BGR format failures.
> 
> >  My initial idea was to cpu mmap and tile/detile manually,
> > but we could actually consider using rendercopy instead.
> > 
> 
> More work for Yf then.
> -DK

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

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-22 17:26       ` Ville Syrjälä
@ 2019-02-22 17:29         ` Pandiyan, Dhinakaran
  2019-02-22 18:37         ` Dhinakaran Pandiyan
  1 sibling, 0 replies; 20+ messages in thread
From: Pandiyan, Dhinakaran @ 2019-02-22 17:29 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev



> -----Original Message-----
> From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
> Sent: Friday, February 22, 2019 9:27 AM
> To: Pandiyan, Dhinakaran <dhinakaran.pandiyan@intel.com>
> Cc: igt-dev@lists.freedesktop.org
> Subject: Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into
> compressed buffers
> 
> On Thu, Feb 21, 2019 at 03:20:35PM -0800, Dhinakaran Pandiyan wrote:
> > On Thu, 2019-02-21 at 16:06 +0200, Ville Syrjälä wrote:
> > > On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran Pandiyan wrote:
> > > > @@ -2397,8 +2523,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);
> > All BGR formats will take this path and it somehow results in Yf-CCS
> > tests specifically failing.
> 
> Hmm. Should be a matter of
> 
>  if (...
> +    is_ccs) {
> 	setup_linear_mapping();
>  } else {
> 	...
> 
> no? Or was that already in there?

I added that in the second version I sent - https://patchwork.freedesktop.org/patch/287379/

-DK
> 
> It is slightly suboptimal since in theory we could just use rendercopy to do the
> full conversion for us, skipping the expensive software step. IIRC I briefly
> mentioned this option when Maarten was adding the !32bpp support to
> rendercopy. Anyways, we could consider doing that in the future if we are
> willing to expand our use of rendercopy. The counter argument is that it's one
> more extra thing that could fail.
> 
> >
> >
> > > > +		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);
> > >
> > > Oh, and this reminds me that we still have the <32k byte blitter
> > > stride problem, which I tried to address a bit in
> > > https://patchwork.freedesktop.org/patch/248543/
> > > by using gtt mmaps instead. However that failed for Yf since fences
> > > can't handle Yf.
> > Wonder if this has got something to do with BGR format failures.
> >
> > >  My initial idea was to cpu mmap and tile/detile manually, but we
> > > could actually consider using rendercopy instead.
> > >
> >
> > More work for Yf then.
> > -DK
> 
> --
> 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] 20+ messages in thread

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-22 17:26       ` Ville Syrjälä
  2019-02-22 17:29         ` Pandiyan, Dhinakaran
@ 2019-02-22 18:37         ` Dhinakaran Pandiyan
  2019-02-22 18:54           ` Ville Syrjälä
  1 sibling, 1 reply; 20+ messages in thread
From: Dhinakaran Pandiyan @ 2019-02-22 18:37 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

On Fri, 2019-02-22 at 19:26 +0200, Ville Syrjälä wrote:
> On Thu, Feb 21, 2019 at 03:20:35PM -0800, Dhinakaran Pandiyan wrote:
> > On Thu, 2019-02-21 at 16:06 +0200, Ville Syrjälä wrote:
> > > On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran Pandiyan
> > > wrote:
> > > > @@ -2397,8 +2523,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);
> > 
> > All BGR formats will take this path and it somehow results in Yf-
> > CCS
> > tests specifically failing.
> 
> Hmm. Should be a matter of 
> 
>  if (...
> +    is_ccs) {
>         setup_linear_mapping();
>  } else {
>         ...
> 
> no? Or was that already in there?
> 
> It is slightly suboptimal since in theory we could just use 
> rendercopy to do the full conversion for us, skipping the expensive
> software step. IIRC I briefly mentioned this option when Maarten
> was adding the !32bpp support to rendercopy. Anyways, we could
> consider doing that in the future if we are willing to expand
> our use of rendercopy. The counter argument is that it's one
> more extra thing that could fail.

Didn't quite get why rendercopy would have a higher chance of failing.
Personally, the problem I have is I don't fully understand the
rendercopy code yet :) And, I am not sure how easy it is to extend
support for new platforms from a display IGT development point of view.
I guess the library is not backward compatible either.


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

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

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-22 18:37         ` Dhinakaran Pandiyan
@ 2019-02-22 18:54           ` Ville Syrjälä
  2019-02-22 19:12             ` Pandiyan, Dhinakaran
  0 siblings, 1 reply; 20+ messages in thread
From: Ville Syrjälä @ 2019-02-22 18:54 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

On Fri, Feb 22, 2019 at 10:37:40AM -0800, Dhinakaran Pandiyan wrote:
> On Fri, 2019-02-22 at 19:26 +0200, Ville Syrjälä wrote:
> > On Thu, Feb 21, 2019 at 03:20:35PM -0800, Dhinakaran Pandiyan wrote:
> > > On Thu, 2019-02-21 at 16:06 +0200, Ville Syrjälä wrote:
> > > > On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran Pandiyan
> > > > wrote:
> > > > > @@ -2397,8 +2523,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);
> > > 
> > > All BGR formats will take this path and it somehow results in Yf-
> > > CCS
> > > tests specifically failing.
> > 
> > Hmm. Should be a matter of 
> > 
> >  if (...
> > +    is_ccs) {
> >         setup_linear_mapping();
> >  } else {
> >         ...
> > 
> > no? Or was that already in there?
> > 
> > It is slightly suboptimal since in theory we could just use 
> > rendercopy to do the full conversion for us, skipping the expensive
> > software step. IIRC I briefly mentioned this option when Maarten
> > was adding the !32bpp support to rendercopy. Anyways, we could
> > consider doing that in the future if we are willing to expand
> > our use of rendercopy. The counter argument is that it's one
> > more extra thing that could fail.
> 
> Didn't quite get why rendercopy would have a higher chance of failing.
> Personally, the problem I have is I don't fully understand the
> rendercopy code yet :) And, I am not sure how easy it is to extend
> support for new platforms from a display IGT development point of view.

It all depends how much the hw people feel the need to change. Hopefully
not too much, and that someone has the energy to find out which new
magic bits are needed to make it work.

Also if the GT side is having major issues we can't rely on rendercopy
obviously. Just one more thing to worry about, at least during early
testing/development.

> I guess the library is not backward compatible either.

In what sense?

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

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-22 18:54           ` Ville Syrjälä
@ 2019-02-22 19:12             ` Pandiyan, Dhinakaran
  2019-02-22 19:34               ` Ville Syrjälä
  0 siblings, 1 reply; 20+ messages in thread
From: Pandiyan, Dhinakaran @ 2019-02-22 19:12 UTC (permalink / raw)
  To: ville.syrjala; +Cc: igt-dev

On Fri, 2019-02-22 at 20:54 +0200, Ville Syrjälä wrote:
> On Fri, Feb 22, 2019 at 10:37:40AM -0800, Dhinakaran Pandiyan wrote:
> > On Fri, 2019-02-22 at 19:26 +0200, Ville Syrjälä wrote:
> > > On Thu, Feb 21, 2019 at 03:20:35PM -0800, Dhinakaran Pandiyan
> > > wrote:
> > > > On Thu, 2019-02-21 at 16:06 +0200, Ville Syrjälä wrote:
> > > > > On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran Pandiyan
> > > > > wrote:
> > > > > > @@ -2397,8 +2523,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);
> > > > 
> > > > All BGR formats will take this path and it somehow results in
> > > > Yf-
> > > > CCS
> > > > tests specifically failing.
> > > 
> > > Hmm. Should be a matter of 
> > > 
> > >  if (...
> > > +    is_ccs) {
> > >         setup_linear_mapping();
> > >  } else {
> > >         ...
> > > 
> > > no? Or was that already in there?
> > > 
> > > It is slightly suboptimal since in theory we could just use 
> > > rendercopy to do the full conversion for us, skipping the
> > > expensive
> > > software step. IIRC I briefly mentioned this option when Maarten
> > > was adding the !32bpp support to rendercopy. Anyways, we could
> > > consider doing that in the future if we are willing to expand
> > > our use of rendercopy. The counter argument is that it's one
> > > more extra thing that could fail.
> > 
> > Didn't quite get why rendercopy would have a higher chance of
> > failing.
> > Personally, the problem I have is I don't fully understand the
> > rendercopy code yet :) And, I am not sure how easy it is to extend
> > support for new platforms from a display IGT development point of
> > view.
> 
> It all depends how much the hw people feel the need to change.
> Hopefully
> not too much, and that someone has the energy to find out which new
> magic bits are needed to make it work.
> 
> Also if the GT side is having major issues we can't rely on
> rendercopy
> obviously. Just one more thing to worry about, at least during early
> testing/development.
> 
> > I guess the library is not backward compatible either.
> 
> In what sense?
Are things like copying from one legacy tiling format to another
expected to work on new platforms with the same code? Based on your
reply above, I understand that it depends on how much the HW has
changed.

> 

And do you plan to review 
https://patchwork.freedesktop.org/patch/287379/? Asking because you
wrote most of that patch.



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

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

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-22 19:12             ` Pandiyan, Dhinakaran
@ 2019-02-22 19:34               ` Ville Syrjälä
  2019-02-23  2:16                 ` Dhinakaran Pandiyan
  0 siblings, 1 reply; 20+ messages in thread
From: Ville Syrjälä @ 2019-02-22 19:34 UTC (permalink / raw)
  To: Pandiyan, Dhinakaran; +Cc: igt-dev

On Fri, Feb 22, 2019 at 07:12:04PM +0000, Pandiyan, Dhinakaran wrote:
> On Fri, 2019-02-22 at 20:54 +0200, Ville Syrjälä wrote:
> > On Fri, Feb 22, 2019 at 10:37:40AM -0800, Dhinakaran Pandiyan wrote:
> > > On Fri, 2019-02-22 at 19:26 +0200, Ville Syrjälä wrote:
> > > > On Thu, Feb 21, 2019 at 03:20:35PM -0800, Dhinakaran Pandiyan
> > > > wrote:
> > > > > On Thu, 2019-02-21 at 16:06 +0200, Ville Syrjälä wrote:
> > > > > > On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran Pandiyan
> > > > > > wrote:
> > > > > > > @@ -2397,8 +2523,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);
> > > > > 
> > > > > All BGR formats will take this path and it somehow results in
> > > > > Yf-
> > > > > CCS
> > > > > tests specifically failing.
> > > > 
> > > > Hmm. Should be a matter of 
> > > > 
> > > >  if (...
> > > > +    is_ccs) {
> > > >         setup_linear_mapping();
> > > >  } else {
> > > >         ...
> > > > 
> > > > no? Or was that already in there?
> > > > 
> > > > It is slightly suboptimal since in theory we could just use 
> > > > rendercopy to do the full conversion for us, skipping the
> > > > expensive
> > > > software step. IIRC I briefly mentioned this option when Maarten
> > > > was adding the !32bpp support to rendercopy. Anyways, we could
> > > > consider doing that in the future if we are willing to expand
> > > > our use of rendercopy. The counter argument is that it's one
> > > > more extra thing that could fail.
> > > 
> > > Didn't quite get why rendercopy would have a higher chance of
> > > failing.
> > > Personally, the problem I have is I don't fully understand the
> > > rendercopy code yet :) And, I am not sure how easy it is to extend
> > > support for new platforms from a display IGT development point of
> > > view.
> > 
> > It all depends how much the hw people feel the need to change.
> > Hopefully
> > not too much, and that someone has the energy to find out which new
> > magic bits are needed to make it work.
> > 
> > Also if the GT side is having major issues we can't rely on
> > rendercopy
> > obviously. Just one more thing to worry about, at least during early
> > testing/development.
> > 
> > > I guess the library is not backward compatible either.
> > 
> > In what sense?
> Are things like copying from one legacy tiling format to another
> expected to work on new platforms with the same code? Based on your
> reply above, I understand that it depends on how much the HW has
> changed.

Yeah. If they feel like removing old tiling formats rendercopy
can't help us.

> 
> > 
> 
> And do you plan to review 
> https://patchwork.freedesktop.org/patch/287379/? Asking because you
> wrote most of that patch.

It has my sob, so should be good to go.

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

* Re: [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers
  2019-02-22 19:34               ` Ville Syrjälä
@ 2019-02-23  2:16                 ` Dhinakaran Pandiyan
  0 siblings, 0 replies; 20+ messages in thread
From: Dhinakaran Pandiyan @ 2019-02-23  2:16 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

On Fri, 2019-02-22 at 21:34 +0200, Ville Syrjälä wrote:
> On Fri, Feb 22, 2019 at 07:12:04PM +0000, Pandiyan, Dhinakaran wrote:
> > On Fri, 2019-02-22 at 20:54 +0200, Ville Syrjälä wrote:
> > > On Fri, Feb 22, 2019 at 10:37:40AM -0800, Dhinakaran Pandiyan
> > > wrote:
> > > > On Fri, 2019-02-22 at 19:26 +0200, Ville Syrjälä wrote:
> > > > > On Thu, Feb 21, 2019 at 03:20:35PM -0800, Dhinakaran Pandiyan
> > > > > wrote:
> > > > > > On Thu, 2019-02-21 at 16:06 +0200, Ville Syrjälä wrote:
> > > > > > > On Wed, Feb 20, 2019 at 06:41:21PM -0800, Dhinakaran
> > > > > > > Pandiyan
> > > > > > > wrote:
> > > > > > > > @@ -2397,8 +2523,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);
> > > > > > 
> > > > > > All BGR formats will take this path and it somehow results
> > > > > > in
> > > > > > Yf-
> > > > > > CCS
> > > > > > tests specifically failing.
> > > > > 
> > > > > Hmm. Should be a matter of 
> > > > > 
> > > > >  if (...
> > > > > +    is_ccs) {
> > > > >         setup_linear_mapping();
> > > > >  } else {
> > > > >         ...
> > > > > 
> > > > > no? Or was that already in there?
> > > > > 
> > > > > It is slightly suboptimal since in theory we could just use 
> > > > > rendercopy to do the full conversion for us, skipping the
> > > > > expensive
> > > > > software step. IIRC I briefly mentioned this option when
> > > > > Maarten
> > > > > was adding the !32bpp support to rendercopy. Anyways, we
> > > > > could
> > > > > consider doing that in the future if we are willing to expand
> > > > > our use of rendercopy. The counter argument is that it's one
> > > > > more extra thing that could fail.
> > > > 
> > > > Didn't quite get why rendercopy would have a higher chance of
> > > > failing.
> > > > Personally, the problem I have is I don't fully understand the
> > > > rendercopy code yet :) And, I am not sure how easy it is to
> > > > extend
> > > > support for new platforms from a display IGT development point
> > > > of
> > > > view.
> > > 
> > > It all depends how much the hw people feel the need to change.
> > > Hopefully
> > > not too much, and that someone has the energy to find out which
> > > new
> > > magic bits are needed to make it work.
> > > 
> > > Also if the GT side is having major issues we can't rely on
> > > rendercopy
> > > obviously. Just one more thing to worry about, at least during
> > > early
> > > testing/development.
> > > 
> > > > I guess the library is not backward compatible either.
> > > 
> > > In what sense?
> > 
> > Are things like copying from one legacy tiling format to another
> > expected to work on new platforms with the same code? Based on your
> > reply above, I understand that it depends on how much the HW has
> > changed.
> 
> Yeah. If they feel like removing old tiling formats rendercopy
> can't help us.
> 
> > 
> > > 
> > 
> > And do you plan to review 
> > https://patchwork.freedesktop.org/patch/287379/? Asking because you
> > wrote most of that patch.
> 
> It has my sob, so should be good to go.

Sounds good, thanks for the reviews.

I'll wait for the remaining patches(1, 2 and 7) are reviewed and push
the series.

-DK

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

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

end of thread, other threads:[~2019-02-23  2:17 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-21  2:41 [igt-dev] [HAX 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Dhinakaran Pandiyan
2019-02-21  2:41 ` [igt-dev] [HAX 2/5] tests/gem_render_copy: Test Yf tiling Dhinakaran Pandiyan
2019-02-21  2:41 ` [igt-dev] [HAX 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers Dhinakaran Pandiyan
2019-02-21 13:58   ` Ville Syrjälä
2019-02-21 14:06   ` Ville Syrjälä
2019-02-21 23:20     ` Dhinakaran Pandiyan
2019-02-22 17:12       ` Ville Syrjälä
2019-02-22 17:26       ` Ville Syrjälä
2019-02-22 17:29         ` Pandiyan, Dhinakaran
2019-02-22 18:37         ` Dhinakaran Pandiyan
2019-02-22 18:54           ` Ville Syrjälä
2019-02-22 19:12             ` Pandiyan, Dhinakaran
2019-02-22 19:34               ` Ville Syrjälä
2019-02-23  2:16                 ` Dhinakaran Pandiyan
2019-02-21  2:41 ` [igt-dev] [HAX 4/5] lib/igt_fb: s/tiling/modifier/ where appropriate Dhinakaran Pandiyan
2019-02-21  2:41 ` [igt-dev] [HAX 5/5] tests/kms_ccs: Generate compressed surfaces with renderopy Dhinakaran Pandiyan
2019-02-21 10:41 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Patchwork
2019-02-21 15:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-21 18:25 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [HAX,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy (rev2) Patchwork
2019-02-22  7:44 ` [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.