Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
@ 2018-02-14 17:07 Martin Peres
  2018-02-14 17:07 ` [igt-dev] [PATCH i-g-t v2 2/2] add a kms_fb_stride test Martin Peres
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Martin Peres @ 2018-02-14 17:07 UTC (permalink / raw)
  To: igt-dev; +Cc: Martin Peres

They are the same as their non-underscored counterparts, except they
will return the error rather than dying when an error occurs.

Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
---
 lib/igt_fb.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++----------
 lib/igt_fb.h |   8 +++++
 2 files changed, 94 insertions(+), 16 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index ecd73053..a96fbaba 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -751,6 +751,7 @@ void igt_paint_image(cairo_t *cr, const char *filename,
  * @fb: pointer to an #igt_fb structure
  * @bo_size: size of the backing bo (0 for automatic size)
  * @bo_stride: stride of the backing bo (0 for automatic stride)
+ * @fb_id: if not NULL, returns the kms id of the created framebuffer
  *
  * This function allocates a gem buffer object suitable to back a framebuffer
  * with the requested properties and then wraps it up in a drm framebuffer
@@ -759,18 +760,17 @@ void igt_paint_image(cairo_t *cr, const char *filename,
  * The backing storage of the framebuffer is filled with all zeros, i.e. black
  * for rgb pixel formats.
  *
- * Returns:
- * The kms id of the created framebuffer.
+ * Returns: 0 in case of success, the error otherwise.
  */
-unsigned int
-igt_create_fb_with_bo_size(int fd, int width, int height,
-			   uint32_t format, uint64_t tiling,
-			   struct igt_fb *fb, unsigned bo_size,
-			   unsigned bo_stride)
+int
+__igt_create_fb_with_bo_size(int fd, int width, int height,
+			     uint32_t format, uint64_t tiling,
+			     struct igt_fb *fb, unsigned bo_size,
+			     unsigned bo_stride, uint32_t *fb_id /* out */)
 {
 	struct format_desc_struct *f = lookup_drm_format(format);
-	uint32_t fb_id;
-	int i;
+	uint32_t _fb_id;
+	int ret, i;
 
 	igt_assert_f(f, "DRM format %08x not found\n", format);
 
@@ -789,9 +789,14 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 
 	if (tiling != LOCAL_DRM_FORMAT_MOD_NONE &&
 	    tiling != LOCAL_I915_FORMAT_MOD_X_TILED) {
-		do_or_die(__kms_addfb(fd, fb->gem_handle, width, height,
-				      fb->stride, format, tiling, fb->offsets,
-				      LOCAL_DRM_MODE_FB_MODIFIERS, &fb_id));
+		ret = __kms_addfb(fd, fb->gem_handle, width, height,
+				  fb->stride, format, tiling, fb->offsets,
+				  LOCAL_DRM_MODE_FB_MODIFIERS, &_fb_id);
+		if (ret) {
+			igt_debug("%s: __kms_addfb() failed: %d (%s)\n",
+				  __func__, errno, strerror(errno));
+			return ret;
+		}
 	} else {
 		uint32_t handles[4];
 		uint32_t pitches[4];
@@ -806,16 +811,21 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 			pitches[i] = fb->stride;
 		}
 
-		do_or_die(drmModeAddFB2(fd, width, height, format,
-					handles, pitches, fb->offsets,
-					&fb_id, 0));
+		ret = drmModeAddFB2(fd, width, height, format,
+		                    handles, pitches, fb->offsets,
+		                    &_fb_id, 0);
+		if (ret) {
+			igt_debug("%s: drmModeAddFB2() failed: %d (%s)\n",
+				  __func__, errno, strerror(errno));
+			return ret;
+		}
 	}
 
 	fb->width = width;
 	fb->height = height;
 	fb->tiling = tiling;
 	fb->drm_format = format;
-	fb->fb_id = fb_id;
+	fb->fb_id = _fb_id;
 	fb->fd = fd;
 	fb->num_planes = f->planes ?: 1;
 	fb->plane_bpp[0] = f->bpp;
@@ -829,6 +839,44 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 		fb->plane_width[i] = planar_width(f, width, i);
 	}
 
+	if (fb_id)
+		*fb_id = _fb_id;
+
+	return 0;
+}
+
+/**
+ * igt_create_fb_with_bo_size:
+ * @fd: open i915 drm file descriptor
+ * @width: width of the framebuffer in pixel
+ * @height: height of the framebuffer in pixel
+ * @format: drm fourcc pixel format code
+ * @tiling: tiling layout of the framebuffer (as framebuffer modifier)
+ * @fb: pointer to an #igt_fb structure
+ * @bo_size: size of the backing bo (0 for automatic size)
+ * @bo_stride: stride of the backing bo (0 for automatic stride)
+ *
+ * This function allocates a gem buffer object suitable to back a framebuffer
+ * with the requested properties and then wraps it up in a drm framebuffer
+ * object of the requested size. All metadata is stored in @fb.
+ *
+ * The backing storage of the framebuffer is filled with all zeros, i.e. black
+ * for rgb pixel formats.
+ *
+ * Returns:
+ * The kms id of the created framebuffer.
+ */
+unsigned int
+igt_create_fb_with_bo_size(int fd, int width, int height,
+			   uint32_t format, uint64_t tiling,
+			   struct igt_fb *fb, unsigned bo_size,
+			   unsigned bo_stride)
+{
+	uint32_t fb_id;
+
+	do_or_die(__igt_create_fb_with_bo_size(fd, width, height, format,
+	                                       tiling, fb, bo_size, bo_stride,
+	                                       &fb_id));
 	return fb_id;
 }
 
@@ -858,6 +906,28 @@ unsigned int igt_create_fb(int fd, int width, int height, uint32_t format,
 					  0, 0);
 }
 
+/**
+ * __igt_create_fb:
+ * @fd: open i915 drm file descriptor
+ * @width: width of the framebuffer in pixel
+ * @height: height of the framebuffer in pixel
+ * @format: drm fourcc pixel format code
+ * @tiling: tiling layout of the framebuffer
+ * @fb: pointer to an #igt_fb structure
+ * @fb_id: if not NULL, returns the kms id of the created framebuffer
+ *
+ * Same as igt_create_fb, but return an error if it failed rather than failing.
+ *
+ * Returns: 0 in case of success, the error otherwise.
+ */
+int __igt_create_fb(int fd, int width, int height, uint32_t format,
+		    uint64_t tiling, struct igt_fb *fb,
+		    uint32_t *fb_id /* out */)
+{
+	return __igt_create_fb_with_bo_size(fd, width, height, format, tiling,
+					    fb, 0, 0, fb_id);
+}
+
 /**
  * igt_create_color_fb:
  * @fd: open i915 drm file descriptor
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 023b069d..8a8bb34d 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -102,11 +102,19 @@ void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
 			  unsigned *width_ret, unsigned *height_ret);
 void igt_calc_fb_size(int fd, int width, int height, uint32_t format, uint64_t tiling,
 		      unsigned *size_ret, unsigned *stride_ret);
+int
+__igt_create_fb_with_bo_size(int fd, int width, int height,
+			     uint32_t format, uint64_t tiling,
+			     struct igt_fb *fb, unsigned bo_size,
+			     unsigned bo_stride, uint32_t *fb_id /* out */);
 unsigned int
 igt_create_fb_with_bo_size(int fd, int width, int height,
 			   uint32_t format, uint64_t tiling,
 			   struct igt_fb *fb, unsigned bo_size,
 			   unsigned bo_stride);
+int __igt_create_fb(int fd, int width, int height, uint32_t format,
+		    uint64_t tiling, struct igt_fb *fb,
+		    uint32_t *fb_id /* out */);
 unsigned int igt_create_fb(int fd, int width, int height, uint32_t format,
 			   uint64_t tiling, struct igt_fb *fb);
 unsigned int igt_create_color_fb(int fd, int width, int height,
-- 
2.16.1

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

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

* [igt-dev] [PATCH i-g-t v2 2/2] add a kms_fb_stride test
  2018-02-14 17:07 [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Martin Peres
@ 2018-02-14 17:07 ` Martin Peres
  2018-02-16 16:19   ` [igt-dev] [PATCH i-g-t v3] " Martin Peres
  2018-02-14 18:51 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Patchwork
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: Martin Peres @ 2018-02-14 17:07 UTC (permalink / raw)
  To: igt-dev; +Cc: Martin Peres

This test checks what strides are actually supported by each plane of
each pipe. The tested strides are 4K, 8K, and 16K. The tested formats
are DRM_FORMAT_RGB565 (16 bits) and DRM_FORMAT_XRGB8888 (32 bits).

To verify that the display controler is OK with the stride, the test
uses the pipe crc and verifies that a test image blitted to a
hdisplay x vdisplay framebuffer appears the same when blitted to a
stride x vdisplay framebuffer (with stride varying from 4K to 16K).

Any thoughts?

v2:
 - SKIP when a stride/format is not supported by the kernel
 - perform a modeset at a low resolution on all pipes before running
   a test in order to be fast and provide coverage even without
   a display attached (requires a VGA or HDMI connector).
 - generate a subtest per pipe, plane, format and stride

Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
---
 tests/Makefile.sources |   1 +
 tests/kms_fb_stride.c  | 312 +++++++++++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 314 insertions(+)
 create mode 100644 tests/kms_fb_stride.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 870c9093..0e1eeb95 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -181,6 +181,7 @@ TESTS_progs = \
 	kms_cursor_legacy \
 	kms_draw_crc \
 	kms_fbcon_fbt \
+	kms_fb_stride \
 	kms_fence_pin_leak \
 	kms_flip \
 	kms_flip_event_leak \
diff --git a/tests/kms_fb_stride.c b/tests/kms_fb_stride.c
new file mode 100644
index 00000000..a86d68dd
--- /dev/null
+++ b/tests/kms_fb_stride.c
@@ -0,0 +1,312 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ *   Martin Peres <martin.peres@linux.intel.com>
+ */
+
+#include "igt.h"
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+
+typedef enum {
+	TEST_STRIDE_CRTC = 0,
+	TEST_STRIDE_2K = 2,
+	TEST_STRIDE_4K = 4,
+	TEST_STRIDE_8K = 8,
+	TEST_STRIDE_16K = 16,
+	TEST_STRIDE_32K = 32,
+} stride_t;
+
+typedef struct {
+	int drm_fd;
+	igt_display_t display;
+	igt_pipe_crc_t *pipe_crc;
+} data_t;
+
+static drmModeModeInfo
+get_lowres_mode(int drmfd, int max_hdisplay)
+{
+	drmModeRes *mode_resources = drmModeGetResources(drmfd);
+	drmModeModeInfo mode;
+	drmModeModeInfo std_1024_mode = {
+		.clock = 65000,
+		.hdisplay = 1024,
+		.hsync_start = 1048,
+		.hsync_end = 1184,
+		.htotal = 1344,
+		.hskew = 0,
+		.vdisplay = 768,
+		.vsync_start = 771,
+		.vsync_end = 777,
+		.vtotal = 806,
+		.vscan = 0,
+		.vrefresh = 60,
+		.flags = 0xA,
+		.type = 0x40,
+		.name = "Custom 1024x768",
+	};
+	bool found;
+	int i, j;
+
+	if (!mode_resources) {
+		igt_warn("drmModeGetResources failed: %s\n", strerror(errno));
+		return std_1024_mode;
+	}
+
+	found = false;
+	for (i = 0; i < mode_resources->count_connectors; i++) {
+		drmModeConnector *connector;
+
+		connector = drmModeGetConnectorCurrent(drmfd,
+						       mode_resources->connectors[i]);
+		if (!connector) {
+			igt_warn("could not get connector %i: %s\n",
+				 mode_resources->connectors[i], strerror(errno));
+			continue;
+		}
+
+		if (!connector->count_modes)
+			continue;
+
+		for (j = 0; j < connector->count_modes; j++) {
+			mode = connector->modes[j];
+			if (mode.hdisplay < max_hdisplay) {
+				found = true;
+				break;
+			}
+		}
+
+		drmModeFreeConnector(connector);
+	}
+
+	drmModeFreeResources(mode_resources);
+
+	if (!found)
+		return std_1024_mode;
+
+	return mode;
+}
+
+static void test_cleanup(data_t *data, igt_plane_t *plane, struct igt_fb *fb) {
+	igt_plane_set_fb(plane, NULL);
+	igt_display_commit2(&data->display, COMMIT_UNIVERSAL);
+	igt_remove_fb(data->drm_fd, fb);
+}
+
+static void test_format_plane_get_crc(data_t *data, igt_output_t *output,
+				      igt_plane_t *plane, uint32_t format,
+				      stride_t stride,
+				      igt_crc_t *crc /* out */) {
+	drmModeModeInfo *mode;
+	struct igt_fb fb;
+	cairo_t *cr;
+	int width, ret;
+
+	mode = igt_output_get_mode(output);
+
+	width = (stride == TEST_STRIDE_CRTC ? mode->hdisplay : stride * 1024);
+
+	igt_skip_on(__igt_create_fb(data->drm_fd, width, mode->vdisplay,
+		                    format, LOCAL_DRM_FORMAT_MOD_NONE, &fb,
+		                    NULL));
+
+	cr = igt_get_cairo_ctx(data->drm_fd, &fb);
+	igt_paint_test_pattern(cr, mode->hdisplay, mode->vdisplay);
+	igt_assert(cairo_status(cr) == 0);
+	cairo_destroy(cr);
+
+	/* set the fb with the wanted stride. If the stride is negative, we want
+	 * to fail because it means the pipe does not support the resolution of
+	 * the screen. If the stride is positive, this means we are testing an
+	 * increased stride and we want to skip if the kernel considers the mode
+	 * invalid.
+	 */
+	igt_plane_set_fb(plane, &fb);
+
+	ret = igt_display_try_commit2(&data->display, COMMIT_UNIVERSAL);
+	if (ret) {
+		/* reset the state and free the framebuffer */
+		test_cleanup(data, plane, &fb);
+
+		igt_skip("The kernel rejected setting a %ix%i framebuffer\n",
+		         width, mode->vdisplay);
+	}
+
+	igt_pipe_crc_collect_crc(data->pipe_crc, crc);
+
+	/* reset the state and free the framebuffer */
+	test_cleanup(data, plane, &fb);
+}
+
+static void test_format_plane(data_t *data, enum pipe pipe,
+			      igt_output_t *output, igt_plane_t *plane,
+			      uint32_t format, stride_t stride)
+{
+	drmModeModeInfo mode;
+	igt_crc_t crc_ref, crc;
+
+	mode = get_lowres_mode(data->drm_fd, 1025);
+	igt_output_override_mode(output, &mode);
+	igt_output_set_pipe(output, pipe);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
+						INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	test_format_plane_get_crc(data, output, plane, format,
+	                          TEST_STRIDE_CRTC, &crc_ref);
+	test_format_plane_get_crc(data, output, plane, format,
+	                          stride, &crc);
+	igt_assert_crc_equal(&crc_ref, &crc);
+
+	igt_pipe_crc_stop(data->pipe_crc);
+	igt_pipe_crc_free(data->pipe_crc);
+
+	igt_output_set_pipe(output, PIPE_ANY);
+}
+
+
+static igt_output_t *
+find_suitable_connector(data_t *data, enum pipe pipe) {
+	igt_output_t *output;
+	drmModeRes *res;
+
+	/* make sure all connectors are free for our testing */
+	res = drmModeGetResources(data->drm_fd);
+	igt_assert(res);
+	kmstest_unset_all_crtcs(data->drm_fd, res);
+
+	/* find a connector that supports mode injection */
+	for_each_valid_output_on_pipe(&data->display, pipe, output) {
+		drmModeConnector *c;
+
+		/* find the first VGA or HDMI connector, since they are fast to
+		 * do a modeset for, and we can force a mode on them.
+		 */
+		c = output->config.connector;
+		if (!c || (c->connector_type != DRM_MODE_CONNECTOR_VGA &&
+			   c->connector_type != DRM_MODE_CONNECTOR_HDMIA &&
+			   c->connector_type != DRM_MODE_CONNECTOR_HDMIB))
+			continue;
+
+		return output;
+	}
+
+	igt_skip("No acceptable connector found on pipe %s\n",
+		 kmstest_pipe_name(pipe));
+}
+
+static igt_plane_t *
+find_plane(data_t *data, enum pipe pipe, int plane_id) {
+	igt_plane_t *plane;
+
+	for_each_plane_on_pipe(&data->display, pipe, plane)
+		if (plane->index == plane_id) {
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				igt_skip("The plane %s.%d is a cursor plane\n",
+					 kmstest_pipe_name(pipe), plane->index);
+			return plane;
+		}
+
+	igt_skip("The plane %s.%d could not be found\n",
+		    kmstest_pipe_name(pipe), plane->index);
+
+	return NULL;
+}
+
+static void
+setup_test(data_t *data, enum pipe pipe, stride_t stride, int plane_id, uint32_t format) {
+	igt_output_t *output;
+	igt_plane_t *plane;
+
+	/* make sure to skip early if the plane or format is not available */
+	igt_skip_on(plane_id >= data->display.pipes[pipe].n_planes);
+	igt_skip_on(!igt_fb_supported_format(format));
+
+	/* get all the specified resources */
+	output = find_suitable_connector(data, pipe);
+	plane = find_plane(data, pipe, plane_id);
+
+	test_format_plane(data, pipe, output, plane, format, stride);
+}
+
+/* formats and strides that will be tested on all pipes and all non-cursor
+ * planes
+ */
+stride_t strides[] = { TEST_STRIDE_4K, TEST_STRIDE_8K, TEST_STRIDE_16K };
+uint32_t formats[] = { DRM_FORMAT_RGB565, DRM_FORMAT_XRGB8888 };
+#define N_PLANES_MAX 4
+
+static void
+run_tests_for_pipe(data_t *data, enum pipe pipe)
+{
+	stride_t stride;
+	uint32_t format;
+	int plane_id, s, f;
+
+	igt_fixture {
+		igt_skip_on(pipe >= data->display.n_pipes);
+		igt_require(data->display.pipes[pipe].n_planes > 0);
+	}
+
+	for (plane_id = 0; plane_id < N_PLANES_MAX; plane_id++) {
+		for (f = 0; f < ARRAY_SIZE(formats); f++) {
+			format = formats[f];
+
+			for (s = 0; s < ARRAY_SIZE(strides); s++) {
+				stride = strides[s];
+
+				igt_subtest_f("pipe-%s-plane-%d-%c%c%c%c-stride-%dK",
+					kmstest_pipe_name(pipe), plane_id, format,
+					format >> 8, format >> 16, format >> 24,
+					stride)
+					setup_test(data, pipe, stride, plane_id, format);
+			}
+		}
+	}
+}
+
+static data_t data;
+
+igt_main
+{
+	enum pipe pipe;
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+
+		kmstest_set_vt_graphics_mode();
+
+		igt_require_pipe_crc(data.drm_fd);
+		igt_display_init(&data.display, data.drm_fd);
+	}
+
+	for_each_pipe_static(pipe)
+		run_tests_for_pipe(&data, pipe);
+
+	igt_fixture {
+		igt_display_fini(&data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index 521a4c42..8b048300 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -159,6 +159,7 @@ test_progs = [
 	'kms_cursor_legacy',
 	'kms_draw_crc',
 	'kms_fbcon_fbt',
+	'kms_fb_stride',
 	'kms_fence_pin_leak',
 	'kms_flip',
 	'kms_flip_event_leak',
-- 
2.16.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
  2018-02-14 17:07 [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Martin Peres
  2018-02-14 17:07 ` [igt-dev] [PATCH i-g-t v2 2/2] add a kms_fb_stride test Martin Peres
@ 2018-02-14 18:51 ` Patchwork
  2018-02-16 14:24 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-02-14 18:51 UTC (permalink / raw)
  To: Martin Peres; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
URL   : https://patchwork.freedesktop.org/series/38268/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
1d227a47223d2ff5c6745c0d82e96e70d456d5de lib/kms: Clear unused fields for getproperty ioctl

with latest DRM-Tip kernel build CI_DRM_3774
5ad7866768dc drm-tip: 2018y-02m-14d-15h-14m-50s UTC integration manifest

Testlist changes:
+++ 144 lines
--- 0 lines

Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:422s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:435s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:378s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:494s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:289s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:484s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:486s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:474s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:464s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:569s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:574s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:419s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:283s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:511s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:390s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:413s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:461s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:414s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:461s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:497s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:502s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:574s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:434s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:508s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:530s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:488s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:479s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:413s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:433s
fi-snb-2520m     total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:403s
Blacklisted hosts:
fi-glk-dsi       total:246  pass:218  dwarn:0   dfail:0   fail:1   skip:26 
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:455s

== Logs ==

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
  2018-02-14 17:07 [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Martin Peres
  2018-02-14 17:07 ` [igt-dev] [PATCH i-g-t v2 2/2] add a kms_fb_stride test Martin Peres
  2018-02-14 18:51 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Patchwork
@ 2018-02-16 14:24 ` Patchwork
  2018-02-16 17:39 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2) Patchwork
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-02-16 14:24 UTC (permalink / raw)
  To: Martin Peres; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
URL   : https://patchwork.freedesktop.org/series/38268/
State : failure

== Summary ==

Test kms_plane:
        Subgroup plane-panning-bottom-right-suspend-pipe-a-planes:
                pass       -> INCOMPLETE (shard-hsw) fdo#103540 +1
Test gem_eio:
        Subgroup in-flight-external:
                fail       -> PASS       (shard-hsw) fdo#104676
Test kms_vblank:
        Subgroup pipe-a-ts-continuation-modeset:
                skip       -> PASS       (shard-snb)
        Subgroup crtc-id:
                skip       -> PASS       (shard-snb)
Test perf_pmu:
        Subgroup render-node-busy-idle-vcs0:
                pass       -> FAIL       (shard-snb)
        Subgroup busy-idle-rcs0:
                pass       -> FAIL       (shard-apl)
Test kms_cursor_legacy:
        Subgroup flip-vs-cursor-legacy:
                pass       -> FAIL       (shard-hsw) fdo#102670
Test perf:
        Subgroup oa-exponents:
                fail       -> PASS       (shard-apl) fdo#102254
Test kms_force_connector_basic:
        Subgroup force-load-detect:
                skip       -> PASS       (shard-snb)
Test kms_draw_crc:
        Subgroup draw-method-xrgb2101010-mmap-wc-xtiled:
                pass       -> SKIP       (shard-snb)

fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254

shard-apl        total:3553 pass:1766 dwarn:1   dfail:0   fail:21  skip:1764 time:13953s
shard-hsw        total:3537 pass:1752 dwarn:1   dfail:0   fail:11  skip:1771 time:14212s
shard-snb        total:3571 pass:1358 dwarn:1   dfail:0   fail:11  skip:2201 time:7684s
Blacklisted hosts:
shard-kbl        total:3534 pass:1888 dwarn:1   dfail:0   fail:18  skip:1625 time:10660s

== Logs ==

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

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

* [igt-dev] [PATCH i-g-t v3] add a kms_fb_stride test
  2018-02-14 17:07 ` [igt-dev] [PATCH i-g-t v2 2/2] add a kms_fb_stride test Martin Peres
@ 2018-02-16 16:19   ` Martin Peres
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Peres @ 2018-02-16 16:19 UTC (permalink / raw)
  To: igt-dev; +Cc: Martin Peres

This test checks what strides are actually supported by each plane of
each pipe. The tested strides are 4K, 8K, and 16K. The tested formats
are DRM_FORMAT_RGB565 (16 bits) and DRM_FORMAT_XRGB8888 (32 bits).

To verify that the display controler is OK with the stride, the test
uses the pipe crc and verifies that a test image blitted to a
hdisplay x vdisplay framebuffer appears the same when blitted to a
stride x vdisplay framebuffer (with stride varying from 4K to 16K).

v2:
 - SKIP when a stride/format is not supported by the kernel
 - perform a modeset at a low resolution on all pipes before running
   a test in order to be fast and provide coverage even without
   a display attached (requires a VGA or HDMI connector).
 - generate a subtest per pipe, plane, format and stride

v3:
 - if not VGA or HDMI connectors are found, fallback to any connected
   connector

Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
---
 tests/Makefile.sources |   1 +
 tests/kms_fb_stride.c  | 323 +++++++++++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 325 insertions(+)
 create mode 100644 tests/kms_fb_stride.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 870c9093..0e1eeb95 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -181,6 +181,7 @@ TESTS_progs = \
 	kms_cursor_legacy \
 	kms_draw_crc \
 	kms_fbcon_fbt \
+	kms_fb_stride \
 	kms_fence_pin_leak \
 	kms_flip \
 	kms_flip_event_leak \
diff --git a/tests/kms_fb_stride.c b/tests/kms_fb_stride.c
new file mode 100644
index 00000000..1c7829fc
--- /dev/null
+++ b/tests/kms_fb_stride.c
@@ -0,0 +1,323 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ *   Martin Peres <martin.peres@linux.intel.com>
+ */
+
+#include "igt.h"
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+
+typedef enum {
+	TEST_STRIDE_CRTC = 0,
+	TEST_STRIDE_2K = 2,
+	TEST_STRIDE_4K = 4,
+	TEST_STRIDE_8K = 8,
+	TEST_STRIDE_16K = 16,
+	TEST_STRIDE_32K = 32,
+} stride_t;
+
+typedef struct {
+	int drm_fd;
+	igt_display_t display;
+	igt_pipe_crc_t *pipe_crc;
+} data_t;
+
+static drmModeModeInfo
+get_lowres_mode(int drmfd, int max_hdisplay)
+{
+	drmModeRes *mode_resources = drmModeGetResources(drmfd);
+	drmModeModeInfo mode;
+	drmModeModeInfo std_1024_mode = {
+		.clock = 65000,
+		.hdisplay = 1024,
+		.hsync_start = 1048,
+		.hsync_end = 1184,
+		.htotal = 1344,
+		.hskew = 0,
+		.vdisplay = 768,
+		.vsync_start = 771,
+		.vsync_end = 777,
+		.vtotal = 806,
+		.vscan = 0,
+		.vrefresh = 60,
+		.flags = 0xA,
+		.type = 0x40,
+		.name = "Custom 1024x768",
+	};
+	bool found;
+	int i, j;
+
+	if (!mode_resources) {
+		igt_warn("drmModeGetResources failed: %s\n", strerror(errno));
+		return std_1024_mode;
+	}
+
+	found = false;
+	for (i = 0; i < mode_resources->count_connectors; i++) {
+		drmModeConnector *connector;
+
+		connector = drmModeGetConnectorCurrent(drmfd,
+						       mode_resources->connectors[i]);
+		if (!connector) {
+			igt_warn("could not get connector %i: %s\n",
+				 mode_resources->connectors[i], strerror(errno));
+			continue;
+		}
+
+		if (!connector->count_modes)
+			continue;
+
+		for (j = 0; j < connector->count_modes; j++) {
+			mode = connector->modes[j];
+			if (mode.hdisplay < max_hdisplay) {
+				found = true;
+				break;
+			}
+		}
+
+		drmModeFreeConnector(connector);
+	}
+
+	drmModeFreeResources(mode_resources);
+
+	if (!found)
+		return std_1024_mode;
+
+	return mode;
+}
+
+static void test_cleanup(data_t *data, igt_plane_t *plane, struct igt_fb *fb) {
+	igt_plane_set_fb(plane, NULL);
+	igt_display_commit2(&data->display, COMMIT_UNIVERSAL);
+	igt_remove_fb(data->drm_fd, fb);
+}
+
+static void test_format_plane_get_crc(data_t *data, igt_output_t *output,
+				      igt_plane_t *plane, uint32_t format,
+				      stride_t stride,
+				      igt_crc_t *crc /* out */) {
+	drmModeModeInfo *mode;
+	struct igt_fb fb;
+	cairo_t *cr;
+	int width, ret;
+
+	mode = igt_output_get_mode(output);
+
+	width = (stride == TEST_STRIDE_CRTC ? mode->hdisplay : stride * 1024);
+
+	igt_skip_on(__igt_create_fb(data->drm_fd, width, mode->vdisplay,
+		                    format, LOCAL_DRM_FORMAT_MOD_NONE, &fb,
+		                    NULL));
+
+	cr = igt_get_cairo_ctx(data->drm_fd, &fb);
+	igt_paint_test_pattern(cr, mode->hdisplay, mode->vdisplay);
+	igt_assert(cairo_status(cr) == 0);
+	cairo_destroy(cr);
+
+	/* set the fb with the wanted stride. If the stride is negative, we want
+	 * to fail because it means the pipe does not support the resolution of
+	 * the screen. If the stride is positive, this means we are testing an
+	 * increased stride and we want to skip if the kernel considers the mode
+	 * invalid.
+	 */
+	igt_plane_set_fb(plane, &fb);
+
+	ret = igt_display_try_commit2(&data->display, COMMIT_UNIVERSAL);
+	if (ret) {
+		/* reset the state and free the framebuffer */
+		test_cleanup(data, plane, &fb);
+
+		igt_skip("The kernel rejected setting a %ix%i framebuffer\n",
+		         width, mode->vdisplay);
+	}
+
+	igt_pipe_crc_collect_crc(data->pipe_crc, crc);
+
+	/* reset the state and free the framebuffer */
+	test_cleanup(data, plane, &fb);
+}
+
+static void test_format_plane(data_t *data, enum pipe pipe,
+			      igt_output_t *output, igt_plane_t *plane,
+			      uint32_t format, stride_t stride)
+{
+	drmModeModeInfo mode;
+	igt_crc_t crc_ref, crc;
+
+	mode = get_lowres_mode(data->drm_fd, 1025);
+	igt_output_override_mode(output, &mode);
+	igt_output_set_pipe(output, pipe);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
+						INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	test_format_plane_get_crc(data, output, plane, format,
+	                          TEST_STRIDE_CRTC, &crc_ref);
+	test_format_plane_get_crc(data, output, plane, format,
+	                          stride, &crc);
+	igt_assert_crc_equal(&crc_ref, &crc);
+
+	igt_pipe_crc_stop(data->pipe_crc);
+	igt_pipe_crc_free(data->pipe_crc);
+
+	igt_output_set_pipe(output, PIPE_ANY);
+}
+
+
+static igt_output_t *
+find_suitable_connector(data_t *data, enum pipe pipe) {
+	igt_output_t *output, *output_connected = NULL;
+	drmModeRes *res;
+
+	/* make sure all connectors are free for our testing */
+	res = drmModeGetResources(data->drm_fd);
+	igt_assert(res);
+	kmstest_unset_all_crtcs(data->drm_fd, res);
+
+	/* find a connector that supports mode injection */
+	for_each_valid_output_on_pipe(&data->display, pipe, output) {
+		drmModeConnector *c = output->config.connector;
+		if (!c)
+			continue;
+
+		/* find the first VGA or HDMI connector, since they are fast to
+		 * do a modeset for, and we can force a mode on them.
+		 */
+		if (c->connector_type == DRM_MODE_CONNECTOR_VGA ||
+		    c->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+		    c->connector_type == DRM_MODE_CONNECTOR_HDMIB)
+			return output;
+
+		/* this connector is not ideal, but if a screen is connected,
+		 * then mark the connector as usable
+		 */
+		if (c->connection == DRM_MODE_CONNECTED)
+			output_connected = output;
+	}
+
+	/* we did not find an ideal connector, so use one that has a connected
+	 * screen on it (if available):
+	 */
+	if (output_connected)
+		return output_connected;
+
+	igt_skip("No acceptable connector found on pipe %s\n",
+		 kmstest_pipe_name(pipe));
+}
+
+static igt_plane_t *
+find_plane(data_t *data, enum pipe pipe, int plane_id) {
+	igt_plane_t *plane;
+
+	for_each_plane_on_pipe(&data->display, pipe, plane)
+		if (plane->index == plane_id) {
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				igt_skip("The plane %s.%d is a cursor plane\n",
+					 kmstest_pipe_name(pipe), plane->index);
+			return plane;
+		}
+
+	igt_skip("The plane %s.%d could not be found\n",
+		    kmstest_pipe_name(pipe), plane->index);
+
+	return NULL;
+}
+
+static void
+setup_test(data_t *data, enum pipe pipe, stride_t stride, int plane_id, uint32_t format) {
+	igt_output_t *output;
+	igt_plane_t *plane;
+
+	/* make sure to skip early if the plane or format is not available */
+	igt_skip_on(plane_id >= data->display.pipes[pipe].n_planes);
+	igt_skip_on(!igt_fb_supported_format(format));
+
+	/* get all the specified resources */
+	output = find_suitable_connector(data, pipe);
+	plane = find_plane(data, pipe, plane_id);
+
+	test_format_plane(data, pipe, output, plane, format, stride);
+}
+
+/* formats and strides that will be tested on all pipes and all non-cursor
+ * planes
+ */
+stride_t strides[] = { TEST_STRIDE_4K, TEST_STRIDE_8K, TEST_STRIDE_16K };
+uint32_t formats[] = { DRM_FORMAT_RGB565, DRM_FORMAT_XRGB8888 };
+#define N_PLANES_MAX 4
+
+static void
+run_tests_for_pipe(data_t *data, enum pipe pipe)
+{
+	stride_t stride;
+	uint32_t format;
+	int plane_id, s, f;
+
+	igt_fixture {
+		igt_skip_on(pipe >= data->display.n_pipes);
+		igt_require(data->display.pipes[pipe].n_planes > 0);
+	}
+
+	for (plane_id = 0; plane_id < N_PLANES_MAX; plane_id++) {
+		for (f = 0; f < ARRAY_SIZE(formats); f++) {
+			format = formats[f];
+
+			for (s = 0; s < ARRAY_SIZE(strides); s++) {
+				stride = strides[s];
+
+				igt_subtest_f("pipe-%s-plane-%d-%c%c%c%c-stride-%dK",
+					kmstest_pipe_name(pipe), plane_id, format,
+					format >> 8, format >> 16, format >> 24,
+					stride)
+					setup_test(data, pipe, stride, plane_id, format);
+			}
+		}
+	}
+}
+
+static data_t data;
+
+igt_main
+{
+	enum pipe pipe;
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+
+		kmstest_set_vt_graphics_mode();
+
+		igt_require_pipe_crc(data.drm_fd);
+		igt_display_init(&data.display, data.drm_fd);
+	}
+
+	for_each_pipe_static(pipe)
+		run_tests_for_pipe(&data, pipe);
+
+	igt_fixture {
+		igt_display_fini(&data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index 521a4c42..8b048300 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -159,6 +159,7 @@ test_progs = [
 	'kms_cursor_legacy',
 	'kms_draw_crc',
 	'kms_fbcon_fbt',
+	'kms_fb_stride',
 	'kms_fence_pin_leak',
 	'kms_flip',
 	'kms_flip_event_leak',
-- 
2.16.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2)
  2018-02-14 17:07 [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Martin Peres
                   ` (2 preceding siblings ...)
  2018-02-16 14:24 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-02-16 17:39 ` Patchwork
  2018-02-16 19:24 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2018-02-23 19:49 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Ville Syrjälä
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-02-16 17:39 UTC (permalink / raw)
  To: Martin Peres; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2)
URL   : https://patchwork.freedesktop.org/series/38268/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
8de9f5f973fe7e8e96e4327ecd2c02d3dce24a1f tests/perf_pmu: Verify engine busyness accuracy

with latest DRM-Tip kernel build CI_DRM_3785
3313cf61f29d drm-tip: 2018y-02m-16d-16h-19m-05s UTC integration manifest

Testlist changes:
+++ 144 lines
--- 0 lines

Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:419s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:378s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:494s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:289s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:487s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:487s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:473s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:470s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:581s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:582s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:419s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:286s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:510s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:391s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:413s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:460s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:409s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:457s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:498s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:454s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:504s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:573s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:435s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:512s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:528s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:493s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:478s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:414s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:433s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:534s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:399s

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2)
  2018-02-14 17:07 [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Martin Peres
                   ` (3 preceding siblings ...)
  2018-02-16 17:39 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2) Patchwork
@ 2018-02-16 19:24 ` Patchwork
  2018-02-23 19:49 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Ville Syrjälä
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-02-16 19:24 UTC (permalink / raw)
  To: Martin Peres; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2)
URL   : https://patchwork.freedesktop.org/series/38268/
State : success

== Summary ==

Test kms_flip:
        Subgroup dpms-vs-vblank-race:
                pass       -> FAIL       (shard-hsw) fdo#103060
Test perf:
        Subgroup oa-exponents:
                pass       -> FAIL       (shard-apl) fdo#102254
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-pri-indfb-multidraw:
                pass       -> FAIL       (shard-snb) fdo#103167 +1
        Subgroup fbc-1p-primscrn-shrfb-pgflip-blt:
                pass       -> FAIL       (shard-apl) fdo#101623
Test gem_eio:
        Subgroup in-flight:
                dmesg-warn -> PASS       (shard-snb) fdo#104058
Test kms_cursor_legacy:
        Subgroup flip-vs-cursor-atomic-transitions-varying-size:
                fail       -> PASS       (shard-apl) fdo#102670

fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670

shard-apl        total:3566 pass:1820 dwarn:1   dfail:0   fail:17  skip:1727 time:12352s
shard-hsw        total:3574 pass:1773 dwarn:1   dfail:0   fail:5   skip:1794 time:11778s
shard-snb        total:3574 pass:1358 dwarn:1   dfail:0   fail:5   skip:2210 time:6666s
Blacklisted hosts:
shard-kbl        total:3556 pass:1923 dwarn:1   dfail:0   fail:16  skip:1615 time:9616s

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
  2018-02-14 17:07 [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Martin Peres
                   ` (4 preceding siblings ...)
  2018-02-16 19:24 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-02-23 19:49 ` Ville Syrjälä
  5 siblings, 0 replies; 8+ messages in thread
From: Ville Syrjälä @ 2018-02-23 19:49 UTC (permalink / raw)
  To: Martin Peres; +Cc: igt-dev

On Wed, Feb 14, 2018 at 07:07:35PM +0200, Martin Peres wrote:
> They are the same as their non-underscored counterparts, except they
> will return the error rather than dying when an error occurs.
> 
> Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
> ---
>  lib/igt_fb.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++----------
>  lib/igt_fb.h |   8 +++++
>  2 files changed, 94 insertions(+), 16 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index ecd73053..a96fbaba 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -751,6 +751,7 @@ void igt_paint_image(cairo_t *cr, const char *filename,
>   * @fb: pointer to an #igt_fb structure
>   * @bo_size: size of the backing bo (0 for automatic size)
>   * @bo_stride: stride of the backing bo (0 for automatic stride)
> + * @fb_id: if not NULL, returns the kms id of the created framebuffer
>   *
>   * This function allocates a gem buffer object suitable to back a framebuffer
>   * with the requested properties and then wraps it up in a drm framebuffer
> @@ -759,18 +760,17 @@ void igt_paint_image(cairo_t *cr, const char *filename,
>   * The backing storage of the framebuffer is filled with all zeros, i.e. black
>   * for rgb pixel formats.
>   *
> - * Returns:
> - * The kms id of the created framebuffer.
> + * Returns: 0 in case of success, the error otherwise.
>   */
> -unsigned int
> -igt_create_fb_with_bo_size(int fd, int width, int height,
> -			   uint32_t format, uint64_t tiling,
> -			   struct igt_fb *fb, unsigned bo_size,
> -			   unsigned bo_stride)
> +int
> +__igt_create_fb_with_bo_size(int fd, int width, int height,
> +			     uint32_t format, uint64_t tiling,
> +			     struct igt_fb *fb, unsigned bo_size,
> +			     unsigned bo_stride, uint32_t *fb_id /* out */)

We'll stuff the fb_id into fb->fb_id, so I think we shouldn't need 
the the out parameter.

Apart from that things look reasonable to me.

>  {
>  	struct format_desc_struct *f = lookup_drm_format(format);
> -	uint32_t fb_id;
> -	int i;
> +	uint32_t _fb_id;
> +	int ret, i;
>  
>  	igt_assert_f(f, "DRM format %08x not found\n", format);
>  
> @@ -789,9 +789,14 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>  
>  	if (tiling != LOCAL_DRM_FORMAT_MOD_NONE &&
>  	    tiling != LOCAL_I915_FORMAT_MOD_X_TILED) {
> -		do_or_die(__kms_addfb(fd, fb->gem_handle, width, height,
> -				      fb->stride, format, tiling, fb->offsets,
> -				      LOCAL_DRM_MODE_FB_MODIFIERS, &fb_id));
> +		ret = __kms_addfb(fd, fb->gem_handle, width, height,
> +				  fb->stride, format, tiling, fb->offsets,
> +				  LOCAL_DRM_MODE_FB_MODIFIERS, &_fb_id);
> +		if (ret) {
> +			igt_debug("%s: __kms_addfb() failed: %d (%s)\n",
> +				  __func__, errno, strerror(errno));
> +			return ret;
> +		}
>  	} else {
>  		uint32_t handles[4];
>  		uint32_t pitches[4];
> @@ -806,16 +811,21 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>  			pitches[i] = fb->stride;
>  		}
>  
> -		do_or_die(drmModeAddFB2(fd, width, height, format,
> -					handles, pitches, fb->offsets,
> -					&fb_id, 0));
> +		ret = drmModeAddFB2(fd, width, height, format,
> +		                    handles, pitches, fb->offsets,
> +		                    &_fb_id, 0);
> +		if (ret) {
> +			igt_debug("%s: drmModeAddFB2() failed: %d (%s)\n",
> +				  __func__, errno, strerror(errno));
> +			return ret;
> +		}
>  	}
>  
>  	fb->width = width;
>  	fb->height = height;
>  	fb->tiling = tiling;
>  	fb->drm_format = format;
> -	fb->fb_id = fb_id;
> +	fb->fb_id = _fb_id;
>  	fb->fd = fd;
>  	fb->num_planes = f->planes ?: 1;
>  	fb->plane_bpp[0] = f->bpp;
> @@ -829,6 +839,44 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>  		fb->plane_width[i] = planar_width(f, width, i);
>  	}
>  
> +	if (fb_id)
> +		*fb_id = _fb_id;
> +
> +	return 0;
> +}
> +
> +/**
> + * igt_create_fb_with_bo_size:
> + * @fd: open i915 drm file descriptor
> + * @width: width of the framebuffer in pixel
> + * @height: height of the framebuffer in pixel
> + * @format: drm fourcc pixel format code
> + * @tiling: tiling layout of the framebuffer (as framebuffer modifier)
> + * @fb: pointer to an #igt_fb structure
> + * @bo_size: size of the backing bo (0 for automatic size)
> + * @bo_stride: stride of the backing bo (0 for automatic stride)
> + *
> + * This function allocates a gem buffer object suitable to back a framebuffer
> + * with the requested properties and then wraps it up in a drm framebuffer
> + * object of the requested size. All metadata is stored in @fb.
> + *
> + * The backing storage of the framebuffer is filled with all zeros, i.e. black
> + * for rgb pixel formats.
> + *
> + * Returns:
> + * The kms id of the created framebuffer.
> + */
> +unsigned int
> +igt_create_fb_with_bo_size(int fd, int width, int height,
> +			   uint32_t format, uint64_t tiling,
> +			   struct igt_fb *fb, unsigned bo_size,
> +			   unsigned bo_stride)
> +{
> +	uint32_t fb_id;
> +
> +	do_or_die(__igt_create_fb_with_bo_size(fd, width, height, format,
> +	                                       tiling, fb, bo_size, bo_stride,
> +	                                       &fb_id));
>  	return fb_id;
>  }
>  
> @@ -858,6 +906,28 @@ unsigned int igt_create_fb(int fd, int width, int height, uint32_t format,
>  					  0, 0);
>  }
>  
> +/**
> + * __igt_create_fb:
> + * @fd: open i915 drm file descriptor
> + * @width: width of the framebuffer in pixel
> + * @height: height of the framebuffer in pixel
> + * @format: drm fourcc pixel format code
> + * @tiling: tiling layout of the framebuffer
> + * @fb: pointer to an #igt_fb structure
> + * @fb_id: if not NULL, returns the kms id of the created framebuffer
> + *
> + * Same as igt_create_fb, but return an error if it failed rather than failing.
> + *
> + * Returns: 0 in case of success, the error otherwise.
> + */
> +int __igt_create_fb(int fd, int width, int height, uint32_t format,
> +		    uint64_t tiling, struct igt_fb *fb,
> +		    uint32_t *fb_id /* out */)
> +{
> +	return __igt_create_fb_with_bo_size(fd, width, height, format, tiling,
> +					    fb, 0, 0, fb_id);
> +}
> +
>  /**
>   * igt_create_color_fb:
>   * @fd: open i915 drm file descriptor
> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
> index 023b069d..8a8bb34d 100644
> --- a/lib/igt_fb.h
> +++ b/lib/igt_fb.h
> @@ -102,11 +102,19 @@ void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
>  			  unsigned *width_ret, unsigned *height_ret);
>  void igt_calc_fb_size(int fd, int width, int height, uint32_t format, uint64_t tiling,
>  		      unsigned *size_ret, unsigned *stride_ret);
> +int
> +__igt_create_fb_with_bo_size(int fd, int width, int height,
> +			     uint32_t format, uint64_t tiling,
> +			     struct igt_fb *fb, unsigned bo_size,
> +			     unsigned bo_stride, uint32_t *fb_id /* out */);
>  unsigned int
>  igt_create_fb_with_bo_size(int fd, int width, int height,
>  			   uint32_t format, uint64_t tiling,
>  			   struct igt_fb *fb, unsigned bo_size,
>  			   unsigned bo_stride);
> +int __igt_create_fb(int fd, int width, int height, uint32_t format,
> +		    uint64_t tiling, struct igt_fb *fb,
> +		    uint32_t *fb_id /* out */);
>  unsigned int igt_create_fb(int fd, int width, int height, uint32_t format,
>  			   uint64_t tiling, struct igt_fb *fb);
>  unsigned int igt_create_color_fb(int fd, int width, int height,
> -- 
> 2.16.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2018-02-23 19:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 17:07 [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Martin Peres
2018-02-14 17:07 ` [igt-dev] [PATCH i-g-t v2 2/2] add a kms_fb_stride test Martin Peres
2018-02-16 16:19   ` [igt-dev] [PATCH i-g-t v3] " Martin Peres
2018-02-14 18:51 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Patchwork
2018-02-16 14:24 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-02-16 17:39 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2) Patchwork
2018-02-16 19:24 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-02-23 19:49 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox