Skip to contentSkip to conversation

lib/igt_draw: Refactor get_tiling calls

PATCH Superseded Imre Deak 4 participants 28 messages Feb 7, 2020 – Feb 12, 2020 Library code

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Imre Deak

author
#0 lore raw

PATCH 1/8 lib/igt_draw: Refactor get_tiling calls

From: Vanshidhar Konda <[email protected]>

Simplify the number of places from which gem_get_tiling method is called and call it only if the device has support in hardware for tiling.

v2:
- Use gem_available_fences() to check for HW detiling.

---
 lib/igt_draw.c                   | 56 +++++++++++++++++---------------
 lib/igt_draw.h                   |  5 +--
 tests/kms_frontbuffer_tracking.c |  8 +++--
 3 files changed, 37 insertions(+), 32 deletions(-)
lib/igt_draw.c +29 -27
index 6950bc49..d227a53a 100644
@@ -333,20 +333,19 @@ static void draw_rect_ptr_tiled(void *ptr, uint32_t stride, uint32_t tiling,
 }
 
 static void draw_rect_mmap_cpu(int fd, struct buf_data *buf, struct rect *rect,
-			       uint32_t color)
+			       uint32_t tiling, uint32_t swizzle, uint32_t color)
 {
 	uint32_t *ptr;
-	uint32_t tiling, swizzle;
 
 	gem_set_domain(fd, buf->handle, I915_GEM_DOMAIN_CPU,
 		       I915_GEM_DOMAIN_CPU);
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
 
 	/* We didn't implement suport for the older tiling methods yet. */
 	if (tiling != I915_TILING_NONE)
 		igt_require(intel_gen(intel_get_drm_devid(fd)) >= 5);
 
-	ptr = gem_mmap__cpu(fd, buf->handle, 0, PAGE_ALIGN(buf->size), 0);
+	ptr = gem_mmap__cpu(fd, buf->handle, 0, PAGE_ALIGN(buf->size),
+			    PROT_READ | PROT_WRITE);
 
 	switch (tiling) {
 	case I915_TILING_NONE:
@@ -384,14 +383,12 @@ static void draw_rect_mmap_gtt(int fd, struct buf_data *buf, struct rect *rect,
 }
 
 static void draw_rect_mmap_wc(int fd, struct buf_data *buf, struct rect *rect,
-			      uint32_t color)
+			      uint32_t tiling, uint32_t swizzle, uint32_t color)
 {
 	uint32_t *ptr;
-	uint32_t tiling, swizzle;
 
 	gem_set_domain(fd, buf->handle, I915_GEM_DOMAIN_GTT,
 		       I915_GEM_DOMAIN_GTT);
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
 
 	/* We didn't implement suport for the older tiling methods yet. */
 	if (tiling != I915_TILING_NONE)
@@ -495,12 +492,9 @@ static void draw_rect_pwrite_tiled(int fd, struct buf_data *buf,
 }
 
 static void draw_rect_pwrite(int fd, struct buf_data *buf,
-			     struct rect *rect, uint32_t color)
+			     struct rect *rect, uint32_t tiling,
+			     uint32_t swizzle, uint32_t color)
 {
-	uint32_t tiling, swizzle;
-
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
-
 	switch (tiling) {
 	case I915_TILING_NONE:
 		draw_rect_pwrite_untiled(fd, buf, rect, color);
@@ -517,6 +511,7 @@ static void draw_rect_pwrite(int fd, struct buf_data *buf,
 
 static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 			  struct buf_data *buf, struct rect *rect,
+			  uint32_t tiling, uint32_t swizzle,
 			  uint32_t color)
 {
 	drm_intel_bo *dst;
@@ -524,11 +519,8 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 	int blt_cmd_len, blt_cmd_tiling, blt_cmd_depth;
 	uint32_t devid = intel_get_drm_devid(fd);
 	int gen = intel_gen(devid);
-	uint32_t tiling, swizzle;
 	int pitch;
 
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
-
 	dst = gem_handle_to_libdrm_bo(cmd_data->bufmgr, fd, "", buf->handle);
 	igt_assert(dst);
 
@@ -574,6 +566,7 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 
 static void draw_rect_render(int fd, struct cmd_data *cmd_data,
 			     struct buf_data *buf, struct rect *rect,
+			     uint32_t tiling, uint32_t swizzle,
 			     uint32_t color)
 {
 	drm_intel_bo *src, *dst;
@@ -581,21 +574,18 @@ static void draw_rect_render(int fd, struct cmd_data *cmd_data,
 	igt_render_copyfunc_t rendercopy = igt_get_render_copyfunc(devid);
 	struct igt_buf src_buf = {}, dst_buf = {};
 	struct intel_batchbuffer *batch;
-	uint32_t tiling, swizzle;
 	struct buf_data tmp;
 	int pixel_size = buf->bpp / 8;
 
 	igt_skip_on(!rendercopy);
 
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
-
 	/* We create a temporary buffer and copy from it using rendercopy. */
 	tmp.size = rect->w * rect->h * pixel_size;
 	tmp.handle = gem_create(fd, tmp.size);
 	tmp.stride = rect->w * pixel_size;
 	tmp.bpp = buf->bpp;
 	draw_rect_mmap_cpu(fd, &tmp, &(struct rect){0, 0, rect->w, rect->h},
-			   color);
+			   I915_TILING_NONE, I915_BIT_6_SWIZZLE_NONE, color);
 
 	src = gem_handle_to_libdrm_bo(cmd_data->bufmgr, fd, "", tmp.handle);
 	igt_assert(src);
@@ -647,9 +637,12 @@ static void draw_rect_render(int fd, struct cmd_data *cmd_data,
  */
 void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		   uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp)
+		   uint32_t tiling, enum igt_draw_method method,
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp)
 {
+	uint32_t buf_tiling, swizzle;
+
 	struct cmd_data cmd_data = {
 		.bufmgr = bufmgr,
 		.context = context,
@@ -667,24 +660,32 @@ void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		.h = rect_h,
 	};
 
+	swizzle = I915_BIT_6_SWIZZLE_NONE;
+	if (tiling != I915_TILING_NONE && gem_available_fences(fd)) {
+		gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);
+		igt_assert(tiling == buf_tiling);
+	}
+
 	switch (method) {
 	case IGT_DRAW_MMAP_CPU:
-		draw_rect_mmap_cpu(fd, &buf, &rect, color);
+		draw_rect_mmap_cpu(fd, &buf, &rect, tiling, swizzle, color);
 		break;
 	case IGT_DRAW_MMAP_GTT:
 		draw_rect_mmap_gtt(fd, &buf, &rect, color);
 		break;
 	case IGT_DRAW_MMAP_WC:
-		draw_rect_mmap_wc(fd, &buf, &rect, color);
+		draw_rect_mmap_wc(fd, &buf, &rect, tiling, swizzle, color);
 		break;
 	case IGT_DRAW_PWRITE:
-		draw_rect_pwrite(fd, &buf, &rect, color);
+		draw_rect_pwrite(fd, &buf, &rect, tiling, swizzle, color);
 		break;
 	case IGT_DRAW_BLT:
-		draw_rect_blt(fd, &cmd_data, &buf, &rect, color);
+		draw_rect_blt(fd, &cmd_data, &buf, &rect, tiling, swizzle,
+			      color);
 		break;
 	case IGT_DRAW_RENDER:
-		draw_rect_render(fd, &cmd_data, &buf, &rect, color);
+		draw_rect_render(fd, &cmd_data, &buf, &rect, tiling, swizzle,
+				 color);
 		break;
 	default:
 		igt_assert(false);
@@ -715,7 +716,8 @@ void igt_draw_rect_fb(int fd, drm_intel_bufmgr *bufmgr,
 		      int rect_w, int rect_h, uint32_t color)
 {
 	igt_draw_rect(fd, bufmgr, context, fb->gem_handle, fb->size, fb->strides[0],
-		      method, rect_x, rect_y, rect_w, rect_h, color,
+		      igt_fb_mod_to_tiling(fb->modifier), method,
+		      rect_x, rect_y, rect_w, rect_h, color,
 		      igt_drm_format_to_bpp(fb->drm_format));
 }
 
lib/igt_draw.h +3 -2
index b030131e..ec146754 100644
@@ -52,8 +52,9 @@ const char *igt_draw_get_method_name(enum igt_draw_method method);
 
 void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		   uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp);
+		   uint32_t tiling, enum igt_draw_method method,
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp);
 
 void igt_draw_rect_fb(int fd, drm_intel_bufmgr *bufmgr,
 		      drm_intel_context *context, struct igt_fb *fb,
tests/kms_frontbuffer_tracking.c +5 -3
index 2c765c34..9c2c3a5d 100644
@@ -291,6 +291,7 @@ struct {
 	int height;
 	uint32_t color;
 	int bpp;
+	uint32_t tiling;
 } busy_thread = {
 	.stop = true,
 };
@@ -1126,9 +1127,9 @@ static void *busy_thread_func(void *data)
 	while (!busy_thread.stop)
 		igt_draw_rect(drm.fd, drm.bufmgr, NULL, busy_thread.handle,
 			      busy_thread.size, busy_thread.stride,
-			      IGT_DRAW_BLT, 0, 0, busy_thread.width,
-			      busy_thread.height, busy_thread.color,
-			      busy_thread.bpp);
+			      busy_thread.tiling, IGT_DRAW_BLT, 0, 0,
+			      busy_thread.width, busy_thread.height,
+			      busy_thread.color, busy_thread.bpp);
 
 	pthread_exit(0);
 }
@@ -1146,6 +1147,7 @@ static void start_busy_thread(struct igt_fb *fb)
 	busy_thread.height = fb->height;
 	busy_thread.color = pick_color(fb, COLOR_PRIM_BG);
 	busy_thread.bpp = igt_drm_format_to_bpp(fb->drm_format);
+	busy_thread.tiling = igt_fb_mod_to_tiling(fb->modifier);
 
 	rc = pthread_create(&busy_thread.thread, NULL, busy_thread_func, NULL);
 	igt_assert_eq(rc, 0);
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#1 lore raw

PATCH 2/8 tests/kms_frontbuffer_tracking: Skip set tiling calls if not supported

From: Vanshidhar Konda <[email protected]>

Skip the method that is setting tiling with invalid strides if the hardware does not support HW for tiling/de-tiling.

v2:
- Use gem_available_fences() to check for HW detiling.

---
 tests/kms_frontbuffer_tracking.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +2 -1
index 9c2c3a5d..724f5d16 100644
@@ -2833,7 +2833,8 @@ static void badstride_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	int rc;
 
-	try_invalid_strides();
+	if (gem_available_fences(drm.fd))
+		try_invalid_strides();
 
 	prepare_subtest(t, NULL);
 
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 2/8
#2 lore raw

Re: [igt-dev] [PATCH i-g-t 2/8] tests/kms_frontbuffer_tracking: Skip set tiling calls if not supported

Quoted 8 lines · Imre Deak

From: Vanshidhar Konda <[email protected]>

Skip the method that is setting tiling with invalid strides if the hardware does not support HW for tiling/de-tiling.

v2:
- Use gem_available_fences() to check for HW detiling.

Quoted 24 lines
---
 tests/kms_frontbuffer_tracking.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +2 -2
index 9c2c3a5d..724f5d16 100644
@@ -2833,7 +2833,8 @@ static void badstride_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	int rc;
 
-	try_invalid_strides();
+	if (gem_available_fences(drm.fd))
+		try_invalid_strides();
 
 	prepare_subtest(t, NULL);
 
--

2.23.1

Quoted 4 lines

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v1 2/8
#3 lore raw

Re: [igt-dev] [PATCH i-g-t 2/8] tests/kms_frontbuffer_tracking: Skip set tiling calls if not supported

In reply to Imre Deak
Quoted 10 lines · Imre Deak

From: Vanshidhar Konda <[email protected]>

Skip the method that is setting tiling with invalid strides if the hardware does not support HW for tiling/de-tiling.

v2:
- Use gem_available_fences() to check for HW detiling.

Quoted 25 lines
---
 tests/kms_frontbuffer_tracking.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +2 -1
index 9c2c3a5d..724f5d16 100644
@@ -2833,7 +2833,8 @@ static void badstride_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	int rc;
 
-	try_invalid_strides();
+	if (gem_available_fences(drm.fd))
+		try_invalid_strides();
 
 	prepare_subtest(t, NULL);
 
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 9 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#4 lore raw

PATCH 3/8 tests/kms_available_modes_crc: Don't set tiling for framebuffer

In reply to Imre Deak

From: Vanshidhar Konda <[email protected]>

The GEM object used for the framebuffer does not need tiling to be set on it as the entire framebuffer is being filled with the same value - tiling will not impact the end value of the buffer.

---
 tests/kms_available_modes_crc.c | 6 ------
 1 file changed, 6 deletions(-)
tests/kms_available_modes_crc.c +0 -6
index 12761343..ed43d1fb 100644
@@ -211,17 +211,11 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->buf = (unsigned char *)calloc(data->size*2, 1);
 
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
-	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
-			       igt_fb_mod_to_tiling(tiling),
-			       data->fb.strides[0]);
-
 	data->fb.gem_handle = data->gem_handle;
 	data->fb.width = w;
 	data->fb.height = h;
 	fill_in_fb(data, output, plane, format);
 
-	igt_assert_eq(ret, 0);
-
 	ret = __kms_addfb(data->gfx_fd, data->gem_handle, w, h,
 			  format, tiling, data->fb.strides, data->fb.offsets,
 			  num_planes, LOCAL_DRM_MODE_FB_MODIFIERS,
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 3/8
#5 lore raw

Re: [igt-dev] [PATCH i-g-t 3/8] tests/kms_available_modes_crc: Don't set tiling for framebuffer

Quoted 8 lines · Imre Deak

From: Vanshidhar Konda <[email protected]>

The GEM object used for the framebuffer does not need tiling to be set on it as the entire framebuffer is being filled with the same value - tiling will not impact the end value of the buffer.

Quoted 33 lines
---
 tests/kms_available_modes_crc.c | 6 ------
 1 file changed, 6 deletions(-)
tests/kms_available_modes_crc.c +0 -6
index 12761343..ed43d1fb 100644
@@ -211,17 +211,11 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->buf = (unsigned char *)calloc(data->size*2, 1);
 
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
-	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
-			       igt_fb_mod_to_tiling(tiling),
-			       data->fb.strides[0]);
-
 	data->fb.gem_handle = data->gem_handle;
 	data->fb.width = w;
 	data->fb.height = h;
 	fill_in_fb(data, output, plane, format);
 
-	igt_assert_eq(ret, 0);
-
 	ret = __kms_addfb(data->gfx_fd, data->gem_handle, w, h,
 			  format, tiling, data->fb.strides, data->fb.offsets,
 			  num_planes, LOCAL_DRM_MODE_FB_MODIFIERS,
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 9 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#6 lore raw

PATCH 4/8 tests/kms_draw_crc: Skip GTT subtests on platforms w/o aperture

In reply to Imre Deak

Subtests drawing through a GTT mapping are not relevant on platforms w/o a GTT aperture, so skip them.

---
 tests/kms_draw_crc.c | 2 ++
 1 file changed, 2 insertions(+)
tests/kms_draw_crc.c +2 -0
index ea14db9a..6de9feae 100644
@@ -178,6 +178,8 @@ static void draw_method_subtest(enum igt_draw_method method,
 	igt_crc_t crc;
 
 	igt_skip_on(method == IGT_DRAW_MMAP_WC && !gem_mmap__has_wc(drm_fd));
+	igt_skip_on(method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm_fd));
 
 	igt_require(format_is_supported(formats[format_index], tiling));
 
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 4/8
#7 lore raw

Re: [igt-dev] [PATCH i-g-t 4/8] tests/kms_draw_crc: Skip GTT subtests on platforms w/o aperture

Quoted 4 lines · Imre Deak

Subtests drawing through a GTT mapping are not relevant on platforms w/o a GTT aperture, so skip them.

Quoted 24 lines
---
 tests/kms_draw_crc.c | 2 ++
 1 file changed, 2 insertions(+)
tests/kms_draw_crc.c +2 -0
index ea14db9a..6de9feae 100644
@@ -178,6 +178,8 @@ static void draw_method_subtest(enum igt_draw_method method,
 	igt_crc_t crc;
 
 	igt_skip_on(method == IGT_DRAW_MMAP_WC && !gem_mmap__has_wc(drm_fd));
+	igt_skip_on(method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm_fd));
 
 	igt_require(format_is_supported(formats[format_index], tiling));
 
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 9 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#8 lore raw

PATCH 5/8 tests/kms_draw_crc: Fix generating reference CRCs on platforms w/o aperture

In reply to Imre Deak

Generate reference CRCs by drawing through a CPU mapping, which is also available on platforms w/o a GTT aperture.

---
 tests/kms_draw_crc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/kms_draw_crc.c +2 -2
index 6de9feae..f9d4b178 100644
@@ -187,7 +187,7 @@ static void draw_method_subtest(enum igt_draw_method method,
 	 * comparison. Cache the value so we don't recompute it for every single
 	 * subtest. */
 	if (!base_crcs[format_index].set) {
-		get_method_crc(IGT_DRAW_MMAP_GTT, formats[format_index],
+		get_method_crc(IGT_DRAW_MMAP_CPU, formats[format_index],
 			       LOCAL_DRM_FORMAT_MOD_NONE,
 			       &base_crcs[format_index].crc);
 		base_crcs[format_index].set = true;
@@ -225,7 +225,7 @@ static void fill_fb_subtest(void)
 	igt_create_fb(drm_fd, ms.mode->hdisplay, ms.mode->vdisplay,
 		      DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, &fb);
 
-	igt_draw_rect_fb(drm_fd, bufmgr, NULL, &fb, IGT_DRAW_MMAP_GTT,
+	igt_draw_rect_fb(drm_fd, bufmgr, NULL, &fb, IGT_DRAW_MMAP_CPU,
 			 0, 0, fb.width, fb.height, 0xFF);
 
 	rc = drmModeSetCrtc(drm_fd, ms.crtc_id, fb.fb_id, 0, 0,
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#9 lore raw

Re: [igt-dev] [PATCH i-g-t 5/8] tests/kms_draw_crc: Fix generating reference CRCs on platforms w/o aperture

Quoted 13 lines · Imre Deak

Generate reference CRCs by drawing through a CPU mapping, which is also available on platforms w/o a GTT aperture.

---
 tests/kms_draw_crc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/kms_draw_crc.c +0 -0
index 6de9feae..f9d4b178 100644

tests/kms_draw_crc.c static void draw_method_subtest(enum igt_draw_method method, · line 188

Quoted 2 lines
tests/kms_draw_crc.c +0 -0
@@ -187,7 +187,7 @@ static void draw_method_subtest(enum igt_draw_method method,
 	 * comparison. Cache the value so we don't recompute it for every single
 	 * subtest. */

It doesn't show in the context here, but the comment line just above this says "Use IGT_DRAW_MMAP_GTT" --- that should be updated to match the code change below.

Matt

Quoted 22 lines
tests/kms_draw_crc.c +2 -2
 	if (!base_crcs[format_index].set) {
-		get_method_crc(IGT_DRAW_MMAP_GTT, formats[format_index],
+		get_method_crc(IGT_DRAW_MMAP_CPU, formats[format_index],
 			       LOCAL_DRM_FORMAT_MOD_NONE,
 			       &base_crcs[format_index].crc);
 		base_crcs[format_index].set = true;
@@ -225,7 +225,7 @@ static void fill_fb_subtest(void)
 	igt_create_fb(drm_fd, ms.mode->hdisplay, ms.mode->vdisplay,
 		      DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, &fb);
 
-	igt_draw_rect_fb(drm_fd, bufmgr, NULL, &fb, IGT_DRAW_MMAP_GTT,
+	igt_draw_rect_fb(drm_fd, bufmgr, NULL, &fb, IGT_DRAW_MMAP_CPU,
 			 0, 0, fb.width, fb.height, 0xFF);
 
 	rc = drmModeSetCrtc(drm_fd, ms.crtc_id, fb.fb_id, 0, 0,
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 9 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#10 lore raw

Re: [igt-dev] [PATCH i-g-t 5/8] tests/kms_draw_crc: Fix generating reference CRCs on platforms w/o aperture

Quoted 9 lines · Matt Roper
Quoted 8 lines · Imre Deak

Generate reference CRCs by drawing through a CPU mapping, which is also available on platforms w/o a GTT aperture.

---
 tests/kms_draw_crc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 11 lines

tests/kms_draw_crc.c static void draw_method_subtest(enum igt_draw_method method, · line 188

Quoted 7 lines
tests/kms_draw_crc.c +0 -0
index 6de9feae..f9d4b178 100644
@@ -187,7 +187,7 @@ static void draw_method_subtest(enum igt_draw_method method,
 	 * comparison. Cache the value so we don't recompute it for every single
 	 * subtest. */

It doesn't show in the context here, but the comment line just above this says "Use IGT_DRAW_MMAP_GTT" --- that should be updated to match the code change below.

Ok.

Quoted 18 lines

Matt

Quoted 14 lines
tests/kms_draw_crc.c +2 -2
 	if (!base_crcs[format_index].set) {
-		get_method_crc(IGT_DRAW_MMAP_GTT, formats[format_index],
+		get_method_crc(IGT_DRAW_MMAP_CPU, formats[format_index],
 			       LOCAL_DRM_FORMAT_MOD_NONE,
 			       &base_crcs[format_index].crc);
 		base_crcs[format_index].set = true;
@@ -225,7 +225,7 @@ static void fill_fb_subtest(void)
 	igt_create_fb(drm_fd, ms.mode->hdisplay, ms.mode->vdisplay,
 		      DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, &fb);
 
-	igt_draw_rect_fb(drm_fd, bufmgr, NULL, &fb, IGT_DRAW_MMAP_GTT,
+	igt_draw_rect_fb(drm_fd, bufmgr, NULL, &fb, IGT_DRAW_MMAP_CPU,
 			 0, 0, fb.width, fb.height, 0xFF);
 
Quoted 15 lines
Quoted 8 lines
tests/kms_draw_crc.c +0 -0
 	rc = drmModeSetCrtc(drm_fd, ms.crtc_id, fb.fb_id, 0, 0,
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 5 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

author
#11 lore raw

PATCH 6/8 tests/kms_frontbuffer_tracking: Skip GTT subtests on platforms w/o aperture

In reply to Imre Deak

Subtests that draw through a GTT mapping are not relevent on a platform w/o GTT aperture, so skip them.

---
 tests/kms_frontbuffer_tracking.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
tests/kms_frontbuffer_tracking.c +32 -0
index 724f5d16..310c8b7b 100644
@@ -1934,6 +1934,9 @@ static void draw_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	struct fb_region *target;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	switch (t->screen) {
 	case SCREEN_PRIM:
 		if (t->method != IGT_DRAW_MMAP_GTT && t->plane == PLANE_PRI)
@@ -2032,6 +2035,11 @@ static void multidraw_subtest(const struct test_mode *t)
 			igt_debug("Methods %s and %s\n",
 				  igt_draw_get_method_name(m1),
 				  igt_draw_get_method_name(m2));
+
+			igt_skip_on((m1 == IGT_DRAW_MMAP_GTT ||
+				     m2 == IGT_DRAW_MMAP_GTT) &&
+				    !gem_has_mappable_ggtt(drm.fd));
+
 			for (r = 0; r < pattern->n_rects; r++) {
 				used_method = (r % 2 == 0) ? m1 : m2;
 
@@ -2140,6 +2148,9 @@ static void badformat_subtest(const struct test_mode *t)
  */
 static void format_draw_subtest(const struct test_mode *t)
 {
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	if (format_is_valid(t->feature, t->format))
 		draw_subtest(t);
 	else
@@ -2276,6 +2287,9 @@ static void flip_subtest(const struct test_mode *t)
 	struct draw_pattern_info *pattern = &pattern1;
 	enum color bg_color;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	switch (t->screen) {
 	case SCREEN_PRIM:
 		assertions |= ASSERT_LAST_ACTION_CHANGED;
@@ -2335,6 +2349,9 @@ static void fliptrack_subtest(const struct test_mode *t, enum flip_type type)
 	struct modeset_params *params = pick_params(t);
 	struct draw_pattern_info *pattern = &pattern1;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	create_fb(t->format, params->primary.fb->width, params->primary.fb->height,
@@ -2383,6 +2400,9 @@ static void move_subtest(const struct test_mode *t)
 	struct fb_region *reg = pick_target(t, params);
 	bool repeat = false;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	/* Just paint the right color since we start at 0x0. */
@@ -2434,6 +2454,9 @@ static void onoff_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	struct draw_pattern_info *pattern = &pattern3;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	/* Just paint the right color since we start at 0x0. */
@@ -2493,6 +2516,9 @@ static void fullscreen_plane_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	int assertions;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	rect = pattern->get_rect(&params->primary, 0);
@@ -2744,6 +2770,9 @@ static void farfromfence_subtest(const struct test_mode *t)
 	int max_height, assertions = 0;
 	int gen = intel_gen(intel_get_drm_devid(drm.fd));
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	switch (gen) {
 	case 2:
 		max_height = 2048;
@@ -3025,6 +3054,9 @@ static void basic_subtest(const struct test_mode *t)
 	fb1 = params->primary.fb;
 
 	for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++, r++) {
+		igt_skip_on(method == IGT_DRAW_MMAP_GTT &&
+			    !gem_has_mappable_ggtt(drm.fd));
+
 		if (r == pattern->n_rects) {
 			params->primary.fb = (params->primary.fb == fb1) ? &fb2 : fb1;
 
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#12 lore raw

Re: [igt-dev] [PATCH i-g-t 6/8] tests/kms_frontbuffer_tracking: Skip GTT subtests on platforms w/o aperture

Quoted 2 lines · Imre Deak

Subtests that draw through a GTT mapping are not relevent on a platform w/o GTT aperture, so skip them.

Could this check be pushed down into check_test_requirements()?

Matt

Quoted 119 lines
---
 tests/kms_frontbuffer_tracking.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
tests/kms_frontbuffer_tracking.c +32 -0
index 724f5d16..310c8b7b 100644
@@ -1934,6 +1934,9 @@ static void draw_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	struct fb_region *target;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	switch (t->screen) {
 	case SCREEN_PRIM:
 		if (t->method != IGT_DRAW_MMAP_GTT && t->plane == PLANE_PRI)
@@ -2032,6 +2035,11 @@ static void multidraw_subtest(const struct test_mode *t)
 			igt_debug("Methods %s and %s\n",
 				  igt_draw_get_method_name(m1),
 				  igt_draw_get_method_name(m2));
+
+			igt_skip_on((m1 == IGT_DRAW_MMAP_GTT ||
+				     m2 == IGT_DRAW_MMAP_GTT) &&
+				    !gem_has_mappable_ggtt(drm.fd));
+
 			for (r = 0; r < pattern->n_rects; r++) {
 				used_method = (r % 2 == 0) ? m1 : m2;
 
@@ -2140,6 +2148,9 @@ static void badformat_subtest(const struct test_mode *t)
  */
 static void format_draw_subtest(const struct test_mode *t)
 {
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	if (format_is_valid(t->feature, t->format))
 		draw_subtest(t);
 	else
@@ -2276,6 +2287,9 @@ static void flip_subtest(const struct test_mode *t)
 	struct draw_pattern_info *pattern = &pattern1;
 	enum color bg_color;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	switch (t->screen) {
 	case SCREEN_PRIM:
 		assertions |= ASSERT_LAST_ACTION_CHANGED;
@@ -2335,6 +2349,9 @@ static void fliptrack_subtest(const struct test_mode *t, enum flip_type type)
 	struct modeset_params *params = pick_params(t);
 	struct draw_pattern_info *pattern = &pattern1;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	create_fb(t->format, params->primary.fb->width, params->primary.fb->height,
@@ -2383,6 +2400,9 @@ static void move_subtest(const struct test_mode *t)
 	struct fb_region *reg = pick_target(t, params);
 	bool repeat = false;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	/* Just paint the right color since we start at 0x0. */
@@ -2434,6 +2454,9 @@ static void onoff_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	struct draw_pattern_info *pattern = &pattern3;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	/* Just paint the right color since we start at 0x0. */
@@ -2493,6 +2516,9 @@ static void fullscreen_plane_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	int assertions;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	rect = pattern->get_rect(&params->primary, 0);
@@ -2744,6 +2770,9 @@ static void farfromfence_subtest(const struct test_mode *t)
 	int max_height, assertions = 0;
 	int gen = intel_gen(intel_get_drm_devid(drm.fd));
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	switch (gen) {
 	case 2:
 		max_height = 2048;
@@ -3025,6 +3054,9 @@ static void basic_subtest(const struct test_mode *t)
 	fb1 = params->primary.fb;
 
 	for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++, r++) {
+		igt_skip_on(method == IGT_DRAW_MMAP_GTT &&
+			    !gem_has_mappable_ggtt(drm.fd));
+
 		if (r == pattern->n_rects) {
 			params->primary.fb = (params->primary.fb == fb1) ? &fb2 : fb1;
 
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 9 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#13 lore raw

Re: [igt-dev] [PATCH i-g-t 6/8] tests/kms_frontbuffer_tracking: Skip GTT subtests on platforms w/o aperture

Quoted 5 lines · Matt Roper
Quoted 2 lines · Imre Deak

Subtests that draw through a GTT mapping are not relevent on a platform w/o GTT aperture, so skip them.

Could this check be pushed down into check_test_requirements()?

The requirement wouldn't be correct for all subtests and for some others we need to check something else than t->method.

Quoted 114 lines

Matt

Quoted 112 lines
---
 tests/kms_frontbuffer_tracking.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
tests/kms_frontbuffer_tracking.c +32 -0
index 724f5d16..310c8b7b 100644
@@ -1934,6 +1934,9 @@ static void draw_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	struct fb_region *target;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	switch (t->screen) {
 	case SCREEN_PRIM:
 		if (t->method != IGT_DRAW_MMAP_GTT && t->plane == PLANE_PRI)
@@ -2032,6 +2035,11 @@ static void multidraw_subtest(const struct test_mode *t)
 			igt_debug("Methods %s and %s\n",
 				  igt_draw_get_method_name(m1),
 				  igt_draw_get_method_name(m2));
+
+			igt_skip_on((m1 == IGT_DRAW_MMAP_GTT ||
+				     m2 == IGT_DRAW_MMAP_GTT) &&
+				    !gem_has_mappable_ggtt(drm.fd));
+
 			for (r = 0; r < pattern->n_rects; r++) {
 				used_method = (r % 2 == 0) ? m1 : m2;
 
@@ -2140,6 +2148,9 @@ static void badformat_subtest(const struct test_mode *t)
  */
 static void format_draw_subtest(const struct test_mode *t)
 {
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	if (format_is_valid(t->feature, t->format))
 		draw_subtest(t);
 	else
@@ -2276,6 +2287,9 @@ static void flip_subtest(const struct test_mode *t)
 	struct draw_pattern_info *pattern = &pattern1;
 	enum color bg_color;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	switch (t->screen) {
 	case SCREEN_PRIM:
 		assertions |= ASSERT_LAST_ACTION_CHANGED;
@@ -2335,6 +2349,9 @@ static void fliptrack_subtest(const struct test_mode *t, enum flip_type type)
 	struct modeset_params *params = pick_params(t);
 	struct draw_pattern_info *pattern = &pattern1;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	create_fb(t->format, params->primary.fb->width, params->primary.fb->height,
@@ -2383,6 +2400,9 @@ static void move_subtest(const struct test_mode *t)
 	struct fb_region *reg = pick_target(t, params);
 	bool repeat = false;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	/* Just paint the right color since we start at 0x0. */
@@ -2434,6 +2454,9 @@ static void onoff_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	struct draw_pattern_info *pattern = &pattern3;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	/* Just paint the right color since we start at 0x0. */
@@ -2493,6 +2516,9 @@ static void fullscreen_plane_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	int assertions;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	rect = pattern->get_rect(&params->primary, 0);
@@ -2744,6 +2770,9 @@ static void farfromfence_subtest(const struct test_mode *t)
 	int max_height, assertions = 0;
 	int gen = intel_gen(intel_get_drm_devid(drm.fd));
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	switch (gen) {
 	case 2:
 		max_height = 2048;
@@ -3025,6 +3054,9 @@ static void basic_subtest(const struct test_mode *t)
 	fb1 = params->primary.fb;
 
 	for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++, r++) {
+		igt_skip_on(method == IGT_DRAW_MMAP_GTT &&
+			    !gem_has_mappable_ggtt(drm.fd));
+
 		if (r == pattern->n_rects) {
 			params->primary.fb = (params->primary.fb == fb1) ? &fb2 : fb1;
 
Quoted 14 lines
Quoted 7 lines
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 5 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

author
#14 lore raw

PATCH 7/8 lib/igt_draw: Fix igt_draw_fill_fb() on platforms w/o aperture

In reply to Imre Deak

Draw through a CPU mapping on platforms w/o a GTT aperture.

---
 lib/igt_draw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/igt_draw.c +1 -1
index d227a53a..c720a4c2 100644
@@ -731,6 +731,6 @@ void igt_draw_rect_fb(int fd, drm_intel_bufmgr *bufmgr,
  */
 void igt_draw_fill_fb(int fd, struct igt_fb *fb, uint32_t color)
 {
-	igt_draw_rect_fb(fd, NULL, NULL, fb, IGT_DRAW_MMAP_GTT,
+	igt_draw_rect_fb(fd, NULL, NULL, fb, IGT_DRAW_MMAP_CPU,
 			 0, 0, fb->width, fb->height, color);
 }
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 7/8
#15 lore raw

Re: [igt-dev] [PATCH i-g-t 7/8] lib/igt_draw: Fix igt_draw_fill_fb() on platforms w/o aperture

Quoted 1 line · Imre Deak

Draw through a CPU mapping on platforms w/o a GTT aperture.

Quoted 25 lines
---
 lib/igt_draw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/igt_draw.c +1 -1
index d227a53a..c720a4c2 100644
@@ -731,6 +731,6 @@ void igt_draw_rect_fb(int fd, drm_intel_bufmgr *bufmgr,
  */
 void igt_draw_fill_fb(int fd, struct igt_fb *fb, uint32_t color)
 {
-	igt_draw_rect_fb(fd, NULL, NULL, fb, IGT_DRAW_MMAP_GTT,
+	igt_draw_rect_fb(fd, NULL, NULL, fb, IGT_DRAW_MMAP_CPU,
 			 0, 0, fb->width, fb->height, color);
 }
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 9 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#16 lore raw

PATCH 8/8 lib/igt_fb: Make sure tiled YUV framebuffers are fully cleared

In reply to Imre Deak

For tiled FBs that are mapped in an other way than a GTT map we need to clear all tile-rows. Clearing only the first stride*height bytes may leave tiles at the end of the FB uncleared.

---
 lib/igt_fb.c | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)
lib/igt_fb.c +20 -10
index af3291a2..a4db0749 100644
@@ -841,10 +841,20 @@ static void memset64(uint64_t *s, uint64_t c, size_t n)
 static void clear_yuv_buffer(struct igt_fb *fb)
 {
 	bool full_range = fb->color_range == IGT_COLOR_YCBCR_FULL_RANGE;
+	size_t plane_size[2];
 	void *ptr;
 
 	igt_assert(igt_format_is_yuv(fb->drm_format));
 
+	for (int i = 0; i < min(ARRAY_SIZE(plane_size), fb->num_planes); i++) {
+		unsigned int tile_width, tile_height;
+
+		igt_get_fb_tile_size(fb->fd, fb->modifier, fb->plane_bpp[i],
+				     &tile_width, &tile_height);
+		plane_size[i] = fb->strides[i] *
+			ALIGN(fb->plane_height[i], tile_height);
+	}
+
 	/* Ensure the framebuffer is preallocated */
 	ptr = igt_fb_map_buffer(fb->fd, fb);
 	igt_assert(*(uint32_t *)ptr == 0);
@@ -853,48 +863,48 @@ static void clear_yuv_buffer(struct igt_fb *fb)
 	case DRM_FORMAT_NV12:
 		memset(ptr + fb->offsets[0],
 		       full_range ? 0x00 : 0x10,
-		       fb->strides[0] * fb->plane_height[0]);
+		       plane_size[0]);
 		memset(ptr + fb->offsets[1],
 		       0x80,
-		       fb->strides[1] * fb->plane_height[1]);
+		       plane_size[1]);
 		break;
 	case DRM_FORMAT_XYUV8888:
 		wmemset(ptr + fb->offsets[0], full_range ? 0x00008080 : 0x00108080,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_YUYV:
 	case DRM_FORMAT_YVYU:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x80008000 : 0x80108010,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_UYVY:
 	case DRM_FORMAT_VYUY:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x00800080 : 0x10801080,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_P010:
 	case DRM_FORMAT_P012:
 	case DRM_FORMAT_P016:
 		wmemset(ptr, full_range ? 0 : 0x10001000,
-			fb->offsets[1] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		wmemset(ptr + fb->offsets[1], 0x80008000,
-			fb->strides[1] * fb->plane_height[1] / sizeof(wchar_t));
+			plane_size[1] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_Y210:
 	case DRM_FORMAT_Y212:
 	case DRM_FORMAT_Y216:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x80000000 : 0x80001000,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 
 	case DRM_FORMAT_XVYU2101010:
 	case DRM_FORMAT_Y410:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x20000200 : 0x20010200,
-		fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 
 	case DRM_FORMAT_XVYU12_16161616:
@@ -903,7 +913,7 @@ static void clear_yuv_buffer(struct igt_fb *fb)
 	case DRM_FORMAT_Y416:
 		memset64(ptr + fb->offsets[0],
 			 full_range ? 0x800000008000ULL : 0x800010008000ULL,
-			 fb->strides[0] * fb->plane_height[0] / sizeof(uint64_t));
+			 plane_size[0] / sizeof(uint64_t));
 		break;
 	}
 
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 8/8
#17 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] lib/igt_fb: Make sure tiled YUV framebuffers are fully cleared

Quoted 14 lines · Imre Deak

For tiled FBs that are mapped in an other way than a GTT map we need to clear all tile-rows. Clearing only the first stride*height bytes may leave tiles at the end of the FB uncleared.

---
 lib/igt_fb.c | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)
lib/igt_fb.c +0 -0
index af3291a2..a4db0749 100644

lib/igt_fb.c static void memset64(uint64_t *s, uint64_t c, size_t n) · line 849

Quoted 9 lines
lib/igt_fb.c +2 -0
@@ -841,10 +841,20 @@ static void memset64(uint64_t *s, uint64_t c, size_t n)
 static void clear_yuv_buffer(struct igt_fb *fb)
 {
 	bool full_range = fb->color_range == IGT_COLOR_YCBCR_FULL_RANGE;
+	size_t plane_size[2];
 	void *ptr;
 
 	igt_assert(igt_format_is_yuv(fb->drm_format));
 
+	for (int i = 0; i < min(ARRAY_SIZE(plane_size), fb->num_planes); i++) {

This will still calculate a plane_size[1] for packed YUV + CCS I think, but I guess that doesn't hurt anything since it just never gets used below.

Matt

Quoted 85 lines
lib/igt_fb.c +18 -10
+		unsigned int tile_width, tile_height;
+
+		igt_get_fb_tile_size(fb->fd, fb->modifier, fb->plane_bpp[i],
+				     &tile_width, &tile_height);
+		plane_size[i] = fb->strides[i] *
+			ALIGN(fb->plane_height[i], tile_height);
+	}
+
 	/* Ensure the framebuffer is preallocated */
 	ptr = igt_fb_map_buffer(fb->fd, fb);
 	igt_assert(*(uint32_t *)ptr == 0);
@@ -853,48 +863,48 @@ static void clear_yuv_buffer(struct igt_fb *fb)
 	case DRM_FORMAT_NV12:
 		memset(ptr + fb->offsets[0],
 		       full_range ? 0x00 : 0x10,
-		       fb->strides[0] * fb->plane_height[0]);
+		       plane_size[0]);
 		memset(ptr + fb->offsets[1],
 		       0x80,
-		       fb->strides[1] * fb->plane_height[1]);
+		       plane_size[1]);
 		break;
 	case DRM_FORMAT_XYUV8888:
 		wmemset(ptr + fb->offsets[0], full_range ? 0x00008080 : 0x00108080,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_YUYV:
 	case DRM_FORMAT_YVYU:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x80008000 : 0x80108010,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_UYVY:
 	case DRM_FORMAT_VYUY:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x00800080 : 0x10801080,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_P010:
 	case DRM_FORMAT_P012:
 	case DRM_FORMAT_P016:
 		wmemset(ptr, full_range ? 0 : 0x10001000,
-			fb->offsets[1] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		wmemset(ptr + fb->offsets[1], 0x80008000,
-			fb->strides[1] * fb->plane_height[1] / sizeof(wchar_t));
+			plane_size[1] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_Y210:
 	case DRM_FORMAT_Y212:
 	case DRM_FORMAT_Y216:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x80000000 : 0x80001000,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 
 	case DRM_FORMAT_XVYU2101010:
 	case DRM_FORMAT_Y410:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x20000200 : 0x20010200,
-		fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 
 	case DRM_FORMAT_XVYU12_16161616:
@@ -903,7 +913,7 @@ static void clear_yuv_buffer(struct igt_fb *fb)
 	case DRM_FORMAT_Y416:
 		memset64(ptr + fb->offsets[0],
 			 full_range ? 0x800000008000ULL : 0x800010008000ULL,
-			 fb->strides[0] * fb->plane_height[0] / sizeof(uint64_t));
+			 plane_size[0] / sizeof(uint64_t));
 		break;
 	}
 
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 9 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#18 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] lib/igt_fb: Make sure tiled YUV framebuffers are fully cleared

Quoted 21 lines · Matt Roper
Quoted 20 lines · Imre Deak

For tiled FBs that are mapped in an other way than a GTT map we need to clear all tile-rows. Clearing only the first stride*height bytes may leave tiles at the end of the FB uncleared.

---
 lib/igt_fb.c | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)
lib/igt_fb.c +1 -0
index af3291a2..a4db0749 100644
@@ -841,10 +841,20 @@ static void memset64(uint64_t *s, uint64_t c, size_t n)
 static void clear_yuv_buffer(struct igt_fb *fb)
 {
 	bool full_range = fb->color_range == IGT_COLOR_YCBCR_FULL_RANGE;
+	size_t plane_size[2];
 	void *ptr;
 
Quoted 7 lines

lib/igt_fb.c static void memset64(uint64_t *s, uint64_t c, size_t n) · line 849

Quoted 3 lines
lib/igt_fb.c +1 -0
 	igt_assert(igt_format_is_yuv(fb->drm_format));
 
+	for (int i = 0; i < min(ARRAY_SIZE(plane_size), fb->num_planes); i++) {

This will still calculate a plane_size[1] for packed YUV + CCS I think, but I guess that doesn't hurt anything since it just never gets used below.

Yes, thanks for spotting that. This should be:

	i < lookup_drm_format(fb->drm_format)->num_planes
Quoted 83 lines

Matt

Quoted 78 lines
lib/igt_fb.c +18 -10
+		unsigned int tile_width, tile_height;
+
+		igt_get_fb_tile_size(fb->fd, fb->modifier, fb->plane_bpp[i],
+				     &tile_width, &tile_height);
+		plane_size[i] = fb->strides[i] *
+			ALIGN(fb->plane_height[i], tile_height);
+	}
+
 	/* Ensure the framebuffer is preallocated */
 	ptr = igt_fb_map_buffer(fb->fd, fb);
 	igt_assert(*(uint32_t *)ptr == 0);
@@ -853,48 +863,48 @@ static void clear_yuv_buffer(struct igt_fb *fb)
 	case DRM_FORMAT_NV12:
 		memset(ptr + fb->offsets[0],
 		       full_range ? 0x00 : 0x10,
-		       fb->strides[0] * fb->plane_height[0]);
+		       plane_size[0]);
 		memset(ptr + fb->offsets[1],
 		       0x80,
-		       fb->strides[1] * fb->plane_height[1]);
+		       plane_size[1]);
 		break;
 	case DRM_FORMAT_XYUV8888:
 		wmemset(ptr + fb->offsets[0], full_range ? 0x00008080 : 0x00108080,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_YUYV:
 	case DRM_FORMAT_YVYU:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x80008000 : 0x80108010,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_UYVY:
 	case DRM_FORMAT_VYUY:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x00800080 : 0x10801080,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_P010:
 	case DRM_FORMAT_P012:
 	case DRM_FORMAT_P016:
 		wmemset(ptr, full_range ? 0 : 0x10001000,
-			fb->offsets[1] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		wmemset(ptr + fb->offsets[1], 0x80008000,
-			fb->strides[1] * fb->plane_height[1] / sizeof(wchar_t));
+			plane_size[1] / sizeof(wchar_t));
 		break;
 	case DRM_FORMAT_Y210:
 	case DRM_FORMAT_Y212:
 	case DRM_FORMAT_Y216:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x80000000 : 0x80001000,
-			fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 
 	case DRM_FORMAT_XVYU2101010:
 	case DRM_FORMAT_Y410:
 		wmemset(ptr + fb->offsets[0],
 			full_range ? 0x20000200 : 0x20010200,
-		fb->strides[0] * fb->plane_height[0] / sizeof(wchar_t));
+			plane_size[0] / sizeof(wchar_t));
 		break;
 
 	case DRM_FORMAT_XVYU12_16161616:
@@ -903,7 +913,7 @@ static void clear_yuv_buffer(struct igt_fb *fb)
 	case DRM_FORMAT_Y416:
 		memset64(ptr + fb->offsets[0],
 			 full_range ? 0x800000008000ULL : 0x800010008000ULL,
-			 fb->strides[0] * fb->plane_height[0] / sizeof(uint64_t));
+			 plane_size[0] / sizeof(uint64_t));
 		break;
 	}
 
Quoted 14 lines
Quoted 7 lines
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 5 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#19 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib/igt_draw: Refactor get_tiling calls

In reply to Imre Deak
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/8] lib/igt_draw: Refactor get_tiling calls
URL : https://patchwork.freedesktop.org/series/73172/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7887 -> IGTPW_4114
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/index.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_blt:
- fi-bsw-nick: [PASS][1] -> [INCOMPLETE][2] ([i915#392])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-bsw-nick/igt@i915_selftest@live_blt.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-bsw-nick/igt@i915_selftest@live_blt.html

* igt@i915_selftest@live_gem_contexts:
- fi-cfl-guc: [PASS][3] -> [INCOMPLETE][4] ([fdo#106070] / [i915#424])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html

* igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
- fi-skl-6770hq: [PASS][5] -> [SKIP][6] ([fdo#109271])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-skl-6770hq/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-skl-6770hq/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-pipe-c:
- fi-skl-6770hq: [PASS][7] -> [DMESG-WARN][8] ([i915#106] / [i915#188])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-skl-6770hq/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-skl-6770hq/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live_blt:
- fi-ivb-3770: [DMESG-FAIL][9] ([i915#725]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-ivb-3770/igt@i915_selftest@live_blt.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-ivb-3770/igt@i915_selftest@live_blt.html

* igt@i915_selftest@live_execlists:
- fi-icl-y: [DMESG-FAIL][11] ([fdo#108569]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-icl-y/igt@i915_selftest@live_execlists.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-icl-y/igt@i915_selftest@live_execlists.html

* igt@i915_selftest@live_gem_contexts:
- fi-cfl-8700k: [DMESG-FAIL][13] ([i915#623]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
- fi-byt-n2820: [DMESG-FAIL][15] ([i915#1052]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html

* igt@i915_selftest@live_gtt:
- fi-icl-guc: [TIMEOUT][17] ([fdo#112271]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-icl-guc/igt@i915_selftest@live_gtt.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-icl-guc/igt@i915_selftest@live_gtt.html

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][19] ([fdo#111096] / [i915#323]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-kbl-7500u/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-kbl-7500u/igt@[email protected]

#### Warnings ####

* igt@i915_module_load@reload:
- fi-icl-u2: [DMESG-WARN][21] ([i915#289]) -> [DMESG-WARN][22] ([i915#109] / [i915#289])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-icl-u2/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-icl-u2/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-skl-6770hq: [INCOMPLETE][23] ([i915#69]) -> [SKIP][24] ([fdo#109271])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-skl-6770hq/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/fi-skl-6770hq/igt@[email protected]

[fdo#106070]: https://bugs.freedesktop.org/show_bug.cgi?id=106070
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#1052]: https://gitlab.freedesktop.org/drm/intel/issues/1052
[i915#106]: https://gitlab.freedesktop.org/drm/intel/issues/106
[i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
[i915#188]: https://gitlab.freedesktop.org/drm/intel/issues/188
[i915#289]: https://gitlab.freedesktop.org/drm/intel/issues/289
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#392]: https://gitlab.freedesktop.org/drm/intel/issues/392
[i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
[i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725

Participating hosts (48 -> 46)
------------------------------

Additional (5): fi-bdw-5557u fi-gdg-551 fi-skl-lmem fi-blb-e6850 fi-skl-6600u
Missing (7): fi-hsw-4200u fi-bsw-n3050 fi-bsw-cyan fi-ctg-p8600 fi-kbl-7560u fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* IGT: IGT_5425 -> IGTPW_4114

CI-20190529: 20190529
CI_DRM_7887: b147ed9753265260d6380604de01c3d646a323cd @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4114: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/index.html
IGT_5425: ad4542ef1adbaa1227bc9ba9e24bb0e0f6dd408d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#20 lore raw
In reply to Imre Deak
Quoted 14 lines · Imre Deak

void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,

lib/igt_draw.c +5 -2
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp)
+		   uint32_t tiling, enum igt_draw_method method,
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp)
 {
+	uint32_t buf_tiling, swizzle;
+

struct cmd_data cmd_data = {
.bufmgr = bufmgr,
.context = context,

lib/igt_draw.c void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context, · line 667

Quoted 8 lines
lib/igt_draw.c +5 -0
@@ -667,24 +660,32 @@ void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		.h = rect_h,
 	};
 
+	swizzle = I915_BIT_6_SWIZZLE_NONE;
+	if (tiling != I915_TILING_NONE && gem_available_fences(fd)) {
+		gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);
+		igt_assert(tiling == buf_tiling);
+	}

Probably a nit, but looks a little strange to call gem_get_tiling() to get the swizzle and then doing an assert. Instead, since igt_draw_rect() has only two callers how about moving the gem_get_tiling() call into the callers and passing both tiling and swizzle into igt_draw_rect()?

tests/kms_frontbuffer_tracking.c struct { · line 294

Quoted 9 lines
tests/kms_frontbuffer_tracking.c +1 -0
index 2c765c34..9c2c3a5d 100644
@@ -291,6 +291,7 @@ struct {
 	int height;
 	uint32_t color;
 	int bpp;
+	uint32_t tiling;

Should not need this if we follow the suggestion above.
_______________________________________________
igt-dev mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

author
#21 lore raw
Quoted 18 lines · Ashutosh
Quoted 17 lines · Imre Deak

void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,

lib/igt_draw.c +5 -2
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp)
+		   uint32_t tiling, enum igt_draw_method method,
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp)
 {
+	uint32_t buf_tiling, swizzle;
+

struct cmd_data cmd_data = {
.bufmgr = bufmgr,
.context = context,

lib/igt_draw.c +0 -0
@@ -667,24 +660,32 @@ void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		.h = rect_h,
 	};
 
Quoted 8 lines

lib/igt_draw.c void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context, · line 667

Quoted 5 lines
lib/igt_draw.c +5 -0
+	swizzle = I915_BIT_6_SWIZZLE_NONE;
+	if (tiling != I915_TILING_NONE && gem_available_fences(fd)) {
+		gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);
+		igt_assert(tiling == buf_tiling);
+	}

Probably a nit, but looks a little strange to call gem_get_tiling() to get the swizzle and then doing an assert.

gem_get_tiling() is the way to get the swizzling for a buffer. The assert only makes sure that the caller's and kernel's idea of the tiling matches. While the callers will pick the tiling (when creating the buffer), the swizzling is fixed based on this tiling and platform.

Quoted 3 lines

Instead, since igt_draw_rect() has only two callers how about moving the gem_get_tiling() call into the callers and passing both tiling and swizzle into igt_draw_rect()?

Why?

Quoted 12 lines

tests/kms_frontbuffer_tracking.c struct { · line 294

Quoted 10 lines
tests/kms_frontbuffer_tracking.c +1 -0
index 2c765c34..9c2c3a5d 100644
@@ -291,6 +291,7 @@ struct {
 	int height;
 	uint32_t color;
 	int bpp;
+	uint32_t tiling;

Should not need this if we follow the suggestion above.

This contains the tiling of the buffer as now we won't have a way to retrieve the same from the kernel.

--Imre
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#22 lore raw
Quoted 29 lines · Imre Deak
Quoted 18 lines · Ashutosh
Quoted 17 lines · Imre Deak

void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,

lib/igt_draw.c +5 -2
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp)
+		   uint32_t tiling, enum igt_draw_method method,
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp)
 {
+	uint32_t buf_tiling, swizzle;
+

struct cmd_data cmd_data = {
.bufmgr = bufmgr,
.context = context,

lib/igt_draw.c +0 -0
@@ -667,24 +660,32 @@ void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		.h = rect_h,
 	};
 
Quoted 8 lines

lib/igt_draw.c void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context, · line 667

Quoted 5 lines
lib/igt_draw.c +5 -0
+	swizzle = I915_BIT_6_SWIZZLE_NONE;
+	if (tiling != I915_TILING_NONE && gem_available_fences(fd)) {
+		gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);
+		igt_assert(tiling == buf_tiling);
+	}

Probably a nit, but looks a little strange to call gem_get_tiling() to get the swizzle and then doing an assert.

Quoted 4 lines

gem_get_tiling() is the way to get the swizzling for a buffer. The assert only makes sure that the caller's and kernel's idea of the tiling matches. While the callers will pick the tiling (when creating the buffer), the swizzling is fixed based on this tiling and platform.

Let me ask a different way, do we even need the new tiling argument to igt_draw_rect()? Can't we just do:

        if (gem_available_fences(fd))
                gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);

Basically if we have the handle we should just be able to query the tiling.

Quoted 19 lines
Quoted 3 lines

Instead, since igt_draw_rect() has only two callers how about moving the gem_get_tiling() call into the callers and passing both tiling and swizzle into igt_draw_rect()?

Why?

Quoted 12 lines

tests/kms_frontbuffer_tracking.c struct { · line 294

Quoted 10 lines
tests/kms_frontbuffer_tracking.c +1 -0
index 2c765c34..9c2c3a5d 100644
@@ -291,6 +291,7 @@ struct {
 	int height;
 	uint32_t color;
 	int bpp;
+	uint32_t tiling;

Should not need this if we follow the suggestion above.

Quoted 2 lines

This contains the tiling of the buffer as now we won't have a way to retrieve the same from the kernel.

Again, won't need these other changes if the tiling arg to igt_draw_rect() can be eliminated.
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

author
#23 lore raw
Quoted 35 lines · Ashutosh
Quoted 29 lines · Imre Deak
Quoted 18 lines · Ashutosh
Quoted 17 lines · Imre Deak

void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,

lib/igt_draw.c +5 -2
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp)
+		   uint32_t tiling, enum igt_draw_method method,
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp)
 {
+	uint32_t buf_tiling, swizzle;
+

struct cmd_data cmd_data = {
.bufmgr = bufmgr,
.context = context,

lib/igt_draw.c +0 -0
@@ -667,24 +660,32 @@ void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		.h = rect_h,
 	};
 
Quoted 8 lines

lib/igt_draw.c void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context, · line 667

Quoted 5 lines
lib/igt_draw.c +5 -0
+	swizzle = I915_BIT_6_SWIZZLE_NONE;
+	if (tiling != I915_TILING_NONE && gem_available_fences(fd)) {
+		gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);
+		igt_assert(tiling == buf_tiling);
+	}

Probably a nit, but looks a little strange to call gem_get_tiling() to get the swizzle and then doing an assert.

Quoted 4 lines

gem_get_tiling() is the way to get the swizzling for a buffer. The assert only makes sure that the caller's and kernel's idea of the tiling matches. While the callers will pick the tiling (when creating the buffer), the swizzling is fixed based on this tiling and platform.

Quoted 7 lines

Let me ask a different way, do we even need the new tiling argument to igt_draw_rect()? Can't we just do:

        if (gem_available_fences(fd))
                gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);

Basically if we have the handle we should just be able to query the tiling.

We do need to handle different tilings even if !gem_available_fences(fd), so we need the tiling param. Note that HW detiling support via GGTT != tiling support by display,gt engines.

Quoted 20 lines
Quoted 20 lines
Quoted 4 lines

Instead, since igt_draw_rect() has only two callers how about moving the gem_get_tiling() call into the callers and passing both tiling and swizzle into igt_draw_rect()?

Why?

Quoted 12 lines

tests/kms_frontbuffer_tracking.c struct { · line 294

Quoted 10 lines
tests/kms_frontbuffer_tracking.c +1 -0
index 2c765c34..9c2c3a5d 100644
@@ -291,6 +291,7 @@ struct {
 	int height;
 	uint32_t color;
 	int bpp;
+	uint32_t tiling;

Should not need this if we follow the suggestion above.

Quoted 5 lines
Quoted 2 lines

This contains the tiling of the buffer as now we won't have a way to retrieve the same from the kernel.

Again, won't need these other changes if the tiling arg to igt_draw_rect() can be eliminated.

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by
#24 lore raw
Quoted 39 lines · Imre Deak
Quoted 38 lines · Ashutosh
Quoted 29 lines · Imre Deak
Quoted 18 lines · Ashutosh
Quoted 17 lines · Imre Deak

void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,

lib/igt_draw.c +5 -2
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp)
+		   uint32_t tiling, enum igt_draw_method method,
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp)
 {
+	uint32_t buf_tiling, swizzle;
+

struct cmd_data cmd_data = {
.bufmgr = bufmgr,
.context = context,

lib/igt_draw.c +0 -0
@@ -667,24 +660,32 @@ void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		.h = rect_h,
 	};
 
Quoted 8 lines

lib/igt_draw.c void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context, · line 667

Quoted 5 lines
lib/igt_draw.c +5 -0
+	swizzle = I915_BIT_6_SWIZZLE_NONE;
+	if (tiling != I915_TILING_NONE && gem_available_fences(fd)) {
+		gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);
+		igt_assert(tiling == buf_tiling);
+	}

Probably a nit, but looks a little strange to call gem_get_tiling() to get the swizzle and then doing an assert.

Quoted 4 lines

gem_get_tiling() is the way to get the swizzling for a buffer. The assert only makes sure that the caller's and kernel's idea of the tiling matches. While the callers will pick the tiling (when creating the buffer), the swizzling is fixed based on this tiling and platform.

Let me ask a different way, do we even need the new tiling argument to igt_draw_rect()? Can't we just do:

Quoted 8 lines
Quoted 4 lines
        if (gem_available_fences(fd))
                gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);

Basically if we have the handle we should just be able to query the tiling.

We do need to handle different tilings even if !gem_available_fences(fd), so we need the tiling param. Note that HW detiling support via GGTT != tiling support by display,gt engines.

OK:

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#25 lore raw
In reply to Imre Deak
Quoted 31 lines · Imre Deak

From: Vanshidhar Konda <[email protected]>

Simplify the number of places from which gem_get_tiling method is called and call it only if the device has support in hardware for tiling.

v2:
- Use gem_available_fences() to check for HW detiling.

---
 lib/igt_draw.c                   | 56 +++++++++++++++++---------------
 lib/igt_draw.h                   |  5 +--
 tests/kms_frontbuffer_tracking.c |  8 +++--
 3 files changed, 37 insertions(+), 32 deletions(-)
lib/igt_draw.c +1 -2
index 6950bc49..d227a53a 100644
@@ -333,20 +333,19 @@ static void draw_rect_ptr_tiled(void *ptr, uint32_t stride, uint32_t tiling,
 }
 
 static void draw_rect_mmap_cpu(int fd, struct buf_data *buf, struct rect *rect,
-			       uint32_t color)
+			       uint32_t tiling, uint32_t swizzle, uint32_t color)
 {
 	uint32_t *ptr;
-	uint32_t tiling, swizzle;
 
 	gem_set_domain(fd, buf->handle, I915_GEM_DOMAIN_CPU,

lib/igt_draw.c static void draw_rect_ptr_tiled(void *ptr, uint32_t stride, uint32_t tiling, · line 348

Quoted 10 lines
lib/igt_draw.c +2 -2
 		       I915_GEM_DOMAIN_CPU);
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
 
 	/* We didn't implement suport for the older tiling methods yet. */
 	if (tiling != I915_TILING_NONE)
 		igt_require(intel_gen(intel_get_drm_devid(fd)) >= 5);
 
-	ptr = gem_mmap__cpu(fd, buf->handle, 0, PAGE_ALIGN(buf->size), 0);
+	ptr = gem_mmap__cpu(fd, buf->handle, 0, PAGE_ALIGN(buf->size),
+			    PROT_READ | PROT_WRITE);

This change doesn't seem to be related to the main purpose of this patch?

Quoted 86 lines
lib/igt_draw.c +6 -15
 	switch (tiling) {
 	case I915_TILING_NONE:
@@ -384,14 +383,12 @@ static void draw_rect_mmap_gtt(int fd, struct buf_data *buf, struct rect *rect,
 }
 
 static void draw_rect_mmap_wc(int fd, struct buf_data *buf, struct rect *rect,
-			      uint32_t color)
+			      uint32_t tiling, uint32_t swizzle, uint32_t color)
 {
 	uint32_t *ptr;
-	uint32_t tiling, swizzle;
 
 	gem_set_domain(fd, buf->handle, I915_GEM_DOMAIN_GTT,
 		       I915_GEM_DOMAIN_GTT);
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
 
 	/* We didn't implement suport for the older tiling methods yet. */
 	if (tiling != I915_TILING_NONE)
@@ -495,12 +492,9 @@ static void draw_rect_pwrite_tiled(int fd, struct buf_data *buf,
 }
 
 static void draw_rect_pwrite(int fd, struct buf_data *buf,
-			     struct rect *rect, uint32_t color)
+			     struct rect *rect, uint32_t tiling,
+			     uint32_t swizzle, uint32_t color)
 {
-	uint32_t tiling, swizzle;
-
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
-
 	switch (tiling) {
 	case I915_TILING_NONE:
 		draw_rect_pwrite_untiled(fd, buf, rect, color);
@@ -517,6 +511,7 @@ static void draw_rect_pwrite(int fd, struct buf_data *buf,
 
 static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 			  struct buf_data *buf, struct rect *rect,
+			  uint32_t tiling, uint32_t swizzle,
 			  uint32_t color)
 {
 	drm_intel_bo *dst;
@@ -524,11 +519,8 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 	int blt_cmd_len, blt_cmd_tiling, blt_cmd_depth;
 	uint32_t devid = intel_get_drm_devid(fd);
 	int gen = intel_gen(devid);
-	uint32_t tiling, swizzle;
 	int pitch;
 
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
-
 	dst = gem_handle_to_libdrm_bo(cmd_data->bufmgr, fd, "", buf->handle);
 	igt_assert(dst);
 
@@ -574,6 +566,7 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 
 static void draw_rect_render(int fd, struct cmd_data *cmd_data,
 			     struct buf_data *buf, struct rect *rect,
+			     uint32_t tiling, uint32_t swizzle,
 			     uint32_t color)
 {
 	drm_intel_bo *src, *dst;
@@ -581,21 +574,18 @@ static void draw_rect_render(int fd, struct cmd_data *cmd_data,
 	igt_render_copyfunc_t rendercopy = igt_get_render_copyfunc(devid);
 	struct igt_buf src_buf = {}, dst_buf = {};
 	struct intel_batchbuffer *batch;
-	uint32_t tiling, swizzle;
 	struct buf_data tmp;
 	int pixel_size = buf->bpp / 8;
 
 	igt_skip_on(!rendercopy);
 
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
-
 	/* We create a temporary buffer and copy from it using rendercopy. */
 	tmp.size = rect->w * rect->h * pixel_size;
 	tmp.handle = gem_create(fd, tmp.size);
 	tmp.stride = rect->w * pixel_size;
 	tmp.bpp = buf->bpp;
 	draw_rect_mmap_cpu(fd, &tmp, &(struct rect){0, 0, rect->w, rect->h},
-			   color);
+			   I915_TILING_NONE, I915_BIT_6_SWIZZLE_NONE, color);
 
 	src = gem_handle_to_libdrm_bo(cmd_data->bufmgr, fd, "", tmp.handle);
 	igt_assert(src);

lib/igt_draw.c static void draw_rect_render(int fd, struct cmd_data *cmd_data, · line 640

Quoted 6 lines
lib/igt_draw.c +1 -2
@@ -647,9 +637,12 @@ static void draw_rect_render(int fd, struct cmd_data *cmd_data,
  */
 void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		   uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp)
+		   uint32_t tiling, enum igt_draw_method method,

The new tiling parameter should probably be captured in the kerneldoc right above this function.

Quoted 34 lines
lib/igt_draw.c +13 -3
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp)
 {
+	uint32_t buf_tiling, swizzle;
+
 	struct cmd_data cmd_data = {
 		.bufmgr = bufmgr,
 		.context = context,
@@ -667,24 +660,32 @@ void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		.h = rect_h,
 	};
 
+	swizzle = I915_BIT_6_SWIZZLE_NONE;
+	if (tiling != I915_TILING_NONE && gem_available_fences(fd)) {
+		gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);
+		igt_assert(tiling == buf_tiling);
+	}
+
 	switch (method) {
 	case IGT_DRAW_MMAP_CPU:
-		draw_rect_mmap_cpu(fd, &buf, &rect, color);
+		draw_rect_mmap_cpu(fd, &buf, &rect, tiling, swizzle, color);
 		break;
 	case IGT_DRAW_MMAP_GTT:
 		draw_rect_mmap_gtt(fd, &buf, &rect, color);
 		break;
 	case IGT_DRAW_MMAP_WC:
-		draw_rect_mmap_wc(fd, &buf, &rect, color);
+		draw_rect_mmap_wc(fd, &buf, &rect, tiling, swizzle, color);
 		break;
 	case IGT_DRAW_PWRITE:
-		draw_rect_pwrite(fd, &buf, &rect, color);
+		draw_rect_pwrite(fd, &buf, &rect, tiling, swizzle, color);
 		break;

lib/igt_draw.c void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context, · line 689

Quoted 10 lines
lib/igt_draw.c +4 -2
 	case IGT_DRAW_BLT:
-		draw_rect_blt(fd, &cmd_data, &buf, &rect, color);
+		draw_rect_blt(fd, &cmd_data, &buf, &rect, tiling, swizzle,
+			      color);
 		break;
 	case IGT_DRAW_RENDER:
-		draw_rect_render(fd, &cmd_data, &buf, &rect, color);
+		draw_rect_render(fd, &cmd_data, &buf, &rect, tiling, swizzle,
+				 color);
 		break;

Blt and render draws don't use the swizzle parameter. If the goal is to keep a consistent parameter list for all these functions, we should probably add tiling & swizzle to the gtt map function, even though they won't be used; otherwise we can drop the swizzle parameter from these two.

Matt

Quoted 68 lines
lib/igt_draw.c +2 -1
 	default:
 		igt_assert(false);
@@ -715,7 +716,8 @@ void igt_draw_rect_fb(int fd, drm_intel_bufmgr *bufmgr,
 		      int rect_w, int rect_h, uint32_t color)
 {
 	igt_draw_rect(fd, bufmgr, context, fb->gem_handle, fb->size, fb->strides[0],
-		      method, rect_x, rect_y, rect_w, rect_h, color,
+		      igt_fb_mod_to_tiling(fb->modifier), method,
+		      rect_x, rect_y, rect_w, rect_h, color,
 		      igt_drm_format_to_bpp(fb->drm_format));
 }
 
lib/igt_draw.h +3 -2
index b030131e..ec146754 100644
@@ -52,8 +52,9 @@ const char *igt_draw_get_method_name(enum igt_draw_method method);
 
 void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		   uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp);
+		   uint32_t tiling, enum igt_draw_method method,
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp);
 
 void igt_draw_rect_fb(int fd, drm_intel_bufmgr *bufmgr,
 		      drm_intel_context *context, struct igt_fb *fb,
tests/kms_frontbuffer_tracking.c +5 -3
index 2c765c34..9c2c3a5d 100644
@@ -291,6 +291,7 @@ struct {
 	int height;
 	uint32_t color;
 	int bpp;
+	uint32_t tiling;
 } busy_thread = {
 	.stop = true,
 };
@@ -1126,9 +1127,9 @@ static void *busy_thread_func(void *data)
 	while (!busy_thread.stop)
 		igt_draw_rect(drm.fd, drm.bufmgr, NULL, busy_thread.handle,
 			      busy_thread.size, busy_thread.stride,
-			      IGT_DRAW_BLT, 0, 0, busy_thread.width,
-			      busy_thread.height, busy_thread.color,
-			      busy_thread.bpp);
+			      busy_thread.tiling, IGT_DRAW_BLT, 0, 0,
+			      busy_thread.width, busy_thread.height,
+			      busy_thread.color, busy_thread.bpp);
 
 	pthread_exit(0);
 }
@@ -1146,6 +1147,7 @@ static void start_busy_thread(struct igt_fb *fb)
 	busy_thread.height = fb->height;
 	busy_thread.color = pick_color(fb, COLOR_PRIM_BG);
 	busy_thread.bpp = igt_drm_format_to_bpp(fb->drm_format);
+	busy_thread.tiling = igt_fb_mod_to_tiling(fb->modifier);
 
 	rc = pthread_create(&busy_thread.thread, NULL, busy_thread_func, NULL);
 	igt_assert_eq(rc, 0);
Signature · 6 lines
2.23.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 9 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
author
#26 lore raw
Quoted 39 lines · Matt Roper
Quoted 38 lines · Imre Deak

From: Vanshidhar Konda <[email protected]>

Simplify the number of places from which gem_get_tiling method is called and call it only if the device has support in hardware for tiling.

v2:
- Use gem_available_fences() to check for HW detiling.

---
 lib/igt_draw.c                   | 56 +++++++++++++++++---------------
 lib/igt_draw.h                   |  5 +--
 tests/kms_frontbuffer_tracking.c |  8 +++--
 3 files changed, 37 insertions(+), 32 deletions(-)
lib/igt_draw.c +1 -3
index 6950bc49..d227a53a 100644
@@ -333,20 +333,19 @@ static void draw_rect_ptr_tiled(void *ptr, uint32_t stride, uint32_t tiling,
 }
 
 static void draw_rect_mmap_cpu(int fd, struct buf_data *buf, struct rect *rect,
-			       uint32_t color)
+			       uint32_t tiling, uint32_t swizzle, uint32_t color)
 {
 	uint32_t *ptr;
-	uint32_t tiling, swizzle;
 
 	gem_set_domain(fd, buf->handle, I915_GEM_DOMAIN_CPU,
 		       I915_GEM_DOMAIN_CPU);
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
 
 	/* We didn't implement suport for the older tiling methods yet. */
 	if (tiling != I915_TILING_NONE)
 		igt_require(intel_gen(intel_get_drm_devid(fd)) >= 5);
 
Quoted 6 lines

lib/igt_draw.c static void draw_rect_ptr_tiled(void *ptr, uint32_t stride, uint32_t tiling, · line 348

Quoted 3 lines
lib/igt_draw.c +2 -1
-	ptr = gem_mmap__cpu(fd, buf->handle, 0, PAGE_ALIGN(buf->size), 0);
+	ptr = gem_mmap__cpu(fd, buf->handle, 0, PAGE_ALIGN(buf->size),
+			    PROT_READ | PROT_WRITE);

This change doesn't seem to be related to the main purpose of this patch?

It's a consequence of starting to use __gem_mmap_offset() on DG1 after this patch, which uses the prot argument, unlike __gem_mmap() used so far. This should've been part of the commit log.

Quoted 84 lines
Quoted 84 lines
lib/igt_draw.c +6 -15
 	switch (tiling) {
 	case I915_TILING_NONE:
@@ -384,14 +383,12 @@ static void draw_rect_mmap_gtt(int fd, struct buf_data *buf, struct rect *rect,
 }
 
 static void draw_rect_mmap_wc(int fd, struct buf_data *buf, struct rect *rect,
-			      uint32_t color)
+			      uint32_t tiling, uint32_t swizzle, uint32_t color)
 {
 	uint32_t *ptr;
-	uint32_t tiling, swizzle;
 
 	gem_set_domain(fd, buf->handle, I915_GEM_DOMAIN_GTT,
 		       I915_GEM_DOMAIN_GTT);
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
 
 	/* We didn't implement suport for the older tiling methods yet. */
 	if (tiling != I915_TILING_NONE)
@@ -495,12 +492,9 @@ static void draw_rect_pwrite_tiled(int fd, struct buf_data *buf,
 }
 
 static void draw_rect_pwrite(int fd, struct buf_data *buf,
-			     struct rect *rect, uint32_t color)
+			     struct rect *rect, uint32_t tiling,
+			     uint32_t swizzle, uint32_t color)
 {
-	uint32_t tiling, swizzle;
-
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
-
 	switch (tiling) {
 	case I915_TILING_NONE:
 		draw_rect_pwrite_untiled(fd, buf, rect, color);
@@ -517,6 +511,7 @@ static void draw_rect_pwrite(int fd, struct buf_data *buf,
 
 static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 			  struct buf_data *buf, struct rect *rect,
+			  uint32_t tiling, uint32_t swizzle,
 			  uint32_t color)
 {
 	drm_intel_bo *dst;
@@ -524,11 +519,8 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 	int blt_cmd_len, blt_cmd_tiling, blt_cmd_depth;
 	uint32_t devid = intel_get_drm_devid(fd);
 	int gen = intel_gen(devid);
-	uint32_t tiling, swizzle;
 	int pitch;
 
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
-
 	dst = gem_handle_to_libdrm_bo(cmd_data->bufmgr, fd, "", buf->handle);
 	igt_assert(dst);
 
@@ -574,6 +566,7 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 
 static void draw_rect_render(int fd, struct cmd_data *cmd_data,
 			     struct buf_data *buf, struct rect *rect,
+			     uint32_t tiling, uint32_t swizzle,
 			     uint32_t color)
 {
 	drm_intel_bo *src, *dst;
@@ -581,21 +574,18 @@ static void draw_rect_render(int fd, struct cmd_data *cmd_data,
 	igt_render_copyfunc_t rendercopy = igt_get_render_copyfunc(devid);
 	struct igt_buf src_buf = {}, dst_buf = {};
 	struct intel_batchbuffer *batch;
-	uint32_t tiling, swizzle;
 	struct buf_data tmp;
 	int pixel_size = buf->bpp / 8;
 
 	igt_skip_on(!rendercopy);
 
-	igt_require(gem_get_tiling(fd, buf->handle, &tiling, &swizzle));
-
 	/* We create a temporary buffer and copy from it using rendercopy. */
 	tmp.size = rect->w * rect->h * pixel_size;
 	tmp.handle = gem_create(fd, tmp.size);
 	tmp.stride = rect->w * pixel_size;
 	tmp.bpp = buf->bpp;
 	draw_rect_mmap_cpu(fd, &tmp, &(struct rect){0, 0, rect->w, rect->h},
-			   color);
+			   I915_TILING_NONE, I915_BIT_6_SWIZZLE_NONE, color);
 
Quoted 12 lines

lib/igt_draw.c static void draw_rect_render(int fd, struct cmd_data *cmd_data, · line 640

Quoted 9 lines
lib/igt_draw.c +1 -2
 	src = gem_handle_to_libdrm_bo(cmd_data->bufmgr, fd, "", tmp.handle);
 	igt_assert(src);
@@ -647,9 +637,12 @@ static void draw_rect_render(int fd, struct cmd_data *cmd_data,
  */
 void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		   uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp)
+		   uint32_t tiling, enum igt_draw_method method,

The new tiling parameter should probably be captured in the kerneldoc right above this function.

Yes, that was missed.

Quoted 43 lines
Quoted 43 lines
lib/igt_draw.c +16 -5
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp)
 {
+	uint32_t buf_tiling, swizzle;
+
 	struct cmd_data cmd_data = {
 		.bufmgr = bufmgr,
 		.context = context,
@@ -667,24 +660,32 @@ void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		.h = rect_h,
 	};
 
+	swizzle = I915_BIT_6_SWIZZLE_NONE;
+	if (tiling != I915_TILING_NONE && gem_available_fences(fd)) {
+		gem_get_tiling(fd, buf_handle, &buf_tiling, &swizzle);
+		igt_assert(tiling == buf_tiling);
+	}
+
 	switch (method) {
 	case IGT_DRAW_MMAP_CPU:
-		draw_rect_mmap_cpu(fd, &buf, &rect, color);
+		draw_rect_mmap_cpu(fd, &buf, &rect, tiling, swizzle, color);
 		break;
 	case IGT_DRAW_MMAP_GTT:
 		draw_rect_mmap_gtt(fd, &buf, &rect, color);
 		break;
 	case IGT_DRAW_MMAP_WC:
-		draw_rect_mmap_wc(fd, &buf, &rect, color);
+		draw_rect_mmap_wc(fd, &buf, &rect, tiling, swizzle, color);
 		break;
 	case IGT_DRAW_PWRITE:
-		draw_rect_pwrite(fd, &buf, &rect, color);
+		draw_rect_pwrite(fd, &buf, &rect, tiling, swizzle, color);
 		break;
 	case IGT_DRAW_BLT:
-		draw_rect_blt(fd, &cmd_data, &buf, &rect, color);
+		draw_rect_blt(fd, &cmd_data, &buf, &rect, tiling, swizzle,
+			      color);
 		break;
 	case IGT_DRAW_RENDER:
-		draw_rect_render(fd, &cmd_data, &buf, &rect, color);
+		draw_rect_render(fd, &cmd_data, &buf, &rect, tiling, swizzle,
Quoted 8 lines

lib/igt_draw.c void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context, · line 689

Quoted 2 lines
lib/igt_draw.c +1 -0
+				 color);
 		break;

Blt and render draws don't use the swizzle parameter. If the goal is to keep a consistent parameter list for all these functions, we should probably add tiling & swizzle to the gtt map function, even though they won't be used; otherwise we can drop the swizzle parameter from these two.

Ok, will remove swizzle from the blt/render funcs.

Quoted 68 lines

Matt

Quoted 64 lines
lib/igt_draw.c +2 -1
 	default:
 		igt_assert(false);
@@ -715,7 +716,8 @@ void igt_draw_rect_fb(int fd, drm_intel_bufmgr *bufmgr,
 		      int rect_w, int rect_h, uint32_t color)
 {
 	igt_draw_rect(fd, bufmgr, context, fb->gem_handle, fb->size, fb->strides[0],
-		      method, rect_x, rect_y, rect_w, rect_h, color,
+		      igt_fb_mod_to_tiling(fb->modifier), method,
+		      rect_x, rect_y, rect_w, rect_h, color,
 		      igt_drm_format_to_bpp(fb->drm_format));
 }
 
lib/igt_draw.h +3 -2
index b030131e..ec146754 100644
@@ -52,8 +52,9 @@ const char *igt_draw_get_method_name(enum igt_draw_method method);
 
 void igt_draw_rect(int fd, drm_intel_bufmgr *bufmgr, drm_intel_context *context,
 		   uint32_t buf_handle, uint32_t buf_size, uint32_t buf_stride,
-		   enum igt_draw_method method, int rect_x, int rect_y,
-		   int rect_w, int rect_h, uint32_t color, int bpp);
+		   uint32_t tiling, enum igt_draw_method method,
+		   int rect_x, int rect_y, int rect_w, int rect_h,
+		   uint32_t color, int bpp);
 
 void igt_draw_rect_fb(int fd, drm_intel_bufmgr *bufmgr,
 		      drm_intel_context *context, struct igt_fb *fb,
tests/kms_frontbuffer_tracking.c +5 -3
index 2c765c34..9c2c3a5d 100644
@@ -291,6 +291,7 @@ struct {
 	int height;
 	uint32_t color;
 	int bpp;
+	uint32_t tiling;
 } busy_thread = {
 	.stop = true,
 };
@@ -1126,9 +1127,9 @@ static void *busy_thread_func(void *data)
 	while (!busy_thread.stop)
 		igt_draw_rect(drm.fd, drm.bufmgr, NULL, busy_thread.handle,
 			      busy_thread.size, busy_thread.stride,
-			      IGT_DRAW_BLT, 0, 0, busy_thread.width,
-			      busy_thread.height, busy_thread.color,
-			      busy_thread.bpp);
+			      busy_thread.tiling, IGT_DRAW_BLT, 0, 0,
+			      busy_thread.width, busy_thread.height,
+			      busy_thread.color, busy_thread.bpp);
 
 	pthread_exit(0);
 }
@@ -1146,6 +1147,7 @@ static void start_busy_thread(struct igt_fb *fb)
 	busy_thread.height = fb->height;
 	busy_thread.color = pick_color(fb, COLOR_PRIM_BG);
 	busy_thread.bpp = igt_drm_format_to_bpp(fb->drm_format);
+	busy_thread.tiling = igt_fb_mod_to_tiling(fb->modifier);
 
 	rc = pthread_create(&busy_thread.thread, NULL, busy_thread_func, NULL);
 	igt_assert_eq(rc, 0);
Signature · 1 line
2.23.1
Quoted 11 lines
Quoted 4 lines

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Signature · 5 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#27 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib/igt_draw: Refactor get_tiling calls

In reply to Imre Deak
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/8] lib/igt_draw: Refactor get_tiling calls
URL : https://patchwork.freedesktop.org/series/73172/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7887_full -> IGTPW_4114_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_4114_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_4114_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/index.html

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@runner@aborted:
- shard-hsw: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-hsw5/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@out-order-bsd2:
- shard-iclb: [PASS][2] -> [SKIP][3] ([fdo#109276]) +8 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb1/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb6/igt@[email protected]

* igt@gem_exec_schedule@pi-common-bsd:
- shard-iclb: [PASS][4] -> [SKIP][5] ([i915#677]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb3/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb4/igt@[email protected]

* igt@gem_exec_schedule@reorder-wide-bsd:
- shard-iclb: [PASS][6] -> [SKIP][7] ([fdo#112146]) +6 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb3/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb2/igt@[email protected]

* igt@gem_partial_pwrite_pread@reads-uncached:
- shard-hsw: [PASS][8] -> [FAIL][9] ([i915#694])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-hsw2/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-hsw1/igt@[email protected]

* igt@gem_ppgtt@blt-vs-render-ctx0:
- shard-hsw: [PASS][10] -> [INCOMPLETE][11] ([i915#61])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-hsw8/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-hsw5/igt@[email protected]

* igt@i915_pm_dc@dc6-dpms:
- shard-iclb: [PASS][12] -> [FAIL][13] ([i915#454])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb5/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb3/igt@[email protected]

* igt@i915_selftest@live_gtt:
- shard-apl: [PASS][14] -> [TIMEOUT][15] ([fdo#112271])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-apl8/igt@i915_selftest@live_gtt.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-apl4/igt@i915_selftest@live_gtt.html

* igt@kms_cursor_crc@pipe-b-cursor-256x256-onscreen:
- shard-apl: [PASS][16] -> [FAIL][17] ([i915#54])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-apl2/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-apl2/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-apl: [PASS][18] -> [DMESG-WARN][19] ([i915#180])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-apl2/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-apl1/igt@[email protected]

* igt@kms_flip@plain-flip-ts-check-interruptible:
- shard-glk: [PASS][20] -> [FAIL][21] ([i915#34])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-glk1/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-glk1/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-suspend:
- shard-iclb: [PASS][22] -> [INCOMPLETE][23] ([i915#123])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb2/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb8/igt@[email protected]

* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-iclb: [PASS][24] -> [SKIP][25] ([fdo#109441]) +2 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb8/igt@kms_psr@psr2_cursor_plane_onoff.html

* igt@kms_setmode@basic:
- shard-glk: [PASS][26] -> [FAIL][27] ([i915#31])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-glk2/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-glk7/igt@[email protected]

* igt@perf_pmu@init-busy-vcs1:
- shard-iclb: [PASS][28] -> [SKIP][29] ([fdo#112080]) +9 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb2/igt@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb5/igt@[email protected]

* igt@prime_mmap_coherency@ioctl-errors:
- shard-hsw: [PASS][30] -> [FAIL][31] ([i915#831])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-hsw2/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-hsw8/igt@[email protected]

#### Possible fixes ####

* igt@gem_busy@busy-vcs1:
- shard-iclb: [SKIP][32] ([fdo#112080]) -> [PASS][33] +8 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb6/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb1/igt@[email protected]

* igt@gem_ctx_isolation@rcs0-s3:
- shard-apl: [DMESG-WARN][34] ([i915#180]) -> [PASS][35] +1 similar issue
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-apl6/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-apl8/igt@[email protected]

* igt@gem_exec_balancer@hang:
- shard-iclb: [TIMEOUT][36] ([fdo#112271]) -> [PASS][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb4/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb2/igt@[email protected]

* igt@gem_exec_schedule@deep-bsd:
- shard-iclb: [SKIP][38] ([fdo#112146]) -> [PASS][39] +3 similar issues
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb2/igt@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb7/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-bsd1:
- shard-iclb: [SKIP][40] ([fdo#109276]) -> [PASS][41] +13 similar issues
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb6/igt@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb2/igt@[email protected]

* igt@gem_partial_pwrite_pread@reads:
- shard-hsw: [FAIL][42] ([i915#694]) -> [PASS][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-hsw2/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-hsw8/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap:
- shard-snb: [DMESG-WARN][44] ([fdo#111870] / [i915#478]) -> [PASS][45]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-snb5/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-snb6/igt@[email protected]

* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [FAIL][46] ([i915#454]) -> [PASS][47]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb2/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb7/igt@[email protected]

* igt@i915_pm_rps@waitboost:
- shard-iclb: [FAIL][48] ([i915#413]) -> [PASS][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb7/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb3/igt@[email protected]

* igt@i915_selftest@live_blt:
- shard-hsw: [DMESG-FAIL][50] ([i915#553] / [i915#725]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-hsw8/igt@i915_selftest@live_blt.html
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-hsw2/igt@i915_selftest@live_blt.html

* igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-xtiled:
- shard-snb: [DMESG-WARN][52] ([i915#478]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-snb5/igt@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-snb2/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-glk: [FAIL][54] ([i915#899]) -> [PASS][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-glk4/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-glk7/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [SKIP][56] ([fdo#109642] / [fdo#111068]) -> [PASS][57] +1 similar issue
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb5/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb2/igt@[email protected]

* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][58] ([fdo#109441]) -> [PASS][59] +1 similar issue
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb8/igt@kms_psr@psr2_primary_mmap_cpu.html
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

* igt@kms_vblank@pipe-b-ts-continuation-dpms-suspend:
- shard-iclb: [INCOMPLETE][60] ([i915#140]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb7/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb8/igt@[email protected]

#### Warnings ####

* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [SKIP][62] ([fdo#112080]) -> [FAIL][63] ([IGT#28])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb7/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb1/igt@[email protected]

* igt@gem_tiled_blits@interruptible:
- shard-hsw: [FAIL][64] ([i915#818]) -> [FAIL][65] ([i915#694])
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-hsw5/igt@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-hsw1/igt@[email protected]

* igt@i915_pm_rpm@legacy-planes:
- shard-snb: [INCOMPLETE][66] ([i915#82]) -> [SKIP][67] ([fdo#109271])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-snb4/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-snb4/igt@[email protected]

* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [DMESG-WARN][68] ([fdo#107724]) -> [SKIP][69] ([fdo#109349])
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb2/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb8/igt@[email protected]

* igt@runner@aborted:
- shard-iclb: [FAIL][70] ([fdo#111093]) -> [FAIL][71] ([fdo#111093] / [i915#209])
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/shard-iclb7/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/shard-iclb8/igt@[email protected]

[IGT#28]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/28
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111093]: https://bugs.freedesktop.org/show_bug.cgi?id=111093
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#123]: https://gitlab.freedesktop.org/drm/intel/issues/123
[i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#209]: https://gitlab.freedesktop.org/drm/intel/issues/209
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#478]: https://gitlab.freedesktop.org/drm/intel/issues/478
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
[i915#818]: https://gitlab.freedesktop.org/drm/intel/issues/818
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#831]: https://gitlab.freedesktop.org/drm/intel/issues/831
[i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899

Participating hosts (10 -> 8)
------------------------------

Missing (2): pig-skl-6260u pig-glk-j5005

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

* CI: CI-20190529 -> None
* IGT: IGT_5425 -> IGTPW_4114
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_7887: b147ed9753265260d6380604de01c3d646a323cd @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4114: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4114/index.html
IGT_5425: ad4542ef1adbaa1227bc9ba9e24bb0e0f6dd408d @ 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_4114/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev