All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Add Y-tiling support into IGTs
@ 2017-03-17 19:15 Praveen Paneri
  2017-03-17 19:15 ` [PATCH 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size Praveen Paneri
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Praveen Paneri @ 2017-03-17 19:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: paulo.r.zanoni, Praveen Paneri

This series adds Y-tiled buffer creation support into IGT libraries and
goes on to use this capability to add support into FBC tests to use
Y-tiled buffers.

Akash Goel (1):
  lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method

Paulo Zanoni (1):
  tests/kms_draw_crc: add support for Y tiling

Praveen Paneri (5):
  lib/igt_fb: Let others use igt_get_fb_tile_size
  lib/igt_fb: Add helper function for tile_to_mod
  lib/igt_draw: Add Y-tiling support
  igt/kms_frontbuffer_tracking: Add Y-tiling support
  igt/kms_fbc_crc.c : Add Y-tile tests

 lib/igt_draw.c                   | 167 ++++++++++++++++++++++++++++-----------
 lib/igt_fb.c                     |  29 ++++++-
 lib/igt_fb.h                     |   4 +-
 tests/kms_draw_crc.c             |  58 ++++++++++----
 tests/kms_fbc_crc.c              |  71 +++++++++--------
 tests/kms_frontbuffer_tracking.c |  46 ++++++-----
 6 files changed, 262 insertions(+), 113 deletions(-)

-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size
  2017-03-17 19:15 [PATCH 0/7] Add Y-tiling support into IGTs Praveen Paneri
@ 2017-03-17 19:15 ` Praveen Paneri
  2017-03-20  9:48   ` Daniel Vetter
  2017-03-17 19:15 ` [PATCH 2/7] lib/igt_fb: Add helper function for tile_to_mod Praveen Paneri
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Praveen Paneri @ 2017-03-17 19:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: paulo.r.zanoni, Praveen Paneri

This function can be used by igt_draw to get accurate
tile dimensions for all tile formats.

Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
---
 lib/igt_fb.c | 2 +-
 lib/igt_fb.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index d2b7e9e..6ecc36b 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -74,7 +74,7 @@ static struct format_desc_struct {
 #define for_each_format(f)	\
 	for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
 
-static void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
+void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
 				 unsigned *width_ret, unsigned *height_ret)
 {
 	switch (tiling) {
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 4a680ce..b178eba 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -94,7 +94,8 @@ enum igt_text_align {
 	align_vcenter	= 0x04,
 	align_hcenter	= 0x08,
 };
-
+void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
+			unsigned *width_ret, unsigned *height_ret);
 void igt_calc_fb_size(int fd, int width, int height, int bpp, uint64_t tiling,
 		      unsigned *size_ret, unsigned *stride_ret);
 unsigned int
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 2/7] lib/igt_fb: Add helper function for tile_to_mod
  2017-03-17 19:15 [PATCH 0/7] Add Y-tiling support into IGTs Praveen Paneri
  2017-03-17 19:15 ` [PATCH 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size Praveen Paneri
@ 2017-03-17 19:15 ` Praveen Paneri
  2017-03-17 19:15 ` [PATCH 3/7] lib/igt_draw: Add Y-tiling support Praveen Paneri
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Praveen Paneri @ 2017-03-17 19:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: paulo.r.zanoni, Praveen Paneri

igt_get_fb_tile_size function takes modifer as an argument
This helper function will let users to convert tiling to
modifier and use igt_get_fb_tile_size()

Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
---
 lib/igt_fb.c | 27 +++++++++++++++++++++++++++
 lib/igt_fb.h |  1 +
 2 files changed, 28 insertions(+)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 6ecc36b..31fb918 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -206,6 +206,33 @@ uint64_t igt_fb_mod_to_tiling(uint64_t modifier)
 	}
 }
 
+/**
+ * igt_fb_tiling_to_mod:
+ * @tiling: DRM framebuffer tiling
+ *
+ * This function converts a DRM framebuffer tiling to its corresponding
+ * modifier constant.
+ *
+ * Returns:
+ * A tiling constant
+ */
+uint64_t igt_fb_tiling_to_mod(uint64_t tiling)
+{
+	switch (tiling) {
+	case I915_TILING_NONE:
+		return LOCAL_DRM_FORMAT_MOD_NONE;
+	case I915_TILING_X:
+		return LOCAL_I915_FORMAT_MOD_X_TILED;
+	case I915_TILING_Y:
+		return LOCAL_I915_FORMAT_MOD_Y_TILED;
+	case I915_TILING_Yf:
+		return LOCAL_I915_FORMAT_MOD_Yf_TILED;
+	default:
+		igt_assert(0);
+	}
+}
+
+
 /* helpers to create nice-looking framebuffers */
 static int create_bo_for_fb(int fd, int width, int height, uint32_t format,
 			    uint64_t tiling, unsigned size, unsigned stride,
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index b178eba..6972a80 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -131,6 +131,7 @@ int igt_create_bo_with_dimensions(int fd, int width, int height, uint32_t format
 				  bool *is_dumb);
 
 uint64_t igt_fb_mod_to_tiling(uint64_t modifier);
+uint64_t igt_fb_tiling_to_mod(uint64_t tiling);
 
 /* cairo-based painting */
 cairo_t *igt_get_cairo_ctx(int fd, struct igt_fb *fb);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 3/7] lib/igt_draw: Add Y-tiling support
  2017-03-17 19:15 [PATCH 0/7] Add Y-tiling support into IGTs Praveen Paneri
  2017-03-17 19:15 ` [PATCH 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size Praveen Paneri
  2017-03-17 19:15 ` [PATCH 2/7] lib/igt_fb: Add helper function for tile_to_mod Praveen Paneri
@ 2017-03-17 19:15 ` Praveen Paneri
  2017-03-17 19:15 ` [PATCH 4/7] lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method Praveen Paneri
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Praveen Paneri @ 2017-03-17 19:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: paulo.r.zanoni, Praveen Paneri

This patch adds Y-tiling support for igt_draw_rect function.

v2:
Use helper function to get tile sizes (Ville)

Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
---
 lib/igt_draw.c | 132 +++++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 87 insertions(+), 45 deletions(-)

diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 29aec85..fcf8fba 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -136,32 +136,47 @@ static int swizzle_addr(int addr, int swizzle)
 
 /* It's all in "pixel coordinates", so make sure you multiply/divide by the bpp
  * if you need to. */
-static int linear_x_y_to_tiled_pos(int x, int y, uint32_t stride, int swizzle,
-				   int bpp)
+static int linear_x_y_to_tiled_pos(int fd, int x, int y, uint32_t stride, int swizzle,
+				   int bpp, int tiling)
 {
-	int x_tile_size, y_tile_size;
-	int x_tile_n, y_tile_n, x_tile_off, y_tile_off;
-	int line_size, tile_size;
+	uint32_t tile_width, tile_height, tile_size;
+	int tile_x, tile_y; /* Co-ordinates of the tile holding the pixel */
+	int tile_x_off, tile_y_off; /* pixel position inside the tile */
 	int tile_n, tile_off;
-	int tiled_pos, tiles_per_line;
+	int line_size, tiles_per_line;
+	int tiled_pos;
 	int pixel_size = bpp / 8;
 
+	igt_get_fb_tile_size(fd, (uint64_t)igt_fb_tiling_to_mod(tiling), bpp,
+			&tile_width, &tile_height);
+
 	line_size = stride;
-	x_tile_size = 512;
-	y_tile_size = 8;
-	tile_size = x_tile_size * y_tile_size;
-	tiles_per_line = line_size / x_tile_size;
+	tile_size = tile_width * tile_height;
+	tiles_per_line = line_size / tile_width;
 
-	y_tile_n = y / y_tile_size;
-	y_tile_off = y % y_tile_size;
+	tile_y = y / tile_height;
+	tile_y_off = y % tile_height;
 
-	x_tile_n = (x * pixel_size) / x_tile_size;
-	x_tile_off = (x * pixel_size) % x_tile_size;
+	tile_x = (x * pixel_size) / tile_width;
+	tile_x_off = (x * pixel_size) % tile_width;
 
-	tile_n = y_tile_n * tiles_per_line + x_tile_n;
-	tile_off = y_tile_off * x_tile_size + x_tile_off;
-	tiled_pos = tile_n * tile_size + tile_off;
+	tile_n = tile_y * tiles_per_line + tile_x;
+
+	if (tiling == I915_TILING_X ) {
+		tile_off = tile_y_off * tile_width + tile_x_off;
+	} else { /* (tiling == I915_TILING_Y ) */
+		int x_oword_n, x_oword_off;
+		int oword_size = 16;
+
+		/* computation inside the tile */
+		x_oword_n = tile_x_off / oword_size;
+		x_oword_off = tile_x_off % oword_size;
+		tile_off = x_oword_n * tile_height * oword_size
+			   + tile_y_off * oword_size
+			   + x_oword_off;
+	}
 
+	tiled_pos = tile_n * tile_size + tile_off;
 	tiled_pos = swizzle_addr(tiled_pos, swizzle);
 
 	return tiled_pos / pixel_size;
@@ -169,34 +184,49 @@ static int linear_x_y_to_tiled_pos(int x, int y, uint32_t stride, int swizzle,
 
 /* It's all in "pixel coordinates", so make sure you multiply/divide by the bpp
  * if you need to. */
-static void tiled_pos_to_x_y_linear(int tiled_pos, uint32_t stride,
-				    int swizzle, int bpp, int *x, int *y)
+static void tiled_pos_to_x_y_linear(int fd, int tiled_pos, uint32_t stride,
+				    int swizzle, int bpp, int *x, int *y,
+				    int tiling)
 {
-	int tile_n, tile_off, tiles_per_line, line_size;
-	int x_tile_off, y_tile_off;
-	int x_tile_n, y_tile_n;
-	int x_tile_size, y_tile_size, tile_size;
+	uint32_t tile_width, tile_height, tile_size;
+	int tile_x, tile_y; /* Co-ordinates of the tile holding the pixel */
+	int tile_x_off, tile_y_off; /* pixel position inside the tile */
+	int tile_n, tile_off;
+	int line_size, tiles_per_line;
 	int pixel_size = bpp / 8;
 
+	igt_get_fb_tile_size(fd, (uint64_t)igt_fb_tiling_to_mod(tiling), bpp,
+                                 &tile_width, &tile_height);
 	tiled_pos = swizzle_addr(tiled_pos, swizzle);
 
 	line_size = stride;
-	x_tile_size = 512;
-	y_tile_size = 8;
-	tile_size = x_tile_size * y_tile_size;
-	tiles_per_line = line_size / x_tile_size;
+	tile_size = tile_width * tile_height;
+	tiles_per_line = line_size / tile_width;
 
 	tile_n = tiled_pos / tile_size;
 	tile_off = tiled_pos % tile_size;
 
-	y_tile_off = tile_off / x_tile_size;
-	x_tile_off = tile_off % x_tile_size;
+	tile_x = tile_n % tiles_per_line;
+	tile_y = tile_n / tiles_per_line;
 
-	x_tile_n = tile_n % tiles_per_line;
-	y_tile_n = tile_n / tiles_per_line;
+	if (tiling == I915_TILING_X ) {
 
-	*x = (x_tile_n * x_tile_size + x_tile_off) / pixel_size;
-	*y = y_tile_n * y_tile_size + y_tile_off;
+		tile_y_off = tile_off / tile_width;
+		tile_x_off = tile_off % tile_width;
+	} else {
+		int x_oword_n, x_oword_off;
+		int oword_size = 16;
+
+		x_oword_n = tile_off / (oword_size * tile_height);
+		x_oword_off = tile_off % oword_size;
+
+		tile_x_off = x_oword_n * oword_size + x_oword_off;
+		tile_y_off = (tile_off - x_oword_n * oword_size * tile_height)
+			     / oword_size;
+	}
+
+	*x = (tile_x * tile_width + tile_x_off) / pixel_size;
+	*y = tile_y * tile_height + tile_y_off;
 }
 
 static void set_pixel(void *_ptr, int index, uint32_t color, int bpp)
@@ -224,15 +254,16 @@ static void draw_rect_ptr_linear(void *ptr, uint32_t stride,
 	}
 }
 
-static void draw_rect_ptr_tiled(void *ptr, uint32_t stride, int swizzle,
-				struct rect *rect, uint32_t color, int bpp)
+static void draw_rect_ptr_tiled(int fd, void *ptr, uint32_t stride, int swizzle,
+				struct rect *rect, uint32_t color, int bpp,
+				int tiling)
 {
 	int x, y, pos;
 
 	for (y = rect->y; y < rect->y + rect->h; y++) {
 		for (x = rect->x; x < rect->x + rect->w; x++) {
-			pos = linear_x_y_to_tiled_pos(x, y, stride, swizzle,
-						      bpp);
+			pos = linear_x_y_to_tiled_pos(fd, x, y, stride, swizzle,
+						      bpp, tiling);
 			set_pixel(ptr, pos, color, bpp);
 		}
 	}
@@ -259,8 +290,12 @@ static void draw_rect_mmap_cpu(int fd, struct buf_data *buf, struct rect *rect,
 		draw_rect_ptr_linear(ptr, buf->stride, rect, color, buf->bpp);
 		break;
 	case I915_TILING_X:
-		draw_rect_ptr_tiled(ptr, buf->stride, swizzle, rect, color,
-				    buf->bpp);
+		draw_rect_ptr_tiled(fd, ptr, buf->stride, swizzle, rect, color,
+				    buf->bpp, tiling);
+		break;
+	case I915_TILING_Y:
+		draw_rect_ptr_tiled(fd, ptr, buf->stride, swizzle, rect, color,
+				    buf->bpp, tiling);
 		break;
 	default:
 		igt_assert(false);
@@ -309,8 +344,12 @@ static void draw_rect_mmap_wc(int fd, struct buf_data *buf, struct rect *rect,
 		draw_rect_ptr_linear(ptr, buf->stride, rect, color, buf->bpp);
 		break;
 	case I915_TILING_X:
-		draw_rect_ptr_tiled(ptr, buf->stride, swizzle, rect, color,
-				    buf->bpp);
+		draw_rect_ptr_tiled(fd, ptr, buf->stride, swizzle, rect, color,
+				    buf->bpp, tiling);
+		break;
+	case I915_TILING_Y:
+		draw_rect_ptr_tiled(fd, ptr, buf->stride, swizzle, rect, color,
+				    buf->bpp, tiling);
 		break;
 	default:
 		igt_assert(false);
@@ -338,7 +377,7 @@ static void draw_rect_pwrite_untiled(int fd, struct buf_data *buf,
 
 static void draw_rect_pwrite_tiled(int fd, struct buf_data *buf,
 				   struct rect *rect, uint32_t color,
-				   uint32_t swizzle)
+				   uint32_t swizzle, int tiling)
 {
 	int i;
 	int tiled_pos, x, y, pixel_size;
@@ -361,8 +400,8 @@ static void draw_rect_pwrite_tiled(int fd, struct buf_data *buf,
 		set_pixel(tmp, i, color, buf->bpp);
 
 	for (tiled_pos = 0; tiled_pos < buf->size; tiled_pos += pixel_size) {
-		tiled_pos_to_x_y_linear(tiled_pos, buf->stride, swizzle,
-					buf->bpp, &x, &y);
+		tiled_pos_to_x_y_linear(fd, tiled_pos, buf->stride, swizzle,
+					buf->bpp, &x, &y, tiling);
 
 		if (x >= rect->x && x < rect->x + rect->w &&
 		    y >= rect->y && y < rect->y + rect->h) {
@@ -399,7 +438,10 @@ static void draw_rect_pwrite(int fd, struct buf_data *buf,
 		draw_rect_pwrite_untiled(fd, buf, rect, color);
 		break;
 	case I915_TILING_X:
-		draw_rect_pwrite_tiled(fd, buf, rect, color, swizzle);
+		draw_rect_pwrite_tiled(fd, buf, rect, color, swizzle, tiling);
+		break;
+	case I915_TILING_Y:
+		draw_rect_pwrite_tiled(fd, buf, rect, color, swizzle, tiling);
 		break;
 	default:
 		igt_assert(false);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 4/7] lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method
  2017-03-17 19:15 [PATCH 0/7] Add Y-tiling support into IGTs Praveen Paneri
                   ` (2 preceding siblings ...)
  2017-03-17 19:15 ` [PATCH 3/7] lib/igt_draw: Add Y-tiling support Praveen Paneri
@ 2017-03-17 19:15 ` Praveen Paneri
  2017-04-26 14:06   ` Paulo Zanoni
  2017-03-17 19:15 ` [PATCH 5/7] tests/kms_draw_crc: add support for Y tiling Praveen Paneri
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Praveen Paneri @ 2017-03-17 19:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: Akash Goel, paulo.r.zanoni, Praveen Paneri

From: Akash Goel <akash.goel@intel.com>

Signed-off-by: Akash Goel <akash.goel@intel.com>
Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
---
 lib/igt_draw.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index fcf8fba..17011d8 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -31,6 +31,7 @@
 #include "igt_core.h"
 #include "igt_fb.h"
 #include "ioctl_wrappers.h"
+#include "i830_reg.h"
 
 /**
  * SECTION:igt_draw
@@ -487,6 +488,23 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 	blt_cmd_tiling = (tiling) ? XY_COLOR_BLT_TILED : 0;
 	pitch = (tiling) ? buf->stride / 4 : buf->stride;
 
+	if (tiling == I915_TILING_Y) {
+		/* To change the tile register, insert an MI_FLUSH_DW followed by an MI_LOAD_REGISTER_IMM */
+		BEGIN_BATCH(4, 0);
+		OUT_BATCH(MI_FLUSH_DW | 2);
+		OUT_BATCH(0x0);
+		OUT_BATCH(0x0);
+		OUT_BATCH(0x0);
+		ADVANCE_BATCH();
+
+		BEGIN_BATCH(4, 0);
+		OUT_BATCH(MI_LOAD_REGISTER_IMM);
+		OUT_BATCH(0x22200); /* BCS_SWCTRL */
+		OUT_BATCH(((0x3 << 16) | 0x3)); /* enable the Y tiling */
+		OUT_BATCH(MI_NOOP);
+		ADVANCE_BATCH();
+	}
+
 	BEGIN_BATCH(6, 1);
 	OUT_BATCH(XY_COLOR_BLT_CMD_NOLEN | XY_COLOR_BLT_WRITE_ALPHA |
 		  XY_COLOR_BLT_WRITE_RGB | blt_cmd_tiling | blt_cmd_len);
@@ -497,6 +515,23 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 	OUT_BATCH(color);
 	ADVANCE_BATCH();
 
+	if (tiling == I915_TILING_Y) {
+		/* To change the tile register, insert an MI_FLUSH_DW followed by an MI_LOAD_REGISTER_IMM */
+		BEGIN_BATCH(4, 0);
+		OUT_BATCH(MI_FLUSH_DW | 2);
+		OUT_BATCH(0x0);
+		OUT_BATCH(0x0);
+		OUT_BATCH(0x0);
+		ADVANCE_BATCH();
+
+		BEGIN_BATCH(4, 0);
+		OUT_BATCH(MI_LOAD_REGISTER_IMM);
+		OUT_BATCH(0x22200); /* BCS_SWCTRL */
+		OUT_BATCH((0x3 << 16)); /* Reset back to X-Tiling (default) */
+		OUT_BATCH(MI_NOOP);
+		ADVANCE_BATCH();
+	}
+
 	intel_batchbuffer_flush(batch);
 	intel_batchbuffer_free(batch);
 }
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 5/7] tests/kms_draw_crc: add support for Y tiling
  2017-03-17 19:15 [PATCH 0/7] Add Y-tiling support into IGTs Praveen Paneri
                   ` (3 preceding siblings ...)
  2017-03-17 19:15 ` [PATCH 4/7] lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method Praveen Paneri
@ 2017-03-17 19:15 ` Praveen Paneri
  2017-03-17 19:15 ` [PATCH 6/7] igt/kms_frontbuffer_tracking: Add Y-tiling support Praveen Paneri
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Praveen Paneri @ 2017-03-17 19:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: paulo.r.zanoni, Praveen Paneri

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

This is the program that's supposed to test lib/igt_draw. We just
added Y tiling support for the library, so add the tests now.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
---
 tests/kms_draw_crc.c | 58 ++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 43 insertions(+), 15 deletions(-)

diff --git a/tests/kms_draw_crc.c b/tests/kms_draw_crc.c
index e163981..d434c56 100644
--- a/tests/kms_draw_crc.c
+++ b/tests/kms_draw_crc.c
@@ -47,6 +47,13 @@ static const uint32_t formats[N_FORMATS] = {
 	DRM_FORMAT_XRGB2101010,
 };
 
+#define N_TILING_METHODS 3
+static const uint64_t tilings[N_TILING_METHODS] = {
+	LOCAL_DRM_FORMAT_MOD_NONE,
+	LOCAL_I915_FORMAT_MOD_X_TILED,
+	LOCAL_I915_FORMAT_MOD_Y_TILED,
+};
+
 struct base_crc {
 	bool set;
 	igt_crc_t crc;
@@ -151,6 +158,11 @@ static void draw_method_subtest(enum igt_draw_method method,
 {
 	igt_crc_t crc;
 
+	if (tiling == LOCAL_I915_FORMAT_MOD_Y_TILED)
+		igt_require(intel_gen(intel_get_drm_devid(drm_fd)) >= 9);
+
+	kmstest_unset_all_crtcs(drm_fd, drm_res);
+
 	/* Use IGT_DRAW_MMAP_GTT on an untiled buffer as the parameter for
 	 * comparison. Cache the value so we don't recompute it for every single
 	 * subtest. */
@@ -208,6 +220,12 @@ static void fill_fb_subtest(void)
 	get_fill_crc(LOCAL_I915_FORMAT_MOD_X_TILED, &crc);
 	igt_assert_crc_equal(&crc, &base_crc);
 
+	if (intel_gen(intel_get_drm_devid(drm_fd)) >= 9) {
+		get_fill_crc(LOCAL_I915_FORMAT_MOD_Y_TILED, &crc);
+		igt_assert_crc_equal(&crc, &base_crc);
+	}
+
+	kmstest_unset_all_crtcs(drm_fd, drm_res);
 	igt_remove_fb(drm_fd, &fb);
 }
 
@@ -265,28 +283,38 @@ static const char *format_str(int format_index)
 	}
 }
 
+static const char *tiling_str(int tiling_index)
+{
+	switch (tilings[tiling_index]) {
+	case LOCAL_DRM_FORMAT_MOD_NONE:
+		return "untiled";
+	case LOCAL_I915_FORMAT_MOD_X_TILED:
+		return "xtiled";
+	case LOCAL_I915_FORMAT_MOD_Y_TILED:
+		return "ytiled";
+	default:
+		igt_assert(false);
+	}
+}
+
 igt_main
 {
 	enum igt_draw_method method;
-	int format_index;
+	int format_idx, tiling_idx;
 
 	igt_fixture
 		setup_environment();
 
-	for (format_index = 0; format_index < N_FORMATS; format_index++) {
-		for (method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
-			igt_subtest_f("draw-method-%s-%s-untiled",
-				      format_str(format_index),
-				      igt_draw_get_method_name(method))
-				draw_method_subtest(method, format_index,
-						    LOCAL_DRM_FORMAT_MOD_NONE);
-			igt_subtest_f("draw-method-%s-%s-tiled",
-				      format_str(format_index),
-				      igt_draw_get_method_name(method))
-				draw_method_subtest(method, format_index,
-						LOCAL_I915_FORMAT_MOD_X_TILED);
-		}
-	}
+	for (format_idx = 0; format_idx < N_FORMATS; format_idx++) {
+	for (method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
+	for (tiling_idx = 0; tiling_idx < N_TILING_METHODS; tiling_idx++) {
+		igt_subtest_f("draw-method-%s-%s-%s",
+			      format_str(format_idx),
+			      igt_draw_get_method_name(method),
+			      tiling_str(tiling_idx))
+			draw_method_subtest(method, format_idx,
+					    tilings[tiling_idx]);
+	} } }
 
 	igt_subtest("fill-fb")
 		fill_fb_subtest();
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 6/7] igt/kms_frontbuffer_tracking: Add Y-tiling support
  2017-03-17 19:15 [PATCH 0/7] Add Y-tiling support into IGTs Praveen Paneri
                   ` (4 preceding siblings ...)
  2017-03-17 19:15 ` [PATCH 5/7] tests/kms_draw_crc: add support for Y tiling Praveen Paneri
@ 2017-03-17 19:15 ` Praveen Paneri
  2017-04-26 14:02   ` Paulo Zanoni
  2017-03-17 19:15 ` [PATCH 7/7] igt/kms_fbc_crc.c : Add Y-tile tests Praveen Paneri
  2017-04-26 13:46 ` [PATCH 0/7] Add Y-tiling support into IGTs Paulo Zanoni
  7 siblings, 1 reply; 15+ messages in thread
From: Praveen Paneri @ 2017-03-17 19:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: paulo.r.zanoni, Praveen Paneri

Allow tests to create Y-tiled bufferes using a separate
argument to the test without increasing the number of
subtests.

Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
---
 tests/kms_frontbuffer_tracking.c | 46 +++++++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 19 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 03c7710..0597f10 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -250,6 +250,7 @@ struct {
 	int only_pipes;
 	int shared_fb_x_offset;
 	int shared_fb_y_offset;
+	uint64_t tiling;
 } opt = {
 	.check_status = true,
 	.check_crc = true,
@@ -262,6 +263,7 @@ struct {
 	.only_pipes = PIPE_COUNT,
 	.shared_fb_x_offset = 500,
 	.shared_fb_y_offset = 500,
+	.tiling = LOCAL_I915_FORMAT_MOD_X_TILED,
 };
 
 struct modeset_params {
@@ -576,7 +578,7 @@ static void create_fb(enum pixel_format pformat, int width, int height,
 	if (plane == PLANE_CUR)
 		tiling_for_size = LOCAL_DRM_FORMAT_MOD_NONE;
 	else
-		tiling_for_size = LOCAL_I915_FORMAT_MOD_X_TILED;
+		tiling_for_size = opt.tiling;
 
 	igt_calc_fb_size(drm.fd, width, height, bpp, tiling_for_size, &size,
 			 &stride);
@@ -708,7 +710,7 @@ static void create_shared_fb(enum pixel_format format)
 
 	big_h = prim_h + scnd_h + offs_h + opt.shared_fb_y_offset;
 
-	create_fb(format, big_w, big_h, LOCAL_I915_FORMAT_MOD_X_TILED,
+	create_fb(format, big_w, big_h, opt.tiling,
 		  PLANE_PRI, &s->big);
 }
 
@@ -742,16 +744,16 @@ static void create_fbs(enum pixel_format format)
 
 	create_fb(format, prim_mode_params.mode->hdisplay,
 		  prim_mode_params.mode->vdisplay,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &s->prim_pri);
+		  opt.tiling, PLANE_PRI, &s->prim_pri);
 	create_fb(format, prim_mode_params.cursor.w,
 		  prim_mode_params.cursor.h, LOCAL_DRM_FORMAT_MOD_NONE,
 		  PLANE_CUR, &s->prim_cur);
 	create_fb(format, prim_mode_params.sprite.w,
-		  prim_mode_params.sprite.h, LOCAL_I915_FORMAT_MOD_X_TILED,
+		  prim_mode_params.sprite.h, opt.tiling,
 		  PLANE_SPR, &s->prim_spr);
 
 	create_fb(format, offscreen_fb.w, offscreen_fb.h,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &s->offscreen);
+		  opt.tiling, PLANE_PRI, &s->offscreen);
 
 	create_shared_fb(format);
 
@@ -760,11 +762,11 @@ static void create_fbs(enum pixel_format format)
 
 	create_fb(format, scnd_mode_params.mode->hdisplay,
 		  scnd_mode_params.mode->vdisplay,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &s->scnd_pri);
+		  opt.tiling, PLANE_PRI, &s->scnd_pri);
 	create_fb(format, scnd_mode_params.cursor.w, scnd_mode_params.cursor.h,
 		  LOCAL_DRM_FORMAT_MOD_NONE, PLANE_CUR, &s->scnd_cur);
 	create_fb(format, scnd_mode_params.sprite.w, scnd_mode_params.sprite.h,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_SPR, &s->scnd_spr);
+		  opt.tiling, PLANE_SPR, &s->scnd_spr);
 }
 
 static bool set_mode_for_params(struct modeset_params *params)
@@ -1241,7 +1243,7 @@ static void init_blue_crc(enum pixel_format format, bool mandatory_sink_crc)
 
 	create_fb(format, prim_mode_params.mode->hdisplay,
 		  prim_mode_params.mode->vdisplay,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &blue);
+		  opt.tiling, PLANE_PRI, &blue);
 
 	fill_fb(&blue, COLOR_PRIM_BG);
 
@@ -1276,7 +1278,7 @@ static void init_crcs(enum pixel_format format,
 	for (r = 0; r < pattern->n_rects; r++)
 		create_fb(format, prim_mode_params.mode->hdisplay,
 			  prim_mode_params.mode->vdisplay,
-			  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &tmp_fbs[r]);
+			  opt.tiling, PLANE_PRI, &tmp_fbs[r]);
 
 	for (r = 0; r < pattern->n_rects; r++)
 		fill_fb(&tmp_fbs[r], COLOR_PRIM_BG);
@@ -2374,7 +2376,7 @@ static void flip_subtest(const struct test_mode *t)
 	prepare_subtest(t, pattern);
 
 	create_fb(t->format, params->fb.fb->width, params->fb.fb->height,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
+		  opt.tiling, t->plane, &fb2);
 	fill_fb(&fb2, bg_color);
 	orig_fb = params->fb.fb;
 
@@ -2420,7 +2422,7 @@ static void fliptrack_subtest(const struct test_mode *t, enum flip_type type)
 	prepare_subtest(t, pattern);
 
 	create_fb(t->format, params->fb.fb->width, params->fb.fb->height,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
+		  opt.tiling, t->plane, &fb2);
 	fill_fb(&fb2, COLOR_PRIM_BG);
 	orig_fb = params->fb.fb;
 
@@ -2631,7 +2633,7 @@ static void fullscreen_plane_subtest(const struct test_mode *t)
 	prepare_subtest(t, pattern);
 
 	rect = pattern->get_rect(&params->fb, 0);
-	create_fb(t->format, rect.w, rect.h, LOCAL_I915_FORMAT_MOD_X_TILED,
+	create_fb(t->format, rect.w, rect.h, opt.tiling,
 		  t->plane, &fullscreen_fb);
 	/* Call pick_color() again since PRI and SPR may not support the same
 	 * pixel formats. */
@@ -2710,7 +2712,7 @@ static void scaledprimary_subtest(const struct test_mode *t)
 	old_fb = params->fb.fb;
 
 	create_fb(t->format, params->fb.fb->width, params->fb.fb->height,
-		  LOCAL_I915_FORMAT_MOD_X_TILED,
+		  opt.tiling,
 		  t->plane, &new_fb);
 	fill_fb(&new_fb, COLOR_BLUE);
 
@@ -2820,7 +2822,7 @@ static void modesetfrombusy_subtest(const struct test_mode *t)
 	prepare_subtest(t, NULL);
 
 	create_fb(t->format, params->fb.fb->width, params->fb.fb->height,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
+		  opt.tiling, t->plane, &fb2);
 	fill_fb(&fb2, COLOR_PRIM_BG);
 
 	start_busy_thread(params->fb.fb);
@@ -2925,7 +2927,7 @@ static void farfromfence_subtest(const struct test_mode *t)
 	target = pick_target(t, params);
 
 	create_fb(t->format, params->mode->hdisplay, max_height,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &tall_fb);
+		  opt.tiling, t->plane, &tall_fb);
 
 	fill_fb(&tall_fb, COLOR_PRIM_BG);
 
@@ -3000,7 +3002,7 @@ static void badstride_subtest(const struct test_mode *t)
 	old_fb = params->fb.fb;
 
 	create_fb(t->format, params->fb.fb->width + 4096, params->fb.fb->height,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &wide_fb);
+		  opt.tiling, t->plane, &wide_fb);
 	igt_assert(wide_fb.stride > 16384);
 
 	fill_fb(&wide_fb, COLOR_PRIM_BG);
@@ -3067,7 +3069,7 @@ static void stridechange_subtest(const struct test_mode *t)
 	old_fb = params->fb.fb;
 
 	create_fb(t->format, params->fb.fb->width + 512, params->fb.fb->height,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &new_fb);
+		  opt.tiling, t->plane, &new_fb);
 	fill_fb(&new_fb, COLOR_PRIM_BG);
 
 	igt_assert(old_fb->stride != new_fb.stride);
@@ -3186,7 +3188,7 @@ static void basic_subtest(const struct test_mode *t)
 	prepare_subtest(t, pattern);
 
 	create_fb(t->format, params->fb.fb->width, params->fb.fb->height,
-		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
+		  opt.tiling, t->plane, &fb2);
 	fb1 = params->fb.fb;
 
 	for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++, r++) {
@@ -3255,6 +3257,10 @@ static int opt_handler(int option, int option_index, void *data)
 		igt_assert_eq(opt.only_pipes, PIPE_COUNT);
 		opt.only_pipes = PIPE_DUAL;
 		break;
+	case 'l':
+		igt_assert_eq(strtol(optarg, NULL, 0), I915_TILING_Y);
+		opt.tiling = igt_fb_tiling_to_mod((uint64_t)strtol(optarg, NULL, 0));
+		break;
 	default:
 		igt_assert(false);
 	}
@@ -3274,7 +3280,8 @@ const char *help_str =
 "  --shared-fb-x offset        Use 'offset' as the X offset for the shared FB\n"
 "  --shared-fb-y offset        Use 'offset' as the Y offset for the shared FB\n"
 "  --1p-only                   Only run subtests that use 1 pipe\n"
-"  --2p-only                   Only run subtests that use 2 pipes\n";
+"  --2p-only                   Only run subtests that use 2 pipes\n"
+"  --tiling		       give 2 for y-tiled, default is x-tiled\n";
 
 static const char *pipes_str(int pipes)
 {
@@ -3413,6 +3420,7 @@ int main(int argc, char *argv[])
 		{ "shared-fb-y",              1, 0, 'y'},
 		{ "1p-only",                  0, 0, '1'},
 		{ "2p-only",                  0, 0, '2'},
+		{ "tiling",                   1, 0, 'l'},
 		{ 0, 0, 0, 0 }
 	};
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 7/7] igt/kms_fbc_crc.c : Add Y-tile tests
  2017-03-17 19:15 [PATCH 0/7] Add Y-tiling support into IGTs Praveen Paneri
                   ` (5 preceding siblings ...)
  2017-03-17 19:15 ` [PATCH 6/7] igt/kms_frontbuffer_tracking: Add Y-tiling support Praveen Paneri
@ 2017-03-17 19:15 ` Praveen Paneri
  2017-04-26 13:46 ` [PATCH 0/7] Add Y-tiling support into IGTs Paulo Zanoni
  7 siblings, 0 replies; 15+ messages in thread
From: Praveen Paneri @ 2017-03-17 19:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: paulo.r.zanoni, Praveen Paneri

Now that we have support for Y-tiled buffers, add another
iteration of tests for Y-tiled buffers.

Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
---
 tests/kms_fbc_crc.c | 71 +++++++++++++++++++++++++++++------------------------
 1 file changed, 39 insertions(+), 32 deletions(-)

diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index 96af06a..e0f9bf6 100644
--- a/tests/kms_fbc_crc.c
+++ b/tests/kms_fbc_crc.c
@@ -318,12 +318,10 @@ static void prepare_crtc(data_t *data)
 	igt_output_set_pipe(output, data->pipe);
 }
 
-static void create_fbs(data_t *data, bool tiled, struct igt_fb *fbs)
+static void create_fbs(data_t *data, uint64_t tiling, struct igt_fb *fbs)
 {
 	int rc;
 	drmModeModeInfo *mode = igt_output_get_mode(data->output);
-	uint64_t tiling = tiled ? LOCAL_I915_FORMAT_MOD_X_TILED :
-				  LOCAL_DRM_FORMAT_MOD_NONE;
 
 	rc = igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
 				 DRM_FORMAT_XRGB8888, tiling,
@@ -344,8 +342,8 @@ static void get_ref_crcs(data_t *data)
 	struct igt_fb fbs[4];
 	int i;
 
-	create_fbs(data, false, &fbs[0]);
-	create_fbs(data, false, &fbs[2]);
+	create_fbs(data, LOCAL_DRM_FORMAT_MOD_NONE, &fbs[0]);
+	create_fbs(data, LOCAL_DRM_FORMAT_MOD_NONE, &fbs[2]);
 
 	fill_mmap_gtt(data, fbs[2].gem_handle, 0xff);
 	fill_mmap_gtt(data, fbs[3].gem_handle, 0xff);
@@ -366,7 +364,7 @@ static void get_ref_crcs(data_t *data)
 		igt_remove_fb(data->drm_fd, &fbs[i]);
 }
 
-static bool prepare_test(data_t *data, enum test_mode test_mode)
+static bool prepare_test(data_t *data, enum test_mode test_mode, uint64_t tiling)
 {
 	igt_display_t *display = &data->display;
 	igt_output_t *output = data->output;
@@ -374,7 +372,7 @@ static bool prepare_test(data_t *data, enum test_mode test_mode)
 
 	data->primary = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
 
-	create_fbs(data, true, data->fb);
+	create_fbs(data, tiling, data->fb);
 
 	igt_pipe_crc_free(data->pipe_crc);
 	data->pipe_crc = NULL;
@@ -484,32 +482,41 @@ static void run_test(data_t *data, enum test_mode mode)
 
 	reset_display(data);
 
-	for_each_pipe_with_valid_output(display, data->pipe, data->output) {
-		prepare_crtc(data);
-
-		igt_info("Beginning %s on pipe %s, connector %s\n",
-			  igt_subtest_name(),
-			  kmstest_pipe_name(data->pipe),
-			  igt_output_name(data->output));
-
-		if (!prepare_test(data, mode)) {
-			igt_info("%s on pipe %s, connector %s: SKIPPED\n",
-				  igt_subtest_name(),
-				  kmstest_pipe_name(data->pipe),
-				  igt_output_name(data->output));
-			continue;
+	for (int tiling = I915_TILING_X;
+	     tiling <= I915_TILING_Y; tiling++) {
+		for_each_pipe_with_valid_output(display,
+						data->pipe, data->output) {
+			prepare_crtc(data);
+
+			igt_info("Beginning %s on pipe %s, connector "
+					"%s, %s-tiled\n",
+					igt_subtest_name(),
+					kmstest_pipe_name(data->pipe),
+					igt_output_name(data->output),
+					(tiling == I915_TILING_X) ? "x":"y" );
+
+			if (!prepare_test(data, mode,
+					  igt_fb_tiling_to_mod(tiling))) {
+				igt_info("%s on pipe %s, connector %s: SKIPPED\n",
+						igt_subtest_name(),
+						kmstest_pipe_name(data->pipe),
+						igt_output_name(data->output));
+				continue;
+			}
+
+			valid_tests++;
+
+			test_crc(data, mode);
+
+			igt_info("%s on pipe %s, connector %s"
+					"%s-tiled: PASSED\n",
+					igt_subtest_name(),
+					kmstest_pipe_name(data->pipe),
+					igt_output_name(data->output),
+					(tiling == I915_TILING_X) ? "x":"y" );
+
+			finish_crtc(data, mode);
 		}
-
-		valid_tests++;
-
-		test_crc(data, mode);
-
-		igt_info("%s on pipe %s, connector %s: PASSED\n",
-			  igt_subtest_name(),
-			  kmstest_pipe_name(data->pipe),
-			  igt_output_name(data->output));
-
-		finish_crtc(data, mode);
 	}
 
 	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size
  2017-03-17 19:15 ` [PATCH 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size Praveen Paneri
@ 2017-03-20  9:48   ` Daniel Vetter
  2017-03-21  8:20     ` Praveen Paneri
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2017-03-20  9:48 UTC (permalink / raw)
  To: Praveen Paneri; +Cc: intel-gfx, paulo.r.zanoni

On Sat, Mar 18, 2017 at 12:45:20AM +0530, Praveen Paneri wrote:
> This function can be used by igt_draw to get accurate
> tile dimensions for all tile formats.
> 
> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
> ---
>  lib/igt_fb.c | 2 +-
>  lib/igt_fb.h | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index d2b7e9e..6ecc36b 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -74,7 +74,7 @@ static struct format_desc_struct {
>  #define for_each_format(f)	\
>  	for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
>  
> -static void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
> +void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
>  				 unsigned *width_ret, unsigned *height_ret)

Documentation seems missing here.
-Daniel

>  {
>  	switch (tiling) {
> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
> index 4a680ce..b178eba 100644
> --- a/lib/igt_fb.h
> +++ b/lib/igt_fb.h
> @@ -94,7 +94,8 @@ enum igt_text_align {
>  	align_vcenter	= 0x04,
>  	align_hcenter	= 0x08,
>  };
> -
> +void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
> +			unsigned *width_ret, unsigned *height_ret);
>  void igt_calc_fb_size(int fd, int width, int height, int bpp, uint64_t tiling,
>  		      unsigned *size_ret, unsigned *stride_ret);
>  unsigned int
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size
  2017-03-20  9:48   ` Daniel Vetter
@ 2017-03-21  8:20     ` Praveen Paneri
  0 siblings, 0 replies; 15+ messages in thread
From: Praveen Paneri @ 2017-03-21  8:20 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, paulo.r.zanoni



On Monday 20 March 2017 03:18 PM, Daniel Vetter wrote:
> On Sat, Mar 18, 2017 at 12:45:20AM +0530, Praveen Paneri wrote:
>> This function can be used by igt_draw to get accurate
>> tile dimensions for all tile formats.
>>
>> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
>> ---
>>   lib/igt_fb.c | 2 +-
>>   lib/igt_fb.h | 3 ++-
>>   2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
>> index d2b7e9e..6ecc36b 100644
>> --- a/lib/igt_fb.c
>> +++ b/lib/igt_fb.c
>> @@ -74,7 +74,7 @@ static struct format_desc_struct {
>>   #define for_each_format(f)	\
>>   	for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
>>
>> -static void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
>> +void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
>>   				 unsigned *width_ret, unsigned *height_ret)
>
> Documentation seems missing here.
> -Daniel
Sure. I will add it.

Thanks
Praveen
>
>>   {
>>   	switch (tiling) {
>> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
>> index 4a680ce..b178eba 100644
>> --- a/lib/igt_fb.h
>> +++ b/lib/igt_fb.h
>> @@ -94,7 +94,8 @@ enum igt_text_align {
>>   	align_vcenter	= 0x04,
>>   	align_hcenter	= 0x08,
>>   };
>> -
>> +void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
>> +			unsigned *width_ret, unsigned *height_ret);
>>   void igt_calc_fb_size(int fd, int width, int height, int bpp, uint64_t tiling,
>>   		      unsigned *size_ret, unsigned *stride_ret);
>>   unsigned int
>> --
>> 2.7.4
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 0/7] Add Y-tiling support into IGTs
  2017-03-17 19:15 [PATCH 0/7] Add Y-tiling support into IGTs Praveen Paneri
                   ` (6 preceding siblings ...)
  2017-03-17 19:15 ` [PATCH 7/7] igt/kms_fbc_crc.c : Add Y-tile tests Praveen Paneri
@ 2017-04-26 13:46 ` Paulo Zanoni
  2017-04-26 14:51   ` Paulo Zanoni
  7 siblings, 1 reply; 15+ messages in thread
From: Paulo Zanoni @ 2017-04-26 13:46 UTC (permalink / raw)
  To: Praveen Paneri, intel-gfx

Em Sáb, 2017-03-18 às 00:45 +0530, Praveen Paneri escreveu:
> This series adds Y-tiled buffer creation support into IGT libraries
> and
> goes on to use this capability to add support into FBC tests to use
> Y-tiled buffers.

I applied this series and the Kernel patch. If I try to run
kms_draw_crc it just gets stuck eating 100% of the CPU. I suppose this
needs to be debugged, maybe some patch is wrong. Can you reproduce this
behavior?

> 
> Akash Goel (1):
>   lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method
> 
> Paulo Zanoni (1):
>   tests/kms_draw_crc: add support for Y tiling
> 
> Praveen Paneri (5):
>   lib/igt_fb: Let others use igt_get_fb_tile_size
>   lib/igt_fb: Add helper function for tile_to_mod
>   lib/igt_draw: Add Y-tiling support
>   igt/kms_frontbuffer_tracking: Add Y-tiling support
>   igt/kms_fbc_crc.c : Add Y-tile tests
> 
>  lib/igt_draw.c                   | 167 ++++++++++++++++++++++++++++-
> ----------
>  lib/igt_fb.c                     |  29 ++++++-
>  lib/igt_fb.h                     |   4 +-
>  tests/kms_draw_crc.c             |  58 ++++++++++----
>  tests/kms_fbc_crc.c              |  71 +++++++++--------
>  tests/kms_frontbuffer_tracking.c |  46 ++++++-----
>  6 files changed, 262 insertions(+), 113 deletions(-)
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 6/7] igt/kms_frontbuffer_tracking: Add Y-tiling support
  2017-03-17 19:15 ` [PATCH 6/7] igt/kms_frontbuffer_tracking: Add Y-tiling support Praveen Paneri
@ 2017-04-26 14:02   ` Paulo Zanoni
  0 siblings, 0 replies; 15+ messages in thread
From: Paulo Zanoni @ 2017-04-26 14:02 UTC (permalink / raw)
  To: Praveen Paneri, intel-gfx

Em Sáb, 2017-03-18 às 00:45 +0530, Praveen Paneri escreveu:
> Allow tests to create Y-tiled bufferes using a separate
> argument to the test without increasing the number of
> subtests.
> 
> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
> ---
>  tests/kms_frontbuffer_tracking.c | 46 +++++++++++++++++++++++-------
> ----------
>  1 file changed, 27 insertions(+), 19 deletions(-)
> 
> diff --git a/tests/kms_frontbuffer_tracking.c
> b/tests/kms_frontbuffer_tracking.c
> index 03c7710..0597f10 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -250,6 +250,7 @@ struct {
>  	int only_pipes;
>  	int shared_fb_x_offset;
>  	int shared_fb_y_offset;
> +	uint64_t tiling;
>  } opt = {
>  	.check_status = true,
>  	.check_crc = true,
> @@ -262,6 +263,7 @@ struct {
>  	.only_pipes = PIPE_COUNT,
>  	.shared_fb_x_offset = 500,
>  	.shared_fb_y_offset = 500,
> +	.tiling = LOCAL_I915_FORMAT_MOD_X_TILED,
>  };
>  
>  struct modeset_params {
> @@ -576,7 +578,7 @@ static void create_fb(enum pixel_format pformat,
> int width, int height,
>  	if (plane == PLANE_CUR)
>  		tiling_for_size = LOCAL_DRM_FORMAT_MOD_NONE;
>  	else
> -		tiling_for_size = LOCAL_I915_FORMAT_MOD_X_TILED;
> +		tiling_for_size = opt.tiling;
>  
>  	igt_calc_fb_size(drm.fd, width, height, bpp,
> tiling_for_size, &size,
>  			 &stride);
> @@ -708,7 +710,7 @@ static void create_shared_fb(enum pixel_format
> format)
>  
>  	big_h = prim_h + scnd_h + offs_h + opt.shared_fb_y_offset;
>  
> -	create_fb(format, big_w, big_h,
> LOCAL_I915_FORMAT_MOD_X_TILED,
> +	create_fb(format, big_w, big_h, opt.tiling,
>  		  PLANE_PRI, &s->big);
>  }
>  
> @@ -742,16 +744,16 @@ static void create_fbs(enum pixel_format
> format)
>  
>  	create_fb(format, prim_mode_params.mode->hdisplay,
>  		  prim_mode_params.mode->vdisplay,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &s-
> >prim_pri);
> +		  opt.tiling, PLANE_PRI, &s->prim_pri);
>  	create_fb(format, prim_mode_params.cursor.w,
>  		  prim_mode_params.cursor.h,
> LOCAL_DRM_FORMAT_MOD_NONE,
>  		  PLANE_CUR, &s->prim_cur);
>  	create_fb(format, prim_mode_params.sprite.w,
> -		  prim_mode_params.sprite.h,
> LOCAL_I915_FORMAT_MOD_X_TILED,
> +		  prim_mode_params.sprite.h, opt.tiling,
>  		  PLANE_SPR, &s->prim_spr);
>  
>  	create_fb(format, offscreen_fb.w, offscreen_fb.h,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &s-
> >offscreen);
> +		  opt.tiling, PLANE_PRI, &s->offscreen);
>  
>  	create_shared_fb(format);
>  
> @@ -760,11 +762,11 @@ static void create_fbs(enum pixel_format
> format)
>  
>  	create_fb(format, scnd_mode_params.mode->hdisplay,
>  		  scnd_mode_params.mode->vdisplay,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &s-
> >scnd_pri);
> +		  opt.tiling, PLANE_PRI, &s->scnd_pri);
>  	create_fb(format, scnd_mode_params.cursor.w,
> scnd_mode_params.cursor.h,
>  		  LOCAL_DRM_FORMAT_MOD_NONE, PLANE_CUR, &s-
> >scnd_cur);
>  	create_fb(format, scnd_mode_params.sprite.w,
> scnd_mode_params.sprite.h,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_SPR, &s-
> >scnd_spr);
> +		  opt.tiling, PLANE_SPR, &s->scnd_spr);
>  }
>  
>  static bool set_mode_for_params(struct modeset_params *params)
> @@ -1241,7 +1243,7 @@ static void init_blue_crc(enum pixel_format
> format, bool mandatory_sink_crc)
>  
>  	create_fb(format, prim_mode_params.mode->hdisplay,
>  		  prim_mode_params.mode->vdisplay,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI, &blue);
> +		  opt.tiling, PLANE_PRI, &blue);
>  
>  	fill_fb(&blue, COLOR_PRIM_BG);
>  
> @@ -1276,7 +1278,7 @@ static void init_crcs(enum pixel_format format,
>  	for (r = 0; r < pattern->n_rects; r++)
>  		create_fb(format, prim_mode_params.mode->hdisplay,
>  			  prim_mode_params.mode->vdisplay,
> -			  LOCAL_I915_FORMAT_MOD_X_TILED, PLANE_PRI,
> &tmp_fbs[r]);
> +			  opt.tiling, PLANE_PRI, &tmp_fbs[r]);
>  
>  	for (r = 0; r < pattern->n_rects; r++)
>  		fill_fb(&tmp_fbs[r], COLOR_PRIM_BG);
> @@ -2374,7 +2376,7 @@ static void flip_subtest(const struct test_mode
> *t)
>  	prepare_subtest(t, pattern);
>  
>  	create_fb(t->format, params->fb.fb->width, params->fb.fb-
> >height,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
> +		  opt.tiling, t->plane, &fb2);
>  	fill_fb(&fb2, bg_color);
>  	orig_fb = params->fb.fb;
>  
> @@ -2420,7 +2422,7 @@ static void fliptrack_subtest(const struct
> test_mode *t, enum flip_type type)
>  	prepare_subtest(t, pattern);
>  
>  	create_fb(t->format, params->fb.fb->width, params->fb.fb-
> >height,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
> +		  opt.tiling, t->plane, &fb2);
>  	fill_fb(&fb2, COLOR_PRIM_BG);
>  	orig_fb = params->fb.fb;
>  
> @@ -2631,7 +2633,7 @@ static void fullscreen_plane_subtest(const
> struct test_mode *t)
>  	prepare_subtest(t, pattern);
>  
>  	rect = pattern->get_rect(&params->fb, 0);
> -	create_fb(t->format, rect.w, rect.h,
> LOCAL_I915_FORMAT_MOD_X_TILED,
> +	create_fb(t->format, rect.w, rect.h, opt.tiling,
>  		  t->plane, &fullscreen_fb);
>  	/* Call pick_color() again since PRI and SPR may not support
> the same
>  	 * pixel formats. */
> @@ -2710,7 +2712,7 @@ static void scaledprimary_subtest(const struct
> test_mode *t)
>  	old_fb = params->fb.fb;
>  
>  	create_fb(t->format, params->fb.fb->width, params->fb.fb-
> >height,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED,
> +		  opt.tiling,
>  		  t->plane, &new_fb);
>  	fill_fb(&new_fb, COLOR_BLUE);
>  
> @@ -2820,7 +2822,7 @@ static void modesetfrombusy_subtest(const
> struct test_mode *t)
>  	prepare_subtest(t, NULL);
>  
>  	create_fb(t->format, params->fb.fb->width, params->fb.fb-
> >height,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
> +		  opt.tiling, t->plane, &fb2);
>  	fill_fb(&fb2, COLOR_PRIM_BG);
>  
>  	start_busy_thread(params->fb.fb);
> @@ -2925,7 +2927,7 @@ static void farfromfence_subtest(const struct
> test_mode *t)
>  	target = pick_target(t, params);
>  
>  	create_fb(t->format, params->mode->hdisplay, max_height,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane,
> &tall_fb);
> +		  opt.tiling, t->plane, &tall_fb);
>  
>  	fill_fb(&tall_fb, COLOR_PRIM_BG);
>  
> @@ -3000,7 +3002,7 @@ static void badstride_subtest(const struct
> test_mode *t)
>  	old_fb = params->fb.fb;
>  
>  	create_fb(t->format, params->fb.fb->width + 4096, params-
> >fb.fb->height,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane,
> &wide_fb);
> +		  opt.tiling, t->plane, &wide_fb);
>  	igt_assert(wide_fb.stride > 16384);
>  
>  	fill_fb(&wide_fb, COLOR_PRIM_BG);
> @@ -3067,7 +3069,7 @@ static void stridechange_subtest(const struct
> test_mode *t)
>  	old_fb = params->fb.fb;
>  
>  	create_fb(t->format, params->fb.fb->width + 512, params-
> >fb.fb->height,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &new_fb);
> +		  opt.tiling, t->plane, &new_fb);
>  	fill_fb(&new_fb, COLOR_PRIM_BG);
>  
>  	igt_assert(old_fb->stride != new_fb.stride);
> @@ -3186,7 +3188,7 @@ static void basic_subtest(const struct
> test_mode *t)
>  	prepare_subtest(t, pattern);
>  
>  	create_fb(t->format, params->fb.fb->width, params->fb.fb-
> >height,
> -		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &fb2);
> +		  opt.tiling, t->plane, &fb2);
>  	fb1 = params->fb.fb;
>  
>  	for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT;
> method++, r++) {
> @@ -3255,6 +3257,10 @@ static int opt_handler(int option, int
> option_index, void *data)
>  		igt_assert_eq(opt.only_pipes, PIPE_COUNT);
>  		opt.only_pipes = PIPE_DUAL;
>  		break;
> +	case 'l':
> +		igt_assert_eq(strtol(optarg, NULL, 0),
> I915_TILING_Y);

???

> +		opt.tiling =
> igt_fb_tiling_to_mod((uint64_t)strtol(optarg, NULL, 0));

This looks a little bit awkward. Please make the option just be a
string: --tiling x, --tiling y, so later we can add --tiling yf and
such. With this, we'll be able to avoid the igt_fb_tiling_to_mod call.


> +		break;
>  	default:
>  		igt_assert(false);
>  	}
> @@ -3274,7 +3280,8 @@ const char *help_str =
>  "  --shared-fb-x offset        Use 'offset' as the X offset for the
> shared FB\n"
>  "  --shared-fb-y offset        Use 'offset' as the Y offset for the
> shared FB\n"
>  "  --1p-only                   Only run subtests that use 1 pipe\n"
> -"  --2p-only                   Only run subtests that use 2
> pipes\n";
> +"  --2p-only                   Only run subtests that use 2 pipes\n"
> +"  --tiling		       give 2 for y-tiled, default is x-
> tiled\n";

Keep the same coding style, please: no tabs are being used here.

>  
>  static const char *pipes_str(int pipes)
>  {
> @@ -3413,6 +3420,7 @@ int main(int argc, char *argv[])
>  		{ "shared-fb-y",              1, 0, 'y'},
>  		{ "1p-only",                  0, 0, '1'},
>  		{ "2p-only",                  0, 0, '2'},
> +		{ "tiling",                   1, 0, 'l'},
>  		{ 0, 0, 0, 0 }
>  	};
>  
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 4/7] lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method
  2017-03-17 19:15 ` [PATCH 4/7] lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method Praveen Paneri
@ 2017-04-26 14:06   ` Paulo Zanoni
  0 siblings, 0 replies; 15+ messages in thread
From: Paulo Zanoni @ 2017-04-26 14:06 UTC (permalink / raw)
  To: Praveen Paneri, intel-gfx; +Cc: Akash Goel

Em Sáb, 2017-03-18 às 00:45 +0530, Praveen Paneri escreveu:
> From: Akash Goel <akash.goel@intel.com>
> 
> Signed-off-by: Akash Goel <akash.goel@intel.com>
> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
> ---
>  lib/igt_draw.c | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/lib/igt_draw.c b/lib/igt_draw.c
> index fcf8fba..17011d8 100644
> --- a/lib/igt_draw.c
> +++ b/lib/igt_draw.c
> @@ -31,6 +31,7 @@
>  #include "igt_core.h"
>  #include "igt_fb.h"
>  #include "ioctl_wrappers.h"
> +#include "i830_reg.h"
>  
>  /**
>   * SECTION:igt_draw
> @@ -487,6 +488,23 @@ static void draw_rect_blt(int fd, struct
> cmd_data *cmd_data,
>  	blt_cmd_tiling = (tiling) ? XY_COLOR_BLT_TILED : 0;
>  	pitch = (tiling) ? buf->stride / 4 : buf->stride;
>  
> +	if (tiling == I915_TILING_Y) {
> +		/* To change the tile register, insert an
> MI_FLUSH_DW followed by an MI_LOAD_REGISTER_IMM */
> +		BEGIN_BATCH(4, 0);
> +		OUT_BATCH(MI_FLUSH_DW | 2);
> +		OUT_BATCH(0x0);
> +		OUT_BATCH(0x0);
> +		OUT_BATCH(0x0);
> +		ADVANCE_BATCH();
> +
> +		BEGIN_BATCH(4, 0);
> +		OUT_BATCH(MI_LOAD_REGISTER_IMM);
> +		OUT_BATCH(0x22200); /* BCS_SWCTRL */
> +		OUT_BATCH(((0x3 << 16) | 0x3)); /* enable the Y
> tiling */
> +		OUT_BATCH(MI_NOOP);
> +		ADVANCE_BATCH();
> +	}
> +
>  	BEGIN_BATCH(6, 1);
>  	OUT_BATCH(XY_COLOR_BLT_CMD_NOLEN | XY_COLOR_BLT_WRITE_ALPHA
> |
>  		  XY_COLOR_BLT_WRITE_RGB | blt_cmd_tiling |
> blt_cmd_len);
> @@ -497,6 +515,23 @@ static void draw_rect_blt(int fd, struct
> cmd_data *cmd_data,
>  	OUT_BATCH(color);
>  	ADVANCE_BATCH();
>  
> +	if (tiling == I915_TILING_Y) {
> +		/* To change the tile register, insert an
> MI_FLUSH_DW followed by an MI_LOAD_REGISTER_IMM */
> +		BEGIN_BATCH(4, 0);
> +		OUT_BATCH(MI_FLUSH_DW | 2);
> +		OUT_BATCH(0x0);
> +		OUT_BATCH(0x0);
> +		OUT_BATCH(0x0);
> +		ADVANCE_BATCH();
> +
> +		BEGIN_BATCH(4, 0);
> +		OUT_BATCH(MI_LOAD_REGISTER_IMM);
> +		OUT_BATCH(0x22200); /* BCS_SWCTRL */
> +		OUT_BATCH((0x3 << 16)); /* Reset back to X-Tiling
> (default) */
> +		OUT_BATCH(MI_NOOP);
> +		ADVANCE_BATCH();
> +	}

These are two almost identical copies of the same code. Please extract
them to a function that takes the tiling as the argument.

> +
>  	intel_batchbuffer_flush(batch);
>  	intel_batchbuffer_free(batch);
>  }
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 0/7] Add Y-tiling support into IGTs
  2017-04-26 13:46 ` [PATCH 0/7] Add Y-tiling support into IGTs Paulo Zanoni
@ 2017-04-26 14:51   ` Paulo Zanoni
  2017-04-27 12:31     ` Praveen Paneri
  0 siblings, 1 reply; 15+ messages in thread
From: Paulo Zanoni @ 2017-04-26 14:51 UTC (permalink / raw)
  To: Praveen Paneri, intel-gfx

Em Qua, 2017-04-26 às 10:46 -0300, Paulo Zanoni escreveu:
> Em Sáb, 2017-03-18 às 00:45 +0530, Praveen Paneri escreveu:
> > 
> > This series adds Y-tiled buffer creation support into IGT libraries
> > and
> > goes on to use this capability to add support into FBC tests to use
> > Y-tiled buffers.
> 
> I applied this series and the Kernel patch. If I try to run
> kms_draw_crc it just gets stuck eating 100% of the CPU. I suppose
> this
> needs to be debugged, maybe some patch is wrong. Can you reproduce
> this
> behavior?

Just as a note, I tested on SKL. Maybe that's relevant.

> 
> > 
> > 
> > Akash Goel (1):
> >   lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method
> > 
> > Paulo Zanoni (1):
> >   tests/kms_draw_crc: add support for Y tiling
> > 
> > Praveen Paneri (5):
> >   lib/igt_fb: Let others use igt_get_fb_tile_size
> >   lib/igt_fb: Add helper function for tile_to_mod
> >   lib/igt_draw: Add Y-tiling support
> >   igt/kms_frontbuffer_tracking: Add Y-tiling support
> >   igt/kms_fbc_crc.c : Add Y-tile tests
> > 
> >  lib/igt_draw.c                   | 167
> > ++++++++++++++++++++++++++++-
> > ----------
> >  lib/igt_fb.c                     |  29 ++++++-
> >  lib/igt_fb.h                     |   4 +-
> >  tests/kms_draw_crc.c             |  58 ++++++++++----
> >  tests/kms_fbc_crc.c              |  71 +++++++++--------
> >  tests/kms_frontbuffer_tracking.c |  46 ++++++-----
> >  6 files changed, 262 insertions(+), 113 deletions(-)
> > 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 0/7] Add Y-tiling support into IGTs
  2017-04-26 14:51   ` Paulo Zanoni
@ 2017-04-27 12:31     ` Praveen Paneri
  0 siblings, 0 replies; 15+ messages in thread
From: Praveen Paneri @ 2017-04-27 12:31 UTC (permalink / raw)
  To: Paulo Zanoni, intel-gfx

Hi Paulo,

Thanks for your review.

On Wednesday 26 April 2017 08:21 PM, Paulo Zanoni wrote:
> Em Qua, 2017-04-26 às 10:46 -0300, Paulo Zanoni escreveu:
>> Em Sáb, 2017-03-18 às 00:45 +0530, Praveen Paneri escreveu:
>>>
>>> This series adds Y-tiled buffer creation support into IGT libraries
>>> and
>>> goes on to use this capability to add support into FBC tests to use
>>> Y-tiled buffers.
>>
>> I applied this series and the Kernel patch. If I try to run
>> kms_draw_crc it just gets stuck eating 100% of the CPU. I suppose
>> this
>> needs to be debugged, maybe some patch is wrong. Can you reproduce
>> this
>> behavior?
>
> Just as a note, I tested on SKL. Maybe that's relevant.
I had tested this on APL and it was working fine. I will try to run it 
on SKL as well.
Will address your comments the resend this series soon.

thanks,
Praveen
>
>>
>>>
>>>
>>> Akash Goel (1):
>>>   lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method
>>>
>>> Paulo Zanoni (1):
>>>   tests/kms_draw_crc: add support for Y tiling
>>>
>>> Praveen Paneri (5):
>>>   lib/igt_fb: Let others use igt_get_fb_tile_size
>>>   lib/igt_fb: Add helper function for tile_to_mod
>>>   lib/igt_draw: Add Y-tiling support
>>>   igt/kms_frontbuffer_tracking: Add Y-tiling support
>>>   igt/kms_fbc_crc.c : Add Y-tile tests
>>>
>>>  lib/igt_draw.c                   | 167
>>> ++++++++++++++++++++++++++++-
>>> ----------
>>>  lib/igt_fb.c                     |  29 ++++++-
>>>  lib/igt_fb.h                     |   4 +-
>>>  tests/kms_draw_crc.c             |  58 ++++++++++----
>>>  tests/kms_fbc_crc.c              |  71 +++++++++--------
>>>  tests/kms_frontbuffer_tracking.c |  46 ++++++-----
>>>  6 files changed, 262 insertions(+), 113 deletions(-)
>>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-04-27 12:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17 19:15 [PATCH 0/7] Add Y-tiling support into IGTs Praveen Paneri
2017-03-17 19:15 ` [PATCH 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size Praveen Paneri
2017-03-20  9:48   ` Daniel Vetter
2017-03-21  8:20     ` Praveen Paneri
2017-03-17 19:15 ` [PATCH 2/7] lib/igt_fb: Add helper function for tile_to_mod Praveen Paneri
2017-03-17 19:15 ` [PATCH 3/7] lib/igt_draw: Add Y-tiling support Praveen Paneri
2017-03-17 19:15 ` [PATCH 4/7] lib/igt_draw: Add Y-tiling support for IGT_DRAW_BLT method Praveen Paneri
2017-04-26 14:06   ` Paulo Zanoni
2017-03-17 19:15 ` [PATCH 5/7] tests/kms_draw_crc: add support for Y tiling Praveen Paneri
2017-03-17 19:15 ` [PATCH 6/7] igt/kms_frontbuffer_tracking: Add Y-tiling support Praveen Paneri
2017-04-26 14:02   ` Paulo Zanoni
2017-03-17 19:15 ` [PATCH 7/7] igt/kms_fbc_crc.c : Add Y-tile tests Praveen Paneri
2017-04-26 13:46 ` [PATCH 0/7] Add Y-tiling support into IGTs Paulo Zanoni
2017-04-26 14:51   ` Paulo Zanoni
2017-04-27 12:31     ` Praveen Paneri

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.