All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride.
@ 2019-04-02 19:12 Maarten Lankhorst
  2019-04-02 19:12 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests Maarten Lankhorst
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Maarten Lankhorst @ 2019-04-02 19:12 UTC (permalink / raw)
  To: igt-dev

fb_convert() cannot convert to the HDR formats, so we need a fallback.
When cairo is available on source and target format, create a surface
for source and target. This way we can convert framebuffers directly
when no direct conversion using fb_convert() is available.

This is required to make the kms_chamelium.*-cmp-planes-random tests
pass.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 lib/igt_fb.c | 87 ++++++++++++++++++++++++++++++++--------------------
 1 file changed, 53 insertions(+), 34 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 6adf422228e8..8319c4d5b227 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2976,53 +2976,72 @@ unsigned int igt_fb_convert_with_stride(struct igt_fb *dst, struct igt_fb *src,
 	void *dst_ptr, *src_ptr;
 	uint64_t base_modifier;
 	int fb_id;
+	const struct format_desc_struct *src_format = lookup_drm_format(src->drm_format);
+	const struct format_desc_struct *dst_format = lookup_drm_format(dst_fourcc);
 
 	if (is_vc4_device(src->fd))
 		base_modifier = fourcc_mod_broadcom_mod(dst_modifier);
 	else
 		base_modifier = dst_modifier;
 
-	fb_id = igt_create_fb_with_bo_size(src->fd, src->width, src->height,
-					   dst_fourcc,
-					   LOCAL_DRM_FORMAT_MOD_NONE, &linear,
-					   0, dst_stride);
-	igt_assert(fb_id > 0);
+	if (src_format->cairo_id == CAIRO_FORMAT_INVALID ||
+	    dst_format->cairo_id == CAIRO_FORMAT_INVALID) {
+		fb_id = igt_create_fb_with_bo_size(src->fd, src->width, src->height,
+						dst_fourcc,
+						LOCAL_DRM_FORMAT_MOD_NONE, &linear,
+						0, dst_stride);
+		igt_assert(fb_id > 0);
 
-	src_ptr = igt_fb_map_buffer(src->fd, src);
-	igt_assert(src_ptr);
+		src_ptr = igt_fb_map_buffer(src->fd, src);
+		igt_assert(src_ptr);
 
-	dst_ptr = igt_fb_map_buffer(linear.fd, &linear);
-	igt_assert(dst_ptr);
+		dst_ptr = igt_fb_map_buffer(linear.fd, &linear);
+		igt_assert(dst_ptr);
 
-	cvt.dst.ptr = dst_ptr;
-	cvt.dst.fb = &linear;
-	cvt.src.ptr = src_ptr;
-	cvt.src.fb = src;
-	fb_convert(&cvt);
+		cvt.dst.ptr = dst_ptr;
+		cvt.dst.fb = &linear;
+		cvt.src.ptr = src_ptr;
+		cvt.src.fb = src;
+		fb_convert(&cvt);
 
-	igt_fb_unmap_buffer(dst, dst_ptr);
-	igt_fb_unmap_buffer(src, src_ptr);
+		igt_fb_unmap_buffer(dst, dst_ptr);
+		igt_fb_unmap_buffer(src, src_ptr);
 
-	switch (base_modifier) {
-	case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
-		fb_id = igt_vc4_fb_t_tiled_convert(dst, &linear);
-		break;
-	case DRM_FORMAT_MOD_BROADCOM_SAND32:
-	case DRM_FORMAT_MOD_BROADCOM_SAND64:
-	case DRM_FORMAT_MOD_BROADCOM_SAND128:
-	case DRM_FORMAT_MOD_BROADCOM_SAND256:
-		fb_id = vc4_fb_sand_tiled_convert(dst, &linear, dst_modifier);
-		break;
-	default:
-		igt_assert(dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE);
-	}
+		switch (base_modifier) {
+		case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
+			fb_id = igt_vc4_fb_t_tiled_convert(dst, &linear);
+			break;
+		case DRM_FORMAT_MOD_BROADCOM_SAND32:
+		case DRM_FORMAT_MOD_BROADCOM_SAND64:
+		case DRM_FORMAT_MOD_BROADCOM_SAND128:
+		case DRM_FORMAT_MOD_BROADCOM_SAND256:
+			fb_id = vc4_fb_sand_tiled_convert(dst, &linear, dst_modifier);
+			break;
+		default:
+			igt_assert(dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE);
+		}
 
-	igt_assert(fb_id > 0);
+		igt_assert(fb_id > 0);
 
-	if (dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE)
-		*dst = linear;
-	else
-		igt_remove_fb(linear.fd, &linear);
+		if (dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE)
+			*dst = linear;
+		else
+			igt_remove_fb(linear.fd, &linear);
+	} else {
+		/* Use the cairo api to convert */
+		cairo_surface_t *surf = igt_get_cairo_surface(src->fd, src);
+		cairo_t *cr;
+
+		igt_create_fb_with_bo_size(src->fd, src->width, src->height, dst_fourcc,
+					   dst_modifier, dst, 0, dst_stride);
+
+		cr = igt_get_cairo_ctx(dst->fd, dst);
+		cairo_set_source_surface(cr, surf, 0, 0);
+		cairo_paint(cr);
+		igt_put_cairo_ctx(dst->fd, dst, cr);
+
+		cairo_surface_destroy(surf);
+	}
 
 	return fb_id;
 }
-- 
2.20.1

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

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

* [igt-dev] [PATCH i-g-t 2/2] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests.
  2019-04-02 19:12 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Maarten Lankhorst
@ 2019-04-02 19:12 ` Maarten Lankhorst
  2019-04-04 12:14   ` Paul Kocialkowski
  2019-04-02 19:52 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Patchwork
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Maarten Lankhorst @ 2019-04-02 19:12 UTC (permalink / raw)
  To: igt-dev

The random tests allowed potentially invalid things:
- 1x1 fb's to be created. Force a minimum of 32 so a scaled
  plane will be at least 16x16. This will fix scaled/planar format
  support in i915 and avoid a div by zero when calculating a value
  modulo h/2 and w/2.
- Downscaling to any amount, restrict it to 2x to make the test pass.
- Some hw may not allow scaling, in those cases we should fallback
  to no scaling at all.
- Attempting to configure a minimum of 4 planes, instead of a maximum.
  This fails with a null pointer deref if the hw doesn't have 4
  configurable overlay planes.

Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 tests/kms_chamelium.c | 195 ++++++++++++++++++++++++++++--------------
 1 file changed, 131 insertions(+), 64 deletions(-)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 2dc1049d2dda..5e5c68ccf879 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -792,26 +792,53 @@ static void randomize_plane_format_stride(igt_plane_t *plane,
 }
 
 static void randomize_plane_dimensions(drmModeModeInfo *mode,
-				       uint32_t *width, uint32_t *height,
-				       uint32_t *src_w, uint32_t *src_h,
-				       uint32_t *src_x, uint32_t *src_y,
-				       uint32_t *crtc_w, uint32_t *crtc_h,
-				       int32_t *crtc_x, int32_t *crtc_y,
-				       bool allow_scaling)
+				       uint32_t *width, uint32_t *height)
 {
-	double ratio;
+	/*
+	 * Randomize width and height in the mode dimensions range.
+	 *
+	 * Restrict to a min of 32, this way src_w/h are always at least 16,
+	 * the minimum for scaled planar YUV on i915.
+	 */
+	*width = max((rand() % mode->hdisplay) + 1, 32);
+	*height = max((rand() % mode->vdisplay) + 1, 32);
+}
+
+static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
+			    uint32_t src_x, uint32_t src_y, uint32_t crtc_w,
+			    uint32_t crtc_h, int32_t crtc_x, int32_t crtc_y,
+			    struct igt_fb *fb)
+{
+	igt_plane_set_fb(plane, fb);
 
-	/* Randomize width and height in the mode dimensions range. */
-	*width = (rand() % mode->hdisplay) + 1;
-	*height = (rand() % mode->vdisplay) + 1;
+	igt_plane_set_position(plane, crtc_x, crtc_y);
+	igt_plane_set_size(plane, crtc_w, crtc_h);
+
+	igt_fb_set_position(fb, plane, src_x, src_y);
+	igt_fb_set_size(fb, plane, src_w, src_h);
+}
+
+static void randomize_plane_coordinates(data_t *data, igt_plane_t *plane,
+					drmModeModeInfo *mode,
+					struct igt_fb *fb,
+					uint32_t *src_w, uint32_t *src_h,
+					uint32_t *src_x, uint32_t *src_y,
+					uint32_t *crtc_w, uint32_t *crtc_h,
+					int32_t *crtc_x, int32_t *crtc_y,
+					bool allow_scaling)
+{
+	bool is_yuv = igt_format_is_yuv(fb->drm_format);
+	uint32_t width = fb->width, height = fb->height;
+	double ratio;
+	int ret;
 
 	/* Randomize source offset in the first half of the original size. */
-	*src_x = rand() % (*width / 2);
-	*src_y = rand() % (*height / 2);
+	*src_x = rand() % (width / 2);
+	*src_y = rand() % (height / 2);
 
 	/* The source size only includes the active source area. */
-	*src_w = *width - *src_x;
-	*src_h = *height - *src_y;
+	*src_w = width - *src_x;
+	*src_h = height - *src_y;
 
 	if (allow_scaling) {
 		*crtc_w = (rand() % mode->hdisplay) + 1;
@@ -821,17 +848,22 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
 		 * Don't bother with scaling if dimensions are quite close in
 		 * order to get non-scaling cases more frequently. Also limit
 		 * scaling to 3x to avoid agressive filtering that makes
-		 * comparison less reliable.
+		 * comparison less reliable, and don't go above 2x downsampling
+		 * to avoid possible hw limitations.
 		 */
 
 		ratio = ((double) *crtc_w / *src_w);
-		if (ratio > 0.8 && ratio < 1.2)
+		if (ratio < 0.5)
+			*src_w = *crtc_w * 2;
+		else if (ratio > 0.8 && ratio < 1.2)
 			*crtc_w = *src_w;
 		else if (ratio > 3.0)
 			*crtc_w = *src_w * 3;
 
 		ratio = ((double) *crtc_h / *src_h);
-		if (ratio > 0.8 && ratio < 1.2)
+		if (ratio < 0.5)
+			*src_h = *crtc_h * 2;
+		else if (ratio > 0.8 && ratio < 1.2)
 			*crtc_h = *src_h;
 		else if (ratio > 3.0)
 			*crtc_h = *src_h * 3;
@@ -846,8 +878,15 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
 		 * scaled clipping may result in decimal dimensions, that most
 		 * drivers don't support.
 		 */
-		*crtc_x = rand() % (mode->hdisplay - *crtc_w);
-		*crtc_y = rand() % (mode->vdisplay - *crtc_h);
+		if (*crtc_w < mode->hdisplay)
+			*crtc_x = rand() % (mode->hdisplay - *crtc_w);
+		else
+			*crtc_x = 0;
+
+		if (*crtc_h < mode->vdisplay)
+			*crtc_y = rand() % (mode->vdisplay - *crtc_h);
+		else
+			*crtc_y = 0;
 	} else {
 		/*
 		 * Randomize the on-crtc position and allow the plane to go
@@ -856,6 +895,50 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
 		*crtc_x = (rand() % mode->hdisplay) - *crtc_w / 2;
 		*crtc_y = (rand() % mode->vdisplay) - *crtc_h / 2;
 	}
+
+	configure_plane(plane, *src_w, *src_h, *src_x, *src_y,
+			*crtc_w, *crtc_h, *crtc_x, *crtc_y, fb);
+	ret = igt_display_try_commit_atomic(&data->display,
+					    DRM_MODE_ATOMIC_TEST_ONLY |
+					    DRM_MODE_ATOMIC_ALLOW_MODESET,
+					    NULL);
+	if (!ret)
+		return;
+
+	/* Coordinates are logged in the dumped debug log, so only report w/h on failure here */
+	igt_assert_f(ret != -ENOSPC, "Failure in testcase, invalid coordinates on a %ux%u fb\n", width, height);
+
+	/* Make YUV coordinates a multiple of 2 and retry the math.. */
+	if (is_yuv) {
+		*src_x &= ~1;
+		*src_y &= ~1;
+		*src_w &= ~1;
+		*src_h &= ~1;
+		/* To handle 1:1 scaling, clear crtc_w/h too */
+		*crtc_w &= ~1;
+		*crtc_h &= ~1;
+		configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
+				*crtc_h, *crtc_x, *crtc_y, fb);
+		ret = igt_display_try_commit_atomic(&data->display,
+						DRM_MODE_ATOMIC_TEST_ONLY |
+						DRM_MODE_ATOMIC_ALLOW_MODESET,
+						NULL);
+		if (!ret)
+			return;
+	}
+
+	igt_assert(!ret || allow_scaling);
+	igt_info("Scaling ratio %g / %g failed, trying without scaling.\n",
+		  ((double) *crtc_w / *src_w), ((double) *crtc_h / *src_h));
+
+	*crtc_w = *src_w;
+	*crtc_h = *src_h;
+
+	configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
+			*crtc_h, *crtc_x, *crtc_y, fb);
+	igt_display_commit_atomic(&data->display,
+				  DRM_MODE_ATOMIC_TEST_ONLY |
+				  DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
 }
 
 static void blit_plane_cairo(data_t *data, cairo_surface_t *result,
@@ -914,20 +997,6 @@ static void blit_plane_cairo(data_t *data, cairo_surface_t *result,
 	cairo_destroy(cr);
 }
 
-static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
-			    uint32_t src_x, uint32_t src_y, uint32_t crtc_w,
-			    uint32_t crtc_h, int32_t crtc_x, int32_t crtc_y,
-			    struct igt_fb *fb)
-{
-	igt_plane_set_fb(plane, fb);
-
-	igt_plane_set_position(plane, crtc_x, crtc_y);
-	igt_plane_set_size(plane, crtc_w, crtc_h);
-
-	igt_fb_set_position(fb, plane, src_x, src_y);
-	igt_fb_set_size(fb, plane, src_w, src_h);
-}
-
 static void prepare_randomized_plane(data_t *data,
 				     drmModeModeInfo *mode,
 				     igt_plane_t *plane,
@@ -947,24 +1016,12 @@ static void prepare_randomized_plane(data_t *data,
 	size_t stride;
 	bool tiled;
 	int fb_id;
+	uint32_t tile_w, tile_h;
 
-	randomize_plane_dimensions(mode, &overlay_fb_w, &overlay_fb_h,
-				   &overlay_src_w, &overlay_src_h,
-				   &overlay_src_x, &overlay_src_y,
-				   &overlay_crtc_w, &overlay_crtc_h,
-				   &overlay_crtc_x, &overlay_crtc_y,
-				   allow_scaling);
+	randomize_plane_dimensions(mode, &overlay_fb_w, &overlay_fb_h);
 
 	igt_debug("Plane %d: framebuffer size %dx%d\n", index,
 		  overlay_fb_w, overlay_fb_h);
-	igt_debug("Plane %d: on-crtc size %dx%d\n", index,
-		  overlay_crtc_w, overlay_crtc_h);
-	igt_debug("Plane %d: on-crtc position %dx%d\n", index,
-		  overlay_crtc_x, overlay_crtc_y);
-	igt_debug("Plane %d: in-framebuffer size %dx%d\n", index,
-		  overlay_src_w, overlay_src_h);
-	igt_debug("Plane %d: in-framebuffer position %dx%d\n", index,
-		  overlay_src_x, overlay_src_y);
 
 	/* Get a pattern framebuffer for the overlay plane. */
 	fb_id = chamelium_get_pattern_fb(data, overlay_fb_w, overlay_fb_h,
@@ -976,23 +1033,42 @@ static void prepare_randomized_plane(data_t *data,
 
 	tiled = (modifier != LOCAL_DRM_FORMAT_MOD_NONE);
 
+	igt_get_fb_tile_size(data->display.drm_fd, modifier,
+			     igt_drm_format_to_bpp(format),
+			     &tile_w, &tile_h);
+
+	/* Make sure stride is a multiple of tile size */
+	stride = DIV_ROUND_UP(stride, tile_w) * tile_w;
+
 	igt_debug("Plane %d: %s format (%s) with stride %ld\n", index,
 		  igt_format_str(format), tiled ? "tiled" : "linear", stride);
 
+
 	fb_id = igt_fb_convert_with_stride(overlay_fb, &pattern_fb, format,
 					   modifier, stride);
 	igt_assert(fb_id > 0);
 
+	randomize_plane_coordinates(data, plane, mode, overlay_fb,
+				    &overlay_src_w, &overlay_src_h,
+				    &overlay_src_x, &overlay_src_y,
+				    &overlay_crtc_w, &overlay_crtc_h,
+				    &overlay_crtc_x, &overlay_crtc_y,
+				    allow_scaling);
+
+	igt_debug("Plane %d: in-framebuffer size %dx%d\n", index,
+		  overlay_src_w, overlay_src_h);
+	igt_debug("Plane %d: in-framebuffer position %dx%d\n", index,
+		  overlay_src_x, overlay_src_y);
+	igt_debug("Plane %d: on-crtc size %dx%d\n", index,
+		  overlay_crtc_w, overlay_crtc_h);
+	igt_debug("Plane %d: on-crtc position %dx%d\n", index,
+		  overlay_crtc_x, overlay_crtc_y);
+
 	blit_plane_cairo(data, result_surface, overlay_src_w, overlay_src_h,
 			 overlay_src_x, overlay_src_y,
 			 overlay_crtc_w, overlay_crtc_h,
 			 overlay_crtc_x, overlay_crtc_y, &pattern_fb);
 
-	configure_plane(plane, overlay_src_w, overlay_src_h,
-			overlay_src_x, overlay_src_y,
-			overlay_crtc_w, overlay_crtc_h,
-			overlay_crtc_x, overlay_crtc_y, overlay_fb);
-
 	/* Remove the original pattern framebuffer. */
 	igt_remove_fb(data->drm_fd, &pattern_fb);
 }
@@ -1068,7 +1144,7 @@ static void test_display_planes_random(data_t *data,
 		igt_output_count_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
 
 	/* Limit the number of planes to a reasonable scene. */
-	overlay_planes_max = max(overlay_planes_max, 4);
+	overlay_planes_max = min(overlay_planes_max, 4);
 
 	overlay_planes_count = (rand() % overlay_planes_max) + 1;
 	igt_debug("Using %d overlay planes\n", overlay_planes_count);
@@ -1121,17 +1197,8 @@ static void test_display_planes_random(data_t *data,
 		chamelium_destroy_frame_dump(dump);
 	}
 
-	for (i = 0; i < overlay_planes_count; i++) {
-		struct igt_fb *overlay_fb = &overlay_fbs[i];
-		igt_plane_t *plane;
-
-		plane = igt_output_get_plane_type_index(output,
-							DRM_PLANE_TYPE_OVERLAY,
-							i);
-		igt_assert(plane);
-
-		igt_remove_fb(data->drm_fd, overlay_fb);
-	}
+	for (i = 0; i < overlay_planes_count; i++)
+		igt_remove_fb(data->drm_fd, &overlay_fbs[i]);
 
 	free(overlay_fbs);
 
-- 
2.20.1

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

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

* [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride.
  2019-04-02 19:12 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Maarten Lankhorst
  2019-04-02 19:12 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests Maarten Lankhorst
@ 2019-04-02 19:52 ` Patchwork
  2019-04-03  9:50 ` [igt-dev] [PATCH i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2 Maarten Lankhorst
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-04-02 19:52 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride.
URL   : https://patchwork.freedesktop.org/series/58886/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5856 -> IGTPW_2765
====================================================

Summary
-------

  **FAILURE**

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

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

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@kms_chamelium@dp-crc-fast:
    - fi-kbl-7500u:       NOTRUN -> FAIL +1

  * igt@kms_chamelium@hdmi-crc-fast:
    - fi-skl-6700k2:      PASS -> FAIL
    - fi-kbl-7567u:       PASS -> FAIL

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_cs_nop@fork-compute0:
    - fi-icl-y:           NOTRUN -> SKIP [fdo#109315] +17

  * igt@gem_exec_basic@basic-bsd2:
    - fi-kbl-7500u:       NOTRUN -> SKIP [fdo#109271] +38
    - fi-icl-y:           NOTRUN -> SKIP [fdo#109276] +7

  * igt@gem_exec_parse@basic-rejected:
    - fi-icl-y:           NOTRUN -> SKIP [fdo#109289] +1

  * igt@i915_selftest@live_contexts:
    - fi-icl-y:           NOTRUN -> DMESG-FAIL [fdo#108569]

  * igt@i915_selftest@live_requests:
    - fi-icl-u3:          PASS -> INCOMPLETE [fdo#109644]

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-kbl-7500u:       NOTRUN -> DMESG-WARN [fdo#102505] / [fdo#103558] / [fdo#105079] / [fdo#105602]

  * igt@kms_chamelium@dp-crc-fast:
    - fi-icl-y:           NOTRUN -> SKIP [fdo#109284] +8

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-icl-y:           NOTRUN -> SKIP [fdo#109285] +3

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103191] / [fdo#107362] +2

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

  * igt@kms_psr@primary_mmap_gtt:
    - fi-icl-y:           NOTRUN -> SKIP [fdo#110189] +3
    - fi-byt-clapper:     NOTRUN -> SKIP [fdo#109271] +23

  * igt@kms_psr@primary_page_flip:
    - fi-apl-guc:         NOTRUN -> SKIP [fdo#109271] +50

  * igt@prime_vgem@basic-fence-flip:
    - fi-icl-y:           NOTRUN -> SKIP [fdo#109294]

  
#### Possible fixes ####

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      DMESG-FAIL [fdo#110235 ] -> PASS
    - fi-skl-gvtdvm:      DMESG-FAIL [fdo#110235 ] -> PASS

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
    - fi-byt-clapper:     FAIL [fdo#107362] -> PASS

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

  
#### Warnings ####

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

  
  [fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505
  [fdo#102657]: https://bugs.freedesktop.org/show_bug.cgi?id=102657
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109294]: https://bugs.freedesktop.org/show_bug.cgi?id=109294
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109644]: https://bugs.freedesktop.org/show_bug.cgi?id=109644
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 


Participating hosts (43 -> 40)
------------------------------

  Additional (3): fi-icl-y fi-apl-guc fi-kbl-7500u 
  Missing    (6): fi-hsw-4770r fi-ilk-m540 fi-byt-squawks fi-skl-6260u fi-bdw-samus fi-snb-2600 


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

    * IGT: IGT_4922 -> IGTPW_2765

  CI_DRM_5856: 55074bd825098a71779cf65a69786547f0eccbe9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2765: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2765/
  IGT_4922: e941e4a29438c7130554492e4daf52afbc99ffdf @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] [PATCH i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2.
  2019-04-02 19:12 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Maarten Lankhorst
  2019-04-02 19:12 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests Maarten Lankhorst
  2019-04-02 19:52 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Patchwork
@ 2019-04-03  9:50 ` Maarten Lankhorst
  2019-04-05 12:53   ` Juha-Pekka Heikkila
  2019-04-03 10:46 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev2) Patchwork
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Maarten Lankhorst @ 2019-04-03  9:50 UTC (permalink / raw)
  To: igt-dev

fb_convert() cannot convert to the HDR formats, so we need a fallback.
When cairo is available on source and target format, create a surface
for source and target. This way we can convert framebuffers directly
when no direct conversion using fb_convert() is available.

This is required to make the kms_chamelium.*-cmp-planes-random tests
pass.

Changes since v1:
- Return fb_id in the cairo case.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 lib/igt_fb.c | 90 ++++++++++++++++++++++++++++++++--------------------
 1 file changed, 56 insertions(+), 34 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 6adf422228e8..a79b3f832c51 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2976,53 +2976,75 @@ unsigned int igt_fb_convert_with_stride(struct igt_fb *dst, struct igt_fb *src,
 	void *dst_ptr, *src_ptr;
 	uint64_t base_modifier;
 	int fb_id;
+	const struct format_desc_struct *src_format = lookup_drm_format(src->drm_format);
+	const struct format_desc_struct *dst_format = lookup_drm_format(dst_fourcc);
 
 	if (is_vc4_device(src->fd))
 		base_modifier = fourcc_mod_broadcom_mod(dst_modifier);
 	else
 		base_modifier = dst_modifier;
 
-	fb_id = igt_create_fb_with_bo_size(src->fd, src->width, src->height,
-					   dst_fourcc,
-					   LOCAL_DRM_FORMAT_MOD_NONE, &linear,
-					   0, dst_stride);
-	igt_assert(fb_id > 0);
+	if (src_format->cairo_id == CAIRO_FORMAT_INVALID ||
+	    dst_format->cairo_id == CAIRO_FORMAT_INVALID) {
+		fb_id = igt_create_fb_with_bo_size(src->fd, src->width, src->height,
+						dst_fourcc,
+						LOCAL_DRM_FORMAT_MOD_NONE, &linear,
+						0, dst_stride);
+		igt_assert(fb_id > 0);
 
-	src_ptr = igt_fb_map_buffer(src->fd, src);
-	igt_assert(src_ptr);
+		src_ptr = igt_fb_map_buffer(src->fd, src);
+		igt_assert(src_ptr);
 
-	dst_ptr = igt_fb_map_buffer(linear.fd, &linear);
-	igt_assert(dst_ptr);
+		dst_ptr = igt_fb_map_buffer(linear.fd, &linear);
+		igt_assert(dst_ptr);
 
-	cvt.dst.ptr = dst_ptr;
-	cvt.dst.fb = &linear;
-	cvt.src.ptr = src_ptr;
-	cvt.src.fb = src;
-	fb_convert(&cvt);
+		cvt.dst.ptr = dst_ptr;
+		cvt.dst.fb = &linear;
+		cvt.src.ptr = src_ptr;
+		cvt.src.fb = src;
+		fb_convert(&cvt);
 
-	igt_fb_unmap_buffer(dst, dst_ptr);
-	igt_fb_unmap_buffer(src, src_ptr);
+		igt_fb_unmap_buffer(dst, dst_ptr);
+		igt_fb_unmap_buffer(src, src_ptr);
 
-	switch (base_modifier) {
-	case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
-		fb_id = igt_vc4_fb_t_tiled_convert(dst, &linear);
-		break;
-	case DRM_FORMAT_MOD_BROADCOM_SAND32:
-	case DRM_FORMAT_MOD_BROADCOM_SAND64:
-	case DRM_FORMAT_MOD_BROADCOM_SAND128:
-	case DRM_FORMAT_MOD_BROADCOM_SAND256:
-		fb_id = vc4_fb_sand_tiled_convert(dst, &linear, dst_modifier);
-		break;
-	default:
-		igt_assert(dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE);
-	}
+		switch (base_modifier) {
+		case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
+			fb_id = igt_vc4_fb_t_tiled_convert(dst, &linear);
+			break;
+		case DRM_FORMAT_MOD_BROADCOM_SAND32:
+		case DRM_FORMAT_MOD_BROADCOM_SAND64:
+		case DRM_FORMAT_MOD_BROADCOM_SAND128:
+		case DRM_FORMAT_MOD_BROADCOM_SAND256:
+			fb_id = vc4_fb_sand_tiled_convert(dst, &linear, dst_modifier);
+			break;
+		default:
+			igt_assert(dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE);
+		}
 
-	igt_assert(fb_id > 0);
+		igt_assert(fb_id > 0);
 
-	if (dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE)
-		*dst = linear;
-	else
-		igt_remove_fb(linear.fd, &linear);
+		if (dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE)
+			*dst = linear;
+		else
+			igt_remove_fb(linear.fd, &linear);
+	} else {
+		/* Use the cairo api to convert */
+		cairo_surface_t *surf = igt_get_cairo_surface(src->fd, src);
+		cairo_t *cr;
+
+		fb_id = igt_create_fb_with_bo_size(src->fd, src->width,
+						   src->height, dst_fourcc,
+						   dst_modifier, dst, 0,
+						   dst_stride);
+		igt_assert(fb_id > 0);
+
+		cr = igt_get_cairo_ctx(dst->fd, dst);
+		cairo_set_source_surface(cr, surf, 0, 0);
+		cairo_paint(cr);
+		igt_put_cairo_ctx(dst->fd, dst, cr);
+
+		cairo_surface_destroy(surf);
+	}
 
 	return fb_id;
 }
-- 
2.20.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev2)
  2019-04-02 19:12 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Maarten Lankhorst
                   ` (2 preceding siblings ...)
  2019-04-03  9:50 ` [igt-dev] [PATCH i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2 Maarten Lankhorst
@ 2019-04-03 10:46 ` Patchwork
  2019-04-04  0:48 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-04-03 10:46 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev2)
URL   : https://patchwork.freedesktop.org/series/58886/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5861 -> IGTPW_2770
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@semaphore:
    - fi-kbl-7500u:       NOTRUN -> SKIP [fdo#109271] +28

  * igt@amdgpu/amd_basic@userptr:
    - fi-kbl-8809g:       PASS -> DMESG-WARN [fdo#108965]

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      PASS -> DMESG-FAIL [fdo#110235 ]

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-kbl-7500u:       NOTRUN -> DMESG-WARN [fdo#102505] / [fdo#103558] / [fdo#105079] / [fdo#105602]

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

  
#### Possible fixes ####

  * igt@i915_pm_rpm@module-reload:
    - fi-skl-6770hq:      FAIL [fdo#108511] -> PASS

  * igt@i915_selftest@live_evict:
    - fi-bsw-kefka:       DMESG-WARN [fdo#107709] -> PASS

  * igt@kms_chamelium@dp-crc-fast:
    - fi-kbl-7500u:       DMESG-WARN [fdo#103841] -> PASS

  
  [fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841
  [fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
  [fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
  [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 


Participating hosts (46 -> 40)
------------------------------

  Missing    (6): fi-kbl-soraka fi-ilk-m540 fi-bsw-n3050 fi-byt-squawks fi-bsw-cyan fi-icl-y 


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

    * IGT: IGT_4923 -> IGTPW_2770

  CI_DRM_5861: 4ff4bc23223973b339f246102499189833d04581 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2770: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2770/
  IGT_4923: 6285eec4f3b8f21833d9d2d852883569d6551822 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev2)
  2019-04-02 19:12 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Maarten Lankhorst
                   ` (3 preceding siblings ...)
  2019-04-03 10:46 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev2) Patchwork
@ 2019-04-04  0:48 ` Patchwork
  2019-04-05  9:35 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev3) Patchwork
  2019-04-06  3:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-04-04  0:48 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev2)
URL   : https://patchwork.freedesktop.org/series/58886/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5861_full -> IGTPW_2770_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-snb:          PASS -> SKIP [fdo#109271]

  * igt@i915_pm_rps@waitboost:
    - shard-apl:          PASS -> FAIL [fdo#102250]
    - shard-kbl:          PASS -> FAIL [fdo#102250]

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

  * igt@kms_busy@extended-modeset-hang-newfb-render-c:
    - shard-hsw:          PASS -> DMESG-WARN [fdo#110222] +1

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

  * igt@kms_busy@extended-modeset-hang-oldfb-with-reset-render-c:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +4

  * igt@kms_busy@extended-pageflip-hang-newfb-render-a:
    - shard-apl:          PASS -> DMESG-WARN [fdo#110222]

  * igt@kms_chv_cursor_fail@pipe-b-256x256-top-edge:
    - shard-kbl:          PASS -> DMESG-FAIL [fdo#103558] / [fdo#104671] / [fdo#105602]

  * igt@kms_concurrent@pipe-b:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#105345]

  * igt@kms_content_protection@legacy:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +38

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

  * igt@kms_cursor_legacy@all-pipes-single-move:
    - shard-glk:          PASS -> INCOMPLETE [fdo#103359] / [k.org#198133]

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#103558] / [fdo#105602] +36

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

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-cpu:
    - shard-glk:          PASS -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-shrfb-draw-mmap-wc:
    - shard-kbl:          NOTRUN -> SKIP [fdo#105602] / [fdo#109271]

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-wc:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +27

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-onoff:
    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] +14

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-e:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +4

  * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
    - shard-apl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2

  * igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format:
    - shard-glk:          PASS -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_setmode@basic:
    - shard-kbl:          NOTRUN -> FAIL [fdo#99912]

  * igt@kms_universal_plane@universal-plane-gen9-features-pipe-e:
    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

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

  * igt@kms_vrr@flip-suspend:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +41

  * igt@prime_vgem@sync-bsd1:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +24

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3-devices:
    - shard-hsw:          INCOMPLETE [fdo#103540] -> PASS

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
    - shard-hsw:          DMESG-WARN [fdo#110222] -> PASS

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

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

  * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
    - shard-glk:          FAIL [fdo#108145] -> PASS
    - shard-kbl:          FAIL [fdo#108145] -> PASS
    - shard-apl:          FAIL [fdo#108145] -> PASS

  * igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format:
    - shard-glk:          SKIP [fdo#109271] / [fdo#109278] -> PASS

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

  
#### Warnings ####

  * igt@kms_content_protection@atomic-dpms:
    - shard-kbl:          FAIL [fdo#108739] -> DMESG-FAIL [fdo#103558] / [fdo#105602]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
    - shard-kbl:          FAIL [fdo#108145] / [fdo#108590] -> DMESG-FAIL [fdo#103558] / [fdo#105602] / [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb:
    - shard-kbl:          FAIL [fdo#108145] -> DMESG-FAIL [fdo#103558] / [fdo#105602] / [fdo#108145]

  
  [fdo#102250]: https://bugs.freedesktop.org/show_bug.cgi?id=102250
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [fdo#104671]: https://bugs.freedesktop.org/show_bug.cgi?id=104671
  [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105345]: https://bugs.freedesktop.org/show_bug.cgi?id=105345
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
  [fdo#108739]: https://bugs.freedesktop.org/show_bug.cgi?id=108739
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (10 -> 5)
------------------------------

  Missing    (5): shard-skl pig-hsw-4770r pig-glk-j5005 shard-iclb pig-skl-6260u 


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

    * IGT: IGT_4923 -> IGTPW_2770
    * Piglit: piglit_4509 -> None

  CI_DRM_5861: 4ff4bc23223973b339f246102499189833d04581 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2770: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2770/
  IGT_4923: 6285eec4f3b8f21833d9d2d852883569d6551822 @ 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_2770/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests.
  2019-04-02 19:12 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests Maarten Lankhorst
@ 2019-04-04 12:14   ` Paul Kocialkowski
  2019-04-04 13:42     ` Maarten Lankhorst
  2019-04-05  8:24     ` [igt-dev] [PATCH i-g-t] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests, v2 Maarten Lankhorst
  0 siblings, 2 replies; 14+ messages in thread
From: Paul Kocialkowski @ 2019-04-04 12:14 UTC (permalink / raw)
  To: Maarten Lankhorst, igt-dev

Hi,

Le mardi 02 avril 2019 à 21:12 +0200, Maarten Lankhorst a écrit :
> The random tests allowed potentially invalid things:
> - 1x1 fb's to be created. Force a minimum of 32 so a scaled
>   plane will be at least 16x16. This will fix scaled/planar format
>   support in i915 and avoid a div by zero when calculating a value
>   modulo h/2 and w/2.
> - Downscaling to any amount, restrict it to 2x to make the test pass.
> - Some hw may not allow scaling, in those cases we should fallback
>   to no scaling at all.
> - Attempting to configure a minimum of 4 planes, instead of a maximum.
>   This fails with a null pointer deref if the hw doesn't have 4
>   configurable overlay planes.

Thanks for your work, it's nice to see improvements and fixes for the
shortcomings of my initial implementation. Most of it looks good to me,
but I have some reservations about how we should handle hw-specific
limits, see comments below.

> Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  tests/kms_chamelium.c | 195 ++++++++++++++++++++++++++++--------------
>  1 file changed, 131 insertions(+), 64 deletions(-)
> 
> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> index 2dc1049d2dda..5e5c68ccf879 100644
> --- a/tests/kms_chamelium.c
> +++ b/tests/kms_chamelium.c
> @@ -792,26 +792,53 @@ static void randomize_plane_format_stride(igt_plane_t *plane,
>  }
>  
>  static void randomize_plane_dimensions(drmModeModeInfo *mode,
> -				       uint32_t *width, uint32_t *height,
> -				       uint32_t *src_w, uint32_t *src_h,
> -				       uint32_t *src_x, uint32_t *src_y,
> -				       uint32_t *crtc_w, uint32_t *crtc_h,
> -				       int32_t *crtc_x, int32_t *crtc_y,
> -				       bool allow_scaling)
> +				       uint32_t *width, uint32_t *height)
>  {
> -	double ratio;
> +	/*
> +	 * Randomize width and height in the mode dimensions range.
> +	 *
> +	 * Restrict to a min of 32, this way src_w/h are always at least 16,
> +	 * the minimum for scaled planar YUV on i915.
> +	 */

Mhh, I don't really like the idea of constraining the tests to avoid
hitting hardware-specific limitations. Since the test is not supposed
to be tied to a driver in particular, trying to handle these limits
explicitly feels like a slippery slope. I believe it should be up to
the kernel to report these limits, not for userspace to have them
hardcoded. (Although I would be lying if I said that I didn't tailor
the test explicitly for my use case (with VC4).)

So here is a proposal: let's have an initial function that probes what
the hardware can and can't do in terms of plane min/max size and
up/down scaling. I would expect that i915 rejects commits where the
plane dimensions and such are off-limits (maybe it's also in the props
ranges directly), so we can test just that early and constrain the test
based on that info later on, so we keep the code generic and avoid
comments about why driver/hardware x/y needs to do this or that.

What do you think?

> +	*width = max((rand() % mode->hdisplay) + 1, 32);
> +	*height = max((rand() % mode->vdisplay) + 1, 32);

Testing a small plane feels like a case we should consider if the
hardware is supposed to be able to do it.

I'm not opposed to having "reasonable" limits though (nobody needs a
1x1 plane for anything), but maybe that should be e.g. 8x8 rather than
32x32.

> +}
> +
> +static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
> +			    uint32_t src_x, uint32_t src_y, uint32_t crtc_w,
> +			    uint32_t crtc_h, int32_t crtc_x, int32_t crtc_y,
> +			    struct igt_fb *fb)
> +{
> +	igt_plane_set_fb(plane, fb);
>  
> -	/* Randomize width and height in the mode dimensions range. */
> -	*width = (rand() % mode->hdisplay) + 1;
> -	*height = (rand() % mode->vdisplay) + 1;
> +	igt_plane_set_position(plane, crtc_x, crtc_y);
> +	igt_plane_set_size(plane, crtc_w, crtc_h);
> +
> +	igt_fb_set_position(fb, plane, src_x, src_y);
> +	igt_fb_set_size(fb, plane, src_w, src_h);
> +}
> +
> +static void randomize_plane_coordinates(data_t *data, igt_plane_t *plane,
> +					drmModeModeInfo *mode,
> +					struct igt_fb *fb,
> +					uint32_t *src_w, uint32_t *src_h,
> +					uint32_t *src_x, uint32_t *src_y,
> +					uint32_t *crtc_w, uint32_t *crtc_h,
> +					int32_t *crtc_x, int32_t *crtc_y,
> +					bool allow_scaling)
> +{
> +	bool is_yuv = igt_format_is_yuv(fb->drm_format);
> +	uint32_t width = fb->width, height = fb->height;
> +	double ratio;
> +	int ret;
>  
>  	/* Randomize source offset in the first half of the original size. */
> -	*src_x = rand() % (*width / 2);
> -	*src_y = rand() % (*height / 2);
> +	*src_x = rand() % (width / 2);
> +	*src_y = rand() % (height / 2);
>  
>  	/* The source size only includes the active source area. */
> -	*src_w = *width - *src_x;
> -	*src_h = *height - *src_y;
> +	*src_w = width - *src_x;
> +	*src_h = height - *src_y;
>  
>  	if (allow_scaling) {
>  		*crtc_w = (rand() % mode->hdisplay) + 1;
> @@ -821,17 +848,22 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
>  		 * Don't bother with scaling if dimensions are quite close in
>  		 * order to get non-scaling cases more frequently. Also limit
>  		 * scaling to 3x to avoid agressive filtering that makes
> -		 * comparison less reliable.
> +		 * comparison less reliable, and don't go above 2x downsampling
> +		 * to avoid possible hw limitations.
>  		 */

Same comment as above about hw limits, although 2x downsampling does
feel like a reasonable general limit too.

>  
>  		ratio = ((double) *crtc_w / *src_w);
> -		if (ratio > 0.8 && ratio < 1.2)
> +		if (ratio < 0.5)
> +			*src_w = *crtc_w * 2;
> +		else if (ratio > 0.8 && ratio < 1.2)
>  			*crtc_w = *src_w;
>  		else if (ratio > 3.0)
>  			*crtc_w = *src_w * 3;
>  
>  		ratio = ((double) *crtc_h / *src_h);
> -		if (ratio > 0.8 && ratio < 1.2)
> +		if (ratio < 0.5)
> +			*src_h = *crtc_h * 2;
> +		else if (ratio > 0.8 && ratio < 1.2)
>  			*crtc_h = *src_h;
>  		else if (ratio > 3.0)
>  			*crtc_h = *src_h * 3;
> @@ -846,8 +878,15 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
>  		 * scaled clipping may result in decimal dimensions, that most
>  		 * drivers don't support.
>  		 */
> -		*crtc_x = rand() % (mode->hdisplay - *crtc_w);
> -		*crtc_y = rand() % (mode->vdisplay - *crtc_h);
> +		if (*crtc_w < mode->hdisplay)
> +			*crtc_x = rand() % (mode->hdisplay - *crtc_w);
> +		else
> +			*crtc_x = 0;
> +
> +		if (*crtc_h < mode->vdisplay)
> +			*crtc_y = rand() % (mode->vdisplay - *crtc_h);
> +		else
> +			*crtc_y = 0;
>  	} else {
>  		/*
>  		 * Randomize the on-crtc position and allow the plane to go
> @@ -856,6 +895,50 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
>  		*crtc_x = (rand() % mode->hdisplay) - *crtc_w / 2;
>  		*crtc_y = (rand() % mode->vdisplay) - *crtc_h / 2;
>  	}
> +
> +	configure_plane(plane, *src_w, *src_h, *src_x, *src_y,
> +			*crtc_w, *crtc_h, *crtc_x, *crtc_y, fb);
> +	ret = igt_display_try_commit_atomic(&data->display,
> +					    DRM_MODE_ATOMIC_TEST_ONLY |
> +					    DRM_MODE_ATOMIC_ALLOW_MODESET,
> +					    NULL);
> +	if (!ret)
> +		return;
> +
> +	/* Coordinates are logged in the dumped debug log, so only report w/h on failure here */

Maybe add a trailing "." here.

> +	igt_assert_f(ret != -ENOSPC, "Failure in testcase, invalid coordinates on a %ux%u fb\n", width, height);
> +
> +	/* Make YUV coordinates a multiple of 2 and retry the math.. */

Maybe remove a trailing "." here.

> +	if (is_yuv) {
> +		*src_x &= ~1;
> +		*src_y &= ~1;
> +		*src_w &= ~1;
> +		*src_h &= ~1;
> +		/* To handle 1:1 scaling, clear crtc_w/h too */
> +		*crtc_w &= ~1;
> +		*crtc_h &= ~1;
> +		configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
> +				*crtc_h, *crtc_x, *crtc_y, fb);
> +		ret = igt_display_try_commit_atomic(&data->display,
> +						DRM_MODE_ATOMIC_TEST_ONLY |
> +						DRM_MODE_ATOMIC_ALLOW_MODESET,
> +						NULL);
> +		if (!ret)
> +			return;
> +	}
> +
> +	igt_assert(!ret || allow_scaling);
> +	igt_info("Scaling ratio %g / %g failed, trying without scaling.\n",
> +		  ((double) *crtc_w / *src_w), ((double) *crtc_h / *src_h));
> +
> +	*crtc_w = *src_w;
> +	*crtc_h = *src_h;
> +
> +	configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
> +			*crtc_h, *crtc_x, *crtc_y, fb);
> +	igt_display_commit_atomic(&data->display,
> +				  DRM_MODE_ATOMIC_TEST_ONLY |
> +				  DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);

I don't understand the purpose of this trailing call.

>  }
>  
>  static void blit_plane_cairo(data_t *data, cairo_surface_t *result,
> @@ -914,20 +997,6 @@ static void blit_plane_cairo(data_t *data, cairo_surface_t *result,
>  	cairo_destroy(cr);
>  }
>  
> -static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
> -			    uint32_t src_x, uint32_t src_y, uint32_t crtc_w,
> -			    uint32_t crtc_h, int32_t crtc_x, int32_t crtc_y,
> -			    struct igt_fb *fb)
> -{
> -	igt_plane_set_fb(plane, fb);
> -
> -	igt_plane_set_position(plane, crtc_x, crtc_y);
> -	igt_plane_set_size(plane, crtc_w, crtc_h);
> -
> -	igt_fb_set_position(fb, plane, src_x, src_y);
> -	igt_fb_set_size(fb, plane, src_w, src_h);
> -}
> -
>  static void prepare_randomized_plane(data_t *data,
>  				     drmModeModeInfo *mode,
>  				     igt_plane_t *plane,
> @@ -947,24 +1016,12 @@ static void prepare_randomized_plane(data_t *data,
>  	size_t stride;
>  	bool tiled;
>  	int fb_id;
> +	uint32_t tile_w, tile_h;
>  
> -	randomize_plane_dimensions(mode, &overlay_fb_w, &overlay_fb_h,
> -				   &overlay_src_w, &overlay_src_h,
> -				   &overlay_src_x, &overlay_src_y,
> -				   &overlay_crtc_w, &overlay_crtc_h,
> -				   &overlay_crtc_x, &overlay_crtc_y,
> -				   allow_scaling);
> +	randomize_plane_dimensions(mode, &overlay_fb_w, &overlay_fb_h);
>  
>  	igt_debug("Plane %d: framebuffer size %dx%d\n", index,
>  		  overlay_fb_w, overlay_fb_h);
> -	igt_debug("Plane %d: on-crtc size %dx%d\n", index,
> -		  overlay_crtc_w, overlay_crtc_h);
> -	igt_debug("Plane %d: on-crtc position %dx%d\n", index,
> -		  overlay_crtc_x, overlay_crtc_y);
> -	igt_debug("Plane %d: in-framebuffer size %dx%d\n", index,
> -		  overlay_src_w, overlay_src_h);
> -	igt_debug("Plane %d: in-framebuffer position %dx%d\n", index,
> -		  overlay_src_x, overlay_src_y);
>  
>  	/* Get a pattern framebuffer for the overlay plane. */
>  	fb_id = chamelium_get_pattern_fb(data, overlay_fb_w, overlay_fb_h,
> @@ -976,23 +1033,42 @@ static void prepare_randomized_plane(data_t *data,
>  
>  	tiled = (modifier != LOCAL_DRM_FORMAT_MOD_NONE);
>  
> +	igt_get_fb_tile_size(data->display.drm_fd, modifier,
> +			     igt_drm_format_to_bpp(format),
> +			     &tile_w, &tile_h);
> +
> +	/* Make sure stride is a multiple of tile size */
> +	stride = DIV_ROUND_UP(stride, tile_w) * tile_w;
> +
>  	igt_debug("Plane %d: %s format (%s) with stride %ld\n", index,
>  		  igt_format_str(format), tiled ? "tiled" : "linear", stride);
>  
> +
>  	fb_id = igt_fb_convert_with_stride(overlay_fb, &pattern_fb, format,
>  					   modifier, stride);
>  	igt_assert(fb_id > 0);
>  
> +	randomize_plane_coordinates(data, plane, mode, overlay_fb,
> +				    &overlay_src_w, &overlay_src_h,
> +				    &overlay_src_x, &overlay_src_y,
> +				    &overlay_crtc_w, &overlay_crtc_h,
> +				    &overlay_crtc_x, &overlay_crtc_y,
> +				    allow_scaling);
> +
> +	igt_debug("Plane %d: in-framebuffer size %dx%d\n", index,
> +		  overlay_src_w, overlay_src_h);
> +	igt_debug("Plane %d: in-framebuffer position %dx%d\n", index,
> +		  overlay_src_x, overlay_src_y);
> +	igt_debug("Plane %d: on-crtc size %dx%d\n", index,
> +		  overlay_crtc_w, overlay_crtc_h);
> +	igt_debug("Plane %d: on-crtc position %dx%d\n", index,
> +		  overlay_crtc_x, overlay_crtc_y);
> +
>  	blit_plane_cairo(data, result_surface, overlay_src_w, overlay_src_h,
>  			 overlay_src_x, overlay_src_y,
>  			 overlay_crtc_w, overlay_crtc_h,
>  			 overlay_crtc_x, overlay_crtc_y, &pattern_fb);
>  
> -	configure_plane(plane, overlay_src_w, overlay_src_h,
> -			overlay_src_x, overlay_src_y,
> -			overlay_crtc_w, overlay_crtc_h,
> -			overlay_crtc_x, overlay_crtc_y, overlay_fb);
> -
>  	/* Remove the original pattern framebuffer. */
>  	igt_remove_fb(data->drm_fd, &pattern_fb);
>  }
> @@ -1068,7 +1144,7 @@ static void test_display_planes_random(data_t *data,
>  		igt_output_count_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
>  
>  	/* Limit the number of planes to a reasonable scene. */
> -	overlay_planes_max = max(overlay_planes_max, 4);
> +	overlay_planes_max = min(overlay_planes_max, 4);
>  
>  	overlay_planes_count = (rand() % overlay_planes_max) + 1;
>  	igt_debug("Using %d overlay planes\n", overlay_planes_count);
> @@ -1121,17 +1197,8 @@ static void test_display_planes_random(data_t *data,
>  		chamelium_destroy_frame_dump(dump);
>  	}
>  
> -	for (i = 0; i < overlay_planes_count; i++) {
> -		struct igt_fb *overlay_fb = &overlay_fbs[i];
> -		igt_plane_t *plane;
> -
> -		plane = igt_output_get_plane_type_index(output,
> -							DRM_PLANE_TYPE_OVERLAY,
> -							i);
> -		igt_assert(plane);
> -
> -		igt_remove_fb(data->drm_fd, overlay_fb);
> -	}
> +	for (i = 0; i < overlay_planes_count; i++)
> +		igt_remove_fb(data->drm_fd, &overlay_fbs[i]);
>  
>  	free(overlay_fbs);
>  
-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

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

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

* Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests.
  2019-04-04 12:14   ` Paul Kocialkowski
@ 2019-04-04 13:42     ` Maarten Lankhorst
  2019-04-05  8:31       ` Paul Kocialkowski
  2019-04-05  8:24     ` [igt-dev] [PATCH i-g-t] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests, v2 Maarten Lankhorst
  1 sibling, 1 reply; 14+ messages in thread
From: Maarten Lankhorst @ 2019-04-04 13:42 UTC (permalink / raw)
  To: Paul Kocialkowski, igt-dev

Op 04-04-2019 om 14:14 schreef Paul Kocialkowski:
> Hi,
>
> Le mardi 02 avril 2019 à 21:12 +0200, Maarten Lankhorst a écrit :
>> The random tests allowed potentially invalid things:
>> - 1x1 fb's to be created. Force a minimum of 32 so a scaled
>>   plane will be at least 16x16. This will fix scaled/planar format
>>   support in i915 and avoid a div by zero when calculating a value
>>   modulo h/2 and w/2.
>> - Downscaling to any amount, restrict it to 2x to make the test pass.
>> - Some hw may not allow scaling, in those cases we should fallback
>>   to no scaling at all.
>> - Attempting to configure a minimum of 4 planes, instead of a maximum.
>>   This fails with a null pointer deref if the hw doesn't have 4
>>   configurable overlay planes.
> Thanks for your work, it's nice to see improvements and fixes for the
> shortcomings of my initial implementation. Most of it looks good to me,
> but I have some reservations about how we should handle hw-specific
> limits, see comments below.
>
>> Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>>  tests/kms_chamelium.c | 195 ++++++++++++++++++++++++++++--------------
>>  1 file changed, 131 insertions(+), 64 deletions(-)
>>
>> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
>> index 2dc1049d2dda..5e5c68ccf879 100644
>> --- a/tests/kms_chamelium.c
>> +++ b/tests/kms_chamelium.c
>> @@ -792,26 +792,53 @@ static void randomize_plane_format_stride(igt_plane_t *plane,
>>  }
>>  
>>  static void randomize_plane_dimensions(drmModeModeInfo *mode,
>> -				       uint32_t *width, uint32_t *height,
>> -				       uint32_t *src_w, uint32_t *src_h,
>> -				       uint32_t *src_x, uint32_t *src_y,
>> -				       uint32_t *crtc_w, uint32_t *crtc_h,
>> -				       int32_t *crtc_x, int32_t *crtc_y,
>> -				       bool allow_scaling)
>> +				       uint32_t *width, uint32_t *height)
>>  {
>> -	double ratio;
>> +	/*
>> +	 * Randomize width and height in the mode dimensions range.
>> +	 *
>> +	 * Restrict to a min of 32, this way src_w/h are always at least 16,
>> +	 * the minimum for scaled planar YUV on i915.
>> +	 */
> Mhh, I don't really like the idea of constraining the tests to avoid
> hitting hardware-specific limitations. Since the test is not supposed
> to be tied to a driver in particular, trying to handle these limits
> explicitly feels like a slippery slope. I believe it should be up to
> the kernel to report these limits, not for userspace to have them
> hardcoded. (Although I would be lying if I said that I didn't tailor
> the test explicitly for my use case (with VC4).)

Some of the limitations are not known initially, for example min size may
change depending on what tiling mode is used, or whether scaling is active.
All those constraints make it harder to 

> So here is a proposal: let's have an initial function that probes what
> the hardware can and can't do in terms of plane min/max size and
> up/down scaling. I would expect that i915 rejects commits where the
> plane dimensions and such are off-limits (maybe it's also in the props
> ranges directly), so we can test just that early and constrain the test
> based on that info later on, so we keep the code generic and avoid
> comments about why driver/hardware x/y needs to do this or that.
>
> What do you think?
>
>> +	*width = max((rand() % mode->hdisplay) + 1, 32);
>> +	*height = max((rand() % mode->vdisplay) + 1, 32);
> Testing a small plane feels like a case we should consider if the
> hardware is supposed to be able to do it.
>
> I'm not opposed to having "reasonable" limits though (nobody needs a
> 1x1 plane for anything), but maybe that should be e.g. 8x8 rather than
> 32x32.

This could be 2x2 for !i915, if you want to display a 1x1 pixel onscreen. src_w = width - (src_x = rand() % (w / 2))

As long as i915 limits are a minimum of 32x32 for src w/h all tests will work.

>> +}
>> +
>> +static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
>> +			    uint32_t src_x, uint32_t src_y, uint32_t crtc_w,
>> +			    uint32_t crtc_h, int32_t crtc_x, int32_t crtc_y,
>> +			    struct igt_fb *fb)
>> +{
>> +	igt_plane_set_fb(plane, fb);
>>  
>> -	/* Randomize width and height in the mode dimensions range. */
>> -	*width = (rand() % mode->hdisplay) + 1;
>> -	*height = (rand() % mode->vdisplay) + 1;
>> +	igt_plane_set_position(plane, crtc_x, crtc_y);
>> +	igt_plane_set_size(plane, crtc_w, crtc_h);
>> +
>> +	igt_fb_set_position(fb, plane, src_x, src_y);
>> +	igt_fb_set_size(fb, plane, src_w, src_h);
>> +}
>> +
>> +static void randomize_plane_coordinates(data_t *data, igt_plane_t *plane,
>> +					drmModeModeInfo *mode,
>> +					struct igt_fb *fb,
>> +					uint32_t *src_w, uint32_t *src_h,
>> +					uint32_t *src_x, uint32_t *src_y,
>> +					uint32_t *crtc_w, uint32_t *crtc_h,
>> +					int32_t *crtc_x, int32_t *crtc_y,
>> +					bool allow_scaling)
>> +{
>> +	bool is_yuv = igt_format_is_yuv(fb->drm_format);
>> +	uint32_t width = fb->width, height = fb->height;
>> +	double ratio;
>> +	int ret;
>>  
>>  	/* Randomize source offset in the first half of the original size. */
>> -	*src_x = rand() % (*width / 2);
>> -	*src_y = rand() % (*height / 2);
>> +	*src_x = rand() % (width / 2);
>> +	*src_y = rand() % (height / 2);
>>  
>>  	/* The source size only includes the active source area. */
>> -	*src_w = *width - *src_x;
>> -	*src_h = *height - *src_y;
>> +	*src_w = width - *src_x;
>> +	*src_h = height - *src_y;
>>  
>>  	if (allow_scaling) {
>>  		*crtc_w = (rand() % mode->hdisplay) + 1;
>> @@ -821,17 +848,22 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
>>  		 * Don't bother with scaling if dimensions are quite close in
>>  		 * order to get non-scaling cases more frequently. Also limit
>>  		 * scaling to 3x to avoid agressive filtering that makes
>> -		 * comparison less reliable.
>> +		 * comparison less reliable, and don't go above 2x downsampling
>> +		 * to avoid possible hw limitations.
>>  		 */
> Same comment as above about hw limits, although 2x downsampling does
> feel like a reasonable general limit too.
Yes, same reason we only allow up to 3x upscaling.
>
>>  
>>  		ratio = ((double) *crtc_w / *src_w);
>> -		if (ratio > 0.8 && ratio < 1.2)
>> +		if (ratio < 0.5)
>> +			*src_w = *crtc_w * 2;
>> +		else if (ratio > 0.8 && ratio < 1.2)
>>  			*crtc_w = *src_w;
>>  		else if (ratio > 3.0)
>>  			*crtc_w = *src_w * 3;
>>  
>>  		ratio = ((double) *crtc_h / *src_h);
>> -		if (ratio > 0.8 && ratio < 1.2)
>> +		if (ratio < 0.5)
>> +			*src_h = *crtc_h * 2;
>> +		else if (ratio > 0.8 && ratio < 1.2)
>>  			*crtc_h = *src_h;
>>  		else if (ratio > 3.0)
>>  			*crtc_h = *src_h * 3;
>> @@ -846,8 +878,15 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
>>  		 * scaled clipping may result in decimal dimensions, that most
>>  		 * drivers don't support.
>>  		 */
>> -		*crtc_x = rand() % (mode->hdisplay - *crtc_w);
>> -		*crtc_y = rand() % (mode->vdisplay - *crtc_h);
>> +		if (*crtc_w < mode->hdisplay)
>> +			*crtc_x = rand() % (mode->hdisplay - *crtc_w);
>> +		else
>> +			*crtc_x = 0;
>> +
>> +		if (*crtc_h < mode->vdisplay)
>> +			*crtc_y = rand() % (mode->vdisplay - *crtc_h);
>> +		else
>> +			*crtc_y = 0;
>>  	} else {
>>  		/*
>>  		 * Randomize the on-crtc position and allow the plane to go
>> @@ -856,6 +895,50 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
>>  		*crtc_x = (rand() % mode->hdisplay) - *crtc_w / 2;
>>  		*crtc_y = (rand() % mode->vdisplay) - *crtc_h / 2;
>>  	}
>> +
>> +	configure_plane(plane, *src_w, *src_h, *src_x, *src_y,
>> +			*crtc_w, *crtc_h, *crtc_x, *crtc_y, fb);
>> +	ret = igt_display_try_commit_atomic(&data->display,
>> +					    DRM_MODE_ATOMIC_TEST_ONLY |
>> +					    DRM_MODE_ATOMIC_ALLOW_MODESET,
>> +					    NULL);
>> +	if (!ret)
>> +		return;
>> +
>> +	/* Coordinates are logged in the dumped debug log, so only report w/h on failure here */
> Maybe add a trailing "." here.
>
>> +	igt_assert_f(ret != -ENOSPC, "Failure in testcase, invalid coordinates on a %ux%u fb\n", width, height);
>> +
>> +	/* Make YUV coordinates a multiple of 2 and retry the math.. */
> Maybe remove a trailing "." here.
>
>> +	if (is_yuv) {
>> +		*src_x &= ~1;
>> +		*src_y &= ~1;
>> +		*src_w &= ~1;
>> +		*src_h &= ~1;
>> +		/* To handle 1:1 scaling, clear crtc_w/h too */
>> +		*crtc_w &= ~1;
>> +		*crtc_h &= ~1;
>> +		configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
>> +				*crtc_h, *crtc_x, *crtc_y, fb);
>> +		ret = igt_display_try_commit_atomic(&data->display,
>> +						DRM_MODE_ATOMIC_TEST_ONLY |
>> +						DRM_MODE_ATOMIC_ALLOW_MODESET,
>> +						NULL);
>> +		if (!ret)
>> +			return;
>> +	}
>> +
>> +	igt_assert(!ret || allow_scaling);
>> +	igt_info("Scaling ratio %g / %g failed, trying without scaling.\n",
>> +		  ((double) *crtc_w / *src_w), ((double) *crtc_h / *src_h));
>> +
>> +	*crtc_w = *src_w;
>> +	*crtc_h = *src_h;
>> +
>> +	configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
>> +			*crtc_h, *crtc_x, *crtc_y, fb);
>> +	igt_display_commit_atomic(&data->display,
>> +				  DRM_MODE_ATOMIC_TEST_ONLY |
>> +				  DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> I don't understand the purpose of this trailing call.

We assume our configuration is valid now without scaling, the TEST_ONLY commit only makes sure. :)
This way we fail as early as possible, but I can add a comment explaining it. 

~Maarten

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

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

* [igt-dev] [PATCH i-g-t] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests, v2.
  2019-04-04 12:14   ` Paul Kocialkowski
  2019-04-04 13:42     ` Maarten Lankhorst
@ 2019-04-05  8:24     ` Maarten Lankhorst
  2019-04-05  8:39       ` Paul Kocialkowski
  1 sibling, 1 reply; 14+ messages in thread
From: Maarten Lankhorst @ 2019-04-05  8:24 UTC (permalink / raw)
  To: igt-dev

The random tests allowed potentially invalid things:
- 1x1 fb's to be created. Force a minimum of 32 on i915 so a scaled
  plane will be at least 16x16. This will fix scaled/planar format
  support in i915 and avoid a div by zero when calculating a value
  modulo h/2 and w/2.
- Downscaling to any amount, restrict it to 2x to make the test pass.
- Some hw may not allow scaling, in those cases we should fallback
  to no scaling at all.
- Attempting to configure a minimum of 4 planes, instead of a maximum.
  This fails with a null pointer deref if the hw doesn't have 4
  configurable overlay planes.

Changes since v1:
- Enforce a minimum displayed size of 16x16 for intel only,
  otherwise it's 1x1.
- Fix comments.

Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 tests/kms_chamelium.c | 199 ++++++++++++++++++++++++++++--------------
 1 file changed, 134 insertions(+), 65 deletions(-)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 2dc1049d2dda..03d874c5a183 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -791,27 +791,56 @@ static void randomize_plane_format_stride(igt_plane_t *plane,
 		*modifier = DRM_FORMAT_MOD_LINEAR;
 }
 
-static void randomize_plane_dimensions(drmModeModeInfo *mode,
-				       uint32_t *width, uint32_t *height,
-				       uint32_t *src_w, uint32_t *src_h,
-				       uint32_t *src_x, uint32_t *src_y,
-				       uint32_t *crtc_w, uint32_t *crtc_h,
-				       int32_t *crtc_x, int32_t *crtc_y,
-				       bool allow_scaling)
+static void randomize_plane_dimensions(data_t *data, drmModeModeInfo *mode,
+				       uint32_t *width, uint32_t *height)
 {
-	double ratio;
+	int min_dim = is_i915_device(data->drm_fd) ? 16 : 1;
+
+	/*
+	 * Randomize width and height in the mode dimensions range.
+	 *
+	 * Restrict to a min of 2 * min_dim, this way src_w/h are always at
+	 * least min_dim, because src_w = width - (rand % w / 2).
+	 */
+	*width = max((rand() % mode->hdisplay) + 1, 2 * min_dim);
+	*height = max((rand() % mode->vdisplay) + 1, 2 * min_dim);
+}
+
+static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
+			    uint32_t src_x, uint32_t src_y, uint32_t crtc_w,
+			    uint32_t crtc_h, int32_t crtc_x, int32_t crtc_y,
+			    struct igt_fb *fb)
+{
+	igt_plane_set_fb(plane, fb);
+
+	igt_plane_set_position(plane, crtc_x, crtc_y);
+	igt_plane_set_size(plane, crtc_w, crtc_h);
+
+	igt_fb_set_position(fb, plane, src_x, src_y);
+	igt_fb_set_size(fb, plane, src_w, src_h);
+}
 
-	/* Randomize width and height in the mode dimensions range. */
-	*width = (rand() % mode->hdisplay) + 1;
-	*height = (rand() % mode->vdisplay) + 1;
+static void randomize_plane_coordinates(data_t *data, igt_plane_t *plane,
+					drmModeModeInfo *mode,
+					struct igt_fb *fb,
+					uint32_t *src_w, uint32_t *src_h,
+					uint32_t *src_x, uint32_t *src_y,
+					uint32_t *crtc_w, uint32_t *crtc_h,
+					int32_t *crtc_x, int32_t *crtc_y,
+					bool allow_scaling)
+{
+	bool is_yuv = igt_format_is_yuv(fb->drm_format);
+	uint32_t width = fb->width, height = fb->height;
+	double ratio;
+	int ret;
 
 	/* Randomize source offset in the first half of the original size. */
-	*src_x = rand() % (*width / 2);
-	*src_y = rand() % (*height / 2);
+	*src_x = rand() % (width / 2);
+	*src_y = rand() % (height / 2);
 
 	/* The source size only includes the active source area. */
-	*src_w = *width - *src_x;
-	*src_h = *height - *src_y;
+	*src_w = width - *src_x;
+	*src_h = height - *src_y;
 
 	if (allow_scaling) {
 		*crtc_w = (rand() % mode->hdisplay) + 1;
@@ -821,17 +850,22 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
 		 * Don't bother with scaling if dimensions are quite close in
 		 * order to get non-scaling cases more frequently. Also limit
 		 * scaling to 3x to avoid agressive filtering that makes
-		 * comparison less reliable.
+		 * comparison less reliable, and don't go above 2x downsampling
+		 * to avoid possible hw limitations.
 		 */
 
 		ratio = ((double) *crtc_w / *src_w);
-		if (ratio > 0.8 && ratio < 1.2)
+		if (ratio < 0.5)
+			*src_w = *crtc_w * 2;
+		else if (ratio > 0.8 && ratio < 1.2)
 			*crtc_w = *src_w;
 		else if (ratio > 3.0)
 			*crtc_w = *src_w * 3;
 
 		ratio = ((double) *crtc_h / *src_h);
-		if (ratio > 0.8 && ratio < 1.2)
+		if (ratio < 0.5)
+			*src_h = *crtc_h * 2;
+		else if (ratio > 0.8 && ratio < 1.2)
 			*crtc_h = *src_h;
 		else if (ratio > 3.0)
 			*crtc_h = *src_h * 3;
@@ -846,8 +880,15 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
 		 * scaled clipping may result in decimal dimensions, that most
 		 * drivers don't support.
 		 */
-		*crtc_x = rand() % (mode->hdisplay - *crtc_w);
-		*crtc_y = rand() % (mode->vdisplay - *crtc_h);
+		if (*crtc_w < mode->hdisplay)
+			*crtc_x = rand() % (mode->hdisplay - *crtc_w);
+		else
+			*crtc_x = 0;
+
+		if (*crtc_h < mode->vdisplay)
+			*crtc_y = rand() % (mode->vdisplay - *crtc_h);
+		else
+			*crtc_y = 0;
 	} else {
 		/*
 		 * Randomize the on-crtc position and allow the plane to go
@@ -856,6 +897,50 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
 		*crtc_x = (rand() % mode->hdisplay) - *crtc_w / 2;
 		*crtc_y = (rand() % mode->vdisplay) - *crtc_h / 2;
 	}
+
+	configure_plane(plane, *src_w, *src_h, *src_x, *src_y,
+			*crtc_w, *crtc_h, *crtc_x, *crtc_y, fb);
+	ret = igt_display_try_commit_atomic(&data->display,
+					    DRM_MODE_ATOMIC_TEST_ONLY |
+					    DRM_MODE_ATOMIC_ALLOW_MODESET,
+					    NULL);
+	if (!ret)
+		return;
+
+	/* Coordinates are logged in the dumped debug log, so only report w/h on failure here */
+	igt_assert_f(ret != -ENOSPC, "Failure in testcase, invalid coordinates on a %ux%u fb\n", width, height);
+
+	/* Make YUV coordinates a multiple of 2 and retry the math. */
+	if (is_yuv) {
+		*src_x &= ~1;
+		*src_y &= ~1;
+		*src_w &= ~1;
+		*src_h &= ~1;
+		/* To handle 1:1 scaling, clear crtc_w/h too. */
+		*crtc_w &= ~1;
+		*crtc_h &= ~1;
+		configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
+				*crtc_h, *crtc_x, *crtc_y, fb);
+		ret = igt_display_try_commit_atomic(&data->display,
+						DRM_MODE_ATOMIC_TEST_ONLY |
+						DRM_MODE_ATOMIC_ALLOW_MODESET,
+						NULL);
+		if (!ret)
+			return;
+	}
+
+	igt_assert(!ret || allow_scaling);
+	igt_info("Scaling ratio %g / %g failed, trying without scaling.\n",
+		  ((double) *crtc_w / *src_w), ((double) *crtc_h / *src_h));
+
+	*crtc_w = *src_w;
+	*crtc_h = *src_h;
+
+	configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
+			*crtc_h, *crtc_x, *crtc_y, fb);
+	igt_display_commit_atomic(&data->display,
+				  DRM_MODE_ATOMIC_TEST_ONLY |
+				  DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
 }
 
 static void blit_plane_cairo(data_t *data, cairo_surface_t *result,
@@ -914,20 +999,6 @@ static void blit_plane_cairo(data_t *data, cairo_surface_t *result,
 	cairo_destroy(cr);
 }
 
-static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
-			    uint32_t src_x, uint32_t src_y, uint32_t crtc_w,
-			    uint32_t crtc_h, int32_t crtc_x, int32_t crtc_y,
-			    struct igt_fb *fb)
-{
-	igt_plane_set_fb(plane, fb);
-
-	igt_plane_set_position(plane, crtc_x, crtc_y);
-	igt_plane_set_size(plane, crtc_w, crtc_h);
-
-	igt_fb_set_position(fb, plane, src_x, src_y);
-	igt_fb_set_size(fb, plane, src_w, src_h);
-}
-
 static void prepare_randomized_plane(data_t *data,
 				     drmModeModeInfo *mode,
 				     igt_plane_t *plane,
@@ -947,24 +1018,12 @@ static void prepare_randomized_plane(data_t *data,
 	size_t stride;
 	bool tiled;
 	int fb_id;
+	uint32_t tile_w, tile_h;
 
-	randomize_plane_dimensions(mode, &overlay_fb_w, &overlay_fb_h,
-				   &overlay_src_w, &overlay_src_h,
-				   &overlay_src_x, &overlay_src_y,
-				   &overlay_crtc_w, &overlay_crtc_h,
-				   &overlay_crtc_x, &overlay_crtc_y,
-				   allow_scaling);
+	randomize_plane_dimensions(data, mode, &overlay_fb_w, &overlay_fb_h);
 
 	igt_debug("Plane %d: framebuffer size %dx%d\n", index,
 		  overlay_fb_w, overlay_fb_h);
-	igt_debug("Plane %d: on-crtc size %dx%d\n", index,
-		  overlay_crtc_w, overlay_crtc_h);
-	igt_debug("Plane %d: on-crtc position %dx%d\n", index,
-		  overlay_crtc_x, overlay_crtc_y);
-	igt_debug("Plane %d: in-framebuffer size %dx%d\n", index,
-		  overlay_src_w, overlay_src_h);
-	igt_debug("Plane %d: in-framebuffer position %dx%d\n", index,
-		  overlay_src_x, overlay_src_y);
 
 	/* Get a pattern framebuffer for the overlay plane. */
 	fb_id = chamelium_get_pattern_fb(data, overlay_fb_w, overlay_fb_h,
@@ -976,23 +1035,42 @@ static void prepare_randomized_plane(data_t *data,
 
 	tiled = (modifier != LOCAL_DRM_FORMAT_MOD_NONE);
 
+	igt_get_fb_tile_size(data->display.drm_fd, modifier,
+			     igt_drm_format_to_bpp(format),
+			     &tile_w, &tile_h);
+
+	/* Make sure stride is a multiple of tile size */
+	stride = DIV_ROUND_UP(stride, tile_w) * tile_w;
+
 	igt_debug("Plane %d: %s format (%s) with stride %ld\n", index,
 		  igt_format_str(format), tiled ? "tiled" : "linear", stride);
 
+
 	fb_id = igt_fb_convert_with_stride(overlay_fb, &pattern_fb, format,
 					   modifier, stride);
 	igt_assert(fb_id > 0);
 
+	randomize_plane_coordinates(data, plane, mode, overlay_fb,
+				    &overlay_src_w, &overlay_src_h,
+				    &overlay_src_x, &overlay_src_y,
+				    &overlay_crtc_w, &overlay_crtc_h,
+				    &overlay_crtc_x, &overlay_crtc_y,
+				    allow_scaling);
+
+	igt_debug("Plane %d: in-framebuffer size %dx%d\n", index,
+		  overlay_src_w, overlay_src_h);
+	igt_debug("Plane %d: in-framebuffer position %dx%d\n", index,
+		  overlay_src_x, overlay_src_y);
+	igt_debug("Plane %d: on-crtc size %dx%d\n", index,
+		  overlay_crtc_w, overlay_crtc_h);
+	igt_debug("Plane %d: on-crtc position %dx%d\n", index,
+		  overlay_crtc_x, overlay_crtc_y);
+
 	blit_plane_cairo(data, result_surface, overlay_src_w, overlay_src_h,
 			 overlay_src_x, overlay_src_y,
 			 overlay_crtc_w, overlay_crtc_h,
 			 overlay_crtc_x, overlay_crtc_y, &pattern_fb);
 
-	configure_plane(plane, overlay_src_w, overlay_src_h,
-			overlay_src_x, overlay_src_y,
-			overlay_crtc_w, overlay_crtc_h,
-			overlay_crtc_x, overlay_crtc_y, overlay_fb);
-
 	/* Remove the original pattern framebuffer. */
 	igt_remove_fb(data->drm_fd, &pattern_fb);
 }
@@ -1068,7 +1146,7 @@ static void test_display_planes_random(data_t *data,
 		igt_output_count_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
 
 	/* Limit the number of planes to a reasonable scene. */
-	overlay_planes_max = max(overlay_planes_max, 4);
+	overlay_planes_max = min(overlay_planes_max, 4);
 
 	overlay_planes_count = (rand() % overlay_planes_max) + 1;
 	igt_debug("Using %d overlay planes\n", overlay_planes_count);
@@ -1121,17 +1199,8 @@ static void test_display_planes_random(data_t *data,
 		chamelium_destroy_frame_dump(dump);
 	}
 
-	for (i = 0; i < overlay_planes_count; i++) {
-		struct igt_fb *overlay_fb = &overlay_fbs[i];
-		igt_plane_t *plane;
-
-		plane = igt_output_get_plane_type_index(output,
-							DRM_PLANE_TYPE_OVERLAY,
-							i);
-		igt_assert(plane);
-
-		igt_remove_fb(data->drm_fd, overlay_fb);
-	}
+	for (i = 0; i < overlay_planes_count; i++)
+		igt_remove_fb(data->drm_fd, &overlay_fbs[i]);
 
 	free(overlay_fbs);
 
-- 
2.20.1

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

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

* Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests.
  2019-04-04 13:42     ` Maarten Lankhorst
@ 2019-04-05  8:31       ` Paul Kocialkowski
  0 siblings, 0 replies; 14+ messages in thread
From: Paul Kocialkowski @ 2019-04-05  8:31 UTC (permalink / raw)
  To: Maarten Lankhorst, igt-dev

Hi,

On Thu, 2019-04-04 at 15:42 +0200, Maarten Lankhorst wrote:
> Op 04-04-2019 om 14:14 schreef Paul Kocialkowski:
> > Hi,
> > 
> > Le mardi 02 avril 2019 à 21:12 +0200, Maarten Lankhorst a écrit :
> > > The random tests allowed potentially invalid things:
> > > - 1x1 fb's to be created. Force a minimum of 32 so a scaled
> > >   plane will be at least 16x16. This will fix scaled/planar format
> > >   support in i915 and avoid a div by zero when calculating a value
> > >   modulo h/2 and w/2.
> > > - Downscaling to any amount, restrict it to 2x to make the test pass.
> > > - Some hw may not allow scaling, in those cases we should fallback
> > >   to no scaling at all.
> > > - Attempting to configure a minimum of 4 planes, instead of a maximum.
> > >   This fails with a null pointer deref if the hw doesn't have 4
> > >   configurable overlay planes.
> > Thanks for your work, it's nice to see improvements and fixes for the
> > shortcomings of my initial implementation. Most of it looks good to me,
> > but I have some reservations about how we should handle hw-specific
> > limits, see comments below.
> > 
> > > Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > > ---
> > >  tests/kms_chamelium.c | 195 ++++++++++++++++++++++++++++--------------
> > >  1 file changed, 131 insertions(+), 64 deletions(-)
> > > 
> > > diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> > > index 2dc1049d2dda..5e5c68ccf879 100644
> > > --- a/tests/kms_chamelium.c
> > > +++ b/tests/kms_chamelium.c
> > > @@ -792,26 +792,53 @@ static void randomize_plane_format_stride(igt_plane_t *plane,
> > >  }
> > >  
> > >  static void randomize_plane_dimensions(drmModeModeInfo *mode,
> > > -				       uint32_t *width, uint32_t *height,
> > > -				       uint32_t *src_w, uint32_t *src_h,
> > > -				       uint32_t *src_x, uint32_t *src_y,
> > > -				       uint32_t *crtc_w, uint32_t *crtc_h,
> > > -				       int32_t *crtc_x, int32_t *crtc_y,
> > > -				       bool allow_scaling)
> > > +				       uint32_t *width, uint32_t *height)
> > >  {
> > > -	double ratio;
> > > +	/*
> > > +	 * Randomize width and height in the mode dimensions range.
> > > +	 *
> > > +	 * Restrict to a min of 32, this way src_w/h are always at least 16,
> > > +	 * the minimum for scaled planar YUV on i915.
> > > +	 */
> > Mhh, I don't really like the idea of constraining the tests to avoid
> > hitting hardware-specific limitations. Since the test is not supposed
> > to be tied to a driver in particular, trying to handle these limits
> > explicitly feels like a slippery slope. I believe it should be up to
> > the kernel to report these limits, not for userspace to have them
> > hardcoded. (Although I would be lying if I said that I didn't tailor
> > the test explicitly for my use case (with VC4).)
> 
> Some of the limitations are not known initially, for example min size may
> change depending on what tiling mode is used, or whether scaling is active.
> All those constraints make it harder to 

Mhh I see, so doing this dynamically will probably over-complexify the
process if we need to take all that into.

> > So here is a proposal: let's have an initial function that probes what
> > the hardware can and can't do in terms of plane min/max size and
> > up/down scaling. I would expect that i915 rejects commits where the
> > plane dimensions and such are off-limits (maybe it's also in the props
> > ranges directly), so we can test just that early and constrain the test
> > based on that info later on, so we keep the code generic and avoid
> > comments about why driver/hardware x/y needs to do this or that.
> > 
> > What do you think?
> > 
> > > +	*width = max((rand() % mode->hdisplay) + 1, 32);
> > > +	*height = max((rand() % mode->vdisplay) + 1, 32);
> > Testing a small plane feels like a case we should consider if the
> > hardware is supposed to be able to do it.
> > 
> > I'm not opposed to having "reasonable" limits though (nobody needs a
> > 1x1 plane for anything), but maybe that should be e.g. 8x8 rather than
> > 32x32.
> 
> This could be 2x2 for !i915, if you want to display a 1x1 pixel onscreen. src_w = width - (src_x = rand() % (w / 2))
> 
> As long as i915 limits are a minimum of 32x32 for src w/h all tests will work.

Ah sorry, I didn't make myself clear: I don't think 1x1 is something we
want to test, but 8x8 is where I feel the sane limit should be.

> > > +}
> > > +
> > > +static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
> > > +			    uint32_t src_x, uint32_t src_y, uint32_t crtc_w,
> > > +			    uint32_t crtc_h, int32_t crtc_x, int32_t crtc_y,
> > > +			    struct igt_fb *fb)
> > > +{
> > > +	igt_plane_set_fb(plane, fb);
> > >  
> > > -	/* Randomize width and height in the mode dimensions range. */
> > > -	*width = (rand() % mode->hdisplay) + 1;
> > > -	*height = (rand() % mode->vdisplay) + 1;
> > > +	igt_plane_set_position(plane, crtc_x, crtc_y);
> > > +	igt_plane_set_size(plane, crtc_w, crtc_h);
> > > +
> > > +	igt_fb_set_position(fb, plane, src_x, src_y);
> > > +	igt_fb_set_size(fb, plane, src_w, src_h);
> > > +}
> > > +
> > > +static void randomize_plane_coordinates(data_t *data, igt_plane_t *plane,
> > > +					drmModeModeInfo *mode,
> > > +					struct igt_fb *fb,
> > > +					uint32_t *src_w, uint32_t *src_h,
> > > +					uint32_t *src_x, uint32_t *src_y,
> > > +					uint32_t *crtc_w, uint32_t *crtc_h,
> > > +					int32_t *crtc_x, int32_t *crtc_y,
> > > +					bool allow_scaling)
> > > +{
> > > +	bool is_yuv = igt_format_is_yuv(fb->drm_format);
> > > +	uint32_t width = fb->width, height = fb->height;
> > > +	double ratio;
> > > +	int ret;
> > >  
> > >  	/* Randomize source offset in the first half of the original size. */
> > > -	*src_x = rand() % (*width / 2);
> > > -	*src_y = rand() % (*height / 2);
> > > +	*src_x = rand() % (width / 2);
> > > +	*src_y = rand() % (height / 2);
> > >  
> > >  	/* The source size only includes the active source area. */
> > > -	*src_w = *width - *src_x;
> > > -	*src_h = *height - *src_y;
> > > +	*src_w = width - *src_x;
> > > +	*src_h = height - *src_y;
> > >  
> > >  	if (allow_scaling) {
> > >  		*crtc_w = (rand() % mode->hdisplay) + 1;
> > > @@ -821,17 +848,22 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
> > >  		 * Don't bother with scaling if dimensions are quite close in
> > >  		 * order to get non-scaling cases more frequently. Also limit
> > >  		 * scaling to 3x to avoid agressive filtering that makes
> > > -		 * comparison less reliable.
> > > +		 * comparison less reliable, and don't go above 2x downsampling
> > > +		 * to avoid possible hw limitations.
> > >  		 */
> > Same comment as above about hw limits, although 2x downsampling does
> > feel like a reasonable general limit too.
> Yes, same reason we only allow up to 3x upscaling.
> > >  
> > >  		ratio = ((double) *crtc_w / *src_w);
> > > -		if (ratio > 0.8 && ratio < 1.2)
> > > +		if (ratio < 0.5)
> > > +			*src_w = *crtc_w * 2;
> > > +		else if (ratio > 0.8 && ratio < 1.2)
> > >  			*crtc_w = *src_w;
> > >  		else if (ratio > 3.0)
> > >  			*crtc_w = *src_w * 3;
> > >  
> > >  		ratio = ((double) *crtc_h / *src_h);
> > > -		if (ratio > 0.8 && ratio < 1.2)
> > > +		if (ratio < 0.5)
> > > +			*src_h = *crtc_h * 2;
> > > +		else if (ratio > 0.8 && ratio < 1.2)
> > >  			*crtc_h = *src_h;
> > >  		else if (ratio > 3.0)
> > >  			*crtc_h = *src_h * 3;
> > > @@ -846,8 +878,15 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
> > >  		 * scaled clipping may result in decimal dimensions, that most
> > >  		 * drivers don't support.
> > >  		 */
> > > -		*crtc_x = rand() % (mode->hdisplay - *crtc_w);
> > > -		*crtc_y = rand() % (mode->vdisplay - *crtc_h);
> > > +		if (*crtc_w < mode->hdisplay)
> > > +			*crtc_x = rand() % (mode->hdisplay - *crtc_w);
> > > +		else
> > > +			*crtc_x = 0;
> > > +
> > > +		if (*crtc_h < mode->vdisplay)
> > > +			*crtc_y = rand() % (mode->vdisplay - *crtc_h);
> > > +		else
> > > +			*crtc_y = 0;
> > >  	} else {
> > >  		/*
> > >  		 * Randomize the on-crtc position and allow the plane to go
> > > @@ -856,6 +895,50 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
> > >  		*crtc_x = (rand() % mode->hdisplay) - *crtc_w / 2;
> > >  		*crtc_y = (rand() % mode->vdisplay) - *crtc_h / 2;
> > >  	}
> > > +
> > > +	configure_plane(plane, *src_w, *src_h, *src_x, *src_y,
> > > +			*crtc_w, *crtc_h, *crtc_x, *crtc_y, fb);
> > > +	ret = igt_display_try_commit_atomic(&data->display,
> > > +					    DRM_MODE_ATOMIC_TEST_ONLY |
> > > +					    DRM_MODE_ATOMIC_ALLOW_MODESET,
> > > +					    NULL);
> > > +	if (!ret)
> > > +		return;
> > > +
> > > +	/* Coordinates are logged in the dumped debug log, so only report w/h on failure here */
> > Maybe add a trailing "." here.
> > 
> > > +	igt_assert_f(ret != -ENOSPC, "Failure in testcase, invalid coordinates on a %ux%u fb\n", width, height);
> > > +
> > > +	/* Make YUV coordinates a multiple of 2 and retry the math.. */
> > Maybe remove a trailing "." here.
> > 
> > > +	if (is_yuv) {
> > > +		*src_x &= ~1;
> > > +		*src_y &= ~1;
> > > +		*src_w &= ~1;
> > > +		*src_h &= ~1;
> > > +		/* To handle 1:1 scaling, clear crtc_w/h too */
> > > +		*crtc_w &= ~1;
> > > +		*crtc_h &= ~1;
> > > +		configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
> > > +				*crtc_h, *crtc_x, *crtc_y, fb);
> > > +		ret = igt_display_try_commit_atomic(&data->display,
> > > +						DRM_MODE_ATOMIC_TEST_ONLY |
> > > +						DRM_MODE_ATOMIC_ALLOW_MODESET,
> > > +						NULL);
> > > +		if (!ret)
> > > +			return;
> > > +	}
> > > +
> > > +	igt_assert(!ret || allow_scaling);
> > > +	igt_info("Scaling ratio %g / %g failed, trying without scaling.\n",
> > > +		  ((double) *crtc_w / *src_w), ((double) *crtc_h / *src_h));
> > > +
> > > +	*crtc_w = *src_w;
> > > +	*crtc_h = *src_h;
> > > +
> > > +	configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
> > > +			*crtc_h, *crtc_x, *crtc_y, fb);
> > > +	igt_display_commit_atomic(&data->display,
> > > +				  DRM_MODE_ATOMIC_TEST_ONLY |
> > > +				  DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> > I don't understand the purpose of this trailing call.
> 
> We assume our configuration is valid now without scaling, the TEST_ONLY commit only makes sure. :)
> This way we fail as early as possible, but I can add a comment explaining it. 

Oh okay, I think I confused igt_display_commit_atomic (which asserts
ret) with igt_display_commit2 (which doesn't).

Sounds all right to me :)

Cheers,

Paul

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

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

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

* Re: [igt-dev] [PATCH i-g-t] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests, v2.
  2019-04-05  8:24     ` [igt-dev] [PATCH i-g-t] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests, v2 Maarten Lankhorst
@ 2019-04-05  8:39       ` Paul Kocialkowski
  0 siblings, 0 replies; 14+ messages in thread
From: Paul Kocialkowski @ 2019-04-05  8:39 UTC (permalink / raw)
  To: Maarten Lankhorst, igt-dev

Hi,

Le vendredi 05 avril 2019 à 10:24 +0200, Maarten Lankhorst a écrit :
> The random tests allowed potentially invalid things:
> - 1x1 fb's to be created. Force a minimum of 32 on i915 so a scaled
>   plane will be at least 16x16. This will fix scaled/planar format
>   support in i915 and avoid a div by zero when calculating a value
>   modulo h/2 and w/2.
> - Downscaling to any amount, restrict it to 2x to make the test pass.
> - Some hw may not allow scaling, in those cases we should fallback
>   to no scaling at all.
> - Attempting to configure a minimum of 4 planes, instead of a maximum.
>   This fails with a null pointer deref if the hw doesn't have 4
>   configurable overlay planes.
> 
> Changes since v1:
> - Enforce a minimum displayed size of 16x16 for intel only,
>   otherwise it's 1x1.

Sorry for being unclear, I actually meant that 8x8 (or even 4x4) would
make more sense as a minimum driver-agnostic size, but not 1x1.

See a few other comments below.

Cheers!

> - Fix comments.
> 
> Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  tests/kms_chamelium.c | 199 ++++++++++++++++++++++++++++--------------
>  1 file changed, 134 insertions(+), 65 deletions(-)
> 
> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> index 2dc1049d2dda..03d874c5a183 100644
> --- a/tests/kms_chamelium.c
> +++ b/tests/kms_chamelium.c
> @@ -791,27 +791,56 @@ static void randomize_plane_format_stride(igt_plane_t *plane,
>  		*modifier = DRM_FORMAT_MOD_LINEAR;
>  }
>  
> -static void randomize_plane_dimensions(drmModeModeInfo *mode,
> -				       uint32_t *width, uint32_t *height,
> -				       uint32_t *src_w, uint32_t *src_h,
> -				       uint32_t *src_x, uint32_t *src_y,
> -				       uint32_t *crtc_w, uint32_t *crtc_h,
> -				       int32_t *crtc_x, int32_t *crtc_y,
> -				       bool allow_scaling)
> +static void randomize_plane_dimensions(data_t *data, drmModeModeInfo *mode,
> +				       uint32_t *width, uint32_t *height)
>  {
> -	double ratio;
> +	int min_dim = is_i915_device(data->drm_fd) ? 16 : 1;
>
> +
> +	/*
> +	 * Randomize width and height in the mode dimensions range.
> +	 *
> +	 * Restrict to a min of 2 * min_dim, this way src_w/h are always at
> +	 * least min_dim, because src_w = width - (rand % w / 2).
> +	 */
> +	*width = max((rand() % mode->hdisplay) + 1, 2 * min_dim);
> +	*height = max((rand() % mode->vdisplay) + 1, 2 * min_dim);
> +}
> +
> +static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
> +			    uint32_t src_x, uint32_t src_y, uint32_t crtc_w,
> +			    uint32_t crtc_h, int32_t crtc_x, int32_t crtc_y,
> +			    struct igt_fb *fb)
> +{
> +	igt_plane_set_fb(plane, fb);
> +
> +	igt_plane_set_position(plane, crtc_x, crtc_y);
> +	igt_plane_set_size(plane, crtc_w, crtc_h);
> +
> +	igt_fb_set_position(fb, plane, src_x, src_y);
> +	igt_fb_set_size(fb, plane, src_w, src_h);
> +}
>  
> -	/* Randomize width and height in the mode dimensions range. */
> -	*width = (rand() % mode->hdisplay) + 1;
> -	*height = (rand() % mode->vdisplay) + 1;
> +static void randomize_plane_coordinates(data_t *data, igt_plane_t *plane,
> +					drmModeModeInfo *mode,
> +					struct igt_fb *fb,
> +					uint32_t *src_w, uint32_t *src_h,
> +					uint32_t *src_x, uint32_t *src_y,
> +					uint32_t *crtc_w, uint32_t *crtc_h,
> +					int32_t *crtc_x, int32_t *crtc_y,
> +					bool allow_scaling)
> +{
> +	bool is_yuv = igt_format_is_yuv(fb->drm_format);
> +	uint32_t width = fb->width, height = fb->height;
> +	double ratio;
> +	int ret;
>  
>  	/* Randomize source offset in the first half of the original size. */
> -	*src_x = rand() % (*width / 2);
> -	*src_y = rand() % (*height / 2);
> +	*src_x = rand() % (width / 2);
> +	*src_y = rand() % (height / 2);
>  
>  	/* The source size only includes the active source area. */
> -	*src_w = *width - *src_x;
> -	*src_h = *height - *src_y;
> +	*src_w = width - *src_x;
> +	*src_h = height - *src_y;
>  
>  	if (allow_scaling) {
>  		*crtc_w = (rand() % mode->hdisplay) + 1;
> @@ -821,17 +850,22 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
>  		 * Don't bother with scaling if dimensions are quite close in
>  		 * order to get non-scaling cases more frequently. Also limit
>  		 * scaling to 3x to avoid agressive filtering that makes
> -		 * comparison less reliable.
> +		 * comparison less reliable, and don't go above 2x downsampling
> +		 * to avoid possible hw limitations.
>  		 */
>  
>  		ratio = ((double) *crtc_w / *src_w);
> -		if (ratio > 0.8 && ratio < 1.2)
> +		if (ratio < 0.5)
> +			*src_w = *crtc_w * 2;
> +		else if (ratio > 0.8 && ratio < 1.2)
>  			*crtc_w = *src_w;
>  		else if (ratio > 3.0)
>  			*crtc_w = *src_w * 3;
>  
>  		ratio = ((double) *crtc_h / *src_h);
> -		if (ratio > 0.8 && ratio < 1.2)
> +		if (ratio < 0.5)
> +			*src_h = *crtc_h * 2;
> +		else if (ratio > 0.8 && ratio < 1.2)
>  			*crtc_h = *src_h;
>  		else if (ratio > 3.0)
>  			*crtc_h = *src_h * 3;
> @@ -846,8 +880,15 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
>  		 * scaled clipping may result in decimal dimensions, that most
>  		 * drivers don't support.
>  		 */
> -		*crtc_x = rand() % (mode->hdisplay - *crtc_w);
> -		*crtc_y = rand() % (mode->vdisplay - *crtc_h);
> +		if (*crtc_w < mode->hdisplay)
> +			*crtc_x = rand() % (mode->hdisplay - *crtc_w);
> +		else
> +			*crtc_x = 0;
> +
> +		if (*crtc_h < mode->vdisplay)
> +			*crtc_y = rand() % (mode->vdisplay - *crtc_h);
> +		else
> +			*crtc_y = 0;
>  	} else {
>  		/*
>  		 * Randomize the on-crtc position and allow the plane to go
> @@ -856,6 +897,50 @@ static void randomize_plane_dimensions(drmModeModeInfo *mode,
>  		*crtc_x = (rand() % mode->hdisplay) - *crtc_w / 2;
>  		*crtc_y = (rand() % mode->vdisplay) - *crtc_h / 2;
>  	}
> +
> +	configure_plane(plane, *src_w, *src_h, *src_x, *src_y,
> +			*crtc_w, *crtc_h, *crtc_x, *crtc_y, fb);
> +	ret = igt_display_try_commit_atomic(&data->display,
> +					    DRM_MODE_ATOMIC_TEST_ONLY |
> +					    DRM_MODE_ATOMIC_ALLOW_MODESET,
> +					    NULL);
> +	if (!ret)
> +		return;
> +
> +	/* Coordinates are logged in the dumped debug log, so only report w/h on failure here */

Maybe add a trailing "." to that comment.

> +	igt_assert_f(ret != -ENOSPC, "Failure in testcase, invalid coordinates on a %ux%u fb\n", width, height);
> +
> +	/* Make YUV coordinates a multiple of 2 and retry the math. */
> +	if (is_yuv) {
> +		*src_x &= ~1;
> +		*src_y &= ~1;
> +		*src_w &= ~1;
> +		*src_h &= ~1;
> +		/* To handle 1:1 scaling, clear crtc_w/h too. */
> +		*crtc_w &= ~1;
> +		*crtc_h &= ~1;
> +		configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
> +				*crtc_h, *crtc_x, *crtc_y, fb);
> +		ret = igt_display_try_commit_atomic(&data->display,
> +						DRM_MODE_ATOMIC_TEST_ONLY |
> +						DRM_MODE_ATOMIC_ALLOW_MODESET,
> +						NULL);
> +		if (!ret)
> +			return;
> +	}
> +
> +	igt_assert(!ret || allow_scaling);
> +	igt_info("Scaling ratio %g / %g failed, trying without scaling.\n",
> +		  ((double) *crtc_w / *src_w), ((double) *crtc_h / *src_h));
> +
> +	*crtc_w = *src_w;
> +	*crtc_h = *src_h;
> +
> +	configure_plane(plane, *src_w, *src_h, *src_x, *src_y, *crtc_w,
> +			*crtc_h, *crtc_x, *crtc_y, fb);
> +	igt_display_commit_atomic(&data->display,
> +				  DRM_MODE_ATOMIC_TEST_ONLY |
> +				  DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>  }
>  
>  static void blit_plane_cairo(data_t *data, cairo_surface_t *result,
> @@ -914,20 +999,6 @@ static void blit_plane_cairo(data_t *data, cairo_surface_t *result,
>  	cairo_destroy(cr);
>  }
>  
> -static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
> -			    uint32_t src_x, uint32_t src_y, uint32_t crtc_w,
> -			    uint32_t crtc_h, int32_t crtc_x, int32_t crtc_y,
> -			    struct igt_fb *fb)
> -{
> -	igt_plane_set_fb(plane, fb);
> -
> -	igt_plane_set_position(plane, crtc_x, crtc_y);
> -	igt_plane_set_size(plane, crtc_w, crtc_h);
> -
> -	igt_fb_set_position(fb, plane, src_x, src_y);
> -	igt_fb_set_size(fb, plane, src_w, src_h);
> -}
> -
>  static void prepare_randomized_plane(data_t *data,
>  				     drmModeModeInfo *mode,
>  				     igt_plane_t *plane,
> @@ -947,24 +1018,12 @@ static void prepare_randomized_plane(data_t *data,
>  	size_t stride;
>  	bool tiled;
>  	int fb_id;
> +	uint32_t tile_w, tile_h;
>  
> -	randomize_plane_dimensions(mode, &overlay_fb_w, &overlay_fb_h,
> -				   &overlay_src_w, &overlay_src_h,
> -				   &overlay_src_x, &overlay_src_y,
> -				   &overlay_crtc_w, &overlay_crtc_h,
> -				   &overlay_crtc_x, &overlay_crtc_y,
> -				   allow_scaling);
> +	randomize_plane_dimensions(data, mode, &overlay_fb_w, &overlay_fb_h);
>  
>  	igt_debug("Plane %d: framebuffer size %dx%d\n", index,
>  		  overlay_fb_w, overlay_fb_h);
> -	igt_debug("Plane %d: on-crtc size %dx%d\n", index,
> -		  overlay_crtc_w, overlay_crtc_h);
> -	igt_debug("Plane %d: on-crtc position %dx%d\n", index,
> -		  overlay_crtc_x, overlay_crtc_y);
> -	igt_debug("Plane %d: in-framebuffer size %dx%d\n", index,
> -		  overlay_src_w, overlay_src_h);
> -	igt_debug("Plane %d: in-framebuffer position %dx%d\n", index,
> -		  overlay_src_x, overlay_src_y);
>  
>  	/* Get a pattern framebuffer for the overlay plane. */
>  	fb_id = chamelium_get_pattern_fb(data, overlay_fb_w, overlay_fb_h,
> @@ -976,23 +1035,42 @@ static void prepare_randomized_plane(data_t *data,
>  
>  	tiled = (modifier != LOCAL_DRM_FORMAT_MOD_NONE);
>  
> +	igt_get_fb_tile_size(data->display.drm_fd, modifier,
> +			     igt_drm_format_to_bpp(format),
> +			     &tile_w, &tile_h);
> +
> +	/* Make sure stride is a multiple of tile size */
> +	stride = DIV_ROUND_UP(stride, tile_w) * tile_w;
> +

Perhaps move that to randomize_plane_format_stride since we already
have stride alignment checks in there (for pixman).

>  	igt_debug("Plane %d: %s format (%s) with stride %ld\n", index,
>  		  igt_format_str(format), tiled ? "tiled" : "linear", stride);
>  
> +

Not sure we need an extra newline here.

>  	fb_id = igt_fb_convert_with_stride(overlay_fb, &pattern_fb, format,
>  					   modifier, stride);
>  	igt_assert(fb_id > 0);
>  
> +	randomize_plane_coordinates(data, plane, mode, overlay_fb,
> +				    &overlay_src_w, &overlay_src_h,
> +				    &overlay_src_x, &overlay_src_y,
> +				    &overlay_crtc_w, &overlay_crtc_h,
> +				    &overlay_crtc_x, &overlay_crtc_y,
> +				    allow_scaling);
> +
> +	igt_debug("Plane %d: in-framebuffer size %dx%d\n", index,
> +		  overlay_src_w, overlay_src_h);
> +	igt_debug("Plane %d: in-framebuffer position %dx%d\n", index,
> +		  overlay_src_x, overlay_src_y);
> +	igt_debug("Plane %d: on-crtc size %dx%d\n", index,
> +		  overlay_crtc_w, overlay_crtc_h);
> +	igt_debug("Plane %d: on-crtc position %dx%d\n", index,
> +		  overlay_crtc_x, overlay_crtc_y);
> +
>  	blit_plane_cairo(data, result_surface, overlay_src_w, overlay_src_h,
>  			 overlay_src_x, overlay_src_y,
>  			 overlay_crtc_w, overlay_crtc_h,
>  			 overlay_crtc_x, overlay_crtc_y, &pattern_fb);
>  
> -	configure_plane(plane, overlay_src_w, overlay_src_h,
> -			overlay_src_x, overlay_src_y,
> -			overlay_crtc_w, overlay_crtc_h,
> -			overlay_crtc_x, overlay_crtc_y, overlay_fb);
> -
>  	/* Remove the original pattern framebuffer. */
>  	igt_remove_fb(data->drm_fd, &pattern_fb);
>  }
> @@ -1068,7 +1146,7 @@ static void test_display_planes_random(data_t *data,
>  		igt_output_count_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
>  
>  	/* Limit the number of planes to a reasonable scene. */
> -	overlay_planes_max = max(overlay_planes_max, 4);
> +	overlay_planes_max = min(overlay_planes_max, 4);
>  
>  	overlay_planes_count = (rand() % overlay_planes_max) + 1;
>  	igt_debug("Using %d overlay planes\n", overlay_planes_count);
> @@ -1121,17 +1199,8 @@ static void test_display_planes_random(data_t *data,
>  		chamelium_destroy_frame_dump(dump);
>  	}
>  
> -	for (i = 0; i < overlay_planes_count; i++) {
> -		struct igt_fb *overlay_fb = &overlay_fbs[i];
> -		igt_plane_t *plane;
> -
> -		plane = igt_output_get_plane_type_index(output,
> -							DRM_PLANE_TYPE_OVERLAY,
> -							i);
> -		igt_assert(plane);
> -
> -		igt_remove_fb(data->drm_fd, overlay_fb);
> -	}
> +	for (i = 0; i < overlay_planes_count; i++)
> +		igt_remove_fb(data->drm_fd, &overlay_fbs[i]);
>  
>  	free(overlay_fbs);
>  
-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev3)
  2019-04-02 19:12 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Maarten Lankhorst
                   ` (4 preceding siblings ...)
  2019-04-04  0:48 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-04-05  9:35 ` Patchwork
  2019-04-06  3:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-04-05  9:35 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev3)
URL   : https://patchwork.freedesktop.org/series/58886/
State : success

== Summary ==

CI Bug Log - changes from IGT_4931 -> IGTPW_2795
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/58886/revisions/3/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@semaphore:
    - fi-kbl-7500u:       NOTRUN -> SKIP [fdo#109271] +28

  * igt@gem_exec_basic@gtt-bsd2:
    - fi-byt-clapper:     NOTRUN -> SKIP [fdo#109271] +57

  * igt@i915_selftest@live_contexts:
    - fi-skl-gvtdvm:      PASS -> DMESG-FAIL [fdo#110235 ]

  * igt@i915_selftest@live_hangcheck:
    - fi-icl-u2:          PASS -> INCOMPLETE [fdo#108569]
    - fi-skl-iommu:       PASS -> INCOMPLETE [fdo#108602] / [fdo#108744]

  * igt@kms_busy@basic-flip-c:
    - fi-skl-6770hq:      PASS -> SKIP [fdo#109271] / [fdo#109278] +2
    - fi-blb-e6850:       NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
    - fi-byt-clapper:     NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-kbl-7500u:       NOTRUN -> DMESG-WARN [fdo#102505] / [fdo#103558] / [fdo#105079] / [fdo#105602]

  * igt@kms_flip@basic-flip-vs-dpms:
    - fi-skl-6770hq:      PASS -> SKIP [fdo#109271] +33

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
    - fi-blb-e6850:       NOTRUN -> SKIP [fdo#109271] +48

  * igt@kms_psr@primary_mmap_gtt:
    - fi-skl-guc:         NOTRUN -> SKIP [fdo#109271] +49

  * igt@runner@aborted:
    - fi-skl-iommu:       NOTRUN -> FAIL [fdo#104108] / [fdo#108602]

  
#### Possible fixes ####

  * igt@gem_cpu_reloc@basic:
    - {fi-icl-u3}:        DMESG-WARN [fdo#107724] -> PASS

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

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      DMESG-FAIL [fdo#110235 ] -> PASS

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

  * igt@kms_chamelium@dp-crc-fast:
    - fi-kbl-7500u:       DMESG-WARN [fdo#103841] -> PASS

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

  [fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505
  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
  [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
  [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 


Participating hosts (45 -> 43)
------------------------------

  Additional (2): fi-skl-guc fi-byt-clapper 
  Missing    (4): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 


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

    * IGT: IGT_4931 -> IGTPW_2795

  CI_DRM_5877: 03f3a57c6df4ef469bd9f528bb9e0201ddd0ee14 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2795: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2795/
  IGT_4931: 019f892e5d1a0a9643cb726c47ce2d99c14b444f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2.
  2019-04-03  9:50 ` [igt-dev] [PATCH i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2 Maarten Lankhorst
@ 2019-04-05 12:53   ` Juha-Pekka Heikkila
  0 siblings, 0 replies; 14+ messages in thread
From: Juha-Pekka Heikkila @ 2019-04-05 12:53 UTC (permalink / raw)
  To: Maarten Lankhorst, igt-dev

Took a while to see what is happening, git made this patch look really 
weird. Anyway, look ok to me.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>

On 3.4.2019 12.50, Maarten Lankhorst wrote:
> fb_convert() cannot convert to the HDR formats, so we need a fallback.
> When cairo is available on source and target format, create a surface
> for source and target. This way we can convert framebuffers directly
> when no direct conversion using fb_convert() is available.
> 
> This is required to make the kms_chamelium.*-cmp-planes-random tests
> pass.
> 
> Changes since v1:
> - Return fb_id in the cairo case.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>   lib/igt_fb.c | 90 ++++++++++++++++++++++++++++++++--------------------
>   1 file changed, 56 insertions(+), 34 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 6adf422228e8..a79b3f832c51 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -2976,53 +2976,75 @@ unsigned int igt_fb_convert_with_stride(struct igt_fb *dst, struct igt_fb *src,
>   	void *dst_ptr, *src_ptr;
>   	uint64_t base_modifier;
>   	int fb_id;
> +	const struct format_desc_struct *src_format = lookup_drm_format(src->drm_format);
> +	const struct format_desc_struct *dst_format = lookup_drm_format(dst_fourcc);
>   
>   	if (is_vc4_device(src->fd))
>   		base_modifier = fourcc_mod_broadcom_mod(dst_modifier);
>   	else
>   		base_modifier = dst_modifier;
>   
> -	fb_id = igt_create_fb_with_bo_size(src->fd, src->width, src->height,
> -					   dst_fourcc,
> -					   LOCAL_DRM_FORMAT_MOD_NONE, &linear,
> -					   0, dst_stride);
> -	igt_assert(fb_id > 0);
> +	if (src_format->cairo_id == CAIRO_FORMAT_INVALID ||
> +	    dst_format->cairo_id == CAIRO_FORMAT_INVALID) {
> +		fb_id = igt_create_fb_with_bo_size(src->fd, src->width, src->height,
> +						dst_fourcc,
> +						LOCAL_DRM_FORMAT_MOD_NONE, &linear,
> +						0, dst_stride);
> +		igt_assert(fb_id > 0);
>   
> -	src_ptr = igt_fb_map_buffer(src->fd, src);
> -	igt_assert(src_ptr);
> +		src_ptr = igt_fb_map_buffer(src->fd, src);
> +		igt_assert(src_ptr);
>   
> -	dst_ptr = igt_fb_map_buffer(linear.fd, &linear);
> -	igt_assert(dst_ptr);
> +		dst_ptr = igt_fb_map_buffer(linear.fd, &linear);
> +		igt_assert(dst_ptr);
>   
> -	cvt.dst.ptr = dst_ptr;
> -	cvt.dst.fb = &linear;
> -	cvt.src.ptr = src_ptr;
> -	cvt.src.fb = src;
> -	fb_convert(&cvt);
> +		cvt.dst.ptr = dst_ptr;
> +		cvt.dst.fb = &linear;
> +		cvt.src.ptr = src_ptr;
> +		cvt.src.fb = src;
> +		fb_convert(&cvt);
>   
> -	igt_fb_unmap_buffer(dst, dst_ptr);
> -	igt_fb_unmap_buffer(src, src_ptr);
> +		igt_fb_unmap_buffer(dst, dst_ptr);
> +		igt_fb_unmap_buffer(src, src_ptr);
>   
> -	switch (base_modifier) {
> -	case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
> -		fb_id = igt_vc4_fb_t_tiled_convert(dst, &linear);
> -		break;
> -	case DRM_FORMAT_MOD_BROADCOM_SAND32:
> -	case DRM_FORMAT_MOD_BROADCOM_SAND64:
> -	case DRM_FORMAT_MOD_BROADCOM_SAND128:
> -	case DRM_FORMAT_MOD_BROADCOM_SAND256:
> -		fb_id = vc4_fb_sand_tiled_convert(dst, &linear, dst_modifier);
> -		break;
> -	default:
> -		igt_assert(dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE);
> -	}
> +		switch (base_modifier) {
> +		case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
> +			fb_id = igt_vc4_fb_t_tiled_convert(dst, &linear);
> +			break;
> +		case DRM_FORMAT_MOD_BROADCOM_SAND32:
> +		case DRM_FORMAT_MOD_BROADCOM_SAND64:
> +		case DRM_FORMAT_MOD_BROADCOM_SAND128:
> +		case DRM_FORMAT_MOD_BROADCOM_SAND256:
> +			fb_id = vc4_fb_sand_tiled_convert(dst, &linear, dst_modifier);
> +			break;
> +		default:
> +			igt_assert(dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE);
> +		}
>   
> -	igt_assert(fb_id > 0);
> +		igt_assert(fb_id > 0);
>   
> -	if (dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE)
> -		*dst = linear;
> -	else
> -		igt_remove_fb(linear.fd, &linear);
> +		if (dst_modifier == LOCAL_DRM_FORMAT_MOD_NONE)
> +			*dst = linear;
> +		else
> +			igt_remove_fb(linear.fd, &linear);
> +	} else {
> +		/* Use the cairo api to convert */
> +		cairo_surface_t *surf = igt_get_cairo_surface(src->fd, src);
> +		cairo_t *cr;
> +
> +		fb_id = igt_create_fb_with_bo_size(src->fd, src->width,
> +						   src->height, dst_fourcc,
> +						   dst_modifier, dst, 0,
> +						   dst_stride);
> +		igt_assert(fb_id > 0);
> +
> +		cr = igt_get_cairo_ctx(dst->fd, dst);
> +		cairo_set_source_surface(cr, surf, 0, 0);
> +		cairo_paint(cr);
> +		igt_put_cairo_ctx(dst->fd, dst, cr);
> +
> +		cairo_surface_destroy(surf);
> +	}
>   
>   	return fb_id;
>   }
> 

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev3)
  2019-04-02 19:12 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Maarten Lankhorst
                   ` (5 preceding siblings ...)
  2019-04-05  9:35 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev3) Patchwork
@ 2019-04-06  3:07 ` Patchwork
  6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-04-06  3:07 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev3)
URL   : https://patchwork.freedesktop.org/series/58886/
State : success

== Summary ==

CI Bug Log - changes from IGT_4931_full -> IGTPW_2795_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/58886/revisions/3/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_create@create-clear:
    - shard-snb:          PASS -> INCOMPLETE [fdo#105411]

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

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

  * igt@kms_busy@basic-modeset-f:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
    - shard-hsw:          PASS -> DMESG-WARN [fdo#110222]
    - shard-kbl:          PASS -> DMESG-WARN [fdo#110222]

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
    - shard-glk:          PASS -> DMESG-WARN [fdo#110222]

  * igt@kms_cursor_crc@cursor-64x64-onscreen:
    - shard-glk:          NOTRUN -> FAIL [fdo#103232]

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +36

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-spr-indfb-draw-render:
    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] +45

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-snb:          PASS -> DMESG-WARN [fdo#102365]

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:
    - shard-glk:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_scaling@pipe-c-scaler-with-rotation:
    - shard-glk:          PASS -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_rotation_crc@multiplane-rotation:
    - shard-kbl:          PASS -> INCOMPLETE [fdo#103665]

  * igt@kms_sequence@queue-busy:
    - shard-snb:          PASS -> SKIP [fdo#109271]

  * igt@kms_setmode@basic:
    - shard-kbl:          PASS -> FAIL [fdo#99912]

  * igt@kms_universal_plane@universal-plane-gen9-features-pipe-e:
    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

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

  * igt@kms_vblank@pipe-c-wait-busy:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

  
#### Possible fixes ####

  * igt@kms_busy@extended-modeset-hang-newfb-render-a:
    - shard-hsw:          DMESG-WARN [fdo#110222] -> PASS +1

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
    - shard-kbl:          DMESG-WARN [fdo#110222] -> PASS +1

  * igt@kms_busy@extended-pageflip-hang-newfb-render-c:
    - shard-glk:          DMESG-WARN [fdo#110222] -> PASS

  * igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
    - shard-glk:          SKIP [fdo#109271] -> PASS +1

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
    - shard-apl:          DMESG-WARN [fdo#108566] -> PASS

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

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

  
  [fdo#102365]: https://bugs.freedesktop.org/show_bug.cgi?id=102365
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109660]: https://bugs.freedesktop.org/show_bug.cgi?id=109660
  [fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


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

  Missing    (2): shard-skl shard-iclb 


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

    * IGT: IGT_4931 -> IGTPW_2795

  CI_DRM_5877: 03f3a57c6df4ef469bd9f528bb9e0201ddd0ee14 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2795: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2795/
  IGT_4931: 019f892e5d1a0a9643cb726c47ce2d99c14b444f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

end of thread, other threads:[~2019-04-06  3:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02 19:12 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Maarten Lankhorst
2019-04-02 19:12 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests Maarten Lankhorst
2019-04-04 12:14   ` Paul Kocialkowski
2019-04-04 13:42     ` Maarten Lankhorst
2019-04-05  8:31       ` Paul Kocialkowski
2019-04-05  8:24     ` [igt-dev] [PATCH i-g-t] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests, v2 Maarten Lankhorst
2019-04-05  8:39       ` Paul Kocialkowski
2019-04-02 19:52 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride Patchwork
2019-04-03  9:50 ` [igt-dev] [PATCH i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2 Maarten Lankhorst
2019-04-05 12:53   ` Juha-Pekka Heikkila
2019-04-03 10:46 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev2) Patchwork
2019-04-04  0:48 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-04-05  9:35 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t] lib/igt_fb: Add cairo conversion to igt_fb_convert_with_stride, v2. (rev3) Patchwork
2019-04-06  3:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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