All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays
@ 2019-08-23 18:23 Madhumitha Tolakanahalli Pradeep
  2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser Madhumitha Tolakanahalli Pradeep
                   ` (11 more replies)
  0 siblings, 12 replies; 34+ messages in thread
From: Madhumitha Tolakanahalli Pradeep @ 2019-08-23 18:23 UTC (permalink / raw)
  To: igt-dev

Madhumitha Tolakanahalli Pradeep (2):
  lib/igt_kms: added tile property parser
  igt/tests/kms_dp_tiled_display: kms test for display port tiled
    displays

 lib/igt_kms.c                |  29 +++
 lib/igt_kms.h                |  11 ++
 tests/Makefile.sources       |   1 +
 tests/kms_dp_tiled_display.c | 346 +++++++++++++++++++++++++++++++++++
 tests/meson.build            |   1 +
 5 files changed, 388 insertions(+)
 create mode 100644 tests/kms_dp_tiled_display.c

-- 
2.17.1

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

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

* [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
@ 2019-08-23 18:23 ` Madhumitha Tolakanahalli Pradeep
  2019-08-27  7:33   ` Ser, Simon
  2019-09-09 20:06   ` Manasi Navare
  2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays Madhumitha Tolakanahalli Pradeep
                   ` (10 subsequent siblings)
  11 siblings, 2 replies; 34+ messages in thread
From: Madhumitha Tolakanahalli Pradeep @ 2019-08-23 18:23 UTC (permalink / raw)
  To: igt-dev; +Cc: madhumitha.tp, Petri Latvala

The tile property parser parses the connector tile property obtained
from connector's Display ID block and set per connector.

v2: Minor style changes (Simon)

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Simon Ser <simon.ser@intel.com>

Cc: <madhumitha.tp@gmail.com>

Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
---
 lib/igt_kms.c | 29 +++++++++++++++++++++++++++++
 lib/igt_kms.h | 11 +++++++++++
 2 files changed, 40 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 17a7d2b6..dc0f810d 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -4515,3 +4515,32 @@ bool igt_display_has_format_mod(igt_display_t *display, uint32_t format,
 
 	return false;
 }
+
+/**
+ * igt_parse_connector_tile_blob:
+ * @blob: pointer to the connector's tile properties
+ * @tile: pointer to tile structure that is populated by the function
+ *
+ * Parses the connector tile blob to extract the tile information.
+ * The blob information is exposed from drm/drm_connector.c in the kernel.
+ * The format of the tile property is defined in the kernel as char tile[256]
+ * that consists of 8 integers that are ':' separated.
+ *
+ */
+
+void igt_parse_connector_tile_blob(drmModePropertyBlobPtr blob,
+		igt_tile_info_t *tile)
+{
+	char *blob_data = blob->data;
+
+	igt_assert(blob);
+
+	tile->tile_group_id = atoi(strtok(blob_data, ":"));
+	tile->tile_is_single_monitor = atoi(strtok(NULL, ":"));
+	tile->num_h_tile = atoi(strtok(NULL, ":"));
+	tile->num_v_tile = atoi(strtok(NULL, ":"));
+	tile->tile_h_loc = atoi(strtok(NULL, ":"));
+	tile->tile_v_loc = atoi(strtok(NULL, ":"));
+	tile->tile_h_size = atoi(strtok(NULL, ":"));
+	tile->tile_v_size = atoi(strtok(NULL, ":"));
+}
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 56481fd1..aebb4d31 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -390,6 +390,14 @@ struct igt_display {
 	int format_mod_count;
 };
 
+typedef struct {
+	int tile_group_id;
+	bool tile_is_single_monitor;
+	uint8_t num_h_tile, num_v_tile;
+	uint8_t tile_h_loc, tile_v_loc;
+	uint16_t tile_h_size, tile_v_size;
+} igt_tile_info_t;
+
 void igt_display_require(igt_display_t *display, int drm_fd);
 void igt_display_fini(igt_display_t *display);
 void igt_display_reset(igt_display_t *display);
@@ -834,4 +842,7 @@ static inline bool igt_vblank_before(uint32_t a, uint32_t b)
 	return igt_vblank_after(b, a);
 }
 
+void igt_parse_connector_tile_blob(drmModePropertyBlobPtr blob,
+		igt_tile_info_t *tile);
+
 #endif /* __IGT_KMS_H__ */
-- 
2.17.1

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

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

* [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
  2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser Madhumitha Tolakanahalli Pradeep
@ 2019-08-23 18:23 ` Madhumitha Tolakanahalli Pradeep
  2019-08-27 10:49   ` Ser, Simon
  2019-09-12  1:31   ` [igt-dev] [PATCH i-g-t v3] " Manasi Navare
  2019-08-23 20:01 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev2) Patchwork
                   ` (9 subsequent siblings)
  11 siblings, 2 replies; 34+ messages in thread
From: Madhumitha Tolakanahalli Pradeep @ 2019-08-23 18:23 UTC (permalink / raw)
  To: igt-dev; +Cc: madhumitha.tp, Petri Latvala

This test validates the tiled DP displays to display a test pattern
seamlessly across the two tiles. It validates the transcoder port
sync feature on i915 to get a tearfree tiled display output.

Related kernel work patches-
https://patchwork.freedesktop.org/series/59837/#rev4.

This test can eventually be extended to cover tiled display support
on other connector types.

v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
    Minor style changes (Simon)
   Code clean-up and reordering


Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Simon Ser <simon.ser@intel.com>

Cc: <madhumitha.tp@gmail.com>

Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
---
 tests/Makefile.sources       |   1 +
 tests/kms_dp_tiled_display.c | 346 +++++++++++++++++++++++++++++++++++
 tests/meson.build            |   1 +
 3 files changed, 348 insertions(+)
 create mode 100644 tests/kms_dp_tiled_display.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c02e4d94..7561ab9b 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -41,6 +41,7 @@ TESTS_progs = \
 	kms_cursor_edge_walk \
 	kms_cursor_legacy \
 	kms_dp_dsc \
+	kms_dp_tiled_display \
 	kms_draw_crc \
 	kms_fbcon_fbt \
 	kms_fence_pin_leak \
diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
new file mode 100644
index 00000000..162fbdd9
--- /dev/null
+++ b/tests/kms_dp_tiled_display.c
@@ -0,0 +1,346 @@
+/*
+ * 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:
+ *  Madhumitha Tolakanahalli Pradeep
+ *      <madhumitha.tolakanahalli.pradeep@intel.com>
+ *
+ * Display Port Tiled Display Test
+ * This test parses the tile information of the connectors that have TILE
+ * property set, sets up the framebuffer with correct offsets corresponding to
+ * the tile offsets and does an atomic modeset with two CRTCs for two
+ * connectors. Page flip event timestamp from each CRTC is collected and
+ * compared to make sure that they occurred in a synchronous manner.
+ *
+ * This test currently supports only horizontally tiled displays, in line with
+ * the displays supported by the kernel at the moment.
+ */
+
+#include "igt.h"
+#include "poll.h"
+#include "drm_mode.h"
+#include "drm_fourcc.h"
+
+IGT_TEST_DESCRIPTION("Test for Display Port Tiled Displays");
+
+typedef struct {
+	int drm_fd;
+	int num_h_tiles;
+	igt_display_t *display;
+	enum igt_commit_style commit;
+} data_t;
+
+typedef struct {
+	igt_output_t *output;
+	igt_tile_info_t tile;
+	igt_fb_t fb_test_pattern;
+	enum pipe pipe;
+	enum igt_commit_style commit;
+	drmModeConnectorPtr connector;
+} data_connector_t;
+
+static int drm_property_is_tile(drmModePropertyPtr prop)
+{
+	return (strcmp(prop->name , "TILE") ? 0 : 1) &&
+			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
+}
+
+static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
+		igt_tile_info_t *tile)
+{
+	int i = 0;
+	drmModePropertyPtr prop;
+	drmModePropertyBlobPtr blob;
+
+	for (i = 0; i < conn->count_props; i++) {
+		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
+
+		igt_assert(prop);
+
+		if (!drm_property_is_tile(prop))
+			continue;
+
+		blob = drmModeGetPropertyBlob(data->drm_fd,
+				conn->prop_values[i]);
+
+		if (!blob)
+			return;
+
+		igt_parse_connector_tile_blob(blob, tile);
+		break;
+	}
+
+	drmModeFreeProperty(prop);
+	drmModeFreePropertyBlob(blob);
+}
+
+static void get_number_of_h_tiles(data_t *data)
+{
+	int i;
+	drmModeResPtr res;
+	drmModeConnectorPtr connector;
+	igt_tile_info_t tile = {.num_h_tile = 0};
+
+	igt_assert(res = drmModeGetResources(data->drm_fd));
+
+	for (i = 0; i < res->count_connectors; i++) {
+		connector = drmModeGetConnectorCurrent(data->drm_fd,
+				res->connectors[i]);
+
+		igt_assert(connector);
+
+		if (!(connector->connection == DRM_MODE_CONNECTED &&
+			connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort))
+			continue;
+
+		get_connector_tile_props(data, connector, &tile);
+		data->num_h_tiles = tile.num_h_tile;
+		break;
+	}
+
+	drmModeFreeResources(res);
+	drmModeFreeConnector(connector);
+}
+
+static void get_connector(data_t *data, data_connector_t *conn)
+{
+	int count = 0;
+	igt_output_t *output;
+
+	for_each_connected_output(data->display, output) {
+		conn[count].connector = drmModeGetConnector(data->display->drm_fd,
+						output->id);
+
+		igt_assert(conn[count].connector);
+
+		if (!(conn[count].connector->connector_type ==
+			DRM_MODE_CONNECTOR_DisplayPort))
+			continue;
+
+		get_connector_tile_props(data, conn[count].connector,
+			&conn[count].tile);
+
+		/* Check if the connectors belong to the same tile group */
+		if (count > 0)
+			igt_assert(conn[count].tile.tile_group_id ==
+				conn[count-1].tile.tile_group_id);
+
+		count++;
+	}
+}
+
+static void
+reset_framebuffer(int drm_fd, igt_output_t *output, igt_fb_t *fb)
+{
+	igt_plane_t *primary;
+
+	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	igt_plane_set_fb(primary, NULL);
+	igt_remove_fb(drm_fd, fb);
+}
+
+static void reset_output(igt_output_t *output)
+{
+	igt_output_set_pipe(output, PIPE_NONE);
+}
+
+static void test_cleanup(data_t *data, data_connector_t *conn)
+{
+	int count;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		if (conn[count].output) {
+			reset_framebuffer(data->drm_fd, conn[count].output,
+				&conn[count].fb_test_pattern);
+			reset_output(conn[count].output);
+		}
+	}
+	igt_display_commit2(data->display, data->commit);
+}
+
+static void setup_mode(data_t *data, data_connector_t *conn_data)
+{
+	int count = 0;
+	enum pipe pipe;
+	igt_output_t *output;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		output = igt_output_from_connector(data->display,
+				conn_data[count].connector);
+
+		/*
+		 * The output is set to PIPE_NONE and then assigned a pipe.
+		 * This is done to ensure a complete modeset occures every
+		 * time the test is run.
+		 */
+		reset_output(output);
+
+		for_each_pipe(data->display, pipe) {
+			if (count > 0 && pipe == conn_data[count-1].pipe)
+				continue;
+
+			if (igt_pipe_connector_valid(pipe, output)) {
+
+				conn_data[count].pipe = pipe;
+				conn_data[count].output = output;
+
+				igt_output_set_pipe(conn_data[count].output,
+					conn_data[count].pipe);
+				break;
+			}
+		}
+	}
+	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
+		NULL);
+}
+
+static void setup_framebuffer(data_t *data, data_connector_t *conn)
+{
+	int count;
+	igt_plane_t *primary;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+
+		igt_create_pattern_fb(data->drm_fd,
+			(conn[count].tile.tile_h_size *
+			data->num_h_tiles),
+			conn[count].tile.tile_v_size,
+			DRM_FORMAT_XBGR8888,
+			LOCAL_DRM_FORMAT_MOD_NONE,
+			&conn[count].fb_test_pattern);
+
+		primary = igt_output_get_plane_type(conn[count].output,
+				DRM_PLANE_TYPE_PRIMARY);
+
+		igt_plane_set_fb(primary, &conn[count].fb_test_pattern);
+
+		igt_fb_set_size(&conn[count].fb_test_pattern, primary,
+				conn[count].tile.tile_h_size,
+				conn[count].tile.tile_v_size);
+
+		igt_fb_set_position(&conn[count].fb_test_pattern, primary,
+				(conn[count].tile.tile_h_size *
+				conn[count].tile.tile_h_loc),
+				(conn[count].tile.tile_v_size *
+				conn[count].tile.tile_v_loc));
+
+		igt_plane_set_size(primary,
+				conn[count].tile.tile_h_size,
+				conn[count].tile.tile_v_size);
+	}
+}
+
+static void page_flip_handler(int fd, unsigned int seq,
+		unsigned int tv_sec, unsigned int tv_usec,
+		unsigned int crtc_id, void *data)
+{
+	bool expr = false;
+	static unsigned int _tv_sec, _tv_usec;
+
+	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
+		tv_sec, tv_usec);
+
+	/* Skip the following checks for the first page flip event */
+	if (_tv_sec == 0 || _tv_usec == 0) {
+		_tv_sec = tv_sec;
+		_tv_usec = tv_usec;
+		return;
+	}
+
+	/*
+	 * For seamless tear-free display, the page flip event timestamps
+	 * from all the tiles should not differ by more than 10us.
+	 */
+	expr = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
+
+	igt_fail_on_f(!expr, "Delayed page flip event from CRTC:%d at %u:%u\n",
+		crtc_id, tv_sec, tv_usec);
+
+	if (tv_sec < _tv_sec)
+		_tv_sec = tv_sec;
+	if (tv_usec < _tv_usec)
+		_tv_usec = tv_usec;
+}
+
+static void wait_for_pageflip(int drm_fd)
+{
+	struct pollfd pfd;
+	drmEventContext drm_event;
+
+	drm_event.version = 3;
+	drm_event.page_flip_handler2 = page_flip_handler;
+
+	pfd.fd = drm_fd;
+	pfd.events = POLLIN;
+	pfd.revents = 0;
+
+	poll(&pfd, 1, 1000);
+	if (pfd.revents & POLLIN)
+		drmHandleEvent(drm_fd, &drm_event);
+}
+
+igt_main
+{
+	igt_display_t display;
+	data_connector_t *conn_data = NULL;
+	data_t data = {.drm_fd = 0, .num_h_tiles = 0,
+		       .display = NULL, .commit = COMMIT_LEGACY};
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
+
+		kmstest_set_vt_graphics_mode();
+		igt_display_require(&display, data.drm_fd);
+		igt_display_reset(&display);
+
+		data.display = &display;
+
+		get_number_of_h_tiles(&data);
+		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
+
+		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
+
+		if (data.num_h_tiles > 0)
+			conn_data = malloc(data.num_h_tiles * sizeof(data_connector_t));
+	}
+
+	igt_subtest("basic-test-pattern") {
+		igt_skip_on(data.num_h_tiles == 0);
+		igt_assert(conn_data);
+
+		get_connector(&data, conn_data);
+		setup_mode(&data, conn_data);
+		setup_framebuffer(&data, conn_data);
+		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
+			DRM_MODE_PAGE_FLIP_EVENT, NULL);
+		wait_for_pageflip(data.drm_fd);
+
+		test_cleanup(&data, conn_data);
+	}
+
+	igt_fixture {
+		free(conn_data);
+		close(data.drm_fd);
+		kmstest_restore_vt_mode();
+		igt_display_fini(data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index a7b2b322..50292df8 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -26,6 +26,7 @@ test_progs = [
 	'kms_cursor_edge_walk',
 	'kms_cursor_legacy',
 	'kms_dp_dsc',
+	'kms_dp_tiled_display',
 	'kms_draw_crc',
 	'kms_fbcon_fbt',
 	'kms_fence_pin_leak',
-- 
2.17.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev2)
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
  2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser Madhumitha Tolakanahalli Pradeep
  2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays Madhumitha Tolakanahalli Pradeep
@ 2019-08-23 20:01 ` Patchwork
  2019-08-24 22:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2019-08-23 20:01 UTC (permalink / raw)
  To: Madhumitha Tolakanahalli Pradeep; +Cc: igt-dev

== Series Details ==

Series: Added tile property parser library function and IGT test for DP tiled displays (rev2)
URL   : https://patchwork.freedesktop.org/series/65652/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6779 -> IGTPW_3376
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_create@basic-files:
    - fi-apl-guc:         [PASS][1] -> [INCOMPLETE][2] ([fdo#103927])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/fi-apl-guc/igt@gem_ctx_create@basic-files.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/fi-apl-guc/igt@gem_ctx_create@basic-files.html

  * igt@gem_ctx_param@basic:
    - fi-icl-u3:          [PASS][3] -> [DMESG-WARN][4] ([fdo#107724]) +2 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/fi-icl-u3/igt@gem_ctx_param@basic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/fi-icl-u3/igt@gem_ctx_param@basic.html

  * igt@gem_ctx_switch@rcs0:
    - fi-cml-u2:          [PASS][5] -> [INCOMPLETE][6] ([fdo#110566])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/fi-cml-u2/igt@gem_ctx_switch@rcs0.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/fi-cml-u2/igt@gem_ctx_switch@rcs0.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       [INCOMPLETE][7] ([fdo#107718]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html

  * igt@i915_module_load@reload-no-display:
    - {fi-icl-u4}:        [DMESG-WARN][9] ([fdo#105602]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/fi-icl-u4/igt@i915_module_load@reload-no-display.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/fi-icl-u4/igt@i915_module_load@reload-no-display.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u2:          [FAIL][11] ([fdo#103167]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#110566]: https://bugs.freedesktop.org/show_bug.cgi?id=110566
  [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045


Participating hosts (54 -> 42)
------------------------------

  Missing    (12): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-ivb-3770 fi-icl-y fi-bdw-samus fi-icl-dsi fi-skl-6600u 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5149 -> IGTPW_3376

  CI-20190529: 20190529
  CI_DRM_6779: 96b21ba1b7912952fef64efcaa6ee1e4c4182b92 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3376: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/
  IGT_5149: 6756ede680ee12745393360d7cc87cc0eb733ff6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_dp_tiled_display@basic-test-pattern

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for Added tile property parser library function and IGT test for DP tiled displays (rev2)
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
                   ` (2 preceding siblings ...)
  2019-08-23 20:01 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev2) Patchwork
@ 2019-08-24 22:07 ` Patchwork
  2019-09-12  4:43 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev3) Patchwork
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2019-08-24 22:07 UTC (permalink / raw)
  To: Madhumitha Tolakanahalli Pradeep; +Cc: igt-dev

== Series Details ==

Series: Added tile property parser library function and IGT test for DP tiled displays (rev2)
URL   : https://patchwork.freedesktop.org/series/65652/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6779_full -> IGTPW_3376_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_dp_tiled_display@basic-test-pattern} (NEW):
    - shard-iclb:         NOTRUN -> [SKIP][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb7/igt@kms_dp_tiled_display@basic-test-pattern.html

  
New tests
---------

  New tests have been introduced between CI_DRM_6779_full and IGTPW_3376_full:

### New IGT tests (1) ###

  * igt@kms_dp_tiled_display@basic-test-pattern:
    - Statuses : 6 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_parallel@bcs0-contexts:
    - shard-hsw:          [PASS][2] -> [FAIL][3] ([fdo#111469])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-hsw1/igt@gem_exec_parallel@bcs0-contexts.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-hsw6/igt@gem_exec_parallel@bcs0-contexts.html

  * igt@gem_exec_schedule@independent-bsd1:
    - shard-iclb:         [PASS][4] -> [SKIP][5] ([fdo#109276]) +20 similar issues
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-iclb2/igt@gem_exec_schedule@independent-bsd1.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb7/igt@gem_exec_schedule@independent-bsd1.html

  * igt@gem_exec_schedule@preempt-other-chain-bsd:
    - shard-iclb:         [PASS][6] -> [SKIP][7] ([fdo#111325]) +7 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-iclb6/igt@gem_exec_schedule@preempt-other-chain-bsd.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb2/igt@gem_exec_schedule@preempt-other-chain-bsd.html

  * igt@gem_tiled_swapping@non-threaded:
    - shard-glk:          [PASS][8] -> [DMESG-WARN][9] ([fdo#108686])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-glk4/igt@gem_tiled_swapping@non-threaded.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-glk3/igt@gem_tiled_swapping@non-threaded.html

  * igt@i915_suspend@fence-restore-untiled:
    - shard-apl:          [PASS][10] -> [DMESG-WARN][11] ([fdo#108566]) +6 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-apl1/igt@i915_suspend@fence-restore-untiled.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-apl4/igt@i915_suspend@fence-restore-untiled.html

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
    - shard-glk:          [PASS][12] -> [FAIL][13] ([fdo#104873])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-glk6/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-glk3/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html

  * igt@kms_flip@flip-vs-suspend:
    - shard-hsw:          [PASS][14] -> [INCOMPLETE][15] ([fdo#103540])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-hsw2/igt@kms_flip@flip-vs-suspend.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-hsw5/igt@kms_flip@flip-vs-suspend.html

  * igt@kms_frontbuffer_tracking@fbc-badstride:
    - shard-iclb:         [PASS][16] -> [FAIL][17] ([fdo#103167]) +4 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-badstride.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-badstride.html

  * igt@kms_psr@no_drrs:
    - shard-iclb:         [PASS][18] -> [FAIL][19] ([fdo#108341])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-iclb2/igt@kms_psr@no_drrs.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb1/igt@kms_psr@no_drrs.html

  * igt@kms_psr@psr2_primary_page_flip:
    - shard-iclb:         [PASS][20] -> [SKIP][21] ([fdo#109441]) +3 similar issues
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb1/igt@kms_psr@psr2_primary_page_flip.html

  
#### Possible fixes ####

  * igt@gem_eio@in-flight-suspend:
    - shard-apl:          [DMESG-WARN][22] ([fdo#108566]) -> [PASS][23] +3 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-apl1/igt@gem_eio@in-flight-suspend.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-apl6/igt@gem_eio@in-flight-suspend.html

  * igt@gem_exec_schedule@out-order-bsd:
    - shard-iclb:         [SKIP][24] ([fdo#111325]) -> [PASS][25] +1 similar issue
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-iclb1/igt@gem_exec_schedule@out-order-bsd.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb3/igt@gem_exec_schedule@out-order-bsd.html

  * {igt@gem_userptr_blits@stress-purge}:
    - shard-apl:          [INCOMPLETE][26] ([fdo#103927]) -> [PASS][27] +1 similar issue
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-apl6/igt@gem_userptr_blits@stress-purge.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-apl8/igt@gem_userptr_blits@stress-purge.html

  * igt@kms_cursor_legacy@flip-vs-cursor-crc-atomic:
    - shard-snb:          [SKIP][28] ([fdo#109271]) -> [PASS][29] +1 similar issue
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-snb2/igt@kms_cursor_legacy@flip-vs-cursor-crc-atomic.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-snb6/igt@kms_cursor_legacy@flip-vs-cursor-crc-atomic.html

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-snb:          [FAIL][30] ([fdo#105363]) -> [PASS][31]
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-snb2/igt@kms_flip@flip-vs-expired-vblank.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-snb6/igt@kms_flip@flip-vs-expired-vblank.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite:
    - shard-iclb:         [FAIL][32] ([fdo#103167]) -> [PASS][33] +3 similar issues
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html

  * igt@kms_psr2_su@page_flip:
    - shard-iclb:         [SKIP][34] ([fdo#109642] / [fdo#111068]) -> [PASS][35]
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-iclb5/igt@kms_psr2_su@page_flip.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb2/igt@kms_psr2_su@page_flip.html

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

  * igt@prime_busy@hang-bsd2:
    - shard-iclb:         [SKIP][38] ([fdo#109276]) -> [PASS][39] +14 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-iclb8/igt@prime_busy@hang-bsd2.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb2/igt@prime_busy@hang-bsd2.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-reset-bsd2:
    - shard-iclb:         [SKIP][40] ([fdo#109276]) -> [FAIL][41] ([fdo#111330]) +1 similar issue
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6779/shard-iclb5/igt@gem_mocs_settings@mocs-reset-bsd2.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/shard-iclb2/igt@gem_mocs_settings@mocs-reset-bsd2.html

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#111469]: https://bugs.freedesktop.org/show_bug.cgi?id=111469


Participating hosts (9 -> 6)
------------------------------

  Missing    (3): pig-skl-6260u shard-skl pig-hsw-4770r 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5149 -> IGTPW_3376
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_6779: 96b21ba1b7912952fef64efcaa6ee1e4c4182b92 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3376: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3376/
  IGT_5149: 6756ede680ee12745393360d7cc87cc0eb733ff6 @ 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_3376/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser
  2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser Madhumitha Tolakanahalli Pradeep
@ 2019-08-27  7:33   ` Ser, Simon
  2019-09-09  3:49     ` Manasi Navare
  2019-09-09 20:06   ` Manasi Navare
  1 sibling, 1 reply; 34+ messages in thread
From: Ser, Simon @ 2019-08-27  7:33 UTC (permalink / raw)
  To: igt-dev, Tolakanahalli Pradeep, Madhumitha; +Cc: madhumitha.tp, Latvala, Petri

On Fri, 2019-08-23 at 11:23 -0700, Madhumitha Tolakanahalli Pradeep wrote:
> The tile property parser parses the connector tile property obtained
> from connector's Display ID block and set per connector.
> 
> v2: Minor style changes (Simon)
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Simon Ser <simon.ser@intel.com>
> 
> Cc: <madhumitha.tp@gmail.com>
> 
> Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>

This is still:

Reviewed-by: Simon Ser <simon.ser@intel.com>

> ---
>  lib/igt_kms.c | 29 +++++++++++++++++++++++++++++
>  lib/igt_kms.h | 11 +++++++++++
>  2 files changed, 40 insertions(+)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 17a7d2b6..dc0f810d 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -4515,3 +4515,32 @@ bool igt_display_has_format_mod(igt_display_t *display, uint32_t format,
>  
>  	return false;
>  }
> +
> +/**
> + * igt_parse_connector_tile_blob:
> + * @blob: pointer to the connector's tile properties
> + * @tile: pointer to tile structure that is populated by the function
> + *
> + * Parses the connector tile blob to extract the tile information.
> + * The blob information is exposed from drm/drm_connector.c in the kernel.
> + * The format of the tile property is defined in the kernel as char tile[256]
> + * that consists of 8 integers that are ':' separated.
> + *
> + */
> +
> +void igt_parse_connector_tile_blob(drmModePropertyBlobPtr blob,
> +		igt_tile_info_t *tile)
> +{
> +	char *blob_data = blob->data;
> +
> +	igt_assert(blob);
> +
> +	tile->tile_group_id = atoi(strtok(blob_data, ":"));
> +	tile->tile_is_single_monitor = atoi(strtok(NULL, ":"));
> +	tile->num_h_tile = atoi(strtok(NULL, ":"));
> +	tile->num_v_tile = atoi(strtok(NULL, ":"));
> +	tile->tile_h_loc = atoi(strtok(NULL, ":"));
> +	tile->tile_v_loc = atoi(strtok(NULL, ":"));
> +	tile->tile_h_size = atoi(strtok(NULL, ":"));
> +	tile->tile_v_size = atoi(strtok(NULL, ":"));
> +}
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 56481fd1..aebb4d31 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -390,6 +390,14 @@ struct igt_display {
>  	int format_mod_count;
>  };
>  
> +typedef struct {
> +	int tile_group_id;
> +	bool tile_is_single_monitor;
> +	uint8_t num_h_tile, num_v_tile;
> +	uint8_t tile_h_loc, tile_v_loc;
> +	uint16_t tile_h_size, tile_v_size;
> +} igt_tile_info_t;
> +
>  void igt_display_require(igt_display_t *display, int drm_fd);
>  void igt_display_fini(igt_display_t *display);
>  void igt_display_reset(igt_display_t *display);
> @@ -834,4 +842,7 @@ static inline bool igt_vblank_before(uint32_t a, uint32_t b)
>  	return igt_vblank_after(b, a);
>  }
>  
> +void igt_parse_connector_tile_blob(drmModePropertyBlobPtr blob,
> +		igt_tile_info_t *tile);
> +
>  #endif /* __IGT_KMS_H__ */
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays Madhumitha Tolakanahalli Pradeep
@ 2019-08-27 10:49   ` Ser, Simon
  2019-08-27 21:29     ` Manasi Navare
  2019-09-12  1:31   ` [igt-dev] [PATCH i-g-t v3] " Manasi Navare
  1 sibling, 1 reply; 34+ messages in thread
From: Ser, Simon @ 2019-08-27 10:49 UTC (permalink / raw)
  To: igt-dev, Tolakanahalli Pradeep, Madhumitha; +Cc: madhumitha.tp, Latvala, Petri

Thanks for the new version! Here are some more comments. Some of them
are nits, some of them are more serious questions. Feel free to let me
know if I'm mistaken or if you don't understand one of them.

On Fri, 2019-08-23 at 11:23 -0700, Madhumitha Tolakanahalli Pradeep wrote:
> This test validates the tiled DP displays to display a test pattern
> seamlessly across the two tiles. It validates the transcoder port
> sync feature on i915 to get a tearfree tiled display output.
> 
> Related kernel work patches-
> https://patchwork.freedesktop.org/series/59837/#rev4.
> 
> This test can eventually be extended to cover tiled display support
> on other connector types.
> 
> v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
>     Minor style changes (Simon)
>    Code clean-up and reordering
> 
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Simon Ser <simon.ser@intel.com>
> 
> Cc: <madhumitha.tp@gmail.com>
> 
> Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> ---
>  tests/Makefile.sources       |   1 +
>  tests/kms_dp_tiled_display.c | 346 +++++++++++++++++++++++++++++++++++
>  tests/meson.build            |   1 +
>  3 files changed, 348 insertions(+)
>  create mode 100644 tests/kms_dp_tiled_display.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index c02e4d94..7561ab9b 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -41,6 +41,7 @@ TESTS_progs = \
>  	kms_cursor_edge_walk \
>  	kms_cursor_legacy \
>  	kms_dp_dsc \
> +	kms_dp_tiled_display \
>  	kms_draw_crc \
>  	kms_fbcon_fbt \
>  	kms_fence_pin_leak \
> diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> new file mode 100644
> index 00000000..162fbdd9
> --- /dev/null
> +++ b/tests/kms_dp_tiled_display.c
> @@ -0,0 +1,346 @@
> +/*
> + * 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:
> + *  Madhumitha Tolakanahalli Pradeep
> + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> + *
> + * Display Port Tiled Display Test
> + * This test parses the tile information of the connectors that have TILE
> + * property set, sets up the framebuffer with correct offsets corresponding to
> + * the tile offsets and does an atomic modeset with two CRTCs for two
> + * connectors. Page flip event timestamp from each CRTC is collected and
> + * compared to make sure that they occurred in a synchronous manner.
> + *
> + * This test currently supports only horizontally tiled displays, in line with
> + * the displays supported by the kernel at the moment.
> + */
> +
> +#include "igt.h"
> +#include "poll.h"
> +#include "drm_mode.h"
> +#include "drm_fourcc.h"
> +
> +IGT_TEST_DESCRIPTION("Test for Display Port Tiled Displays");
> +
> +typedef struct {
> +	int drm_fd;
> +	int num_h_tiles;
> +	igt_display_t *display;
> +	enum igt_commit_style commit;
> +} data_t;
> +
> +typedef struct {
> +	igt_output_t *output;
> +	igt_tile_info_t tile;
> +	igt_fb_t fb_test_pattern;
> +	enum pipe pipe;
> +	enum igt_commit_style commit;
> +	drmModeConnectorPtr connector;
> +} data_connector_t;
> +
> +static int drm_property_is_tile(drmModePropertyPtr prop)
> +{
> +	return (strcmp(prop->name , "TILE") ? 0 : 1) &&
> +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> +}
> +
> +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> +		igt_tile_info_t *tile)
> +{
> +	int i = 0;
> +	drmModePropertyPtr prop;
> +	drmModePropertyBlobPtr blob;
> +
> +	for (i = 0; i < conn->count_props; i++) {
> +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> +
> +		igt_assert(prop);
> +
> +		if (!drm_property_is_tile(prop))
> +			continue;

This branch leaks prop.

> +		blob = drmModeGetPropertyBlob(data->drm_fd,
> +				conn->prop_values[i]);
> +
> +		if (!blob)
> +			return;

This branch leaks prop.

> +		igt_parse_connector_tile_blob(blob, tile);
> +		break;
> +	}
> +
> +	drmModeFreeProperty(prop);
> +	drmModeFreePropertyBlob(blob);
> +}
> +
> +static void get_number_of_h_tiles(data_t *data)
> +{
> +	int i;
> +	drmModeResPtr res;
> +	drmModeConnectorPtr connector;
> +	igt_tile_info_t tile = {.num_h_tile = 0};
> +
> +	igt_assert(res = drmModeGetResources(data->drm_fd));
> +
> +	for (i = 0; i < res->count_connectors; i++) {
> +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> +				res->connectors[i]);
> +
> +		igt_assert(connector);
> +
> +		if (!(connector->connection == DRM_MODE_CONNECTED &&
> +			connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort))
> +			continue;

This can be simplified to

    connection != DRM_MODE_CONNECTED ||
    connector_type != DRM_MODE_CONNECTOR_DisplayPort

Additionally, this branch leaks the connector.

> +		get_connector_tile_props(data, connector, &tile);
> +		data->num_h_tiles = tile.num_h_tile;
> +		break;
> +	}
> +
> +	drmModeFreeResources(res);
> +	drmModeFreeConnector(connector);
> +}
> +
> +static void get_connector(data_t *data, data_connector_t *conn)

Nit: since this fills all connectors, maybe it should be named
get_connectors (with an s). Also it's not clear that conn refers to an
array of connectors, maybe it should be renamed to conns.

(Applies to the whole patch)

> +{
> +	int count = 0;
> +	igt_output_t *output;
> +
> +	for_each_connected_output(data->display, output) {
> +		conn[count].connector = drmModeGetConnector(data->display->drm_fd,
> +						output->id);
> +
> +		igt_assert(conn[count].connector);
> +
> +		if (!(conn[count].connector->connector_type ==
> +			DRM_MODE_CONNECTOR_DisplayPort))
> +			continue;

This can be simplified to

    if (connector_type != DRM_MODE_CONNECTOR_DisplayPort)

Additionally, this branch leaks the connector.

> +		get_connector_tile_props(data, conn[count].connector,
> +			&conn[count].tile);
> +
> +		/* Check if the connectors belong to the same tile group */
> +		if (count > 0)
> +			igt_assert(conn[count].tile.tile_group_id ==
> +				conn[count-1].tile.tile_group_id);
> +
> +		count++;
> +	}
> +}
> +
> +static void
> +reset_framebuffer(int drm_fd, igt_output_t *output, igt_fb_t *fb)
> +{
> +	igt_plane_t *primary;
> +
> +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +	igt_remove_fb(drm_fd, fb);
> +}
> +
> +static void reset_output(igt_output_t *output)
> +{
> +	igt_output_set_pipe(output, PIPE_NONE);
> +}
> +
> +static void test_cleanup(data_t *data, data_connector_t *conn)
> +{
> +	int count;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		if (conn[count].output) {
> +			reset_framebuffer(data->drm_fd, conn[count].output,
> +				&conn[count].fb_test_pattern);
> +			reset_output(conn[count].output);
> +		}
> +	}
> +	igt_display_commit2(data->display, data->commit);
> +}
> +
> +static void setup_mode(data_t *data, data_connector_t *conn_data)

This function doesn't actually setup the output mode, it only sets up
the pipe. Is this an overlook?

> +{
> +	int count = 0;
> +	enum pipe pipe;
> +	igt_output_t *output;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		output = igt_output_from_connector(data->display,
> +				conn_data[count].connector);
> +
> +		/*
> +		 * The output is set to PIPE_NONE and then assigned a pipe.
> +		 * This is done to ensure a complete modeset occures every
> +		 * time the test is run.
> +		 */
> +		reset_output(output);

Is this necessary?

> +		for_each_pipe(data->display, pipe) {
> +			if (count > 0 && pipe == conn_data[count-1].pipe)
> +				continue;
> +
> +			if (igt_pipe_connector_valid(pipe, output)) {
> +
> +				conn_data[count].pipe = pipe;
> +				conn_data[count].output = output;
> +
> +				igt_output_set_pipe(conn_data[count].output,
> +					conn_data[count].pipe);
> +				break;
> +			}
> +		}
> +	}
> +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +		NULL);
> +}
> +
> +static void setup_framebuffer(data_t *data, data_connector_t *conn)
> +{
> +	int count;
> +	igt_plane_t *primary;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +
> +		igt_create_pattern_fb(data->drm_fd,
> +			(conn[count].tile.tile_h_size *
> +			data->num_h_tiles),

Do we need to multiply by the number of horizontal tiles here? It seems
we only use the first tile_h_size pixels of the buffer. Am I missing
something?

But maybe a test that would better reflect reality would create a
single framebuffer for all tiled displays, to display a single image
across all of them?

> +			conn[count].tile.tile_v_size,
> +			DRM_FORMAT_XBGR8888,
> +			LOCAL_DRM_FORMAT_MOD_NONE,
> +			&conn[count].fb_test_pattern);
> +
> +		primary = igt_output_get_plane_type(conn[count].output,
> +				DRM_PLANE_TYPE_PRIMARY);
> +
> +		igt_plane_set_fb(primary, &conn[count].fb_test_pattern);
> +
> +		igt_fb_set_size(&conn[count].fb_test_pattern, primary,
> +				conn[count].tile.tile_h_size,
> +				conn[count].tile.tile_v_size);
> +
> +		igt_fb_set_position(&conn[count].fb_test_pattern, primary,
> +				(conn[count].tile.tile_h_size *
> +				conn[count].tile.tile_h_loc),
> +				(conn[count].tile.tile_v_size *
> +				conn[count].tile.tile_v_loc));
> +
> +		igt_plane_set_size(primary,
> +				conn[count].tile.tile_h_size,
> +				conn[count].tile.tile_v_size);
> +	}
> +}
> +
> +static void page_flip_handler(int fd, unsigned int seq,
> +		unsigned int tv_sec, unsigned int tv_usec,
> +		unsigned int crtc_id, void *data)
> +{
> +	bool expr = false;
> +	static unsigned int _tv_sec, _tv_usec;
> +
> +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> +		tv_sec, tv_usec);

We should also make sure we receive exactly one page-flip per CRTC.
Currently we don't use crtc_id (apart from logging purposes).

> +	/* Skip the following checks for the first page flip event */
> +	if (_tv_sec == 0 || _tv_usec == 0) {
> +		_tv_sec = tv_sec;
> +		_tv_usec = tv_usec;
> +		return;
> +	}
> +
> +	/*
> +	 * For seamless tear-free display, the page flip event timestamps
> +	 * from all the tiles should not differ by more than 10us.
> +	 */
> +	expr = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);

Nit: this could be renamed to e.g. is_on_time, expr is a pretty vague
name.

> +	igt_fail_on_f(!expr, "Delayed page flip event from CRTC:%d at %u:%u\n",
> +		crtc_id, tv_sec, tv_usec);
> +
> +	if (tv_sec < _tv_sec)
> +		_tv_sec = tv_sec;
> +	if (tv_usec < _tv_usec)
> +		_tv_usec = tv_usec;

This updates the timestamp on each page-flip. This means that the first
and last page-flips could be delayed by more than 10µs if there are
intermediate page-flips. For instance, if the first page-flip happens
at t=0µs and the second one happens at t=9µs, the last one could happen
at t=18µs without making this test fails. Is this something we want to
allow?

> +}
> +
> +static void wait_for_pageflip(int drm_fd)
> +{
> +	struct pollfd pfd;
> +	drmEventContext drm_event;

Nit: to make sure garbage isn't read from this struct (there are other
function pointers), it's probably safer to zero-fill it (= {0}).

> +	drm_event.version = 3;
> +	drm_event.page_flip_handler2 = page_flip_handler;
> +
> +	pfd.fd = drm_fd;
> +	pfd.events = POLLIN;
> +	pfd.revents = 0;
> +
> +	poll(&pfd, 1, 1000);

Maybe we should check poll(2)'s return value?

> +	if (pfd.revents & POLLIN)
> +		drmHandleEvent(drm_fd, &drm_event);

If we don't get POLLIN (e.g. if we timeout), wait_for_pageflip will
silently do nothing, and the test will pass. Instead, we probably want
to fail in this case.

> +}
> +
> +igt_main
> +{
> +	igt_display_t display;
> +	data_connector_t *conn_data = NULL;
> +	data_t data = {.drm_fd = 0, .num_h_tiles = 0,
> +		       .display = NULL, .commit = COMMIT_LEGACY};

Nit: one can just do assign to {0} to zero-fill the struct.

> +	igt_fixture {
> +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> +
> +		kmstest_set_vt_graphics_mode();
> +		igt_display_require(&display, data.drm_fd);
> +		igt_display_reset(&display);
> +
> +		data.display = &display;
> +
> +		get_number_of_h_tiles(&data);
> +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> +
> +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;

Should we try to run this test at all on drivers that don't support
atomic?

If the driver doesn't support atomic, user-space will submit two page-
flip requests. However it's possible that the hardware executes a page-
flip between both requests: user-space calls the first drmModePageFlip,
the vblank for this particular CRTC triggers, then user-space calls the
second drmModePageFlip. Page-flips will be out-of-sync by one frame.

> +		if (data.num_h_tiles > 0)
> +			conn_data = malloc(data.num_h_tiles * sizeof(data_connector_t));
> +	}
> +
> +	igt_subtest("basic-test-pattern") {
> +		igt_skip_on(data.num_h_tiles == 0);
> +		igt_assert(conn_data);
> +
> +		get_connector(&data, conn_data);
> +		setup_mode(&data, conn_data);
> +		setup_framebuffer(&data, conn_data);
> +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> +			DRM_MODE_PAGE_FLIP_EVENT, NULL);
> +		wait_for_pageflip(data.drm_fd);

Here we only wait for a single page-flip. This will only stash the
timestamp of the frst page-flip without checking the time-stamp of
subsequent page-flips. We should wait for as many page-flips as enabled
tiled connectors.

> +		test_cleanup(&data, conn_data);
> +	}
> +
> +	igt_fixture {
> +		free(conn_data);
> +		close(data.drm_fd);
> +		kmstest_restore_vt_mode();
> +		igt_display_fini(data.display);
> +	}
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index a7b2b322..50292df8 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -26,6 +26,7 @@ test_progs = [
>  	'kms_cursor_edge_walk',
>  	'kms_cursor_legacy',
>  	'kms_dp_dsc',
> +	'kms_dp_tiled_display',
>  	'kms_draw_crc',
>  	'kms_fbcon_fbt',
>  	'kms_fence_pin_leak',
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-08-27 10:49   ` Ser, Simon
@ 2019-08-27 21:29     ` Manasi Navare
  2019-08-28 22:35       ` Manasi Navare
  2019-08-30 11:39       ` Ser, Simon
  0 siblings, 2 replies; 34+ messages in thread
From: Manasi Navare @ 2019-08-27 21:29 UTC (permalink / raw)
  To: Ser, Simon; +Cc: igt-dev, madhumitha.tp, Latvala, Petri

On Tue, Aug 27, 2019 at 03:49:38AM -0700, Ser, Simon wrote:
> Thanks for the new version! Here are some more comments. Some of them
> are nits, some of them are more serious questions. Feel free to let me
> know if I'm mistaken or if you don't understand one of them.

Thanks for the review comments Simon. I will be working on addressing the following
review comments and will take over this patch since Madhumitha's internship has ended.
I really appreciate all your help and feedback on this.

Please find my answers below:

> 
> On Fri, 2019-08-23 at 11:23 -0700, Madhumitha Tolakanahalli Pradeep wrote:
> > This test validates the tiled DP displays to display a test pattern
> > seamlessly across the two tiles. It validates the transcoder port
> > sync feature on i915 to get a tearfree tiled display output.
> > 
> > Related kernel work patches-
> > https://patchwork.freedesktop.org/series/59837/#rev4.
> > 
> > This test can eventually be extended to cover tiled display support
> > on other connector types.
> > 
> > v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
> >     Minor style changes (Simon)
> >    Code clean-up and reordering
> > 
> > 
> > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > Cc: Petri Latvala <petri.latvala@intel.com>
> > Cc: Simon Ser <simon.ser@intel.com>
> > 
> > Cc: <madhumitha.tp@gmail.com>
> > 
> > Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> > ---
> >  tests/Makefile.sources       |   1 +
> >  tests/kms_dp_tiled_display.c | 346 +++++++++++++++++++++++++++++++++++
> >  tests/meson.build            |   1 +
> >  3 files changed, 348 insertions(+)
> >  create mode 100644 tests/kms_dp_tiled_display.c
> > 
> > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > index c02e4d94..7561ab9b 100644
> > --- a/tests/Makefile.sources
> > +++ b/tests/Makefile.sources
> > @@ -41,6 +41,7 @@ TESTS_progs = \
> >  	kms_cursor_edge_walk \
> >  	kms_cursor_legacy \
> >  	kms_dp_dsc \
> > +	kms_dp_tiled_display \
> >  	kms_draw_crc \
> >  	kms_fbcon_fbt \
> >  	kms_fence_pin_leak \
> > diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> > new file mode 100644
> > index 00000000..162fbdd9
> > --- /dev/null
> > +++ b/tests/kms_dp_tiled_display.c
> > @@ -0,0 +1,346 @@
> > +/*
> > + * 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:
> > + *  Madhumitha Tolakanahalli Pradeep
> > + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> > + *
> > + * Display Port Tiled Display Test
> > + * This test parses the tile information of the connectors that have TILE
> > + * property set, sets up the framebuffer with correct offsets corresponding to
> > + * the tile offsets and does an atomic modeset with two CRTCs for two
> > + * connectors. Page flip event timestamp from each CRTC is collected and
> > + * compared to make sure that they occurred in a synchronous manner.
> > + *
> > + * This test currently supports only horizontally tiled displays, in line with
> > + * the displays supported by the kernel at the moment.
> > + */
> > +
> > +#include "igt.h"
> > +#include "poll.h"
> > +#include "drm_mode.h"
> > +#include "drm_fourcc.h"
> > +
> > +IGT_TEST_DESCRIPTION("Test for Display Port Tiled Displays");
> > +
> > +typedef struct {
> > +	int drm_fd;
> > +	int num_h_tiles;
> > +	igt_display_t *display;
> > +	enum igt_commit_style commit;
> > +} data_t;
> > +
> > +typedef struct {
> > +	igt_output_t *output;
> > +	igt_tile_info_t tile;
> > +	igt_fb_t fb_test_pattern;
> > +	enum pipe pipe;
> > +	enum igt_commit_style commit;
> > +	drmModeConnectorPtr connector;
> > +} data_connector_t;
> > +
> > +static int drm_property_is_tile(drmModePropertyPtr prop)
> > +{
> > +	return (strcmp(prop->name , "TILE") ? 0 : 1) &&
> > +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> > +}
> > +
> > +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> > +		igt_tile_info_t *tile)
> > +{
> > +	int i = 0;
> > +	drmModePropertyPtr prop;
> > +	drmModePropertyBlobPtr blob;
> > +
> > +	for (i = 0; i < conn->count_props; i++) {
> > +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> > +
> > +		igt_assert(prop);
> > +
> > +		if (!drm_property_is_tile(prop))
> > +			continue;
> 
> This branch leaks prop.

Freeing prop here before continuing shd fix this, will fix this in the next rev

> 
> > +		blob = drmModeGetPropertyBlob(data->drm_fd,
> > +				conn->prop_values[i]);
> > +
> > +		if (!blob)
> > +			return;
> 
> This branch leaks prop.

Agree, will add drmModeFreePropertyBlob(blob); before return

> 
> > +		igt_parse_connector_tile_blob(blob, tile);
> > +		break;
> > +	}
> > +
> > +	drmModeFreeProperty(prop);
> > +	drmModeFreePropertyBlob(blob);
> > +}
> > +
> > +static void get_number_of_h_tiles(data_t *data)
> > +{
> > +	int i;
> > +	drmModeResPtr res;
> > +	drmModeConnectorPtr connector;
> > +	igt_tile_info_t tile = {.num_h_tile = 0};
> > +
> > +	igt_assert(res = drmModeGetResources(data->drm_fd));
> > +
> > +	for (i = 0; i < res->count_connectors; i++) {
> > +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> > +				res->connectors[i]);
> > +
> > +		igt_assert(connector);
> > +
> > +		if (!(connector->connection == DRM_MODE_CONNECTED &&
> > +			connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort))
> > +			continue;
> 
> This can be simplified to
> 
>     connection != DRM_MODE_CONNECTED ||
>     connector_type != DRM_MODE_CONNECTOR_DisplayPort

Yes will simplify in the next rev

> 
> Additionally, this branch leaks the connector.

Hmm, so call drmModeFreeConnector(connector); before continuing shd be followed in general throughout
the code right?

> 
> > +		get_connector_tile_props(data, connector, &tile);
> > +		data->num_h_tiles = tile.num_h_tile;
> > +		break;
> > +	}
> > +
> > +	drmModeFreeResources(res);
> > +	drmModeFreeConnector(connector);
> > +}
> > +
> > +static void get_connector(data_t *data, data_connector_t *conn)
> 
> Nit: since this fills all connectors, maybe it should be named
> get_connectors (with an s). Also it's not clear that conn refers to an
> array of connectors, maybe it should be renamed to conns.

Yes I agree that will make it more readable, I will fix it in next rev

> 
> (Applies to the whole patch)
> 
> > +{
> > +	int count = 0;
> > +	igt_output_t *output;
> > +
> > +	for_each_connected_output(data->display, output) {
> > +		conn[count].connector = drmModeGetConnector(data->display->drm_fd,
> > +						output->id);
> > +
> > +		igt_assert(conn[count].connector);
> > +
> > +		if (!(conn[count].connector->connector_type ==
> > +			DRM_MODE_CONNECTOR_DisplayPort))
> > +			continue;
> 
> This can be simplified to
> 
>     if (connector_type != DRM_MODE_CONNECTOR_DisplayPort)
> 
> Additionally, this branch leaks the connector.
> 
> > +		get_connector_tile_props(data, conn[count].connector,
> > +			&conn[count].tile);
> > +
> > +		/* Check if the connectors belong to the same tile group */
> > +		if (count > 0)
> > +			igt_assert(conn[count].tile.tile_group_id ==
> > +				conn[count-1].tile.tile_group_id);
> > +
> > +		count++;
> > +	}
> > +}
> > +
> > +static void
> > +reset_framebuffer(int drm_fd, igt_output_t *output, igt_fb_t *fb)
> > +{
> > +	igt_plane_t *primary;
> > +
> > +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > +	igt_plane_set_fb(primary, NULL);
> > +	igt_remove_fb(drm_fd, fb);
> > +}
> > +
> > +static void reset_output(igt_output_t *output)
> > +{
> > +	igt_output_set_pipe(output, PIPE_NONE);
> > +}
> > +
> > +static void test_cleanup(data_t *data, data_connector_t *conn)
> > +{
> > +	int count;
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +		if (conn[count].output) {
> > +			reset_framebuffer(data->drm_fd, conn[count].output,
> > +				&conn[count].fb_test_pattern);
> > +			reset_output(conn[count].output);
> > +		}
> > +	}
> > +	igt_display_commit2(data->display, data->commit);
> > +}
> > +
> > +static void setup_mode(data_t *data, data_connector_t *conn_data)
> 
> This function doesn't actually setup the output mode, it only sets up
> the pipe. Is this an overlook?

yes we just set the pipe/CRTC here and the atomic commit call does a complete
modeset with check and commit without any output since we didnt setup fb yet.
But I agree that calling it just setup_pipe robably makes it more intuitive

> 
> > +{
> > +	int count = 0;
> > +	enum pipe pipe;
> > +	igt_output_t *output;
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +		output = igt_output_from_connector(data->display,
> > +				conn_data[count].connector);
> > +
> > +		/*
> > +		 * The output is set to PIPE_NONE and then assigned a pipe.
> > +		 * This is done to ensure a complete modeset occures every
> > +		 * time the test is run.
> > +		 */
> > +		reset_output(output);
> 
> Is this necessary?

Yes this is necessary to force a complete modeset for each test since if the pipe
assignments or the mode has not changed it will not set needs_modeset flag in side kernel
and will not do a full atomic check and commit.

> 
> > +		for_each_pipe(data->display, pipe) {
> > +			if (count > 0 && pipe == conn_data[count-1].pipe)
> > +				continue;
> > +
> > +			if (igt_pipe_connector_valid(pipe, output)) {
> > +
> > +				conn_data[count].pipe = pipe;
> > +				conn_data[count].output = output;
> > +
> > +				igt_output_set_pipe(conn_data[count].output,
> > +					conn_data[count].pipe);
> > +				break;
> > +			}
> > +		}
> > +	}
> > +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> > +		NULL);
> > +}
> > +
> > +static void setup_framebuffer(data_t *data, data_connector_t *conn)
> > +{
> > +	int count;
> > +	igt_plane_t *primary;
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +
> > +		igt_create_pattern_fb(data->drm_fd,
> > +			(conn[count].tile.tile_h_size *
> > +			data->num_h_tiles),
> 
> Do we need to multiply by the number of horizontal tiles here? It seems
> we only use the first tile_h_size pixels of the buffer. Am I missing
> something?
> 

Yes we only use the tile_h_size of the buffer at the proper offset of tile_h_loc
So this below logic shd be modified to only create fb of the size tile_h_size if its in the for loop
or just create one fb outside the loop of the size tile_h_size * num_tiles and then just use that with dfferent
offsets for two CRTCs

When I discussed this on dri-devel, people said that real userspace can decide to do either one single fb for all tiles
or separate ones where each is of the size equal to tile size.

Let me know if there is a preference

> But maybe a test that would better reflect reality would create a
> single framebuffer for all tiled displays, to display a single image
> across all of them?
> 
> > +			conn[count].tile.tile_v_size,
> > +			DRM_FORMAT_XBGR8888,
> > +			LOCAL_DRM_FORMAT_MOD_NONE,
> > +			&conn[count].fb_test_pattern);
> > +
> > +		primary = igt_output_get_plane_type(conn[count].output,
> > +				DRM_PLANE_TYPE_PRIMARY);
> > +
> > +		igt_plane_set_fb(primary, &conn[count].fb_test_pattern);
> > +
> > +		igt_fb_set_size(&conn[count].fb_test_pattern, primary,
> > +				conn[count].tile.tile_h_size,
> > +				conn[count].tile.tile_v_size);
> > +
> > +		igt_fb_set_position(&conn[count].fb_test_pattern, primary,
> > +				(conn[count].tile.tile_h_size *
> > +				conn[count].tile.tile_h_loc),
> > +				(conn[count].tile.tile_v_size *
> > +				conn[count].tile.tile_v_loc));
> > +
> > +		igt_plane_set_size(primary,
> > +				conn[count].tile.tile_h_size,
> > +				conn[count].tile.tile_v_size);
> > +	}
> > +}
> > +
> > +static void page_flip_handler(int fd, unsigned int seq,
> > +		unsigned int tv_sec, unsigned int tv_usec,
> > +		unsigned int crtc_id, void *data)
> > +{
> > +	bool expr = false;
> > +	static unsigned int _tv_sec, _tv_usec;
> > +
> > +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> > +		tv_sec, tv_usec);
> 
> We should also make sure we receive exactly one page-flip per CRTC.
> Currently we don't use crtc_id (apart from logging purposes).

I see so somehow have a static count of events and make sure per crtc id its the same count or
some similar logic

> 
> > +	/* Skip the following checks for the first page flip event */
> > +	if (_tv_sec == 0 || _tv_usec == 0) {
> > +		_tv_sec = tv_sec;
> > +		_tv_usec = tv_usec;
> > +		return;
> > +	}
> > +
> > +	/*
> > +	 * For seamless tear-free display, the page flip event timestamps
> > +	 * from all the tiles should not differ by more than 10us.
> > +	 */
> > +	expr = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> 
> Nit: this could be renamed to e.g. is_on_time, expr is a pretty vague
> name.

yes agree will rename to make it more readable

> 
> > +	igt_fail_on_f(!expr, "Delayed page flip event from CRTC:%d at %u:%u\n",
> > +		crtc_id, tv_sec, tv_usec);
> > +
> > +	if (tv_sec < _tv_sec)
> > +		_tv_sec = tv_sec;
> > +	if (tv_usec < _tv_usec)
> > +		_tv_usec = tv_usec;
> 
> This updates the timestamp on each page-flip. This means that the first
> and last page-flips could be delayed by more than 10µs if there are
> intermediate page-flips. For instance, if the first page-flip happens
> at t=0µs and the second one happens at t=9µs, the last one could happen
> at t=18µs without making this test fails. Is this something we want to
> allow?

Nope all of them should happen within the same vblank so the diff between all
should be <10us, will have to modify the logic to do that.

so basically instead of making <10us condition for the consecutive ones, it should be between the first one
and all other events, correct?

> 
> > +}
> > +
> > +static void wait_for_pageflip(int drm_fd)
> > +{
> > +	struct pollfd pfd;
> > +	drmEventContext drm_event;
> 
> Nit: to make sure garbage isn't read from this struct (there are other
> function pointers), it's probably safer to zero-fill it (= {0}).

Got it

> 
> > +	drm_event.version = 3;
> > +	drm_event.page_flip_handler2 = page_flip_handler;
> > +
> > +	pfd.fd = drm_fd;
> > +	pfd.events = POLLIN;
> > +	pfd.revents = 0;
> > +
> > +	poll(&pfd, 1, 1000);
> 
> Maybe we should check poll(2)'s return value?

poll(2)? Or just check return value of the function poll() just for error handling?

> 
> > +	if (pfd.revents & POLLIN)
> > +		drmHandleEvent(drm_fd, &drm_event);
> 
> If we don't get POLLIN (e.g. if we timeout), wait_for_pageflip will
> silently do nothing, and the test will pass. Instead, we probably want
> to fail in this case.

Yes thats correct, just add else case with igt_assert?

> 
> > +}
> > +
> > +igt_main
> > +{
> > +	igt_display_t display;
> > +	data_connector_t *conn_data = NULL;
> > +	data_t data = {.drm_fd = 0, .num_h_tiles = 0,
> > +		       .display = NULL, .commit = COMMIT_LEGACY};
> 
> Nit: one can just do assign to {0} to zero-fill the struct.

Got it

> 
> > +	igt_fixture {
> > +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > +
> > +		kmstest_set_vt_graphics_mode();
> > +		igt_display_require(&display, data.drm_fd);
> > +		igt_display_reset(&display);
> > +
> > +		data.display = &display;
> > +
> > +		get_number_of_h_tiles(&data);
> > +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> > +
> > +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> 
> Should we try to run this test at all on drivers that don't support
> atomic?
> 
> If the driver doesn't support atomic, user-space will submit two page-
> flip requests. However it's possible that the hardware executes a page-
> flip between both requests: user-space calls the first drmModePageFlip,
> the vblank for this particular CRTC triggers, then user-space calls the
> second drmModePageFlip. Page-flips will be out-of-sync by one frame.

Hmm, yea should probbaly have igt_require on atomic

> 
> > +		if (data.num_h_tiles > 0)
> > +			conn_data = malloc(data.num_h_tiles * sizeof(data_connector_t));
> > +	}
> > +
> > +	igt_subtest("basic-test-pattern") {
> > +		igt_skip_on(data.num_h_tiles == 0);
> > +		igt_assert(conn_data);
> > +
> > +		get_connector(&data, conn_data);
> > +		setup_mode(&data, conn_data);
> > +		setup_framebuffer(&data, conn_data);
> > +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> > +			DRM_MODE_PAGE_FLIP_EVENT, NULL);
> > +		wait_for_pageflip(data.drm_fd);
> 
> Here we only wait for a single page-flip. This will only stash the
> timestamp of the frst page-flip without checking the time-stamp of
> subsequent page-flips. We should wait for as many page-flips as enabled
> tiled connectors.

That was our initial understanding as well, but with just one wait_for_pageflip call we
were geting two page flip events for two tiles
Do we need to call wait for page flip explicitly the number of times = number of tiles?

Regards
Manasi

> 
> > +		test_cleanup(&data, conn_data);
> > +	}
> > +
> > +	igt_fixture {
> > +		free(conn_data);
> > +		close(data.drm_fd);
> > +		kmstest_restore_vt_mode();
> > +		igt_display_fini(data.display);
> > +	}
> > +}
> > diff --git a/tests/meson.build b/tests/meson.build
> > index a7b2b322..50292df8 100644
> > --- a/tests/meson.build
> > +++ b/tests/meson.build
> > @@ -26,6 +26,7 @@ test_progs = [
> >  	'kms_cursor_edge_walk',
> >  	'kms_cursor_legacy',
> >  	'kms_dp_dsc',
> > +	'kms_dp_tiled_display',
> >  	'kms_draw_crc',
> >  	'kms_fbcon_fbt',
> >  	'kms_fence_pin_leak',
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-08-27 21:29     ` Manasi Navare
@ 2019-08-28 22:35       ` Manasi Navare
  2019-08-30 11:39       ` Ser, Simon
  1 sibling, 0 replies; 34+ messages in thread
From: Manasi Navare @ 2019-08-28 22:35 UTC (permalink / raw)
  To: Ser, Simon; +Cc: igt-dev, madhumitha.tp, Latvala, Petri

On Tue, Aug 27, 2019 at 02:29:49PM -0700, Manasi Navare wrote:
> On Tue, Aug 27, 2019 at 03:49:38AM -0700, Ser, Simon wrote:
> > Thanks for the new version! Here are some more comments. Some of them
> > are nits, some of them are more serious questions. Feel free to let me
> > know if I'm mistaken or if you don't understand one of them.
> 
> Thanks for the review comments Simon. I will be working on addressing the following
> review comments and will take over this patch since Madhumitha's internship has ended.
> I really appreciate all your help and feedback on this.
> 
> Please find my answers below:
> 
> > 
> > On Fri, 2019-08-23 at 11:23 -0700, Madhumitha Tolakanahalli Pradeep wrote:
> > > This test validates the tiled DP displays to display a test pattern
> > > seamlessly across the two tiles. It validates the transcoder port
> > > sync feature on i915 to get a tearfree tiled display output.
> > > 
> > > Related kernel work patches-
> > > https://patchwork.freedesktop.org/series/59837/#rev4.
> > > 
> > > This test can eventually be extended to cover tiled display support
> > > on other connector types.
> > > 
> > > v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
> > >     Minor style changes (Simon)
> > >    Code clean-up and reordering
> > > 
> > > 
> > > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > > Cc: Petri Latvala <petri.latvala@intel.com>
> > > Cc: Simon Ser <simon.ser@intel.com>
> > > 
> > > Cc: <madhumitha.tp@gmail.com>
> > > 
> > > Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> > > ---
> > >  tests/Makefile.sources       |   1 +
> > >  tests/kms_dp_tiled_display.c | 346 +++++++++++++++++++++++++++++++++++
> > >  tests/meson.build            |   1 +
> > >  3 files changed, 348 insertions(+)
> > >  create mode 100644 tests/kms_dp_tiled_display.c
> > > 
> > > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > > index c02e4d94..7561ab9b 100644
> > > --- a/tests/Makefile.sources
> > > +++ b/tests/Makefile.sources
> > > @@ -41,6 +41,7 @@ TESTS_progs = \
> > >  	kms_cursor_edge_walk \
> > >  	kms_cursor_legacy \
> > >  	kms_dp_dsc \
> > > +	kms_dp_tiled_display \
> > >  	kms_draw_crc \
> > >  	kms_fbcon_fbt \
> > >  	kms_fence_pin_leak \
> > > diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> > > new file mode 100644
> > > index 00000000..162fbdd9
> > > --- /dev/null
> > > +++ b/tests/kms_dp_tiled_display.c
> > > @@ -0,0 +1,346 @@
> > > +/*
> > > + * 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:
> > > + *  Madhumitha Tolakanahalli Pradeep
> > > + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> > > + *
> > > + * Display Port Tiled Display Test
> > > + * This test parses the tile information of the connectors that have TILE
> > > + * property set, sets up the framebuffer with correct offsets corresponding to
> > > + * the tile offsets and does an atomic modeset with two CRTCs for two
> > > + * connectors. Page flip event timestamp from each CRTC is collected and
> > > + * compared to make sure that they occurred in a synchronous manner.
> > > + *
> > > + * This test currently supports only horizontally tiled displays, in line with
> > > + * the displays supported by the kernel at the moment.
> > > + */
> > > +
> > > +#include "igt.h"
> > > +#include "poll.h"
> > > +#include "drm_mode.h"
> > > +#include "drm_fourcc.h"
> > > +
> > > +IGT_TEST_DESCRIPTION("Test for Display Port Tiled Displays");
> > > +
> > > +typedef struct {
> > > +	int drm_fd;
> > > +	int num_h_tiles;
> > > +	igt_display_t *display;
> > > +	enum igt_commit_style commit;
> > > +} data_t;
> > > +
> > > +typedef struct {
> > > +	igt_output_t *output;
> > > +	igt_tile_info_t tile;
> > > +	igt_fb_t fb_test_pattern;
> > > +	enum pipe pipe;
> > > +	enum igt_commit_style commit;
> > > +	drmModeConnectorPtr connector;
> > > +} data_connector_t;
> > > +
> > > +static int drm_property_is_tile(drmModePropertyPtr prop)
> > > +{
> > > +	return (strcmp(prop->name , "TILE") ? 0 : 1) &&
> > > +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> > > +}
> > > +
> > > +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> > > +		igt_tile_info_t *tile)
> > > +{
> > > +	int i = 0;
> > > +	drmModePropertyPtr prop;
> > > +	drmModePropertyBlobPtr blob;
> > > +
> > > +	for (i = 0; i < conn->count_props; i++) {
> > > +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> > > +
> > > +		igt_assert(prop);
> > > +
> > > +		if (!drm_property_is_tile(prop))
> > > +			continue;
> > 
> > This branch leaks prop.
> 
> Freeing prop here before continuing shd fix this, will fix this in the next rev
> 
> > 
> > > +		blob = drmModeGetPropertyBlob(data->drm_fd,
> > > +				conn->prop_values[i]);
> > > +
> > > +		if (!blob)
> > > +			return;
> > 
> > This branch leaks prop.
> 
> Agree, will add drmModeFreePropertyBlob(blob); before return
> 
> > 
> > > +		igt_parse_connector_tile_blob(blob, tile);
> > > +		break;
> > > +	}
> > > +
> > > +	drmModeFreeProperty(prop);
> > > +	drmModeFreePropertyBlob(blob);
> > > +}
> > > +
> > > +static void get_number_of_h_tiles(data_t *data)
> > > +{
> > > +	int i;
> > > +	drmModeResPtr res;
> > > +	drmModeConnectorPtr connector;
> > > +	igt_tile_info_t tile = {.num_h_tile = 0};
> > > +
> > > +	igt_assert(res = drmModeGetResources(data->drm_fd));
> > > +
> > > +	for (i = 0; i < res->count_connectors; i++) {
> > > +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> > > +				res->connectors[i]);
> > > +
> > > +		igt_assert(connector);
> > > +
> > > +		if (!(connector->connection == DRM_MODE_CONNECTED &&
> > > +			connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort))
> > > +			continue;
> > 
> > This can be simplified to
> > 
> >     connection != DRM_MODE_CONNECTED ||
> >     connector_type != DRM_MODE_CONNECTOR_DisplayPort
> 
> Yes will simplify in the next rev
> 
> > 
> > Additionally, this branch leaks the connector.
> 
> Hmm, so call drmModeFreeConnector(connector); before continuing shd be followed in general throughout
> the code right?
> 
> > 
> > > +		get_connector_tile_props(data, connector, &tile);
> > > +		data->num_h_tiles = tile.num_h_tile;
> > > +		break;
> > > +	}
> > > +
> > > +	drmModeFreeResources(res);
> > > +	drmModeFreeConnector(connector);
> > > +}
> > > +
> > > +static void get_connector(data_t *data, data_connector_t *conn)
> > 
> > Nit: since this fills all connectors, maybe it should be named
> > get_connectors (with an s). Also it's not clear that conn refers to an
> > array of connectors, maybe it should be renamed to conns.
> 
> Yes I agree that will make it more readable, I will fix it in next rev
> 
> > 
> > (Applies to the whole patch)
> > 
> > > +{
> > > +	int count = 0;
> > > +	igt_output_t *output;
> > > +
> > > +	for_each_connected_output(data->display, output) {
> > > +		conn[count].connector = drmModeGetConnector(data->display->drm_fd,
> > > +						output->id);
> > > +
> > > +		igt_assert(conn[count].connector);
> > > +
> > > +		if (!(conn[count].connector->connector_type ==
> > > +			DRM_MODE_CONNECTOR_DisplayPort))
> > > +			continue;
> > 
> > This can be simplified to
> > 
> >     if (connector_type != DRM_MODE_CONNECTOR_DisplayPort)
> > 
> > Additionally, this branch leaks the connector.
> > 
> > > +		get_connector_tile_props(data, conn[count].connector,
> > > +			&conn[count].tile);
> > > +
> > > +		/* Check if the connectors belong to the same tile group */
> > > +		if (count > 0)
> > > +			igt_assert(conn[count].tile.tile_group_id ==
> > > +				conn[count-1].tile.tile_group_id);
> > > +
> > > +		count++;
> > > +	}
> > > +}
> > > +
> > > +static void
> > > +reset_framebuffer(int drm_fd, igt_output_t *output, igt_fb_t *fb)
> > > +{
> > > +	igt_plane_t *primary;
> > > +
> > > +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > > +	igt_plane_set_fb(primary, NULL);
> > > +	igt_remove_fb(drm_fd, fb);
> > > +}
> > > +
> > > +static void reset_output(igt_output_t *output)
> > > +{
> > > +	igt_output_set_pipe(output, PIPE_NONE);
> > > +}
> > > +
> > > +static void test_cleanup(data_t *data, data_connector_t *conn)
> > > +{
> > > +	int count;
> > > +
> > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > +		if (conn[count].output) {
> > > +			reset_framebuffer(data->drm_fd, conn[count].output,
> > > +				&conn[count].fb_test_pattern);
> > > +			reset_output(conn[count].output);
> > > +		}
> > > +	}
> > > +	igt_display_commit2(data->display, data->commit);
> > > +}
> > > +
> > > +static void setup_mode(data_t *data, data_connector_t *conn_data)
> > 
> > This function doesn't actually setup the output mode, it only sets up
> > the pipe. Is this an overlook?
> 
> yes we just set the pipe/CRTC here and the atomic commit call does a complete
> modeset with check and commit without any output since we didnt setup fb yet.
> But I agree that calling it just setup_pipe robably makes it more intuitive
> 
> > 
> > > +{
> > > +	int count = 0;
> > > +	enum pipe pipe;
> > > +	igt_output_t *output;
> > > +
> > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > +		output = igt_output_from_connector(data->display,
> > > +				conn_data[count].connector);
> > > +
> > > +		/*
> > > +		 * The output is set to PIPE_NONE and then assigned a pipe.
> > > +		 * This is done to ensure a complete modeset occures every
> > > +		 * time the test is run.
> > > +		 */
> > > +		reset_output(output);
> > 
> > Is this necessary?
> 
> Yes this is necessary to force a complete modeset for each test since if the pipe
> assignments or the mode has not changed it will not set needs_modeset flag in side kernel
> and will not do a full atomic check and commit.

The igt_display_commit2 call is also needed after setting the pipe to NONE to ensure that
we clear the pipe assignments and then do a modeset.
I just tested that and will add it in next rev as below:

static void reset_mode(data_t *data, data_connector_t *conn_data)
{
        int count;
        igt_output_t *output;

        for (count = 0; count < data->num_h_tiles; count++) {
                output = igt_output_from_connector(data->display,
                                conn_data[count].connector);
                       igt_output_set_pipe(output, PIPE_NONE);
        }
        igt_display_commit2(data->display, data->commit);
}


Manasi

> 
> > 
> > > +		for_each_pipe(data->display, pipe) {
> > > +			if (count > 0 && pipe == conn_data[count-1].pipe)
> > > +				continue;
> > > +
> > > +			if (igt_pipe_connector_valid(pipe, output)) {
> > > +
> > > +				conn_data[count].pipe = pipe;
> > > +				conn_data[count].output = output;
> > > +
> > > +				igt_output_set_pipe(conn_data[count].output,
> > > +					conn_data[count].pipe);
> > > +				break;
> > > +			}
> > > +		}
> > > +	}
> > > +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> > > +		NULL);
> > > +}
> > > +
> > > +static void setup_framebuffer(data_t *data, data_connector_t *conn)
> > > +{
> > > +	int count;
> > > +	igt_plane_t *primary;
> > > +
> > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > +
> > > +		igt_create_pattern_fb(data->drm_fd,
> > > +			(conn[count].tile.tile_h_size *
> > > +			data->num_h_tiles),
> > 
> > Do we need to multiply by the number of horizontal tiles here? It seems
> > we only use the first tile_h_size pixels of the buffer. Am I missing
> > something?
> > 
> 
> Yes we only use the tile_h_size of the buffer at the proper offset of tile_h_loc
> So this below logic shd be modified to only create fb of the size tile_h_size if its in the for loop
> or just create one fb outside the loop of the size tile_h_size * num_tiles and then just use that with dfferent
> offsets for two CRTCs
> 
> When I discussed this on dri-devel, people said that real userspace can decide to do either one single fb for all tiles
> or separate ones where each is of the size equal to tile size.
> 
> Let me know if there is a preference
> 
> > But maybe a test that would better reflect reality would create a
> > single framebuffer for all tiled displays, to display a single image
> > across all of them?
> > 
> > > +			conn[count].tile.tile_v_size,
> > > +			DRM_FORMAT_XBGR8888,
> > > +			LOCAL_DRM_FORMAT_MOD_NONE,
> > > +			&conn[count].fb_test_pattern);
> > > +
> > > +		primary = igt_output_get_plane_type(conn[count].output,
> > > +				DRM_PLANE_TYPE_PRIMARY);
> > > +
> > > +		igt_plane_set_fb(primary, &conn[count].fb_test_pattern);
> > > +
> > > +		igt_fb_set_size(&conn[count].fb_test_pattern, primary,
> > > +				conn[count].tile.tile_h_size,
> > > +				conn[count].tile.tile_v_size);
> > > +
> > > +		igt_fb_set_position(&conn[count].fb_test_pattern, primary,
> > > +				(conn[count].tile.tile_h_size *
> > > +				conn[count].tile.tile_h_loc),
> > > +				(conn[count].tile.tile_v_size *
> > > +				conn[count].tile.tile_v_loc));
> > > +
> > > +		igt_plane_set_size(primary,
> > > +				conn[count].tile.tile_h_size,
> > > +				conn[count].tile.tile_v_size);
> > > +	}
> > > +}
> > > +
> > > +static void page_flip_handler(int fd, unsigned int seq,
> > > +		unsigned int tv_sec, unsigned int tv_usec,
> > > +		unsigned int crtc_id, void *data)
> > > +{
> > > +	bool expr = false;
> > > +	static unsigned int _tv_sec, _tv_usec;
> > > +
> > > +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> > > +		tv_sec, tv_usec);
> > 
> > We should also make sure we receive exactly one page-flip per CRTC.
> > Currently we don't use crtc_id (apart from logging purposes).
> 
> I see so somehow have a static count of events and make sure per crtc id its the same count or
> some similar logic
> 
> > 
> > > +	/* Skip the following checks for the first page flip event */
> > > +	if (_tv_sec == 0 || _tv_usec == 0) {
> > > +		_tv_sec = tv_sec;
> > > +		_tv_usec = tv_usec;
> > > +		return;
> > > +	}
> > > +
> > > +	/*
> > > +	 * For seamless tear-free display, the page flip event timestamps
> > > +	 * from all the tiles should not differ by more than 10us.
> > > +	 */
> > > +	expr = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> > 
> > Nit: this could be renamed to e.g. is_on_time, expr is a pretty vague
> > name.
> 
> yes agree will rename to make it more readable
> 
> > 
> > > +	igt_fail_on_f(!expr, "Delayed page flip event from CRTC:%d at %u:%u\n",
> > > +		crtc_id, tv_sec, tv_usec);
> > > +
> > > +	if (tv_sec < _tv_sec)
> > > +		_tv_sec = tv_sec;
> > > +	if (tv_usec < _tv_usec)
> > > +		_tv_usec = tv_usec;
> > 
> > This updates the timestamp on each page-flip. This means that the first
> > and last page-flips could be delayed by more than 10µs if there are
> > intermediate page-flips. For instance, if the first page-flip happens
> > at t=0µs and the second one happens at t=9µs, the last one could happen
> > at t=18µs without making this test fails. Is this something we want to
> > allow?
> 
> Nope all of them should happen within the same vblank so the diff between all
> should be <10us, will have to modify the logic to do that.
> 
> so basically instead of making <10us condition for the consecutive ones, it should be between the first one
> and all other events, correct?
> 
> > 
> > > +}
> > > +
> > > +static void wait_for_pageflip(int drm_fd)
> > > +{
> > > +	struct pollfd pfd;
> > > +	drmEventContext drm_event;
> > 
> > Nit: to make sure garbage isn't read from this struct (there are other
> > function pointers), it's probably safer to zero-fill it (= {0}).
> 
> Got it
> 
> > 
> > > +	drm_event.version = 3;
> > > +	drm_event.page_flip_handler2 = page_flip_handler;
> > > +
> > > +	pfd.fd = drm_fd;
> > > +	pfd.events = POLLIN;
> > > +	pfd.revents = 0;
> > > +
> > > +	poll(&pfd, 1, 1000);
> > 
> > Maybe we should check poll(2)'s return value?
> 
> poll(2)? Or just check return value of the function poll() just for error handling?
> 
> > 
> > > +	if (pfd.revents & POLLIN)
> > > +		drmHandleEvent(drm_fd, &drm_event);
> > 
> > If we don't get POLLIN (e.g. if we timeout), wait_for_pageflip will
> > silently do nothing, and the test will pass. Instead, we probably want
> > to fail in this case.
> 
> Yes thats correct, just add else case with igt_assert?
> 
> > 
> > > +}
> > > +
> > > +igt_main
> > > +{
> > > +	igt_display_t display;
> > > +	data_connector_t *conn_data = NULL;
> > > +	data_t data = {.drm_fd = 0, .num_h_tiles = 0,
> > > +		       .display = NULL, .commit = COMMIT_LEGACY};
> > 
> > Nit: one can just do assign to {0} to zero-fill the struct.
> 
> Got it
> 
> > 
> > > +	igt_fixture {
> > > +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > > +
> > > +		kmstest_set_vt_graphics_mode();
> > > +		igt_display_require(&display, data.drm_fd);
> > > +		igt_display_reset(&display);
> > > +
> > > +		data.display = &display;
> > > +
> > > +		get_number_of_h_tiles(&data);
> > > +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> > > +
> > > +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> > 
> > Should we try to run this test at all on drivers that don't support
> > atomic?
> > 
> > If the driver doesn't support atomic, user-space will submit two page-
> > flip requests. However it's possible that the hardware executes a page-
> > flip between both requests: user-space calls the first drmModePageFlip,
> > the vblank for this particular CRTC triggers, then user-space calls the
> > second drmModePageFlip. Page-flips will be out-of-sync by one frame.
> 
> Hmm, yea should probbaly have igt_require on atomic
> 
> > 
> > > +		if (data.num_h_tiles > 0)
> > > +			conn_data = malloc(data.num_h_tiles * sizeof(data_connector_t));
> > > +	}
> > > +
> > > +	igt_subtest("basic-test-pattern") {
> > > +		igt_skip_on(data.num_h_tiles == 0);
> > > +		igt_assert(conn_data);
> > > +
> > > +		get_connector(&data, conn_data);
> > > +		setup_mode(&data, conn_data);
> > > +		setup_framebuffer(&data, conn_data);
> > > +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> > > +			DRM_MODE_PAGE_FLIP_EVENT, NULL);
> > > +		wait_for_pageflip(data.drm_fd);
> > 
> > Here we only wait for a single page-flip. This will only stash the
> > timestamp of the frst page-flip without checking the time-stamp of
> > subsequent page-flips. We should wait for as many page-flips as enabled
> > tiled connectors.
> 
> That was our initial understanding as well, but with just one wait_for_pageflip call we
> were geting two page flip events for two tiles
> Do we need to call wait for page flip explicitly the number of times = number of tiles?
> 
> Regards
> Manasi
> 
> > 
> > > +		test_cleanup(&data, conn_data);
> > > +	}
> > > +
> > > +	igt_fixture {
> > > +		free(conn_data);
> > > +		close(data.drm_fd);
> > > +		kmstest_restore_vt_mode();
> > > +		igt_display_fini(data.display);
> > > +	}
> > > +}
> > > diff --git a/tests/meson.build b/tests/meson.build
> > > index a7b2b322..50292df8 100644
> > > --- a/tests/meson.build
> > > +++ b/tests/meson.build
> > > @@ -26,6 +26,7 @@ test_progs = [
> > >  	'kms_cursor_edge_walk',
> > >  	'kms_cursor_legacy',
> > >  	'kms_dp_dsc',
> > > +	'kms_dp_tiled_display',
> > >  	'kms_draw_crc',
> > >  	'kms_fbcon_fbt',
> > >  	'kms_fence_pin_leak',
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-08-27 21:29     ` Manasi Navare
  2019-08-28 22:35       ` Manasi Navare
@ 2019-08-30 11:39       ` Ser, Simon
  2019-09-12  0:47         ` Manasi Navare
  1 sibling, 1 reply; 34+ messages in thread
From: Ser, Simon @ 2019-08-30 11:39 UTC (permalink / raw)
  To: Navare, Manasi D; +Cc: igt-dev, madhumitha.tp, Latvala, Petri

On Tue, 2019-08-27 at 14:29 -0700, Manasi Navare wrote:
> On Tue, Aug 27, 2019 at 03:49:38AM -0700, Ser, Simon wrote:
> > Thanks for the new version! Here are some more comments. Some of them
> > are nits, some of them are more serious questions. Feel free to let me
> > know if I'm mistaken or if you don't understand one of them.
> 
> Thanks for the review comments Simon. I will be working on addressing the following
> review comments and will take over this patch since Madhumitha's internship has ended.
> I really appreciate all your help and feedback on this.
> 
> Please find my answers below:
> 
> > On Fri, 2019-08-23 at 11:23 -0700, Madhumitha Tolakanahalli Pradeep wrote:
> > > This test validates the tiled DP displays to display a test pattern
> > > seamlessly across the two tiles. It validates the transcoder port
> > > sync feature on i915 to get a tearfree tiled display output.
> > > 
> > > Related kernel work patches-
> > > https://patchwork.freedesktop.org/series/59837/#rev4.
> > > 
> > > This test can eventually be extended to cover tiled display support
> > > on other connector types.
> > > 
> > > v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
> > >     Minor style changes (Simon)
> > >    Code clean-up and reordering
> > > 
> > > 
> > > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > > Cc: Petri Latvala <petri.latvala@intel.com>
> > > Cc: Simon Ser <simon.ser@intel.com>
> > > 
> > > Cc: <madhumitha.tp@gmail.com>
> > > 
> > > Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> > > ---
> > >  tests/Makefile.sources       |   1 +
> > >  tests/kms_dp_tiled_display.c | 346 +++++++++++++++++++++++++++++++++++
> > >  tests/meson.build            |   1 +
> > >  3 files changed, 348 insertions(+)
> > >  create mode 100644 tests/kms_dp_tiled_display.c
> > > 
> > > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > > index c02e4d94..7561ab9b 100644
> > > --- a/tests/Makefile.sources
> > > +++ b/tests/Makefile.sources
> > > @@ -41,6 +41,7 @@ TESTS_progs = \
> > >  	kms_cursor_edge_walk \
> > >  	kms_cursor_legacy \
> > >  	kms_dp_dsc \
> > > +	kms_dp_tiled_display \
> > >  	kms_draw_crc \
> > >  	kms_fbcon_fbt \
> > >  	kms_fence_pin_leak \
> > > diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> > > new file mode 100644
> > > index 00000000..162fbdd9
> > > --- /dev/null
> > > +++ b/tests/kms_dp_tiled_display.c
> > > @@ -0,0 +1,346 @@
> > > +/*
> > > + * 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:
> > > + *  Madhumitha Tolakanahalli Pradeep
> > > + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> > > + *
> > > + * Display Port Tiled Display Test
> > > + * This test parses the tile information of the connectors that have TILE
> > > + * property set, sets up the framebuffer with correct offsets corresponding to
> > > + * the tile offsets and does an atomic modeset with two CRTCs for two
> > > + * connectors. Page flip event timestamp from each CRTC is collected and
> > > + * compared to make sure that they occurred in a synchronous manner.
> > > + *
> > > + * This test currently supports only horizontally tiled displays, in line with
> > > + * the displays supported by the kernel at the moment.
> > > + */
> > > +
> > > +#include "igt.h"
> > > +#include "poll.h"
> > > +#include "drm_mode.h"
> > > +#include "drm_fourcc.h"
> > > +
> > > +IGT_TEST_DESCRIPTION("Test for Display Port Tiled Displays");
> > > +
> > > +typedef struct {
> > > +	int drm_fd;
> > > +	int num_h_tiles;
> > > +	igt_display_t *display;
> > > +	enum igt_commit_style commit;
> > > +} data_t;
> > > +
> > > +typedef struct {
> > > +	igt_output_t *output;
> > > +	igt_tile_info_t tile;
> > > +	igt_fb_t fb_test_pattern;
> > > +	enum pipe pipe;
> > > +	enum igt_commit_style commit;
> > > +	drmModeConnectorPtr connector;
> > > +} data_connector_t;
> > > +
> > > +static int drm_property_is_tile(drmModePropertyPtr prop)
> > > +{
> > > +	return (strcmp(prop->name , "TILE") ? 0 : 1) &&
> > > +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> > > +}
> > > +
> > > +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> > > +		igt_tile_info_t *tile)
> > > +{
> > > +	int i = 0;
> > > +	drmModePropertyPtr prop;
> > > +	drmModePropertyBlobPtr blob;
> > > +
> > > +	for (i = 0; i < conn->count_props; i++) {
> > > +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> > > +
> > > +		igt_assert(prop);
> > > +
> > > +		if (!drm_property_is_tile(prop))
> > > +			continue;
> > 
> > This branch leaks prop.
> 
> Freeing prop here before continuing shd fix this, will fix this in the next rev
> 
> > > +		blob = drmModeGetPropertyBlob(data->drm_fd,
> > > +				conn->prop_values[i]);
> > > +
> > > +		if (!blob)
> > > +			return;
> > 
> > This branch leaks prop.
> 
> Agree, will add drmModeFreePropertyBlob(blob); before return
> 
> > > +		igt_parse_connector_tile_blob(blob, tile);
> > > +		break;
> > > +	}
> > > +
> > > +	drmModeFreeProperty(prop);
> > > +	drmModeFreePropertyBlob(blob);
> > > +}
> > > +
> > > +static void get_number_of_h_tiles(data_t *data)
> > > +{
> > > +	int i;
> > > +	drmModeResPtr res;
> > > +	drmModeConnectorPtr connector;
> > > +	igt_tile_info_t tile = {.num_h_tile = 0};
> > > +
> > > +	igt_assert(res = drmModeGetResources(data->drm_fd));
> > > +
> > > +	for (i = 0; i < res->count_connectors; i++) {
> > > +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> > > +				res->connectors[i]);
> > > +
> > > +		igt_assert(connector);
> > > +
> > > +		if (!(connector->connection == DRM_MODE_CONNECTED &&
> > > +			connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort))
> > > +			continue;
> > 
> > This can be simplified to
> > 
> >     connection != DRM_MODE_CONNECTED ||
> >     connector_type != DRM_MODE_CONNECTOR_DisplayPort
> 
> Yes will simplify in the next rev
> 
> > Additionally, this branch leaks the connector.
> 
> Hmm, so call drmModeFreeConnector(connector); before continuing shd be followed in general throughout
> the code right?

Yeah, that would fix it.

> > > +		get_connector_tile_props(data, connector, &tile);
> > > +		data->num_h_tiles = tile.num_h_tile;
> > > +		break;
> > > +	}
> > > +
> > > +	drmModeFreeResources(res);
> > > +	drmModeFreeConnector(connector);
> > > +}
> > > +
> > > +static void get_connector(data_t *data, data_connector_t *conn)
> > 
> > Nit: since this fills all connectors, maybe it should be named
> > get_connectors (with an s). Also it's not clear that conn refers to an
> > array of connectors, maybe it should be renamed to conns.
> 
> Yes I agree that will make it more readable, I will fix it in next rev
> 
> > (Applies to the whole patch)
> > 
> > > +{
> > > +	int count = 0;
> > > +	igt_output_t *output;
> > > +
> > > +	for_each_connected_output(data->display, output) {
> > > +		conn[count].connector = drmModeGetConnector(data->display->drm_fd,
> > > +						output->id);
> > > +
> > > +		igt_assert(conn[count].connector);
> > > +
> > > +		if (!(conn[count].connector->connector_type ==
> > > +			DRM_MODE_CONNECTOR_DisplayPort))
> > > +			continue;
> > 
> > This can be simplified to
> > 
> >     if (connector_type != DRM_MODE_CONNECTOR_DisplayPort)
> > 
> > Additionally, this branch leaks the connector.
> > 
> > > +		get_connector_tile_props(data, conn[count].connector,
> > > +			&conn[count].tile);
> > > +
> > > +		/* Check if the connectors belong to the same tile group */
> > > +		if (count > 0)
> > > +			igt_assert(conn[count].tile.tile_group_id ==
> > > +				conn[count-1].tile.tile_group_id);
> > > +
> > > +		count++;
> > > +	}
> > > +}
> > > +
> > > +static void
> > > +reset_framebuffer(int drm_fd, igt_output_t *output, igt_fb_t *fb)
> > > +{
> > > +	igt_plane_t *primary;
> > > +
> > > +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > > +	igt_plane_set_fb(primary, NULL);
> > > +	igt_remove_fb(drm_fd, fb);
> > > +}
> > > +
> > > +static void reset_output(igt_output_t *output)
> > > +{
> > > +	igt_output_set_pipe(output, PIPE_NONE);
> > > +}
> > > +
> > > +static void test_cleanup(data_t *data, data_connector_t *conn)
> > > +{
> > > +	int count;
> > > +
> > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > +		if (conn[count].output) {
> > > +			reset_framebuffer(data->drm_fd, conn[count].output,
> > > +				&conn[count].fb_test_pattern);
> > > +			reset_output(conn[count].output);
> > > +		}
> > > +	}
> > > +	igt_display_commit2(data->display, data->commit);
> > > +}
> > > +
> > > +static void setup_mode(data_t *data, data_connector_t *conn_data)
> > 
> > This function doesn't actually setup the output mode, it only sets up
> > the pipe. Is this an overlook?
> 
> yes we just set the pipe/CRTC here and the atomic commit call does a complete
> modeset with check and commit without any output since we didnt setup fb yet.
> But I agree that calling it just setup_pipe robably makes it more intuitive

Oh, I forgot that igt_output_set_pipe also sets the mode.

> > > +{
> > > +	int count = 0;
> > > +	enum pipe pipe;
> > > +	igt_output_t *output;
> > > +
> > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > +		output = igt_output_from_connector(data->display,
> > > +				conn_data[count].connector);
> > > +
> > > +		/*
> > > +		 * The output is set to PIPE_NONE and then assigned a pipe.
> > > +		 * This is done to ensure a complete modeset occures every
> > > +		 * time the test is run.
> > > +		 */
> > > +		reset_output(output);
> > 
> > Is this necessary?
> 
> Yes this is necessary to force a complete modeset for each test since if the pipe
> assignments or the mode has not changed it will not set needs_modeset flag in side kernel
> and will not do a full atomic check and commit.

Hmm, why do we need to do a new modeset? If the mode is already set to
what we want, no need for this?

(Sorry, I'm unfamiliar with the kernel side of things!)

> > > +		for_each_pipe(data->display, pipe) {
> > > +			if (count > 0 && pipe == conn_data[count-1].pipe)
> > > +				continue;
> > > +
> > > +			if (igt_pipe_connector_valid(pipe, output)) {
> > > +
> > > +				conn_data[count].pipe = pipe;
> > > +				conn_data[count].output = output;
> > > +
> > > +				igt_output_set_pipe(conn_data[count].output,
> > > +					conn_data[count].pipe);
> > > +				break;
> > > +			}
> > > +		}
> > > +	}
> > > +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> > > +		NULL);
> > > +}
> > > +
> > > +static void setup_framebuffer(data_t *data, data_connector_t *conn)
> > > +{
> > > +	int count;
> > > +	igt_plane_t *primary;
> > > +
> > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > +
> > > +		igt_create_pattern_fb(data->drm_fd,
> > > +			(conn[count].tile.tile_h_size *
> > > +			data->num_h_tiles),
> > 
> > Do we need to multiply by the number of horizontal tiles here? It seems
> > we only use the first tile_h_size pixels of the buffer. Am I missing
> > something?
> > 
> 
> Yes we only use the tile_h_size of the buffer at the proper offset of tile_h_loc
> So this below logic shd be modified to only create fb of the size tile_h_size if its in the for loop
> or just create one fb outside the loop of the size tile_h_size * num_tiles and then just use that with dfferent
> offsets for two CRTCs
> 
> When I discussed this on dri-devel, people said that real userspace can decide to do either one single fb for all tiles
> or separate ones where each is of the size equal to tile size.
> 
> Let me know if there is a preference

As a userspace dev, I'd say a single FB would be a little bit more
realistic, but yeah I guess userspace could use two FBs as well. No big
deal, I'm fine with both.

> > But maybe a test that would better reflect reality would create a
> > single framebuffer for all tiled displays, to display a single image
> > across all of them?
> > 
> > > +			conn[count].tile.tile_v_size,
> > > +			DRM_FORMAT_XBGR8888,
> > > +			LOCAL_DRM_FORMAT_MOD_NONE,
> > > +			&conn[count].fb_test_pattern);
> > > +
> > > +		primary = igt_output_get_plane_type(conn[count].output,
> > > +				DRM_PLANE_TYPE_PRIMARY);
> > > +
> > > +		igt_plane_set_fb(primary, &conn[count].fb_test_pattern);
> > > +
> > > +		igt_fb_set_size(&conn[count].fb_test_pattern, primary,
> > > +				conn[count].tile.tile_h_size,
> > > +				conn[count].tile.tile_v_size);
> > > +
> > > +		igt_fb_set_position(&conn[count].fb_test_pattern, primary,
> > > +				(conn[count].tile.tile_h_size *
> > > +				conn[count].tile.tile_h_loc),
> > > +				(conn[count].tile.tile_v_size *
> > > +				conn[count].tile.tile_v_loc));
> > > +
> > > +		igt_plane_set_size(primary,
> > > +				conn[count].tile.tile_h_size,
> > > +				conn[count].tile.tile_v_size);
> > > +	}
> > > +}
> > > +
> > > +static void page_flip_handler(int fd, unsigned int seq,
> > > +		unsigned int tv_sec, unsigned int tv_usec,
> > > +		unsigned int crtc_id, void *data)
> > > +{
> > > +	bool expr = false;
> > > +	static unsigned int _tv_sec, _tv_usec;
> > > +
> > > +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> > > +		tv_sec, tv_usec);
> > 
> > We should also make sure we receive exactly one page-flip per CRTC.
> > Currently we don't use crtc_id (apart from logging purposes).
> 
> I see so somehow have a static count of events and make sure per crtc id its the same count or
> some similar logic

Yeah. We could for instance add a "bool got_page_flip" field in our
data_connector_t struct and set it to true here (making sure it's not
set to true already).

A pointer can be passed to page_flip_handler via the data argument.

> > > +	/* Skip the following checks for the first page flip event */
> > > +	if (_tv_sec == 0 || _tv_usec == 0) {
> > > +		_tv_sec = tv_sec;
> > > +		_tv_usec = tv_usec;
> > > +		return;
> > > +	}
> > > +
> > > +	/*
> > > +	 * For seamless tear-free display, the page flip event timestamps
> > > +	 * from all the tiles should not differ by more than 10us.
> > > +	 */
> > > +	expr = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> > 
> > Nit: this could be renamed to e.g. is_on_time, expr is a pretty vague
> > name.
> 
> yes agree will rename to make it more readable
> 
> > > +	igt_fail_on_f(!expr, "Delayed page flip event from CRTC:%d at %u:%u\n",
> > > +		crtc_id, tv_sec, tv_usec);
> > > +
> > > +	if (tv_sec < _tv_sec)
> > > +		_tv_sec = tv_sec;
> > > +	if (tv_usec < _tv_usec)
> > > +		_tv_usec = tv_usec;
> > 
> > This updates the timestamp on each page-flip. This means that the first
> > and last page-flips could be delayed by more than 10µs if there are
> > intermediate page-flips. For instance, if the first page-flip happens
> > at t=0µs and the second one happens at t=9µs, the last one could happen
> > at t=18µs without making this test fails. Is this something we want to
> > allow?
> 
> Nope all of them should happen within the same vblank so the diff between all
> should be <10us, will have to modify the logic to do that.
> 
> so basically instead of making <10us condition for the consecutive ones, it should be between the first one
> and all other events, correct?

Correct! So we can just drop these 4 lines, that should do it.

> > > +}
> > > +
> > > +static void wait_for_pageflip(int drm_fd)
> > > +{
> > > +	struct pollfd pfd;
> > > +	drmEventContext drm_event;
> > 
> > Nit: to make sure garbage isn't read from this struct (there are other
> > function pointers), it's probably safer to zero-fill it (= {0}).
> 
> Got it
> 
> > > +	drm_event.version = 3;
> > > +	drm_event.page_flip_handler2 = page_flip_handler;
> > > +
> > > +	pfd.fd = drm_fd;
> > > +	pfd.events = POLLIN;
> > > +	pfd.revents = 0;
> > > +
> > > +	poll(&pfd, 1, 1000);
> > 
> > Maybe we should check poll(2)'s return value?
> 
> poll(2)? Or just check return value of the function poll() just for error handling?

Yes, just in case.

(As a side note, poll(2) simply means "the poll system call" and refers
to poll's syscall manpage section.)

> > > +	if (pfd.revents & POLLIN)
> > > +		drmHandleEvent(drm_fd, &drm_event);
> > 
> > If we don't get POLLIN (e.g. if we timeout), wait_for_pageflip will
> > silently do nothing, and the test will pass. Instead, we probably want
> > to fail in this case.
> 
> Yes thats correct, just add else case with igt_assert?

Yes!

> > > +}
> > > +
> > > +igt_main
> > > +{
> > > +	igt_display_t display;
> > > +	data_connector_t *conn_data = NULL;
> > > +	data_t data = {.drm_fd = 0, .num_h_tiles = 0,
> > > +		       .display = NULL, .commit = COMMIT_LEGACY};
> > 
> > Nit: one can just do assign to {0} to zero-fill the struct.
> 
> Got it
> 
> > > +	igt_fixture {
> > > +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > > +
> > > +		kmstest_set_vt_graphics_mode();
> > > +		igt_display_require(&display, data.drm_fd);
> > > +		igt_display_reset(&display);
> > > +
> > > +		data.display = &display;
> > > +
> > > +		get_number_of_h_tiles(&data);
> > > +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> > > +
> > > +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> > 
> > Should we try to run this test at all on drivers that don't support
> > atomic?
> > 
> > If the driver doesn't support atomic, user-space will submit two page-
> > flip requests. However it's possible that the hardware executes a page-
> > flip between both requests: user-space calls the first drmModePageFlip,
> > the vblank for this particular CRTC triggers, then user-space calls the
> > second drmModePageFlip. Page-flips will be out-of-sync by one frame.
> 
> Hmm, yea should probbaly have igt_require on atomic
> 
> > > +		if (data.num_h_tiles > 0)
> > > +			conn_data = malloc(data.num_h_tiles * sizeof(data_connector_t));
> > > +	}
> > > +
> > > +	igt_subtest("basic-test-pattern") {
> > > +		igt_skip_on(data.num_h_tiles == 0);
> > > +		igt_assert(conn_data);
> > > +
> > > +		get_connector(&data, conn_data);
> > > +		setup_mode(&data, conn_data);
> > > +		setup_framebuffer(&data, conn_data);
> > > +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> > > +			DRM_MODE_PAGE_FLIP_EVENT, NULL);
> > > +		wait_for_pageflip(data.drm_fd);
> > 
> > Here we only wait for a single page-flip. This will only stash the
> > timestamp of the frst page-flip without checking the time-stamp of
> > subsequent page-flips. We should wait for as many page-flips as enabled
> > tiled connectors.
> 
> That was our initial understanding as well, but with just one wait_for_pageflip call we
> were geting two page flip events for two tiles
> Do we need to call wait for page flip explicitly the number of times = number of tiles?

Oh, I see. So it seems two events are queued. Then we should probably
loop until we have a page-flip for all CRTCs, since there's no
guarantee all events will be sent at once.

> Regards
> Manasi
> 
> > > +		test_cleanup(&data, conn_data);
> > > +	}
> > > +
> > > +	igt_fixture {
> > > +		free(conn_data);
> > > +		close(data.drm_fd);
> > > +		kmstest_restore_vt_mode();
> > > +		igt_display_fini(data.display);
> > > +	}
> > > +}
> > > diff --git a/tests/meson.build b/tests/meson.build
> > > index a7b2b322..50292df8 100644
> > > --- a/tests/meson.build
> > > +++ b/tests/meson.build
> > > @@ -26,6 +26,7 @@ test_progs = [
> > >  	'kms_cursor_edge_walk',
> > >  	'kms_cursor_legacy',
> > >  	'kms_dp_dsc',
> > > +	'kms_dp_tiled_display',
> > >  	'kms_draw_crc',
> > >  	'kms_fbcon_fbt',
> > >  	'kms_fence_pin_leak',
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser
  2019-08-27  7:33   ` Ser, Simon
@ 2019-09-09  3:49     ` Manasi Navare
  2019-09-09 10:41       ` Ser, Simon
  0 siblings, 1 reply; 34+ messages in thread
From: Manasi Navare @ 2019-09-09  3:49 UTC (permalink / raw)
  To: Ser, Simon; +Cc: igt-dev, madhumitha.tp, Latvala, Petri

Hi Simon,

Is this good to get merged?

Regards
Manasi

On Tue, Aug 27, 2019 at 12:33:45AM -0700, Ser, Simon wrote:
> On Fri, 2019-08-23 at 11:23 -0700, Madhumitha Tolakanahalli Pradeep wrote:
> > The tile property parser parses the connector tile property obtained
> > from connector's Display ID block and set per connector.
> > 
> > v2: Minor style changes (Simon)
> > 
> > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > Cc: Petri Latvala <petri.latvala@intel.com>
> > Cc: Simon Ser <simon.ser@intel.com>
> > 
> > Cc: <madhumitha.tp@gmail.com>
> > 
> > Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> 
> This is still:
> 
> Reviewed-by: Simon Ser <simon.ser@intel.com>
> 
> > ---
> >  lib/igt_kms.c | 29 +++++++++++++++++++++++++++++
> >  lib/igt_kms.h | 11 +++++++++++
> >  2 files changed, 40 insertions(+)
> > 
> > diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> > index 17a7d2b6..dc0f810d 100644
> > --- a/lib/igt_kms.c
> > +++ b/lib/igt_kms.c
> > @@ -4515,3 +4515,32 @@ bool igt_display_has_format_mod(igt_display_t *display, uint32_t format,
> >  
> >  	return false;
> >  }
> > +
> > +/**
> > + * igt_parse_connector_tile_blob:
> > + * @blob: pointer to the connector's tile properties
> > + * @tile: pointer to tile structure that is populated by the function
> > + *
> > + * Parses the connector tile blob to extract the tile information.
> > + * The blob information is exposed from drm/drm_connector.c in the kernel.
> > + * The format of the tile property is defined in the kernel as char tile[256]
> > + * that consists of 8 integers that are ':' separated.
> > + *
> > + */
> > +
> > +void igt_parse_connector_tile_blob(drmModePropertyBlobPtr blob,
> > +		igt_tile_info_t *tile)
> > +{
> > +	char *blob_data = blob->data;
> > +
> > +	igt_assert(blob);
> > +
> > +	tile->tile_group_id = atoi(strtok(blob_data, ":"));
> > +	tile->tile_is_single_monitor = atoi(strtok(NULL, ":"));
> > +	tile->num_h_tile = atoi(strtok(NULL, ":"));
> > +	tile->num_v_tile = atoi(strtok(NULL, ":"));
> > +	tile->tile_h_loc = atoi(strtok(NULL, ":"));
> > +	tile->tile_v_loc = atoi(strtok(NULL, ":"));
> > +	tile->tile_h_size = atoi(strtok(NULL, ":"));
> > +	tile->tile_v_size = atoi(strtok(NULL, ":"));
> > +}
> > diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> > index 56481fd1..aebb4d31 100644
> > --- a/lib/igt_kms.h
> > +++ b/lib/igt_kms.h
> > @@ -390,6 +390,14 @@ struct igt_display {
> >  	int format_mod_count;
> >  };
> >  
> > +typedef struct {
> > +	int tile_group_id;
> > +	bool tile_is_single_monitor;
> > +	uint8_t num_h_tile, num_v_tile;
> > +	uint8_t tile_h_loc, tile_v_loc;
> > +	uint16_t tile_h_size, tile_v_size;
> > +} igt_tile_info_t;
> > +
> >  void igt_display_require(igt_display_t *display, int drm_fd);
> >  void igt_display_fini(igt_display_t *display);
> >  void igt_display_reset(igt_display_t *display);
> > @@ -834,4 +842,7 @@ static inline bool igt_vblank_before(uint32_t a, uint32_t b)
> >  	return igt_vblank_after(b, a);
> >  }
> >  
> > +void igt_parse_connector_tile_blob(drmModePropertyBlobPtr blob,
> > +		igt_tile_info_t *tile);
> > +
> >  #endif /* __IGT_KMS_H__ */
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser
  2019-09-09  3:49     ` Manasi Navare
@ 2019-09-09 10:41       ` Ser, Simon
  0 siblings, 0 replies; 34+ messages in thread
From: Ser, Simon @ 2019-09-09 10:41 UTC (permalink / raw)
  To: Navare, Manasi D; +Cc: igt-dev, madhumitha.tp, Latvala, Petri

On Sun, 2019-09-08 at 20:49 -0700, Manasi Navare wrote:
> Hi Simon,
> 
> Is this good to get merged?

Yes!

> Regards
> Manasi
> 
> On Tue, Aug 27, 2019 at 12:33:45AM -0700, Ser, Simon wrote:
> > On Fri, 2019-08-23 at 11:23 -0700, Madhumitha Tolakanahalli Pradeep wrote:
> > > The tile property parser parses the connector tile property obtained
> > > from connector's Display ID block and set per connector.
> > > 
> > > v2: Minor style changes (Simon)
> > > 
> > > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > > Cc: Petri Latvala <petri.latvala@intel.com>
> > > Cc: Simon Ser <simon.ser@intel.com>
> > > 
> > > Cc: <madhumitha.tp@gmail.com>
> > > 
> > > Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> > 
> > This is still:
> > 
> > Reviewed-by: Simon Ser <simon.ser@intel.com>
> > 
> > > ---
> > >  lib/igt_kms.c | 29 +++++++++++++++++++++++++++++
> > >  lib/igt_kms.h | 11 +++++++++++
> > >  2 files changed, 40 insertions(+)
> > > 
> > > diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> > > index 17a7d2b6..dc0f810d 100644
> > > --- a/lib/igt_kms.c
> > > +++ b/lib/igt_kms.c
> > > @@ -4515,3 +4515,32 @@ bool igt_display_has_format_mod(igt_display_t *display, uint32_t format,
> > >  
> > >  	return false;
> > >  }
> > > +
> > > +/**
> > > + * igt_parse_connector_tile_blob:
> > > + * @blob: pointer to the connector's tile properties
> > > + * @tile: pointer to tile structure that is populated by the function
> > > + *
> > > + * Parses the connector tile blob to extract the tile information.
> > > + * The blob information is exposed from drm/drm_connector.c in the kernel.
> > > + * The format of the tile property is defined in the kernel as char tile[256]
> > > + * that consists of 8 integers that are ':' separated.
> > > + *
> > > + */
> > > +
> > > +void igt_parse_connector_tile_blob(drmModePropertyBlobPtr blob,
> > > +		igt_tile_info_t *tile)
> > > +{
> > > +	char *blob_data = blob->data;
> > > +
> > > +	igt_assert(blob);
> > > +
> > > +	tile->tile_group_id = atoi(strtok(blob_data, ":"));
> > > +	tile->tile_is_single_monitor = atoi(strtok(NULL, ":"));
> > > +	tile->num_h_tile = atoi(strtok(NULL, ":"));
> > > +	tile->num_v_tile = atoi(strtok(NULL, ":"));
> > > +	tile->tile_h_loc = atoi(strtok(NULL, ":"));
> > > +	tile->tile_v_loc = atoi(strtok(NULL, ":"));
> > > +	tile->tile_h_size = atoi(strtok(NULL, ":"));
> > > +	tile->tile_v_size = atoi(strtok(NULL, ":"));
> > > +}
> > > diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> > > index 56481fd1..aebb4d31 100644
> > > --- a/lib/igt_kms.h
> > > +++ b/lib/igt_kms.h
> > > @@ -390,6 +390,14 @@ struct igt_display {
> > >  	int format_mod_count;
> > >  };
> > >  
> > > +typedef struct {
> > > +	int tile_group_id;
> > > +	bool tile_is_single_monitor;
> > > +	uint8_t num_h_tile, num_v_tile;
> > > +	uint8_t tile_h_loc, tile_v_loc;
> > > +	uint16_t tile_h_size, tile_v_size;
> > > +} igt_tile_info_t;
> > > +
> > >  void igt_display_require(igt_display_t *display, int drm_fd);
> > >  void igt_display_fini(igt_display_t *display);
> > >  void igt_display_reset(igt_display_t *display);
> > > @@ -834,4 +842,7 @@ static inline bool igt_vblank_before(uint32_t a, uint32_t b)
> > >  	return igt_vblank_after(b, a);
> > >  }
> > >  
> > > +void igt_parse_connector_tile_blob(drmModePropertyBlobPtr blob,
> > > +		igt_tile_info_t *tile);
> > > +
> > >  #endif /* __IGT_KMS_H__ */
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser
  2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser Madhumitha Tolakanahalli Pradeep
  2019-08-27  7:33   ` Ser, Simon
@ 2019-09-09 20:06   ` Manasi Navare
  1 sibling, 0 replies; 34+ messages in thread
From: Manasi Navare @ 2019-09-09 20:06 UTC (permalink / raw)
  To: Madhumitha Tolakanahalli Pradeep; +Cc: igt-dev, madhumitha.tp, Petri Latvala


Thanks for the patch and the review, merged to IGT

Regards
Manasi

On Fri, Aug 23, 2019 at 11:23:50AM -0700, Madhumitha Tolakanahalli Pradeep wrote:
> The tile property parser parses the connector tile property obtained
> from connector's Display ID block and set per connector.
> 
> v2: Minor style changes (Simon)
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Simon Ser <simon.ser@intel.com>
> 
> Cc: <madhumitha.tp@gmail.com>
> 
> Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> ---
>  lib/igt_kms.c | 29 +++++++++++++++++++++++++++++
>  lib/igt_kms.h | 11 +++++++++++
>  2 files changed, 40 insertions(+)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 17a7d2b6..dc0f810d 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -4515,3 +4515,32 @@ bool igt_display_has_format_mod(igt_display_t *display, uint32_t format,
>  
>  	return false;
>  }
> +
> +/**
> + * igt_parse_connector_tile_blob:
> + * @blob: pointer to the connector's tile properties
> + * @tile: pointer to tile structure that is populated by the function
> + *
> + * Parses the connector tile blob to extract the tile information.
> + * The blob information is exposed from drm/drm_connector.c in the kernel.
> + * The format of the tile property is defined in the kernel as char tile[256]
> + * that consists of 8 integers that are ':' separated.
> + *
> + */
> +
> +void igt_parse_connector_tile_blob(drmModePropertyBlobPtr blob,
> +		igt_tile_info_t *tile)
> +{
> +	char *blob_data = blob->data;
> +
> +	igt_assert(blob);
> +
> +	tile->tile_group_id = atoi(strtok(blob_data, ":"));
> +	tile->tile_is_single_monitor = atoi(strtok(NULL, ":"));
> +	tile->num_h_tile = atoi(strtok(NULL, ":"));
> +	tile->num_v_tile = atoi(strtok(NULL, ":"));
> +	tile->tile_h_loc = atoi(strtok(NULL, ":"));
> +	tile->tile_v_loc = atoi(strtok(NULL, ":"));
> +	tile->tile_h_size = atoi(strtok(NULL, ":"));
> +	tile->tile_v_size = atoi(strtok(NULL, ":"));
> +}
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 56481fd1..aebb4d31 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -390,6 +390,14 @@ struct igt_display {
>  	int format_mod_count;
>  };
>  
> +typedef struct {
> +	int tile_group_id;
> +	bool tile_is_single_monitor;
> +	uint8_t num_h_tile, num_v_tile;
> +	uint8_t tile_h_loc, tile_v_loc;
> +	uint16_t tile_h_size, tile_v_size;
> +} igt_tile_info_t;
> +
>  void igt_display_require(igt_display_t *display, int drm_fd);
>  void igt_display_fini(igt_display_t *display);
>  void igt_display_reset(igt_display_t *display);
> @@ -834,4 +842,7 @@ static inline bool igt_vblank_before(uint32_t a, uint32_t b)
>  	return igt_vblank_after(b, a);
>  }
>  
> +void igt_parse_connector_tile_blob(drmModePropertyBlobPtr blob,
> +		igt_tile_info_t *tile);
> +
>  #endif /* __IGT_KMS_H__ */
> -- 
> 2.17.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-08-30 11:39       ` Ser, Simon
@ 2019-09-12  0:47         ` Manasi Navare
  2019-09-12 12:51           ` Ser, Simon
  0 siblings, 1 reply; 34+ messages in thread
From: Manasi Navare @ 2019-09-12  0:47 UTC (permalink / raw)
  To: Ser, Simon; +Cc: igt-dev, madhumitha.tp, Latvala, Petri

On Fri, Aug 30, 2019 at 04:39:53AM -0700, Ser, Simon wrote:
> On Tue, 2019-08-27 at 14:29 -0700, Manasi Navare wrote:
> > On Tue, Aug 27, 2019 at 03:49:38AM -0700, Ser, Simon wrote:
> > > Thanks for the new version! Here are some more comments. Some of them
> > > are nits, some of them are more serious questions. Feel free to let me
> > > know if I'm mistaken or if you don't understand one of them.
> > 
> > Thanks for the review comments Simon. I will be working on addressing the following
> > review comments and will take over this patch since Madhumitha's internship has ended.
> > I really appreciate all your help and feedback on this.
> > 
> > Please find my answers below:
> > 
> > > On Fri, 2019-08-23 at 11:23 -0700, Madhumitha Tolakanahalli Pradeep wrote:
> > > > This test validates the tiled DP displays to display a test pattern
> > > > seamlessly across the two tiles. It validates the transcoder port
> > > > sync feature on i915 to get a tearfree tiled display output.
> > > > 
> > > > Related kernel work patches-
> > > > https://patchwork.freedesktop.org/series/59837/#rev4.
> > > > 
> > > > This test can eventually be extended to cover tiled display support
> > > > on other connector types.
> > > > 
> > > > v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
> > > >     Minor style changes (Simon)
> > > >    Code clean-up and reordering
> > > > 
> > > > 
> > > > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > > > Cc: Petri Latvala <petri.latvala@intel.com>
> > > > Cc: Simon Ser <simon.ser@intel.com>
> > > > 
> > > > Cc: <madhumitha.tp@gmail.com>
> > > > 
> > > > Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> > > > ---
> > > >  tests/Makefile.sources       |   1 +
> > > >  tests/kms_dp_tiled_display.c | 346 +++++++++++++++++++++++++++++++++++
> > > >  tests/meson.build            |   1 +
> > > >  3 files changed, 348 insertions(+)
> > > >  create mode 100644 tests/kms_dp_tiled_display.c
> > > > 
> > > > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > > > index c02e4d94..7561ab9b 100644
> > > > --- a/tests/Makefile.sources
> > > > +++ b/tests/Makefile.sources
> > > > @@ -41,6 +41,7 @@ TESTS_progs = \
> > > >  	kms_cursor_edge_walk \
> > > >  	kms_cursor_legacy \
> > > >  	kms_dp_dsc \
> > > > +	kms_dp_tiled_display \
> > > >  	kms_draw_crc \
> > > >  	kms_fbcon_fbt \
> > > >  	kms_fence_pin_leak \
> > > > diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> > > > new file mode 100644
> > > > index 00000000..162fbdd9
> > > > --- /dev/null
> > > > +++ b/tests/kms_dp_tiled_display.c
> > > > @@ -0,0 +1,346 @@
> > > > +/*
> > > > + * 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:
> > > > + *  Madhumitha Tolakanahalli Pradeep
> > > > + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> > > > + *
> > > > + * Display Port Tiled Display Test
> > > > + * This test parses the tile information of the connectors that have TILE
> > > > + * property set, sets up the framebuffer with correct offsets corresponding to
> > > > + * the tile offsets and does an atomic modeset with two CRTCs for two
> > > > + * connectors. Page flip event timestamp from each CRTC is collected and
> > > > + * compared to make sure that they occurred in a synchronous manner.
> > > > + *
> > > > + * This test currently supports only horizontally tiled displays, in line with
> > > > + * the displays supported by the kernel at the moment.
> > > > + */
> > > > +
> > > > +#include "igt.h"
> > > > +#include "poll.h"
> > > > +#include "drm_mode.h"
> > > > +#include "drm_fourcc.h"
> > > > +
> > > > +IGT_TEST_DESCRIPTION("Test for Display Port Tiled Displays");
> > > > +
> > > > +typedef struct {
> > > > +	int drm_fd;
> > > > +	int num_h_tiles;
> > > > +	igt_display_t *display;
> > > > +	enum igt_commit_style commit;
> > > > +} data_t;
> > > > +
> > > > +typedef struct {
> > > > +	igt_output_t *output;
> > > > +	igt_tile_info_t tile;
> > > > +	igt_fb_t fb_test_pattern;
> > > > +	enum pipe pipe;
> > > > +	enum igt_commit_style commit;
> > > > +	drmModeConnectorPtr connector;
> > > > +} data_connector_t;
> > > > +
> > > > +static int drm_property_is_tile(drmModePropertyPtr prop)
> > > > +{
> > > > +	return (strcmp(prop->name , "TILE") ? 0 : 1) &&
> > > > +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> > > > +}
> > > > +
> > > > +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> > > > +		igt_tile_info_t *tile)
> > > > +{
> > > > +	int i = 0;
> > > > +	drmModePropertyPtr prop;
> > > > +	drmModePropertyBlobPtr blob;
> > > > +
> > > > +	for (i = 0; i < conn->count_props; i++) {
> > > > +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> > > > +
> > > > +		igt_assert(prop);
> > > > +
> > > > +		if (!drm_property_is_tile(prop))
> > > > +			continue;
> > > 
> > > This branch leaks prop.
> > 
> > Freeing prop here before continuing shd fix this, will fix this in the next rev
> > 
> > > > +		blob = drmModeGetPropertyBlob(data->drm_fd,
> > > > +				conn->prop_values[i]);
> > > > +
> > > > +		if (!blob)
> > > > +			return;
> > > 
> > > This branch leaks prop.
> > 
> > Agree, will add drmModeFreePropertyBlob(blob); before return
> > 
> > > > +		igt_parse_connector_tile_blob(blob, tile);
> > > > +		break;
> > > > +	}
> > > > +
> > > > +	drmModeFreeProperty(prop);
> > > > +	drmModeFreePropertyBlob(blob);
> > > > +}
> > > > +
> > > > +static void get_number_of_h_tiles(data_t *data)
> > > > +{
> > > > +	int i;
> > > > +	drmModeResPtr res;
> > > > +	drmModeConnectorPtr connector;
> > > > +	igt_tile_info_t tile = {.num_h_tile = 0};
> > > > +
> > > > +	igt_assert(res = drmModeGetResources(data->drm_fd));
> > > > +
> > > > +	for (i = 0; i < res->count_connectors; i++) {
> > > > +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> > > > +				res->connectors[i]);
> > > > +
> > > > +		igt_assert(connector);
> > > > +
> > > > +		if (!(connector->connection == DRM_MODE_CONNECTED &&
> > > > +			connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort))
> > > > +			continue;
> > > 
> > > This can be simplified to
> > > 
> > >     connection != DRM_MODE_CONNECTED ||
> > >     connector_type != DRM_MODE_CONNECTOR_DisplayPort
> > 
> > Yes will simplify in the next rev
> > 
> > > Additionally, this branch leaks the connector.
> > 
> > Hmm, so call drmModeFreeConnector(connector); before continuing shd be followed in general throughout
> > the code right?
> 
> Yeah, that would fix it.
> 
> > > > +		get_connector_tile_props(data, connector, &tile);
> > > > +		data->num_h_tiles = tile.num_h_tile;
> > > > +		break;
> > > > +	}
> > > > +
> > > > +	drmModeFreeResources(res);
> > > > +	drmModeFreeConnector(connector);
> > > > +}
> > > > +
> > > > +static void get_connector(data_t *data, data_connector_t *conn)
> > > 
> > > Nit: since this fills all connectors, maybe it should be named
> > > get_connectors (with an s). Also it's not clear that conn refers to an
> > > array of connectors, maybe it should be renamed to conns.
> > 
> > Yes I agree that will make it more readable, I will fix it in next rev
> > 
> > > (Applies to the whole patch)
> > > 
> > > > +{
> > > > +	int count = 0;
> > > > +	igt_output_t *output;
> > > > +
> > > > +	for_each_connected_output(data->display, output) {
> > > > +		conn[count].connector = drmModeGetConnector(data->display->drm_fd,
> > > > +						output->id);
> > > > +
> > > > +		igt_assert(conn[count].connector);
> > > > +
> > > > +		if (!(conn[count].connector->connector_type ==
> > > > +			DRM_MODE_CONNECTOR_DisplayPort))
> > > > +			continue;
> > > 
> > > This can be simplified to
> > > 
> > >     if (connector_type != DRM_MODE_CONNECTOR_DisplayPort)
> > > 
> > > Additionally, this branch leaks the connector.
> > > 
> > > > +		get_connector_tile_props(data, conn[count].connector,
> > > > +			&conn[count].tile);
> > > > +
> > > > +		/* Check if the connectors belong to the same tile group */
> > > > +		if (count > 0)
> > > > +			igt_assert(conn[count].tile.tile_group_id ==
> > > > +				conn[count-1].tile.tile_group_id);
> > > > +
> > > > +		count++;
> > > > +	}
> > > > +}
> > > > +
> > > > +static void
> > > > +reset_framebuffer(int drm_fd, igt_output_t *output, igt_fb_t *fb)
> > > > +{
> > > > +	igt_plane_t *primary;
> > > > +
> > > > +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > > > +	igt_plane_set_fb(primary, NULL);
> > > > +	igt_remove_fb(drm_fd, fb);
> > > > +}
> > > > +
> > > > +static void reset_output(igt_output_t *output)
> > > > +{
> > > > +	igt_output_set_pipe(output, PIPE_NONE);
> > > > +}
> > > > +
> > > > +static void test_cleanup(data_t *data, data_connector_t *conn)
> > > > +{
> > > > +	int count;
> > > > +
> > > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > > +		if (conn[count].output) {
> > > > +			reset_framebuffer(data->drm_fd, conn[count].output,
> > > > +				&conn[count].fb_test_pattern);
> > > > +			reset_output(conn[count].output);
> > > > +		}
> > > > +	}
> > > > +	igt_display_commit2(data->display, data->commit);
> > > > +}
> > > > +
> > > > +static void setup_mode(data_t *data, data_connector_t *conn_data)
> > > 
> > > This function doesn't actually setup the output mode, it only sets up
> > > the pipe. Is this an overlook?
> > 
> > yes we just set the pipe/CRTC here and the atomic commit call does a complete
> > modeset with check and commit without any output since we didnt setup fb yet.
> > But I agree that calling it just setup_pipe robably makes it more intuitive
> 
> Oh, I forgot that igt_output_set_pipe also sets the mode.
> 
> > > > +{
> > > > +	int count = 0;
> > > > +	enum pipe pipe;
> > > > +	igt_output_t *output;
> > > > +
> > > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > > +		output = igt_output_from_connector(data->display,
> > > > +				conn_data[count].connector);
> > > > +
> > > > +		/*
> > > > +		 * The output is set to PIPE_NONE and then assigned a pipe.
> > > > +		 * This is done to ensure a complete modeset occures every
> > > > +		 * time the test is run.
> > > > +		 */
> > > > +		reset_output(output);
> > > 
> > > Is this necessary?
> > 
> > Yes this is necessary to force a complete modeset for each test since if the pipe
> > assignments or the mode has not changed it will not set needs_modeset flag in side kernel
> > and will not do a full atomic check and commit.
> 
> Hmm, why do we need to do a new modeset? If the mode is already set to
> what we want, no need for this?
> 
> (Sorry, I'm unfamiliar with the kernel side of things!)
> 
> > > > +		for_each_pipe(data->display, pipe) {
> > > > +			if (count > 0 && pipe == conn_data[count-1].pipe)
> > > > +				continue;
> > > > +
> > > > +			if (igt_pipe_connector_valid(pipe, output)) {
> > > > +
> > > > +				conn_data[count].pipe = pipe;
> > > > +				conn_data[count].output = output;
> > > > +
> > > > +				igt_output_set_pipe(conn_data[count].output,
> > > > +					conn_data[count].pipe);
> > > > +				break;
> > > > +			}
> > > > +		}
> > > > +	}
> > > > +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> > > > +		NULL);
> > > > +}
> > > > +
> > > > +static void setup_framebuffer(data_t *data, data_connector_t *conn)
> > > > +{
> > > > +	int count;
> > > > +	igt_plane_t *primary;
> > > > +
> > > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > > +
> > > > +		igt_create_pattern_fb(data->drm_fd,
> > > > +			(conn[count].tile.tile_h_size *
> > > > +			data->num_h_tiles),
> > > 
> > > Do we need to multiply by the number of horizontal tiles here? It seems
> > > we only use the first tile_h_size pixels of the buffer. Am I missing
> > > something?
> > > 
> > 
> > Yes we only use the tile_h_size of the buffer at the proper offset of tile_h_loc
> > So this below logic shd be modified to only create fb of the size tile_h_size if its in the for loop
> > or just create one fb outside the loop of the size tile_h_size * num_tiles and then just use that with dfferent
> > offsets for two CRTCs
> > 
> > When I discussed this on dri-devel, people said that real userspace can decide to do either one single fb for all tiles
> > or separate ones where each is of the size equal to tile size.
> > 
> > Let me know if there is a preference
> 
> As a userspace dev, I'd say a single FB would be a little bit more
> realistic, but yeah I guess userspace could use two FBs as well. No big
> deal, I'm fine with both.
> 
> > > But maybe a test that would better reflect reality would create a
> > > single framebuffer for all tiled displays, to display a single image
> > > across all of them?
> > > 
> > > > +			conn[count].tile.tile_v_size,
> > > > +			DRM_FORMAT_XBGR8888,
> > > > +			LOCAL_DRM_FORMAT_MOD_NONE,
> > > > +			&conn[count].fb_test_pattern);
> > > > +
> > > > +		primary = igt_output_get_plane_type(conn[count].output,
> > > > +				DRM_PLANE_TYPE_PRIMARY);
> > > > +
> > > > +		igt_plane_set_fb(primary, &conn[count].fb_test_pattern);
> > > > +
> > > > +		igt_fb_set_size(&conn[count].fb_test_pattern, primary,
> > > > +				conn[count].tile.tile_h_size,
> > > > +				conn[count].tile.tile_v_size);
> > > > +
> > > > +		igt_fb_set_position(&conn[count].fb_test_pattern, primary,
> > > > +				(conn[count].tile.tile_h_size *
> > > > +				conn[count].tile.tile_h_loc),
> > > > +				(conn[count].tile.tile_v_size *
> > > > +				conn[count].tile.tile_v_loc));
> > > > +
> > > > +		igt_plane_set_size(primary,
> > > > +				conn[count].tile.tile_h_size,
> > > > +				conn[count].tile.tile_v_size);
> > > > +	}
> > > > +}
> > > > +
> > > > +static void page_flip_handler(int fd, unsigned int seq,
> > > > +		unsigned int tv_sec, unsigned int tv_usec,
> > > > +		unsigned int crtc_id, void *data)
> > > > +{
> > > > +	bool expr = false;
> > > > +	static unsigned int _tv_sec, _tv_usec;
> > > > +
> > > > +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> > > > +		tv_sec, tv_usec);
> > > 
> > > We should also make sure we receive exactly one page-flip per CRTC.
> > > Currently we don't use crtc_id (apart from logging purposes).
> > 
> > I see so somehow have a static count of events and make sure per crtc id its the same count or
> > some similar logic
> 
> Yeah. We could for instance add a "bool got_page_flip" field in our
> data_connector_t struct and set it to true here (making sure it's not
> set to true already).
> 
> A pointer can be passed to page_flip_handler via the data argument.

I didnt understand what you meant by passing a pointer to page_flip_handler
via the data argument?
I looked through the drmHandleEvent definition and it populates the void *data
in page_flip_handler with vblank->user_data
So its not clear to me how we can pass our data_connector_t -> got_page_flip_bool to page_flip_handler
and set that to true here.

I have all the other changes done, so in my revision that I am about to send all the changes except for
this check to double check number of page flip events == num_h_tiles is missing.

Also i observed that since the events are queued, it calls the page flip handler twice in the first wait_for_page_flip() call
so even if i loop it the number of times = number of connectors, it calls page flip handler twice for the first loop
and then doesnt call page flip handler teh second time.

So I am skipping that looping part as well.

Please let me know your thoughts and I look forward to your review on teh new revision I am sending today.

Manasi

> 
> > > > +	/* Skip the following checks for the first page flip event */
> > > > +	if (_tv_sec == 0 || _tv_usec == 0) {
> > > > +		_tv_sec = tv_sec;
> > > > +		_tv_usec = tv_usec;
> > > > +		return;
> > > > +	}
> > > > +
> > > > +	/*
> > > > +	 * For seamless tear-free display, the page flip event timestamps
> > > > +	 * from all the tiles should not differ by more than 10us.
> > > > +	 */
> > > > +	expr = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> > > 
> > > Nit: this could be renamed to e.g. is_on_time, expr is a pretty vague
> > > name.
> > 
> > yes agree will rename to make it more readable
> > 
> > > > +	igt_fail_on_f(!expr, "Delayed page flip event from CRTC:%d at %u:%u\n",
> > > > +		crtc_id, tv_sec, tv_usec);
> > > > +
> > > > +	if (tv_sec < _tv_sec)
> > > > +		_tv_sec = tv_sec;
> > > > +	if (tv_usec < _tv_usec)
> > > > +		_tv_usec = tv_usec;
> > > 
> > > This updates the timestamp on each page-flip. This means that the first
> > > and last page-flips could be delayed by more than 10µs if there are
> > > intermediate page-flips. For instance, if the first page-flip happens
> > > at t=0µs and the second one happens at t=9µs, the last one could happen
> > > at t=18µs without making this test fails. Is this something we want to
> > > allow?
> > 
> > Nope all of them should happen within the same vblank so the diff between all
> > should be <10us, will have to modify the logic to do that.
> > 
> > so basically instead of making <10us condition for the consecutive ones, it should be between the first one
> > and all other events, correct?
> 
> Correct! So we can just drop these 4 lines, that should do it.
> 
> > > > +}
> > > > +
> > > > +static void wait_for_pageflip(int drm_fd)
> > > > +{
> > > > +	struct pollfd pfd;
> > > > +	drmEventContext drm_event;
> > > 
> > > Nit: to make sure garbage isn't read from this struct (there are other
> > > function pointers), it's probably safer to zero-fill it (= {0}).
> > 
> > Got it
> > 
> > > > +	drm_event.version = 3;
> > > > +	drm_event.page_flip_handler2 = page_flip_handler;
> > > > +
> > > > +	pfd.fd = drm_fd;
> > > > +	pfd.events = POLLIN;
> > > > +	pfd.revents = 0;
> > > > +
> > > > +	poll(&pfd, 1, 1000);
> > > 
> > > Maybe we should check poll(2)'s return value?
> > 
> > poll(2)? Or just check return value of the function poll() just for error handling?
> 
> Yes, just in case.
> 
> (As a side note, poll(2) simply means "the poll system call" and refers
> to poll's syscall manpage section.)
> 
> > > > +	if (pfd.revents & POLLIN)
> > > > +		drmHandleEvent(drm_fd, &drm_event);
> > > 
> > > If we don't get POLLIN (e.g. if we timeout), wait_for_pageflip will
> > > silently do nothing, and the test will pass. Instead, we probably want
> > > to fail in this case.
> > 
> > Yes thats correct, just add else case with igt_assert?
> 
> Yes!
> 
> > > > +}
> > > > +
> > > > +igt_main
> > > > +{
> > > > +	igt_display_t display;
> > > > +	data_connector_t *conn_data = NULL;
> > > > +	data_t data = {.drm_fd = 0, .num_h_tiles = 0,
> > > > +		       .display = NULL, .commit = COMMIT_LEGACY};
> > > 
> > > Nit: one can just do assign to {0} to zero-fill the struct.
> > 
> > Got it
> > 
> > > > +	igt_fixture {
> > > > +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > > > +
> > > > +		kmstest_set_vt_graphics_mode();
> > > > +		igt_display_require(&display, data.drm_fd);
> > > > +		igt_display_reset(&display);
> > > > +
> > > > +		data.display = &display;
> > > > +
> > > > +		get_number_of_h_tiles(&data);
> > > > +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> > > > +
> > > > +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> > > 
> > > Should we try to run this test at all on drivers that don't support
> > > atomic?
> > > 
> > > If the driver doesn't support atomic, user-space will submit two page-
> > > flip requests. However it's possible that the hardware executes a page-
> > > flip between both requests: user-space calls the first drmModePageFlip,
> > > the vblank for this particular CRTC triggers, then user-space calls the
> > > second drmModePageFlip. Page-flips will be out-of-sync by one frame.
> > 
> > Hmm, yea should probbaly have igt_require on atomic
> > 
> > > > +		if (data.num_h_tiles > 0)
> > > > +			conn_data = malloc(data.num_h_tiles * sizeof(data_connector_t));
> > > > +	}
> > > > +
> > > > +	igt_subtest("basic-test-pattern") {
> > > > +		igt_skip_on(data.num_h_tiles == 0);
> > > > +		igt_assert(conn_data);
> > > > +
> > > > +		get_connector(&data, conn_data);
> > > > +		setup_mode(&data, conn_data);
> > > > +		setup_framebuffer(&data, conn_data);
> > > > +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> > > > +			DRM_MODE_PAGE_FLIP_EVENT, NULL);
> > > > +		wait_for_pageflip(data.drm_fd);
> > > 
> > > Here we only wait for a single page-flip. This will only stash the
> > > timestamp of the frst page-flip without checking the time-stamp of
> > > subsequent page-flips. We should wait for as many page-flips as enabled
> > > tiled connectors.
> > 
> > That was our initial understanding as well, but with just one wait_for_pageflip call we
> > were geting two page flip events for two tiles
> > Do we need to call wait for page flip explicitly the number of times = number of tiles?
> 
> Oh, I see. So it seems two events are queued. Then we should probably
> loop until we have a page-flip for all CRTCs, since there's no
> guarantee all events will be sent at once.
> 
> > Regards
> > Manasi
> > 
> > > > +		test_cleanup(&data, conn_data);
> > > > +	}
> > > > +
> > > > +	igt_fixture {
> > > > +		free(conn_data);
> > > > +		close(data.drm_fd);
> > > > +		kmstest_restore_vt_mode();
> > > > +		igt_display_fini(data.display);
> > > > +	}
> > > > +}
> > > > diff --git a/tests/meson.build b/tests/meson.build
> > > > index a7b2b322..50292df8 100644
> > > > --- a/tests/meson.build
> > > > +++ b/tests/meson.build
> > > > @@ -26,6 +26,7 @@ test_progs = [
> > > >  	'kms_cursor_edge_walk',
> > > >  	'kms_cursor_legacy',
> > > >  	'kms_dp_dsc',
> > > > +	'kms_dp_tiled_display',
> > > >  	'kms_draw_crc',
> > > >  	'kms_fbcon_fbt',
> > > >  	'kms_fence_pin_leak',
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v3] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays Madhumitha Tolakanahalli Pradeep
  2019-08-27 10:49   ` Ser, Simon
@ 2019-09-12  1:31   ` Manasi Navare
  2019-09-12 23:28     ` [igt-dev] [PATCH i-g-t v4] " Manasi Navare
  1 sibling, 1 reply; 34+ messages in thread
From: Manasi Navare @ 2019-09-12  1:31 UTC (permalink / raw)
  To: igt-dev; +Cc: madhumitha.tp, Petri Latvala

From: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>

This test validates the tiled DP displays to display a test pattern
seamlessly across the two tiles. It validates the transcoder port
sync feature on i915 to get a tearfree tiled display output.

Related kernel work patches-
https://patchwork.freedesktop.org/series/66403/

This test can eventually be extended to cover tiled display support
on other connector types.

v3:
* Fix the pointer leaks (Simon)
* Code indentation (Manasi)
* Compare two consecutive flip timestamps (Simon)
* Use single fb across tiles (Simon)
* Fix reset mode logic (Manasi)

v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
    Minor style changes (Simon)
   Code clean-up and reordering

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Simon Ser <simon.ser@intel.com>
Cc: <madhumitha.tp@gmail.com>
Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 tests/Makefile.sources       |   1 +
 tests/kms_dp_tiled_display.c | 377 +++++++++++++++++++++++++++++++++++
 tests/meson.build            |   1 +
 3 files changed, 379 insertions(+)
 create mode 100644 tests/kms_dp_tiled_display.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c02e4d94..7561ab9b 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -41,6 +41,7 @@ TESTS_progs = \
 	kms_cursor_edge_walk \
 	kms_cursor_legacy \
 	kms_dp_dsc \
+	kms_dp_tiled_display \
 	kms_draw_crc \
 	kms_fbcon_fbt \
 	kms_fence_pin_leak \
diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
new file mode 100644
index 00000000..de2662d4
--- /dev/null
+++ b/tests/kms_dp_tiled_display.c
@@ -0,0 +1,377 @@
+/*
+ * 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:
+ *  Madhumitha Tolakanahalli Pradeep
+ *      <madhumitha.tolakanahalli.pradeep@intel.com>
+ *  Manasi Navare <manasi.d.navare@intel.com>
+ *
+ * Display Port Tiled Display Test
+ * This test parses the tile information of the connectors that have TILE
+ * property set, sets up the framebuffer with correct offsets corresponding to
+ * the tile offsets and does an atomic modeset with two CRTCs for two
+ * connectors. Page flip event timestamp from each CRTC is collected and
+ * compared to make sure that they occurred in a synchronous manner.
+ *
+ * This test currently supports only horizontally tiled displays, in line with
+ * the displays supported by the kernel at the moment.
+ */
+
+#include "igt.h"
+#include "poll.h"
+#include "drm_mode.h"
+#include "drm_fourcc.h"
+
+IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
+
+typedef struct {
+	int drm_fd;
+	int num_h_tiles;
+	igt_fb_t fb_test_pattern;
+	igt_display_t *display;
+	enum igt_commit_style commit;
+} data_t;
+
+typedef struct {
+	igt_output_t *output;
+	igt_tile_info_t tile;
+	enum pipe pipe;
+	enum igt_commit_style commit;
+	drmModeConnectorPtr connector;
+} data_connector_t;
+
+static int drm_property_is_tile(drmModePropertyPtr prop)
+{
+	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
+			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
+}
+
+static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
+		igt_tile_info_t *tile)
+{
+	int i = 0;
+	drmModePropertyPtr prop;
+	drmModePropertyBlobPtr blob;
+
+	for (i = 0; i < conn->count_props; i++) {
+		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
+
+		igt_assert(prop);
+
+		if (!drm_property_is_tile(prop)) {
+			drmModeFreeProperty(prop);
+			continue;
+		}
+
+		blob = drmModeGetPropertyBlob(data->drm_fd,
+				conn->prop_values[i]);
+
+		if (!blob)
+			goto cleanup;
+
+		igt_parse_connector_tile_blob(blob, tile);
+		break;
+	}
+
+cleanup:
+	drmModeFreeProperty(prop);
+	drmModeFreePropertyBlob(blob);
+}
+
+static void get_number_of_h_tiles(data_t *data)
+{
+	int i;
+	drmModeResPtr res;
+	drmModeConnectorPtr connector;
+	igt_tile_info_t tile = {.num_h_tile = 0};
+
+	igt_assert(res = drmModeGetResources(data->drm_fd));
+
+	for (i = 0; i < res->count_connectors; i++) {
+		connector = drmModeGetConnectorCurrent(data->drm_fd,
+				res->connectors[i]);
+
+		igt_assert(connector);
+
+		if (connector->connection != DRM_MODE_CONNECTED ||
+		    connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) {
+			drmModeFreeConnector(connector);
+			continue;
+		}
+
+		get_connector_tile_props(data, connector, &tile);
+		data->num_h_tiles = tile.num_h_tile;
+		break;
+	}
+
+	drmModeFreeResources(res);
+	drmModeFreeConnector(connector);
+}
+
+static void get_connectors(data_t *data, data_connector_t *conns)
+{
+	int count = 0;
+	igt_output_t *output;
+
+	for_each_connected_output(data->display, output) {
+		conns[count].connector = drmModeGetConnector(data->display->drm_fd,
+							     output->id);
+
+		igt_assert(conns[count].connector);
+
+		if (conns[count].connector->connector_type !=
+		    DRM_MODE_CONNECTOR_DisplayPort) {
+			drmModeFreeConnector(conns[count].connector);
+			continue;
+		}
+
+		get_connector_tile_props(data, conns[count].connector,
+					 &conns[count].tile);
+
+		/* Check if the connectors belong to the same tile group */
+		if (count > 0)
+			igt_assert(conns[count].tile.tile_group_id ==
+				   conns[count-1].tile.tile_group_id);
+
+		count++;
+	}
+}
+
+static void
+reset_plane(igt_output_t *output)
+{
+	igt_plane_t *primary;
+
+	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	igt_plane_set_fb(primary, NULL);
+}
+
+static void reset_output(igt_output_t *output)
+{
+	igt_output_set_pipe(output, PIPE_NONE);
+}
+
+static void reset_mode(data_t *data, data_connector_t *conns)
+{
+	int count;
+	igt_output_t *output;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		output = igt_output_from_connector(data->display,
+						   conns[count].connector);
+		igt_output_set_pipe(output, PIPE_NONE);
+	}
+	igt_display_commit2(data->display, data->commit);
+}
+
+static void test_cleanup(data_t *data, data_connector_t *conns)
+{
+	int count;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		if (conns[count].output) {
+			reset_plane(conns[count].output);
+			reset_output(conns[count].output);
+		}
+	}
+	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
+	igt_display_commit2(data->display, data->commit);
+}
+
+static void setup_mode(data_t *data, data_connector_t *conns)
+{
+	int count = 0;
+	enum pipe pipe;
+	igt_output_t *output;
+
+	/*
+	 * The output is set to PIPE_NONE and then assigned a pipe.
+	 * This is done to ensure a complete modeset occures every
+	 * time the test is run.
+	 */
+	reset_mode(data, conns);
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		output = igt_output_from_connector(data->display,
+						   conns[count].connector);
+
+		for_each_pipe(data->display, pipe) {
+			if (count > 0 && pipe == conns[count-1].pipe)
+				continue;
+
+			if (igt_pipe_connector_valid(pipe, output)) {
+
+				conns[count].pipe = pipe;
+				conns[count].output = output;
+
+				igt_output_set_pipe(conns[count].output,
+						    conns[count].pipe);
+				break;
+			}
+		}
+	}
+	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
+		NULL);
+}
+
+static void setup_framebuffer(data_t *data, data_connector_t *conns)
+{
+	int count;
+	igt_plane_t *primary;
+	int fb_h_size = 0, fb_v_size = 0;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+
+		fb_h_size += conns[count].tile.tile_h_size;
+		/* We support only horizontal tiles, so vertical size is same
+		 * for all tiles and needs to be assigned only once.
+		 */
+		if (!fb_v_size)
+			fb_v_size = conns[count].tile.tile_v_size;
+	}
+
+	igt_create_pattern_fb(data->drm_fd,
+			      fb_h_size,
+			      fb_v_size,
+			      DRM_FORMAT_XBGR8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE,
+			      &data->fb_test_pattern);
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+
+		primary = igt_output_get_plane_type(conns[count].output,
+						    DRM_PLANE_TYPE_PRIMARY);
+
+		igt_plane_set_fb(primary, &data->fb_test_pattern);
+
+		igt_fb_set_size(&data->fb_test_pattern, primary,
+				conns[count].tile.tile_h_size,
+				conns[count].tile.tile_v_size);
+
+		igt_fb_set_position(&data->fb_test_pattern, primary,
+				    (conns[count].tile.tile_h_size *
+				     conns[count].tile.tile_h_loc),
+				    (conns[count].tile.tile_v_size *
+				     conns[count].tile.tile_v_loc));
+
+		igt_plane_set_size(primary,
+				   conns[count].tile.tile_h_size,
+				   conns[count].tile.tile_v_size);
+	}
+}
+
+static void page_flip_handler(int fd, unsigned int seq,
+			      unsigned int tv_sec, unsigned int tv_usec,
+			      unsigned int crtc_id, void *data)
+{
+	bool is_on_time = false;
+	static unsigned int _tv_sec, _tv_usec;
+
+	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
+		  tv_sec, tv_usec);
+
+	/* Skip the following checks for the first page flip event */
+	if (_tv_sec == 0 || _tv_usec == 0) {
+		_tv_sec = tv_sec;
+		_tv_usec = tv_usec;
+		return;
+	}
+
+	/*
+	 * For seamless tear-free display, the page flip event timestamps
+	 * from all the tiles should not differ by more than 10us.
+	 */
+	is_on_time = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
+
+	igt_fail_on_f(!is_on_time, "Delayed page flip event from CRTC:%d at %u:%u\n",
+		      crtc_id, tv_sec, tv_usec);
+}
+
+static void wait_for_pageflip(int drm_fd)
+{
+	int rc;
+	struct pollfd pfd = {0};
+	drmEventContext drm_event;
+
+	drm_event.version = 3;
+	drm_event.page_flip_handler2 = page_flip_handler;
+
+	pfd.fd = drm_fd;
+	pfd.events = POLLIN;
+	pfd.revents = 0;
+
+	rc = poll(&pfd, 1, 1000);
+	igt_assert(rc > 0);
+
+	if (pfd.revents & POLLIN) {
+		rc = drmHandleEvent(drm_fd, &drm_event);
+		igt_assert_eq(rc, 0);
+	} else
+		igt_assert(0);
+}
+
+igt_main
+{
+	igt_display_t display;
+	data_connector_t *conn_data = NULL;
+	data_t data = {0};
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
+
+		kmstest_set_vt_graphics_mode();
+		igt_display_require(&display, data.drm_fd);
+		igt_display_reset(&display);
+
+		data.display = &display;
+
+		get_number_of_h_tiles(&data);
+		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
+
+		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
+
+		if (data.num_h_tiles > 0)
+			conn_data = malloc(data.num_h_tiles * sizeof(data_connector_t));
+	}
+
+	igt_subtest("basic-test-pattern") {
+		igt_skip_on(data.commit == COMMIT_LEGACY);
+		igt_skip_on(data.num_h_tiles == 0);
+		igt_assert(conn_data);
+
+		get_connectors(&data, conn_data);
+		setup_mode(&data, conn_data);
+		setup_framebuffer(&data, conn_data);
+		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
+			DRM_MODE_PAGE_FLIP_EVENT, NULL);
+		wait_for_pageflip(data.drm_fd);
+
+		test_cleanup(&data, conn_data);
+	}
+
+	igt_fixture {
+		free(conn_data);
+		close(data.drm_fd);
+		kmstest_restore_vt_mode();
+		igt_display_fini(data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index a7b2b322..50292df8 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -26,6 +26,7 @@ test_progs = [
 	'kms_cursor_edge_walk',
 	'kms_cursor_legacy',
 	'kms_dp_dsc',
+	'kms_dp_tiled_display',
 	'kms_draw_crc',
 	'kms_fbcon_fbt',
 	'kms_fence_pin_leak',
-- 
2.19.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev3)
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
                   ` (3 preceding siblings ...)
  2019-08-24 22:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-09-12  4:43 ` Patchwork
  2019-09-12  7:35 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2019-09-12  4:43 UTC (permalink / raw)
  To: Manasi Navare; +Cc: igt-dev

== Series Details ==

Series: Added tile property parser library function and IGT test for DP tiled displays (rev3)
URL   : https://patchwork.freedesktop.org/series/65652/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6874 -> IGTPW_3444
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_create@basic-files:
    - fi-icl-u3:          [PASS][1] -> [INCOMPLETE][2] ([fdo#107713] / [fdo#109100])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/fi-icl-u3/igt@gem_ctx_create@basic-files.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/fi-icl-u3/igt@gem_ctx_create@basic-files.html

  * igt@kms_busy@basic-flip-c:
    - fi-skl-6770hq:      [PASS][3] -> [SKIP][4] ([fdo#109271] / [fdo#109278]) +2 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/fi-skl-6770hq/igt@kms_busy@basic-flip-c.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/fi-skl-6770hq/igt@kms_busy@basic-flip-c.html

  * igt@kms_flip@basic-flip-vs-dpms:
    - fi-skl-6770hq:      [PASS][5] -> [SKIP][6] ([fdo#109271]) +23 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/fi-skl-6770hq/igt@kms_flip@basic-flip-vs-dpms.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/fi-skl-6770hq/igt@kms_flip@basic-flip-vs-dpms.html

  
#### Possible fixes ####

  * igt@gem_basic@create-fd-close:
    - fi-icl-u3:          [DMESG-WARN][7] ([fdo#107724]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/fi-icl-u3/igt@gem_basic@create-fd-close.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/fi-icl-u3/igt@gem_basic@create-fd-close.html

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-kbl-7500u:       [DMESG-WARN][9] ([fdo#105128] / [fdo#107139]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/fi-kbl-7500u/igt@gem_exec_suspend@basic-s4-devices.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/fi-kbl-7500u/igt@gem_exec_suspend@basic-s4-devices.html

  * igt@i915_selftest@live_execlists:
    - fi-skl-gvtdvm:      [DMESG-FAIL][11] ([fdo#111108]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-cfl-guc:         [INCOMPLETE][13] ([fdo#111514]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][15] ([fdo#111407]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

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

  [fdo#105128]: https://bugs.freedesktop.org/show_bug.cgi?id=105128
  [fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#111108]: https://bugs.freedesktop.org/show_bug.cgi?id=111108
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [fdo#111514]: https://bugs.freedesktop.org/show_bug.cgi?id=111514


Participating hosts (54 -> 46)
------------------------------

  Missing    (8): fi-ilk-m540 fi-bxt-dsi fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5178 -> IGTPW_3444

  CI-20190529: 20190529
  CI_DRM_6874: f9ee689ff55489da8db3cd5ddad533967c07561f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3444: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/
  IGT_5178: efb4539494d94f03374874d3b61bd04ef3802aaa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_dp_tiled_display@basic-test-pattern

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for Added tile property parser library function and IGT test for DP tiled displays (rev3)
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
                   ` (4 preceding siblings ...)
  2019-09-12  4:43 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev3) Patchwork
@ 2019-09-12  7:35 ` Patchwork
  2019-09-13  0:07 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev4) Patchwork
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2019-09-12  7:35 UTC (permalink / raw)
  To: Manasi Navare; +Cc: igt-dev

== Series Details ==

Series: Added tile property parser library function and IGT test for DP tiled displays (rev3)
URL   : https://patchwork.freedesktop.org/series/65652/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6874_full -> IGTPW_3444_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_dp_tiled_display@basic-test-pattern} (NEW):
    - shard-glk:          NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-glk6/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-hsw:          NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-hsw6/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-iclb:         NOTRUN -> [FAIL][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb6/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-snb:          NOTRUN -> [FAIL][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-snb5/igt@kms_dp_tiled_display@basic-test-pattern.html

  
New tests
---------

  New tests have been introduced between CI_DRM_6874_full and IGTPW_3444_full:

### New IGT tests (1) ###

  * igt@kms_dp_tiled_display@basic-test-pattern:
    - Statuses : 4 fail(s) 2 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_schedule@preempt-other-bsd1:
    - shard-iclb:         [PASS][5] -> [SKIP][6] ([fdo#109276]) +15 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-iclb2/igt@gem_exec_schedule@preempt-other-bsd1.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb8/igt@gem_exec_schedule@preempt-other-bsd1.html

  * igt@gem_exec_schedule@preempt-other-chain-bsd:
    - shard-iclb:         [PASS][7] -> [SKIP][8] ([fdo#111325]) +6 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-iclb8/igt@gem_exec_schedule@preempt-other-chain-bsd.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb2/igt@gem_exec_schedule@preempt-other-chain-bsd.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-kbl:          [PASS][9] -> [FAIL][10] ([fdo#103232])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-kbl3/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
    - shard-apl:          [PASS][11] -> [FAIL][12] ([fdo#103232])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-apl6/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-apl7/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-render:
    - shard-iclb:         [PASS][13] -> [FAIL][14] ([fdo#103167]) +7 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-render.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-apl:          [PASS][15] -> [FAIL][16] ([fdo#103167])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-apl1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-apl7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt.html
    - shard-glk:          [PASS][17] -> [FAIL][18] ([fdo#103167])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-glk5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-glk4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt.html
    - shard-kbl:          [PASS][19] -> [FAIL][20] ([fdo#103167])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-kbl2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-kbl3/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt.html

  * igt@kms_psr@psr2_cursor_mmap_gtt:
    - shard-iclb:         [PASS][21] -> [SKIP][22] ([fdo#109441])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_gtt.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb4/igt@kms_psr@psr2_cursor_mmap_gtt.html

  * igt@kms_setmode@basic:
    - shard-apl:          [PASS][23] -> [FAIL][24] ([fdo#99912])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-apl2/igt@kms_setmode@basic.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-apl6/igt@kms_setmode@basic.html

  
#### Possible fixes ####

  * igt@gem_ctx_shared@exec-single-timeline-bsd:
    - shard-iclb:         [SKIP][25] ([fdo#110841]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-iclb2/igt@gem_ctx_shared@exec-single-timeline-bsd.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb6/igt@gem_ctx_shared@exec-single-timeline-bsd.html

  * igt@gem_exec_schedule@preempt-bsd1:
    - shard-iclb:         [SKIP][27] ([fdo#109276]) -> [PASS][28] +16 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-iclb3/igt@gem_exec_schedule@preempt-bsd1.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb4/igt@gem_exec_schedule@preempt-bsd1.html

  * igt@gem_exec_schedule@preempt-other-bsd:
    - shard-iclb:         [SKIP][29] ([fdo#111325]) -> [PASS][30] +3 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-iclb2/igt@gem_exec_schedule@preempt-other-bsd.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb5/igt@gem_exec_schedule@preempt-other-bsd.html

  * igt@i915_suspend@debugfs-reader:
    - shard-apl:          [DMESG-WARN][31] ([fdo#108566]) -> [PASS][32] +5 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-apl6/igt@i915_suspend@debugfs-reader.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-apl3/igt@i915_suspend@debugfs-reader.html

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
    - shard-glk:          [FAIL][33] ([fdo#104873]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-glk1/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-glk7/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html

  * igt@kms_cursor_legacy@cursor-vs-flip-atomic:
    - shard-hsw:          [FAIL][35] ([fdo#103355]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-hsw6/igt@kms_cursor_legacy@cursor-vs-flip-atomic.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-hsw5/igt@kms_cursor_legacy@cursor-vs-flip-atomic.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt:
    - shard-iclb:         [FAIL][37] ([fdo#103167]) -> [PASS][38] +3 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [SKIP][39] ([fdo#109441]) -> [PASS][40] +2 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-iclb6/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@prime_busy@wait-hang-blt:
    - shard-hsw:          [INCOMPLETE][41] ([fdo#103540]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-hsw4/igt@prime_busy@wait-hang-blt.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-hsw1/igt@prime_busy@wait-hang-blt.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-isolation-bsd2:
    - shard-iclb:         [SKIP][43] ([fdo#109276]) -> [FAIL][44] ([fdo#111330])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6874/shard-iclb7/igt@gem_mocs_settings@mocs-isolation-bsd2.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/shard-iclb4/igt@gem_mocs_settings@mocs-isolation-bsd2.html

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (10 -> 6)
------------------------------

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


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5178 -> IGTPW_3444
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_6874: f9ee689ff55489da8db3cd5ddad533967c07561f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3444: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3444/
  IGT_5178: efb4539494d94f03374874d3b61bd04ef3802aaa @ 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_3444/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-12  0:47         ` Manasi Navare
@ 2019-09-12 12:51           ` Ser, Simon
  2019-09-12 23:23             ` Manasi Navare
  0 siblings, 1 reply; 34+ messages in thread
From: Ser, Simon @ 2019-09-12 12:51 UTC (permalink / raw)
  To: Navare, Manasi D; +Cc: igt-dev, madhumitha.tp, Latvala, Petri

On Wed, 2019-09-11 at 17:47 -0700, Manasi Navare wrote:
> On Fri, Aug 30, 2019 at 04:39:53AM -0700, Ser, Simon wrote:
> > On Tue, 2019-08-27 at 14:29 -0700, Manasi Navare wrote:
> > > On Tue, Aug 27, 2019 at 03:49:38AM -0700, Ser, Simon wrote:
> > > > Thanks for the new version! Here are some more comments. Some of them
> > > > are nits, some of them are more serious questions. Feel free to let me
> > > > know if I'm mistaken or if you don't understand one of them.
> > > 
> > > Thanks for the review comments Simon. I will be working on addressing the following
> > > review comments and will take over this patch since Madhumitha's internship has ended.
> > > I really appreciate all your help and feedback on this.
> > > 
> > > Please find my answers below:
> > > 
> > > > On Fri, 2019-08-23 at 11:23 -0700, Madhumitha Tolakanahalli Pradeep wrote:
> > > > > This test validates the tiled DP displays to display a test pattern
> > > > > seamlessly across the two tiles. It validates the transcoder port
> > > > > sync feature on i915 to get a tearfree tiled display output.
> > > > > 
> > > > > Related kernel work patches-
> > > > > https://patchwork.freedesktop.org/series/59837/#rev4.
> > > > > 
> > > > > This test can eventually be extended to cover tiled display support
> > > > > on other connector types.
> > > > > 
> > > > > v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
> > > > >     Minor style changes (Simon)
> > > > >    Code clean-up and reordering
> > > > > 
> > > > > 
> > > > > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > > > > Cc: Petri Latvala <petri.latvala@intel.com>
> > > > > Cc: Simon Ser <simon.ser@intel.com>
> > > > > 
> > > > > Cc: <madhumitha.tp@gmail.com>
> > > > > 
> > > > > Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> > > > > ---
> > > > >  tests/Makefile.sources       |   1 +
> > > > >  tests/kms_dp_tiled_display.c | 346 +++++++++++++++++++++++++++++++++++
> > > > >  tests/meson.build            |   1 +
> > > > >  3 files changed, 348 insertions(+)
> > > > >  create mode 100644 tests/kms_dp_tiled_display.c
> > > > > 
> > > > > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > > > > index c02e4d94..7561ab9b 100644
> > > > > --- a/tests/Makefile.sources
> > > > > +++ b/tests/Makefile.sources
> > > > > @@ -41,6 +41,7 @@ TESTS_progs = \
> > > > >  	kms_cursor_edge_walk \
> > > > >  	kms_cursor_legacy \
> > > > >  	kms_dp_dsc \
> > > > > +	kms_dp_tiled_display \
> > > > >  	kms_draw_crc \
> > > > >  	kms_fbcon_fbt \
> > > > >  	kms_fence_pin_leak \
> > > > > diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> > > > > new file mode 100644
> > > > > index 00000000..162fbdd9
> > > > > --- /dev/null
> > > > > +++ b/tests/kms_dp_tiled_display.c
> > > > > @@ -0,0 +1,346 @@
> > > > > +/*
> > > > > + * 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:
> > > > > + *  Madhumitha Tolakanahalli Pradeep
> > > > > + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> > > > > + *
> > > > > + * Display Port Tiled Display Test
> > > > > + * This test parses the tile information of the connectors that have TILE
> > > > > + * property set, sets up the framebuffer with correct offsets corresponding to
> > > > > + * the tile offsets and does an atomic modeset with two CRTCs for two
> > > > > + * connectors. Page flip event timestamp from each CRTC is collected and
> > > > > + * compared to make sure that they occurred in a synchronous manner.
> > > > > + *
> > > > > + * This test currently supports only horizontally tiled displays, in line with
> > > > > + * the displays supported by the kernel at the moment.
> > > > > + */
> > > > > +
> > > > > +#include "igt.h"
> > > > > +#include "poll.h"
> > > > > +#include "drm_mode.h"
> > > > > +#include "drm_fourcc.h"
> > > > > +
> > > > > +IGT_TEST_DESCRIPTION("Test for Display Port Tiled Displays");
> > > > > +
> > > > > +typedef struct {
> > > > > +	int drm_fd;
> > > > > +	int num_h_tiles;
> > > > > +	igt_display_t *display;
> > > > > +	enum igt_commit_style commit;
> > > > > +} data_t;
> > > > > +
> > > > > +typedef struct {
> > > > > +	igt_output_t *output;
> > > > > +	igt_tile_info_t tile;
> > > > > +	igt_fb_t fb_test_pattern;
> > > > > +	enum pipe pipe;
> > > > > +	enum igt_commit_style commit;
> > > > > +	drmModeConnectorPtr connector;
> > > > > +} data_connector_t;
> > > > > +
> > > > > +static int drm_property_is_tile(drmModePropertyPtr prop)
> > > > > +{
> > > > > +	return (strcmp(prop->name , "TILE") ? 0 : 1) &&
> > > > > +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> > > > > +}
> > > > > +
> > > > > +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> > > > > +		igt_tile_info_t *tile)
> > > > > +{
> > > > > +	int i = 0;
> > > > > +	drmModePropertyPtr prop;
> > > > > +	drmModePropertyBlobPtr blob;
> > > > > +
> > > > > +	for (i = 0; i < conn->count_props; i++) {
> > > > > +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> > > > > +
> > > > > +		igt_assert(prop);
> > > > > +
> > > > > +		if (!drm_property_is_tile(prop))
> > > > > +			continue;
> > > > 
> > > > This branch leaks prop.
> > > 
> > > Freeing prop here before continuing shd fix this, will fix this in the next rev
> > > 
> > > > > +		blob = drmModeGetPropertyBlob(data->drm_fd,
> > > > > +				conn->prop_values[i]);
> > > > > +
> > > > > +		if (!blob)
> > > > > +			return;
> > > > 
> > > > This branch leaks prop.
> > > 
> > > Agree, will add drmModeFreePropertyBlob(blob); before return
> > > 
> > > > > +		igt_parse_connector_tile_blob(blob, tile);
> > > > > +		break;
> > > > > +	}
> > > > > +
> > > > > +	drmModeFreeProperty(prop);
> > > > > +	drmModeFreePropertyBlob(blob);
> > > > > +}
> > > > > +
> > > > > +static void get_number_of_h_tiles(data_t *data)
> > > > > +{
> > > > > +	int i;
> > > > > +	drmModeResPtr res;
> > > > > +	drmModeConnectorPtr connector;
> > > > > +	igt_tile_info_t tile = {.num_h_tile = 0};
> > > > > +
> > > > > +	igt_assert(res = drmModeGetResources(data->drm_fd));
> > > > > +
> > > > > +	for (i = 0; i < res->count_connectors; i++) {
> > > > > +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> > > > > +				res->connectors[i]);
> > > > > +
> > > > > +		igt_assert(connector);
> > > > > +
> > > > > +		if (!(connector->connection == DRM_MODE_CONNECTED &&
> > > > > +			connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort))
> > > > > +			continue;
> > > > 
> > > > This can be simplified to
> > > > 
> > > >     connection != DRM_MODE_CONNECTED ||
> > > >     connector_type != DRM_MODE_CONNECTOR_DisplayPort
> > > 
> > > Yes will simplify in the next rev
> > > 
> > > > Additionally, this branch leaks the connector.
> > > 
> > > Hmm, so call drmModeFreeConnector(connector); before continuing shd be followed in general throughout
> > > the code right?
> > 
> > Yeah, that would fix it.
> > 
> > > > > +		get_connector_tile_props(data, connector, &tile);
> > > > > +		data->num_h_tiles = tile.num_h_tile;
> > > > > +		break;
> > > > > +	}
> > > > > +
> > > > > +	drmModeFreeResources(res);
> > > > > +	drmModeFreeConnector(connector);
> > > > > +}
> > > > > +
> > > > > +static void get_connector(data_t *data, data_connector_t *conn)
> > > > 
> > > > Nit: since this fills all connectors, maybe it should be named
> > > > get_connectors (with an s). Also it's not clear that conn refers to an
> > > > array of connectors, maybe it should be renamed to conns.
> > > 
> > > Yes I agree that will make it more readable, I will fix it in next rev
> > > 
> > > > (Applies to the whole patch)
> > > > 
> > > > > +{
> > > > > +	int count = 0;
> > > > > +	igt_output_t *output;
> > > > > +
> > > > > +	for_each_connected_output(data->display, output) {
> > > > > +		conn[count].connector = drmModeGetConnector(data->display->drm_fd,
> > > > > +						output->id);
> > > > > +
> > > > > +		igt_assert(conn[count].connector);
> > > > > +
> > > > > +		if (!(conn[count].connector->connector_type ==
> > > > > +			DRM_MODE_CONNECTOR_DisplayPort))
> > > > > +			continue;
> > > > 
> > > > This can be simplified to
> > > > 
> > > >     if (connector_type != DRM_MODE_CONNECTOR_DisplayPort)
> > > > 
> > > > Additionally, this branch leaks the connector.
> > > > 
> > > > > +		get_connector_tile_props(data, conn[count].connector,
> > > > > +			&conn[count].tile);
> > > > > +
> > > > > +		/* Check if the connectors belong to the same tile group */
> > > > > +		if (count > 0)
> > > > > +			igt_assert(conn[count].tile.tile_group_id ==
> > > > > +				conn[count-1].tile.tile_group_id);
> > > > > +
> > > > > +		count++;
> > > > > +	}
> > > > > +}
> > > > > +
> > > > > +static void
> > > > > +reset_framebuffer(int drm_fd, igt_output_t *output, igt_fb_t *fb)
> > > > > +{
> > > > > +	igt_plane_t *primary;
> > > > > +
> > > > > +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > > > > +	igt_plane_set_fb(primary, NULL);
> > > > > +	igt_remove_fb(drm_fd, fb);
> > > > > +}
> > > > > +
> > > > > +static void reset_output(igt_output_t *output)
> > > > > +{
> > > > > +	igt_output_set_pipe(output, PIPE_NONE);
> > > > > +}
> > > > > +
> > > > > +static void test_cleanup(data_t *data, data_connector_t *conn)
> > > > > +{
> > > > > +	int count;
> > > > > +
> > > > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > > > +		if (conn[count].output) {
> > > > > +			reset_framebuffer(data->drm_fd, conn[count].output,
> > > > > +				&conn[count].fb_test_pattern);
> > > > > +			reset_output(conn[count].output);
> > > > > +		}
> > > > > +	}
> > > > > +	igt_display_commit2(data->display, data->commit);
> > > > > +}
> > > > > +
> > > > > +static void setup_mode(data_t *data, data_connector_t *conn_data)
> > > > 
> > > > This function doesn't actually setup the output mode, it only sets up
> > > > the pipe. Is this an overlook?
> > > 
> > > yes we just set the pipe/CRTC here and the atomic commit call does a complete
> > > modeset with check and commit without any output since we didnt setup fb yet.
> > > But I agree that calling it just setup_pipe robably makes it more intuitive
> > 
> > Oh, I forgot that igt_output_set_pipe also sets the mode.
> > 
> > > > > +{
> > > > > +	int count = 0;
> > > > > +	enum pipe pipe;
> > > > > +	igt_output_t *output;
> > > > > +
> > > > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > > > +		output = igt_output_from_connector(data->display,
> > > > > +				conn_data[count].connector);
> > > > > +
> > > > > +		/*
> > > > > +		 * The output is set to PIPE_NONE and then assigned a pipe.
> > > > > +		 * This is done to ensure a complete modeset occures every
> > > > > +		 * time the test is run.
> > > > > +		 */
> > > > > +		reset_output(output);
> > > > 
> > > > Is this necessary?
> > > 
> > > Yes this is necessary to force a complete modeset for each test since if the pipe
> > > assignments or the mode has not changed it will not set needs_modeset flag in side kernel
> > > and will not do a full atomic check and commit.
> > 
> > Hmm, why do we need to do a new modeset? If the mode is already set to
> > what we want, no need for this?
> > 
> > (Sorry, I'm unfamiliar with the kernel side of things!)
> > 
> > > > > +		for_each_pipe(data->display, pipe) {
> > > > > +			if (count > 0 && pipe == conn_data[count-1].pipe)
> > > > > +				continue;
> > > > > +
> > > > > +			if (igt_pipe_connector_valid(pipe, output)) {
> > > > > +
> > > > > +				conn_data[count].pipe = pipe;
> > > > > +				conn_data[count].output = output;
> > > > > +
> > > > > +				igt_output_set_pipe(conn_data[count].output,
> > > > > +					conn_data[count].pipe);
> > > > > +				break;
> > > > > +			}
> > > > > +		}
> > > > > +	}
> > > > > +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> > > > > +		NULL);
> > > > > +}
> > > > > +
> > > > > +static void setup_framebuffer(data_t *data, data_connector_t *conn)
> > > > > +{
> > > > > +	int count;
> > > > > +	igt_plane_t *primary;
> > > > > +
> > > > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > > > +
> > > > > +		igt_create_pattern_fb(data->drm_fd,
> > > > > +			(conn[count].tile.tile_h_size *
> > > > > +			data->num_h_tiles),
> > > > 
> > > > Do we need to multiply by the number of horizontal tiles here? It seems
> > > > we only use the first tile_h_size pixels of the buffer. Am I missing
> > > > something?
> > > > 
> > > 
> > > Yes we only use the tile_h_size of the buffer at the proper offset of tile_h_loc
> > > So this below logic shd be modified to only create fb of the size tile_h_size if its in the for loop
> > > or just create one fb outside the loop of the size tile_h_size * num_tiles and then just use that with dfferent
> > > offsets for two CRTCs
> > > 
> > > When I discussed this on dri-devel, people said that real userspace can decide to do either one single fb for all tiles
> > > or separate ones where each is of the size equal to tile size.
> > > 
> > > Let me know if there is a preference
> > 
> > As a userspace dev, I'd say a single FB would be a little bit more
> > realistic, but yeah I guess userspace could use two FBs as well. No big
> > deal, I'm fine with both.
> > 
> > > > But maybe a test that would better reflect reality would create a
> > > > single framebuffer for all tiled displays, to display a single image
> > > > across all of them?
> > > > 
> > > > > +			conn[count].tile.tile_v_size,
> > > > > +			DRM_FORMAT_XBGR8888,
> > > > > +			LOCAL_DRM_FORMAT_MOD_NONE,
> > > > > +			&conn[count].fb_test_pattern);
> > > > > +
> > > > > +		primary = igt_output_get_plane_type(conn[count].output,
> > > > > +				DRM_PLANE_TYPE_PRIMARY);
> > > > > +
> > > > > +		igt_plane_set_fb(primary, &conn[count].fb_test_pattern);
> > > > > +
> > > > > +		igt_fb_set_size(&conn[count].fb_test_pattern, primary,
> > > > > +				conn[count].tile.tile_h_size,
> > > > > +				conn[count].tile.tile_v_size);
> > > > > +
> > > > > +		igt_fb_set_position(&conn[count].fb_test_pattern, primary,
> > > > > +				(conn[count].tile.tile_h_size *
> > > > > +				conn[count].tile.tile_h_loc),
> > > > > +				(conn[count].tile.tile_v_size *
> > > > > +				conn[count].tile.tile_v_loc));
> > > > > +
> > > > > +		igt_plane_set_size(primary,
> > > > > +				conn[count].tile.tile_h_size,
> > > > > +				conn[count].tile.tile_v_size);
> > > > > +	}
> > > > > +}
> > > > > +
> > > > > +static void page_flip_handler(int fd, unsigned int seq,
> > > > > +		unsigned int tv_sec, unsigned int tv_usec,
> > > > > +		unsigned int crtc_id, void *data)
> > > > > +{
> > > > > +	bool expr = false;
> > > > > +	static unsigned int _tv_sec, _tv_usec;
> > > > > +
> > > > > +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> > > > > +		tv_sec, tv_usec);
> > > > 
> > > > We should also make sure we receive exactly one page-flip per CRTC.
> > > > Currently we don't use crtc_id (apart from logging purposes).
> > > 
> > > I see so somehow have a static count of events and make sure per crtc id its the same count or
> > > some similar logic
> > 
> > Yeah. We could for instance add a "bool got_page_flip" field in our
> > data_connector_t struct and set it to true here (making sure it's not
> > set to true already).
> > 
> > A pointer can be passed to page_flip_handler via the data argument.
> 
> I didnt understand what you meant by passing a pointer to page_flip_handler
> via the data argument?
> I looked through the drmHandleEvent definition and it populates the void *data
> in page_flip_handler with vblank->user_data
> So its not clear to me how we can pass our data_connector_t -> got_page_flip_bool to page_flip_handler
> and set that to true here.

Hi!

The user_data field is set to the last argument given to
drmModeAtomicCommit (in IGT, to igt_display_commit_atomic). Currently
we set it to NULL, we could set it to the data_connector_t array.

If it helps, here [1] is a very similar test that just atomically page-
flips on multiple CRTCs at once. Note how the page_flip_handler sets
got_page_flip (and makes sure there are no double page-flips). Also
note that the last argument to igt_display_commit_atomic is not NULL
when page-flipping.

[1]: https://patchwork.freedesktop.org/patch/329336/

> I have all the other changes done, so in my revision that I am about to send all the changes except for
> this check to double check number of page flip events == num_h_tiles is missing.
> 
> Also i observed that since the events are queued, it calls the page flip handler twice in the first wait_for_page_flip() call
> so even if i loop it the number of times = number of connectors, it calls page flip handler twice for the first loop
> and then doesnt call page flip handler teh second time.
> 
> So I am skipping that looping part as well.

Instead of relying on the events being queued and all arriving in just
one poll() call, we can just loop until we got all page-flips. For
instance, this is done in the test I linked before [1]:

	while (!got_all_page_flips(&data)) {
		ret = poll(&pfd, 1, 1000);
		igt_assert(ret == 1);
		drmHandleEvent(data.drm_fd, &drm_event);
	}

Let me know if something's not clear, or if you think this isn't the
right approach!

> Please let me know your thoughts and I look forward to your review on teh new revision I am sending today.

Thanks!

> Manasi
> 
> > > > > +	/* Skip the following checks for the first page flip event */
> > > > > +	if (_tv_sec == 0 || _tv_usec == 0) {
> > > > > +		_tv_sec = tv_sec;
> > > > > +		_tv_usec = tv_usec;
> > > > > +		return;
> > > > > +	}
> > > > > +
> > > > > +	/*
> > > > > +	 * For seamless tear-free display, the page flip event timestamps
> > > > > +	 * from all the tiles should not differ by more than 10us.
> > > > > +	 */
> > > > > +	expr = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> > > > 
> > > > Nit: this could be renamed to e.g. is_on_time, expr is a pretty vague
> > > > name.
> > > 
> > > yes agree will rename to make it more readable
> > > 
> > > > > +	igt_fail_on_f(!expr, "Delayed page flip event from CRTC:%d at %u:%u\n",
> > > > > +		crtc_id, tv_sec, tv_usec);
> > > > > +
> > > > > +	if (tv_sec < _tv_sec)
> > > > > +		_tv_sec = tv_sec;
> > > > > +	if (tv_usec < _tv_usec)
> > > > > +		_tv_usec = tv_usec;
> > > > 
> > > > This updates the timestamp on each page-flip. This means that the first
> > > > and last page-flips could be delayed by more than 10µs if there are
> > > > intermediate page-flips. For instance, if the first page-flip happens
> > > > at t=0µs and the second one happens at t=9µs, the last one could happen
> > > > at t=18µs without making this test fails. Is this something we want to
> > > > allow?
> > > 
> > > Nope all of them should happen within the same vblank so the diff between all
> > > should be <10us, will have to modify the logic to do that.
> > > 
> > > so basically instead of making <10us condition for the consecutive ones, it should be between the first one
> > > and all other events, correct?
> > 
> > Correct! So we can just drop these 4 lines, that should do it.
> > 
> > > > > +}
> > > > > +
> > > > > +static void wait_for_pageflip(int drm_fd)
> > > > > +{
> > > > > +	struct pollfd pfd;
> > > > > +	drmEventContext drm_event;
> > > > 
> > > > Nit: to make sure garbage isn't read from this struct (there are other
> > > > function pointers), it's probably safer to zero-fill it (= {0}).
> > > 
> > > Got it
> > > 
> > > > > +	drm_event.version = 3;
> > > > > +	drm_event.page_flip_handler2 = page_flip_handler;
> > > > > +
> > > > > +	pfd.fd = drm_fd;
> > > > > +	pfd.events = POLLIN;
> > > > > +	pfd.revents = 0;
> > > > > +
> > > > > +	poll(&pfd, 1, 1000);
> > > > 
> > > > Maybe we should check poll(2)'s return value?
> > > 
> > > poll(2)? Or just check return value of the function poll() just for error handling?
> > 
> > Yes, just in case.
> > 
> > (As a side note, poll(2) simply means "the poll system call" and refers
> > to poll's syscall manpage section.)
> > 
> > > > > +	if (pfd.revents & POLLIN)
> > > > > +		drmHandleEvent(drm_fd, &drm_event);
> > > > 
> > > > If we don't get POLLIN (e.g. if we timeout), wait_for_pageflip will
> > > > silently do nothing, and the test will pass. Instead, we probably want
> > > > to fail in this case.
> > > 
> > > Yes thats correct, just add else case with igt_assert?
> > 
> > Yes!
> > 
> > > > > +}
> > > > > +
> > > > > +igt_main
> > > > > +{
> > > > > +	igt_display_t display;
> > > > > +	data_connector_t *conn_data = NULL;
> > > > > +	data_t data = {.drm_fd = 0, .num_h_tiles = 0,
> > > > > +		       .display = NULL, .commit = COMMIT_LEGACY};
> > > > 
> > > > Nit: one can just do assign to {0} to zero-fill the struct.
> > > 
> > > Got it
> > > 
> > > > > +	igt_fixture {
> > > > > +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > > > > +
> > > > > +		kmstest_set_vt_graphics_mode();
> > > > > +		igt_display_require(&display, data.drm_fd);
> > > > > +		igt_display_reset(&display);
> > > > > +
> > > > > +		data.display = &display;
> > > > > +
> > > > > +		get_number_of_h_tiles(&data);
> > > > > +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> > > > > +
> > > > > +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> > > > 
> > > > Should we try to run this test at all on drivers that don't support
> > > > atomic?
> > > > 
> > > > If the driver doesn't support atomic, user-space will submit two page-
> > > > flip requests. However it's possible that the hardware executes a page-
> > > > flip between both requests: user-space calls the first drmModePageFlip,
> > > > the vblank for this particular CRTC triggers, then user-space calls the
> > > > second drmModePageFlip. Page-flips will be out-of-sync by one frame.
> > > 
> > > Hmm, yea should probbaly have igt_require on atomic
> > > 
> > > > > +		if (data.num_h_tiles > 0)
> > > > > +			conn_data = malloc(data.num_h_tiles * sizeof(data_connector_t));
> > > > > +	}
> > > > > +
> > > > > +	igt_subtest("basic-test-pattern") {
> > > > > +		igt_skip_on(data.num_h_tiles == 0);
> > > > > +		igt_assert(conn_data);
> > > > > +
> > > > > +		get_connector(&data, conn_data);
> > > > > +		setup_mode(&data, conn_data);
> > > > > +		setup_framebuffer(&data, conn_data);
> > > > > +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> > > > > +			DRM_MODE_PAGE_FLIP_EVENT, NULL);
> > > > > +		wait_for_pageflip(data.drm_fd);
> > > > 
> > > > Here we only wait for a single page-flip. This will only stash the
> > > > timestamp of the frst page-flip without checking the time-stamp of
> > > > subsequent page-flips. We should wait for as many page-flips as enabled
> > > > tiled connectors.
> > > 
> > > That was our initial understanding as well, but with just one wait_for_pageflip call we
> > > were geting two page flip events for two tiles
> > > Do we need to call wait for page flip explicitly the number of times = number of tiles?
> > 
> > Oh, I see. So it seems two events are queued. Then we should probably
> > loop until we have a page-flip for all CRTCs, since there's no
> > guarantee all events will be sent at once.
> > 
> > > Regards
> > > Manasi
> > > 
> > > > > +		test_cleanup(&data, conn_data);
> > > > > +	}
> > > > > +
> > > > > +	igt_fixture {
> > > > > +		free(conn_data);
> > > > > +		close(data.drm_fd);
> > > > > +		kmstest_restore_vt_mode();
> > > > > +		igt_display_fini(data.display);
> > > > > +	}
> > > > > +}
> > > > > diff --git a/tests/meson.build b/tests/meson.build
> > > > > index a7b2b322..50292df8 100644
> > > > > --- a/tests/meson.build
> > > > > +++ b/tests/meson.build
> > > > > @@ -26,6 +26,7 @@ test_progs = [
> > > > >  	'kms_cursor_edge_walk',
> > > > >  	'kms_cursor_legacy',
> > > > >  	'kms_dp_dsc',
> > > > > +	'kms_dp_tiled_display',
> > > > >  	'kms_draw_crc',
> > > > >  	'kms_fbcon_fbt',
> > > > >  	'kms_fence_pin_leak',
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-12 12:51           ` Ser, Simon
@ 2019-09-12 23:23             ` Manasi Navare
  0 siblings, 0 replies; 34+ messages in thread
From: Manasi Navare @ 2019-09-12 23:23 UTC (permalink / raw)
  To: Ser, Simon; +Cc: igt-dev, madhumitha.tp, Latvala, Petri

On Thu, Sep 12, 2019 at 05:51:53AM -0700, Ser, Simon wrote:
> On Wed, 2019-09-11 at 17:47 -0700, Manasi Navare wrote:
> > On Fri, Aug 30, 2019 at 04:39:53AM -0700, Ser, Simon wrote:
> > > On Tue, 2019-08-27 at 14:29 -0700, Manasi Navare wrote:
> > > > On Tue, Aug 27, 2019 at 03:49:38AM -0700, Ser, Simon wrote:
> > > > > Thanks for the new version! Here are some more comments. Some of them
> > > > > are nits, some of them are more serious questions. Feel free to let me
> > > > > know if I'm mistaken or if you don't understand one of them.
> > > > 
> > > > Thanks for the review comments Simon. I will be working on addressing the following
> > > > review comments and will take over this patch since Madhumitha's internship has ended.
> > > > I really appreciate all your help and feedback on this.
> > > > 
> > > > Please find my answers below:
> > > > 
> > > > > On Fri, 2019-08-23 at 11:23 -0700, Madhumitha Tolakanahalli Pradeep wrote:
> > > > > > This test validates the tiled DP displays to display a test pattern
> > > > > > seamlessly across the two tiles. It validates the transcoder port
> > > > > > sync feature on i915 to get a tearfree tiled display output.
> > > > > > 
> > > > > > Related kernel work patches-
> > > > > > https://patchwork.freedesktop.org/series/59837/#rev4.
> > > > > > 
> > > > > > This test can eventually be extended to cover tiled display support
> > > > > > on other connector types.
> > > > > > 
> > > > > > v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
> > > > > >     Minor style changes (Simon)
> > > > > >    Code clean-up and reordering
> > > > > > 
> > > > > > 
> > > > > > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > > > > > Cc: Petri Latvala <petri.latvala@intel.com>
> > > > > > Cc: Simon Ser <simon.ser@intel.com>
> > > > > > 
> > > > > > Cc: <madhumitha.tp@gmail.com>
> > > > > > 
> > > > > > Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> > > > > > ---
> > > > > >  tests/Makefile.sources       |   1 +
> > > > > >  tests/kms_dp_tiled_display.c | 346 +++++++++++++++++++++++++++++++++++
> > > > > >  tests/meson.build            |   1 +
> > > > > >  3 files changed, 348 insertions(+)
> > > > > >  create mode 100644 tests/kms_dp_tiled_display.c
> > > > > > 
> > > > > > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > > > > > index c02e4d94..7561ab9b 100644
> > > > > > --- a/tests/Makefile.sources
> > > > > > +++ b/tests/Makefile.sources
> > > > > > @@ -41,6 +41,7 @@ TESTS_progs = \
> > > > > >  	kms_cursor_edge_walk \
> > > > > >  	kms_cursor_legacy \
> > > > > >  	kms_dp_dsc \
> > > > > > +	kms_dp_tiled_display \
> > > > > >  	kms_draw_crc \
> > > > > >  	kms_fbcon_fbt \
> > > > > >  	kms_fence_pin_leak \
> > > > > > diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> > > > > > new file mode 100644
> > > > > > index 00000000..162fbdd9
> > > > > > --- /dev/null
> > > > > > +++ b/tests/kms_dp_tiled_display.c
> > > > > > @@ -0,0 +1,346 @@
> > > > > > +/*
> > > > > > + * 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:
> > > > > > + *  Madhumitha Tolakanahalli Pradeep
> > > > > > + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> > > > > > + *
> > > > > > + * Display Port Tiled Display Test
> > > > > > + * This test parses the tile information of the connectors that have TILE
> > > > > > + * property set, sets up the framebuffer with correct offsets corresponding to
> > > > > > + * the tile offsets and does an atomic modeset with two CRTCs for two
> > > > > > + * connectors. Page flip event timestamp from each CRTC is collected and
> > > > > > + * compared to make sure that they occurred in a synchronous manner.
> > > > > > + *
> > > > > > + * This test currently supports only horizontally tiled displays, in line with
> > > > > > + * the displays supported by the kernel at the moment.
> > > > > > + */
> > > > > > +
> > > > > > +#include "igt.h"
> > > > > > +#include "poll.h"
> > > > > > +#include "drm_mode.h"
> > > > > > +#include "drm_fourcc.h"
> > > > > > +
> > > > > > +IGT_TEST_DESCRIPTION("Test for Display Port Tiled Displays");
> > > > > > +
> > > > > > +typedef struct {
> > > > > > +	int drm_fd;
> > > > > > +	int num_h_tiles;
> > > > > > +	igt_display_t *display;
> > > > > > +	enum igt_commit_style commit;
> > > > > > +} data_t;
> > > > > > +
> > > > > > +typedef struct {
> > > > > > +	igt_output_t *output;
> > > > > > +	igt_tile_info_t tile;
> > > > > > +	igt_fb_t fb_test_pattern;
> > > > > > +	enum pipe pipe;
> > > > > > +	enum igt_commit_style commit;
> > > > > > +	drmModeConnectorPtr connector;
> > > > > > +} data_connector_t;
> > > > > > +
> > > > > > +static int drm_property_is_tile(drmModePropertyPtr prop)
> > > > > > +{
> > > > > > +	return (strcmp(prop->name , "TILE") ? 0 : 1) &&
> > > > > > +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> > > > > > +}
> > > > > > +
> > > > > > +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> > > > > > +		igt_tile_info_t *tile)
> > > > > > +{
> > > > > > +	int i = 0;
> > > > > > +	drmModePropertyPtr prop;
> > > > > > +	drmModePropertyBlobPtr blob;
> > > > > > +
> > > > > > +	for (i = 0; i < conn->count_props; i++) {
> > > > > > +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> > > > > > +
> > > > > > +		igt_assert(prop);
> > > > > > +
> > > > > > +		if (!drm_property_is_tile(prop))
> > > > > > +			continue;
> > > > > 
> > > > > This branch leaks prop.
> > > > 
> > > > Freeing prop here before continuing shd fix this, will fix this in the next rev
> > > > 
> > > > > > +		blob = drmModeGetPropertyBlob(data->drm_fd,
> > > > > > +				conn->prop_values[i]);
> > > > > > +
> > > > > > +		if (!blob)
> > > > > > +			return;
> > > > > 
> > > > > This branch leaks prop.
> > > > 
> > > > Agree, will add drmModeFreePropertyBlob(blob); before return
> > > > 
> > > > > > +		igt_parse_connector_tile_blob(blob, tile);
> > > > > > +		break;
> > > > > > +	}
> > > > > > +
> > > > > > +	drmModeFreeProperty(prop);
> > > > > > +	drmModeFreePropertyBlob(blob);
> > > > > > +}
> > > > > > +
> > > > > > +static void get_number_of_h_tiles(data_t *data)
> > > > > > +{
> > > > > > +	int i;
> > > > > > +	drmModeResPtr res;
> > > > > > +	drmModeConnectorPtr connector;
> > > > > > +	igt_tile_info_t tile = {.num_h_tile = 0};
> > > > > > +
> > > > > > +	igt_assert(res = drmModeGetResources(data->drm_fd));
> > > > > > +
> > > > > > +	for (i = 0; i < res->count_connectors; i++) {
> > > > > > +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> > > > > > +				res->connectors[i]);
> > > > > > +
> > > > > > +		igt_assert(connector);
> > > > > > +
> > > > > > +		if (!(connector->connection == DRM_MODE_CONNECTED &&
> > > > > > +			connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort))
> > > > > > +			continue;
> > > > > 
> > > > > This can be simplified to
> > > > > 
> > > > >     connection != DRM_MODE_CONNECTED ||
> > > > >     connector_type != DRM_MODE_CONNECTOR_DisplayPort
> > > > 
> > > > Yes will simplify in the next rev
> > > > 
> > > > > Additionally, this branch leaks the connector.
> > > > 
> > > > Hmm, so call drmModeFreeConnector(connector); before continuing shd be followed in general throughout
> > > > the code right?
> > > 
> > > Yeah, that would fix it.
> > > 
> > > > > > +		get_connector_tile_props(data, connector, &tile);
> > > > > > +		data->num_h_tiles = tile.num_h_tile;
> > > > > > +		break;
> > > > > > +	}
> > > > > > +
> > > > > > +	drmModeFreeResources(res);
> > > > > > +	drmModeFreeConnector(connector);
> > > > > > +}
> > > > > > +
> > > > > > +static void get_connector(data_t *data, data_connector_t *conn)
> > > > > 
> > > > > Nit: since this fills all connectors, maybe it should be named
> > > > > get_connectors (with an s). Also it's not clear that conn refers to an
> > > > > array of connectors, maybe it should be renamed to conns.
> > > > 
> > > > Yes I agree that will make it more readable, I will fix it in next rev
> > > > 
> > > > > (Applies to the whole patch)
> > > > > 
> > > > > > +{
> > > > > > +	int count = 0;
> > > > > > +	igt_output_t *output;
> > > > > > +
> > > > > > +	for_each_connected_output(data->display, output) {
> > > > > > +		conn[count].connector = drmModeGetConnector(data->display->drm_fd,
> > > > > > +						output->id);
> > > > > > +
> > > > > > +		igt_assert(conn[count].connector);
> > > > > > +
> > > > > > +		if (!(conn[count].connector->connector_type ==
> > > > > > +			DRM_MODE_CONNECTOR_DisplayPort))
> > > > > > +			continue;
> > > > > 
> > > > > This can be simplified to
> > > > > 
> > > > >     if (connector_type != DRM_MODE_CONNECTOR_DisplayPort)
> > > > > 
> > > > > Additionally, this branch leaks the connector.
> > > > > 
> > > > > > +		get_connector_tile_props(data, conn[count].connector,
> > > > > > +			&conn[count].tile);
> > > > > > +
> > > > > > +		/* Check if the connectors belong to the same tile group */
> > > > > > +		if (count > 0)
> > > > > > +			igt_assert(conn[count].tile.tile_group_id ==
> > > > > > +				conn[count-1].tile.tile_group_id);
> > > > > > +
> > > > > > +		count++;
> > > > > > +	}
> > > > > > +}
> > > > > > +
> > > > > > +static void
> > > > > > +reset_framebuffer(int drm_fd, igt_output_t *output, igt_fb_t *fb)
> > > > > > +{
> > > > > > +	igt_plane_t *primary;
> > > > > > +
> > > > > > +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > > > > > +	igt_plane_set_fb(primary, NULL);
> > > > > > +	igt_remove_fb(drm_fd, fb);
> > > > > > +}
> > > > > > +
> > > > > > +static void reset_output(igt_output_t *output)
> > > > > > +{
> > > > > > +	igt_output_set_pipe(output, PIPE_NONE);
> > > > > > +}
> > > > > > +
> > > > > > +static void test_cleanup(data_t *data, data_connector_t *conn)
> > > > > > +{
> > > > > > +	int count;
> > > > > > +
> > > > > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > > > > +		if (conn[count].output) {
> > > > > > +			reset_framebuffer(data->drm_fd, conn[count].output,
> > > > > > +				&conn[count].fb_test_pattern);
> > > > > > +			reset_output(conn[count].output);
> > > > > > +		}
> > > > > > +	}
> > > > > > +	igt_display_commit2(data->display, data->commit);
> > > > > > +}
> > > > > > +
> > > > > > +static void setup_mode(data_t *data, data_connector_t *conn_data)
> > > > > 
> > > > > This function doesn't actually setup the output mode, it only sets up
> > > > > the pipe. Is this an overlook?
> > > > 
> > > > yes we just set the pipe/CRTC here and the atomic commit call does a complete
> > > > modeset with check and commit without any output since we didnt setup fb yet.
> > > > But I agree that calling it just setup_pipe robably makes it more intuitive
> > > 
> > > Oh, I forgot that igt_output_set_pipe also sets the mode.
> > > 
> > > > > > +{
> > > > > > +	int count = 0;
> > > > > > +	enum pipe pipe;
> > > > > > +	igt_output_t *output;
> > > > > > +
> > > > > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > > > > +		output = igt_output_from_connector(data->display,
> > > > > > +				conn_data[count].connector);
> > > > > > +
> > > > > > +		/*
> > > > > > +		 * The output is set to PIPE_NONE and then assigned a pipe.
> > > > > > +		 * This is done to ensure a complete modeset occures every
> > > > > > +		 * time the test is run.
> > > > > > +		 */
> > > > > > +		reset_output(output);
> > > > > 
> > > > > Is this necessary?
> > > > 
> > > > Yes this is necessary to force a complete modeset for each test since if the pipe
> > > > assignments or the mode has not changed it will not set needs_modeset flag in side kernel
> > > > and will not do a full atomic check and commit.
> > > 
> > > Hmm, why do we need to do a new modeset? If the mode is already set to
> > > what we want, no need for this?
> > > 
> > > (Sorry, I'm unfamiliar with the kernel side of things!)
> > > 
> > > > > > +		for_each_pipe(data->display, pipe) {
> > > > > > +			if (count > 0 && pipe == conn_data[count-1].pipe)
> > > > > > +				continue;
> > > > > > +
> > > > > > +			if (igt_pipe_connector_valid(pipe, output)) {
> > > > > > +
> > > > > > +				conn_data[count].pipe = pipe;
> > > > > > +				conn_data[count].output = output;
> > > > > > +
> > > > > > +				igt_output_set_pipe(conn_data[count].output,
> > > > > > +					conn_data[count].pipe);
> > > > > > +				break;
> > > > > > +			}
> > > > > > +		}
> > > > > > +	}
> > > > > > +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> > > > > > +		NULL);
> > > > > > +}
> > > > > > +
> > > > > > +static void setup_framebuffer(data_t *data, data_connector_t *conn)
> > > > > > +{
> > > > > > +	int count;
> > > > > > +	igt_plane_t *primary;
> > > > > > +
> > > > > > +	for (count = 0; count < data->num_h_tiles; count++) {
> > > > > > +
> > > > > > +		igt_create_pattern_fb(data->drm_fd,
> > > > > > +			(conn[count].tile.tile_h_size *
> > > > > > +			data->num_h_tiles),
> > > > > 
> > > > > Do we need to multiply by the number of horizontal tiles here? It seems
> > > > > we only use the first tile_h_size pixels of the buffer. Am I missing
> > > > > something?
> > > > > 
> > > > 
> > > > Yes we only use the tile_h_size of the buffer at the proper offset of tile_h_loc
> > > > So this below logic shd be modified to only create fb of the size tile_h_size if its in the for loop
> > > > or just create one fb outside the loop of the size tile_h_size * num_tiles and then just use that with dfferent
> > > > offsets for two CRTCs
> > > > 
> > > > When I discussed this on dri-devel, people said that real userspace can decide to do either one single fb for all tiles
> > > > or separate ones where each is of the size equal to tile size.
> > > > 
> > > > Let me know if there is a preference
> > > 
> > > As a userspace dev, I'd say a single FB would be a little bit more
> > > realistic, but yeah I guess userspace could use two FBs as well. No big
> > > deal, I'm fine with both.
> > > 
> > > > > But maybe a test that would better reflect reality would create a
> > > > > single framebuffer for all tiled displays, to display a single image
> > > > > across all of them?
> > > > > 
> > > > > > +			conn[count].tile.tile_v_size,
> > > > > > +			DRM_FORMAT_XBGR8888,
> > > > > > +			LOCAL_DRM_FORMAT_MOD_NONE,
> > > > > > +			&conn[count].fb_test_pattern);
> > > > > > +
> > > > > > +		primary = igt_output_get_plane_type(conn[count].output,
> > > > > > +				DRM_PLANE_TYPE_PRIMARY);
> > > > > > +
> > > > > > +		igt_plane_set_fb(primary, &conn[count].fb_test_pattern);
> > > > > > +
> > > > > > +		igt_fb_set_size(&conn[count].fb_test_pattern, primary,
> > > > > > +				conn[count].tile.tile_h_size,
> > > > > > +				conn[count].tile.tile_v_size);
> > > > > > +
> > > > > > +		igt_fb_set_position(&conn[count].fb_test_pattern, primary,
> > > > > > +				(conn[count].tile.tile_h_size *
> > > > > > +				conn[count].tile.tile_h_loc),
> > > > > > +				(conn[count].tile.tile_v_size *
> > > > > > +				conn[count].tile.tile_v_loc));
> > > > > > +
> > > > > > +		igt_plane_set_size(primary,
> > > > > > +				conn[count].tile.tile_h_size,
> > > > > > +				conn[count].tile.tile_v_size);
> > > > > > +	}
> > > > > > +}
> > > > > > +
> > > > > > +static void page_flip_handler(int fd, unsigned int seq,
> > > > > > +		unsigned int tv_sec, unsigned int tv_usec,
> > > > > > +		unsigned int crtc_id, void *data)
> > > > > > +{
> > > > > > +	bool expr = false;
> > > > > > +	static unsigned int _tv_sec, _tv_usec;
> > > > > > +
> > > > > > +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> > > > > > +		tv_sec, tv_usec);
> > > > > 
> > > > > We should also make sure we receive exactly one page-flip per CRTC.
> > > > > Currently we don't use crtc_id (apart from logging purposes).
> > > > 
> > > > I see so somehow have a static count of events and make sure per crtc id its the same count or
> > > > some similar logic
> > > 
> > > Yeah. We could for instance add a "bool got_page_flip" field in our
> > > data_connector_t struct and set it to true here (making sure it's not
> > > set to true already).
> > > 
> > > A pointer can be passed to page_flip_handler via the data argument.
> > 
> > I didnt understand what you meant by passing a pointer to page_flip_handler
> > via the data argument?
> > I looked through the drmHandleEvent definition and it populates the void *data
> > in page_flip_handler with vblank->user_data
> > So its not clear to me how we can pass our data_connector_t -> got_page_flip_bool to page_flip_handler
> > and set that to true here.
> 
> Hi!
> 
> The user_data field is set to the last argument given to
> drmModeAtomicCommit (in IGT, to igt_display_commit_atomic). Currently
> we set it to NULL, we could set it to the data_connector_t array.
> 
> If it helps, here [1] is a very similar test that just atomically page-
> flips on multiple CRTCs at once. Note how the page_flip_handler sets
> got_page_flip (and makes sure there are no double page-flips). Also
> note that the last argument to igt_display_commit_atomic is not NULL
> when page-flipping.
> 
> [1]: https://patchwork.freedesktop.org/patch/329336/
> 
> > I have all the other changes done, so in my revision that I am about to send all the changes except for
> > this check to double check number of page flip events == num_h_tiles is missing.
> > 
> > Also i observed that since the events are queued, it calls the page flip handler twice in the first wait_for_page_flip() call
> > so even if i loop it the number of times = number of connectors, it calls page flip handler twice for the first loop
> > and then doesnt call page flip handler teh second time.
> > 
> > So I am skipping that looping part as well.
> 
> Instead of relying on the events being queued and all arriving in just
> one poll() call, we can just loop until we got all page-flips. For
> instance, this is done in the test I linked before [1]:
> 
> 	while (!got_all_page_flips(&data)) {
> 		ret = poll(&pfd, 1, 1000);
> 		igt_assert(ret == 1);
> 		drmHandleEvent(data.drm_fd, &drm_event);
> 	}
> 
> Let me know if something's not clear, or if you think this isn't the
> right approach!

Yes I tried this approach and it worked, I have this logic in rev4, please just review rev4 
of the patch.
I also added a pointer to the array of structs as part of common data_t struct like
your test, makes it easier to navigate between functions.

Now the rev4 should be complete in terms of validating this page flip events logic
to check that there is only 1 page flip per CRTC and that we have obtained
page flips for all crtcs within same vblank

Please let me know your feedback on rev4

Regards
Manasi

> 
> > Please let me know your thoughts and I look forward to your review on teh new revision I am sending today.
> 
> Thanks!
> 
> > Manasi
> > 
> > > > > > +	/* Skip the following checks for the first page flip event */
> > > > > > +	if (_tv_sec == 0 || _tv_usec == 0) {
> > > > > > +		_tv_sec = tv_sec;
> > > > > > +		_tv_usec = tv_usec;
> > > > > > +		return;
> > > > > > +	}
> > > > > > +
> > > > > > +	/*
> > > > > > +	 * For seamless tear-free display, the page flip event timestamps
> > > > > > +	 * from all the tiles should not differ by more than 10us.
> > > > > > +	 */
> > > > > > +	expr = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> > > > > 
> > > > > Nit: this could be renamed to e.g. is_on_time, expr is a pretty vague
> > > > > name.
> > > > 
> > > > yes agree will rename to make it more readable
> > > > 
> > > > > > +	igt_fail_on_f(!expr, "Delayed page flip event from CRTC:%d at %u:%u\n",
> > > > > > +		crtc_id, tv_sec, tv_usec);
> > > > > > +
> > > > > > +	if (tv_sec < _tv_sec)
> > > > > > +		_tv_sec = tv_sec;
> > > > > > +	if (tv_usec < _tv_usec)
> > > > > > +		_tv_usec = tv_usec;
> > > > > 
> > > > > This updates the timestamp on each page-flip. This means that the first
> > > > > and last page-flips could be delayed by more than 10µs if there are
> > > > > intermediate page-flips. For instance, if the first page-flip happens
> > > > > at t=0µs and the second one happens at t=9µs, the last one could happen
> > > > > at t=18µs without making this test fails. Is this something we want to
> > > > > allow?
> > > > 
> > > > Nope all of them should happen within the same vblank so the diff between all
> > > > should be <10us, will have to modify the logic to do that.
> > > > 
> > > > so basically instead of making <10us condition for the consecutive ones, it should be between the first one
> > > > and all other events, correct?
> > > 
> > > Correct! So we can just drop these 4 lines, that should do it.
> > > 
> > > > > > +}
> > > > > > +
> > > > > > +static void wait_for_pageflip(int drm_fd)
> > > > > > +{
> > > > > > +	struct pollfd pfd;
> > > > > > +	drmEventContext drm_event;
> > > > > 
> > > > > Nit: to make sure garbage isn't read from this struct (there are other
> > > > > function pointers), it's probably safer to zero-fill it (= {0}).
> > > > 
> > > > Got it
> > > > 
> > > > > > +	drm_event.version = 3;
> > > > > > +	drm_event.page_flip_handler2 = page_flip_handler;
> > > > > > +
> > > > > > +	pfd.fd = drm_fd;
> > > > > > +	pfd.events = POLLIN;
> > > > > > +	pfd.revents = 0;
> > > > > > +
> > > > > > +	poll(&pfd, 1, 1000);
> > > > > 
> > > > > Maybe we should check poll(2)'s return value?
> > > > 
> > > > poll(2)? Or just check return value of the function poll() just for error handling?
> > > 
> > > Yes, just in case.
> > > 
> > > (As a side note, poll(2) simply means "the poll system call" and refers
> > > to poll's syscall manpage section.)
> > > 
> > > > > > +	if (pfd.revents & POLLIN)
> > > > > > +		drmHandleEvent(drm_fd, &drm_event);
> > > > > 
> > > > > If we don't get POLLIN (e.g. if we timeout), wait_for_pageflip will
> > > > > silently do nothing, and the test will pass. Instead, we probably want
> > > > > to fail in this case.
> > > > 
> > > > Yes thats correct, just add else case with igt_assert?
> > > 
> > > Yes!
> > > 
> > > > > > +}
> > > > > > +
> > > > > > +igt_main
> > > > > > +{
> > > > > > +	igt_display_t display;
> > > > > > +	data_connector_t *conn_data = NULL;
> > > > > > +	data_t data = {.drm_fd = 0, .num_h_tiles = 0,
> > > > > > +		       .display = NULL, .commit = COMMIT_LEGACY};
> > > > > 
> > > > > Nit: one can just do assign to {0} to zero-fill the struct.
> > > > 
> > > > Got it
> > > > 
> > > > > > +	igt_fixture {
> > > > > > +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > > > > > +
> > > > > > +		kmstest_set_vt_graphics_mode();
> > > > > > +		igt_display_require(&display, data.drm_fd);
> > > > > > +		igt_display_reset(&display);
> > > > > > +
> > > > > > +		data.display = &display;
> > > > > > +
> > > > > > +		get_number_of_h_tiles(&data);
> > > > > > +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> > > > > > +
> > > > > > +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> > > > > 
> > > > > Should we try to run this test at all on drivers that don't support
> > > > > atomic?
> > > > > 
> > > > > If the driver doesn't support atomic, user-space will submit two page-
> > > > > flip requests. However it's possible that the hardware executes a page-
> > > > > flip between both requests: user-space calls the first drmModePageFlip,
> > > > > the vblank for this particular CRTC triggers, then user-space calls the
> > > > > second drmModePageFlip. Page-flips will be out-of-sync by one frame.
> > > > 
> > > > Hmm, yea should probbaly have igt_require on atomic
> > > > 
> > > > > > +		if (data.num_h_tiles > 0)
> > > > > > +			conn_data = malloc(data.num_h_tiles * sizeof(data_connector_t));
> > > > > > +	}
> > > > > > +
> > > > > > +	igt_subtest("basic-test-pattern") {
> > > > > > +		igt_skip_on(data.num_h_tiles == 0);
> > > > > > +		igt_assert(conn_data);
> > > > > > +
> > > > > > +		get_connector(&data, conn_data);
> > > > > > +		setup_mode(&data, conn_data);
> > > > > > +		setup_framebuffer(&data, conn_data);
> > > > > > +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> > > > > > +			DRM_MODE_PAGE_FLIP_EVENT, NULL);
> > > > > > +		wait_for_pageflip(data.drm_fd);
> > > > > 
> > > > > Here we only wait for a single page-flip. This will only stash the
> > > > > timestamp of the frst page-flip without checking the time-stamp of
> > > > > subsequent page-flips. We should wait for as many page-flips as enabled
> > > > > tiled connectors.
> > > > 
> > > > That was our initial understanding as well, but with just one wait_for_pageflip call we
> > > > were geting two page flip events for two tiles
> > > > Do we need to call wait for page flip explicitly the number of times = number of tiles?
> > > 
> > > Oh, I see. So it seems two events are queued. Then we should probably
> > > loop until we have a page-flip for all CRTCs, since there's no
> > > guarantee all events will be sent at once.
> > > 
> > > > Regards
> > > > Manasi
> > > > 
> > > > > > +		test_cleanup(&data, conn_data);
> > > > > > +	}
> > > > > > +
> > > > > > +	igt_fixture {
> > > > > > +		free(conn_data);
> > > > > > +		close(data.drm_fd);
> > > > > > +		kmstest_restore_vt_mode();
> > > > > > +		igt_display_fini(data.display);
> > > > > > +	}
> > > > > > +}
> > > > > > diff --git a/tests/meson.build b/tests/meson.build
> > > > > > index a7b2b322..50292df8 100644
> > > > > > --- a/tests/meson.build
> > > > > > +++ b/tests/meson.build
> > > > > > @@ -26,6 +26,7 @@ test_progs = [
> > > > > >  	'kms_cursor_edge_walk',
> > > > > >  	'kms_cursor_legacy',
> > > > > >  	'kms_dp_dsc',
> > > > > > +	'kms_dp_tiled_display',
> > > > > >  	'kms_draw_crc',
> > > > > >  	'kms_fbcon_fbt',
> > > > > >  	'kms_fence_pin_leak',
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v4] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-12  1:31   ` [igt-dev] [PATCH i-g-t v3] " Manasi Navare
@ 2019-09-12 23:28     ` Manasi Navare
  2019-09-13  9:49       ` Petri Latvala
                         ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Manasi Navare @ 2019-09-12 23:28 UTC (permalink / raw)
  To: igt-dev; +Cc: madhumitha.tp, Petri Latvala

From: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>

This test validates the tiled DP displays to display a test pattern
seamlessly across the two tiles. It validates the transcoder port
sync feature on i915 to get a tearfree tiled display output.

Related kernel work patches-
https://patchwork.freedesktop.org/series/66403/

This test can eventually be extended to cover tiled display support
on other connector types.

v4:
* Add the logic to check there are
page flips per connector (Simon)
* Calloc instead of malloc to initialize (Manasi)

v3:
* Fix the pointer leaks (Simon)
* Code indentation (Manasi)
* Compare two consecutive flip timestamps (Simon)
* Use single fb across tiles (Simon)
* Fix reset mode logic (Manasi)

v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
    Minor style changes (Simon)
   Code clean-up and reordering

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Simon Ser <simon.ser@intel.com>
Cc: <madhumitha.tp@gmail.com>
Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 tests/Makefile.sources       |   1 +
 tests/kms_dp_tiled_display.c | 397 +++++++++++++++++++++++++++++++++++
 tests/meson.build            |   1 +
 3 files changed, 399 insertions(+)
 create mode 100644 tests/kms_dp_tiled_display.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c02e4d94..7561ab9b 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -41,6 +41,7 @@ TESTS_progs = \
 	kms_cursor_edge_walk \
 	kms_cursor_legacy \
 	kms_dp_dsc \
+	kms_dp_tiled_display \
 	kms_draw_crc \
 	kms_fbcon_fbt \
 	kms_fence_pin_leak \
diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
new file mode 100644
index 00000000..3055c6c3
--- /dev/null
+++ b/tests/kms_dp_tiled_display.c
@@ -0,0 +1,397 @@
+/*
+ * 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:
+ *  Madhumitha Tolakanahalli Pradeep
+ *      <madhumitha.tolakanahalli.pradeep@intel.com>
+ *  Manasi Navare <manasi.d.navare@intel.com>
+ *
+ * Display Port Tiled Display Test
+ * This test parses the tile information of the connectors that have TILE
+ * property set, sets up the framebuffer with correct offsets corresponding to
+ * the tile offsets and does an atomic modeset with two CRTCs for two
+ * connectors. Page flip event timestamp from each CRTC is collected and
+ * compared to make sure that they occurred in a synchronous manner.
+ *
+ * This test currently supports only horizontally tiled displays, in line with
+ * the displays supported by the kernel at the moment.
+ */
+
+#include "igt.h"
+#include "poll.h"
+#include "drm_mode.h"
+#include "drm_fourcc.h"
+
+IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
+
+typedef struct {
+	igt_output_t *output;
+	igt_tile_info_t tile;
+	enum pipe pipe;
+	drmModeConnectorPtr connector;
+	bool got_page_flip;
+} data_connector_t;
+
+typedef struct {
+	int drm_fd;
+	int num_h_tiles;
+	igt_fb_t fb_test_pattern;
+	igt_display_t *display;
+	data_connector_t *conns;
+	enum igt_commit_style commit;
+} data_t;
+
+static int drm_property_is_tile(drmModePropertyPtr prop)
+{
+	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
+			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
+}
+
+static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
+				     igt_tile_info_t *tile)
+{
+	int i = 0;
+	drmModePropertyPtr prop;
+	drmModePropertyBlobPtr blob;
+
+	for (i = 0; i < conn->count_props; i++) {
+		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
+
+		igt_assert(prop);
+
+		if (!drm_property_is_tile(prop)) {
+			drmModeFreeProperty(prop);
+			continue;
+		}
+
+		blob = drmModeGetPropertyBlob(data->drm_fd,
+				conn->prop_values[i]);
+
+		if (!blob)
+			goto cleanup;
+
+		igt_parse_connector_tile_blob(blob, tile);
+		break;
+	}
+
+cleanup:
+	drmModeFreeProperty(prop);
+	drmModeFreePropertyBlob(blob);
+}
+
+static void get_number_of_h_tiles(data_t *data)
+{
+	int i;
+	drmModeResPtr res;
+	drmModeConnectorPtr connector;
+	igt_tile_info_t tile = {.num_h_tile = 0};
+
+	igt_assert(res = drmModeGetResources(data->drm_fd));
+
+	for (i = 0; i < res->count_connectors; i++) {
+		connector = drmModeGetConnectorCurrent(data->drm_fd,
+				res->connectors[i]);
+
+		igt_assert(connector);
+
+		if (connector->connection != DRM_MODE_CONNECTED ||
+		    connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) {
+			drmModeFreeConnector(connector);
+			continue;
+		}
+
+		get_connector_tile_props(data, connector, &tile);
+		data->num_h_tiles = tile.num_h_tile;
+		break;
+	}
+
+	drmModeFreeResources(res);
+	drmModeFreeConnector(connector);
+}
+
+static void get_connectors(data_t *data)
+{
+	int count = 0;
+	igt_output_t *output;
+	data_connector_t *conns = data->conns;
+
+	for_each_connected_output(data->display, output) {
+		conns[count].connector = drmModeGetConnector(data->display->drm_fd,
+							     output->id);
+
+		igt_assert(conns[count].connector);
+
+		if (conns[count].connector->connector_type !=
+		    DRM_MODE_CONNECTOR_DisplayPort) {
+			drmModeFreeConnector(conns[count].connector);
+			continue;
+		}
+
+		get_connector_tile_props(data, conns[count].connector,
+					 &conns[count].tile);
+
+		/* Check if the connectors belong to the same tile group */
+		if (count > 0)
+			igt_assert(conns[count].tile.tile_group_id ==
+				   conns[count-1].tile.tile_group_id);
+
+		count++;
+	}
+}
+
+static void
+reset_plane(igt_output_t *output)
+{
+	igt_plane_t *primary;
+
+	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	igt_plane_set_fb(primary, NULL);
+}
+
+static void reset_output(igt_output_t *output)
+{
+	igt_output_set_pipe(output, PIPE_NONE);
+}
+
+static void reset_mode(data_t *data)
+{
+	int count;
+	igt_output_t *output;
+	data_connector_t *conns = data->conns;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		output = igt_output_from_connector(data->display,
+						   conns[count].connector);
+		igt_output_set_pipe(output, PIPE_NONE);
+	}
+	igt_display_commit2(data->display, data->commit);
+}
+
+static void test_cleanup(data_t *data)
+{
+	int count;
+	data_connector_t *conns = data->conns;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		if (conns[count].output) {
+			reset_plane(conns[count].output);
+			reset_output(conns[count].output);
+		}
+	}
+	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
+	igt_display_commit2(data->display, data->commit);
+	memset(conns, 0, sizeof(data_connector_t) * data->num_h_tiles);
+}
+
+static void setup_mode(data_t *data)
+{
+	int count = 0;
+	enum pipe pipe;
+	igt_output_t *output;
+	data_connector_t *conns = data->conns;
+
+	/*
+	 * The output is set to PIPE_NONE and then assigned a pipe.
+	 * This is done to ensure a complete modeset occures every
+	 * time the test is run.
+	 */
+	reset_mode(data);
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		output = igt_output_from_connector(data->display,
+						   conns[count].connector);
+
+		for_each_pipe(data->display, pipe) {
+			if (count > 0 && pipe == conns[count-1].pipe)
+				continue;
+
+			if (igt_pipe_connector_valid(pipe, output)) {
+
+				conns[count].pipe = pipe;
+				conns[count].output = output;
+
+				igt_output_set_pipe(conns[count].output,
+						    conns[count].pipe);
+				break;
+			}
+		}
+	}
+	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
+				  NULL);
+}
+
+static void setup_framebuffer(data_t *data)
+{
+	int count;
+	igt_plane_t *primary;
+	int fb_h_size = 0, fb_v_size = 0;
+	data_connector_t *conns = data->conns;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+
+		fb_h_size += conns[count].tile.tile_h_size;
+		/* We support only horizontal tiles, so vertical size is same
+		 * for all tiles and needs to be assigned only once.
+		 */
+		if (!fb_v_size)
+			fb_v_size = conns[count].tile.tile_v_size;
+	}
+
+	igt_create_pattern_fb(data->drm_fd,
+			      fb_h_size,
+			      fb_v_size,
+			      DRM_FORMAT_XBGR8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE,
+			      &data->fb_test_pattern);
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+
+		primary = igt_output_get_plane_type(conns[count].output,
+						    DRM_PLANE_TYPE_PRIMARY);
+
+		igt_plane_set_fb(primary, &data->fb_test_pattern);
+
+		igt_fb_set_size(&data->fb_test_pattern, primary,
+				conns[count].tile.tile_h_size,
+				conns[count].tile.tile_v_size);
+
+		igt_fb_set_position(&data->fb_test_pattern, primary,
+				    (conns[count].tile.tile_h_size *
+				     conns[count].tile.tile_h_loc),
+				    (conns[count].tile.tile_v_size *
+				     conns[count].tile.tile_v_loc));
+
+		igt_plane_set_size(primary,
+				   conns[count].tile.tile_h_size,
+				   conns[count].tile.tile_v_size);
+	}
+}
+
+static void page_flip_handler(int fd, unsigned int seq,
+			      unsigned int tv_sec, unsigned int tv_usec,
+			      unsigned int crtc_id, void *_data)
+{
+	data_t *data = _data;
+	data_connector_t *conn;
+	bool is_on_time = false;
+	static unsigned int _tv_sec, _tv_usec;
+	int i;
+
+	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
+		  tv_sec, tv_usec);
+
+	for (i = 0; i < data->num_h_tiles; i++) {
+
+		conn = &data->conns[i];
+		if (data->display->pipes[conn->pipe].crtc_id == crtc_id) {
+			igt_assert_f(!conn->got_page_flip,
+				     "Got two page-flips for CRTC %u\n",
+				     crtc_id);
+			conn->got_page_flip = true;
+
+			/* Skip the following checks for the first page flip event */
+			if (_tv_sec == 0 || _tv_usec == 0) {
+				_tv_sec = tv_sec;
+				_tv_usec = tv_usec;
+				return;
+			}
+			/*
+			 * For seamless tear-free display, the page flip event timestamps
+			 * from all the tiles should not differ by more than 10us.
+			 */
+			is_on_time = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
+
+			igt_fail_on_f(!is_on_time, "Delayed page flip event from CRTC:%d at %u:%u\n",
+				      crtc_id, tv_sec, tv_usec);
+			return;
+		}
+	}
+
+	igt_assert_f(false, "Got page-flip event for unexpected CRTC %u\n",
+		     crtc_id);
+}
+
+static bool got_all_page_flips(data_t *data)
+{
+	int i;
+
+	for (i = 0; i < data->num_h_tiles; i++) {
+		if (!data->conns[i].got_page_flip)
+			return false;
+	}
+
+	return true;
+}
+
+igt_main
+{
+	igt_display_t display;
+	data_t data = {0};
+	struct pollfd pfd = {0};
+	drmEventContext drm_event = {0};
+	int ret;
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
+
+		kmstest_set_vt_graphics_mode();
+		igt_display_require(&display, data.drm_fd);
+		igt_display_reset(&display);
+
+		data.display = &display;
+		pfd.fd = data.drm_fd;
+		pfd.events = POLLIN;
+		drm_event.version = 3;
+		drm_event.page_flip_handler2 = page_flip_handler;
+		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
+		igt_require(data.commit == COMMIT_ATOMIC);
+
+		get_number_of_h_tiles(&data);
+		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
+		igt_require(data.num_h_tiles > 0);
+		data.conns = calloc(data.num_h_tiles, sizeof(data_connector_t));
+	}
+
+	igt_subtest("basic-test-pattern") {
+		igt_assert(data.conns);
+
+		get_connectors(&data);
+		setup_mode(&data);
+		setup_framebuffer(&data);
+		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
+					  DRM_MODE_PAGE_FLIP_EVENT, &data);
+		while (!got_all_page_flips(&data)) {
+			ret = poll(&pfd, 1, 1000);
+			igt_assert(ret == 1);
+			drmHandleEvent(data.drm_fd, &drm_event);
+		}
+
+		test_cleanup(&data);
+	}
+
+	igt_fixture {
+		free(data.conns);
+		close(data.drm_fd);
+		kmstest_restore_vt_mode();
+		igt_display_fini(data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index a7b2b322..50292df8 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -26,6 +26,7 @@ test_progs = [
 	'kms_cursor_edge_walk',
 	'kms_cursor_legacy',
 	'kms_dp_dsc',
+	'kms_dp_tiled_display',
 	'kms_draw_crc',
 	'kms_fbcon_fbt',
 	'kms_fence_pin_leak',
-- 
2.19.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev4)
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
                   ` (5 preceding siblings ...)
  2019-09-12  7:35 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-09-13  0:07 ` Patchwork
  2019-09-13 17:21 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2019-09-13  0:07 UTC (permalink / raw)
  To: Manasi Navare; +Cc: igt-dev

== Series Details ==

Series: Added tile property parser library function and IGT test for DP tiled displays (rev4)
URL   : https://patchwork.freedesktop.org/series/65652/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6885 -> IGTPW_3451
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/65652/revisions/4/mbox/

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

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

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - {fi-tgl-u}:         NOTRUN -> [SKIP][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/fi-tgl-u/igt@i915_pm_rpm@basic-pci-d3-state.html

  * igt@i915_pm_rpm@basic-rte:
    - {fi-tgl-u}:         NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/fi-tgl-u/igt@i915_pm_rpm@basic-rte.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_hangcheck:
    - fi-icl-u3:          [PASS][3] -> [DMESG-FAIL][4] ([fdo#111144] / [fdo#111678])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/fi-icl-u3/igt@i915_selftest@live_hangcheck.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/fi-icl-u3/igt@i915_selftest@live_hangcheck.html

  * igt@i915_selftest@live_workarounds:
    - fi-bsw-kefka:       [PASS][5] -> [DMESG-WARN][6] ([fdo#111373])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/fi-bsw-kefka/igt@i915_selftest@live_workarounds.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/fi-bsw-kefka/igt@i915_selftest@live_workarounds.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3:
    - {fi-tgl-u}:         [INCOMPLETE][7] -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/fi-tgl-u/igt@gem_exec_suspend@basic-s3.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/fi-tgl-u/igt@gem_exec_suspend@basic-s3.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][9] ([fdo#111096]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_frontbuffer_tracking@basic:
    - {fi-icl-u4}:        [FAIL][11] ([fdo#103167]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/fi-icl-u4/igt@kms_frontbuffer_tracking@basic.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/fi-icl-u4/igt@kms_frontbuffer_tracking@basic.html
    - fi-icl-u2:          [FAIL][13] ([fdo#103167]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html

  * igt@prime_vgem@basic-busy-default:
    - fi-icl-u3:          [DMESG-WARN][15] ([fdo#107724]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/fi-icl-u3/igt@prime_vgem@basic-busy-default.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/fi-icl-u3/igt@prime_vgem@basic-busy-default.html

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111144]: https://bugs.freedesktop.org/show_bug.cgi?id=111144
  [fdo#111373]: https://bugs.freedesktop.org/show_bug.cgi?id=111373
  [fdo#111678]: https://bugs.freedesktop.org/show_bug.cgi?id=111678


Participating hosts (55 -> 47)
------------------------------

  Missing    (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5178 -> IGTPW_3451

  CI-20190529: 20190529
  CI_DRM_6885: 11786d27cb029a083556ac9b82e33d74e250ce26 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3451: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/
  IGT_5178: efb4539494d94f03374874d3b61bd04ef3802aaa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_dp_tiled_display@basic-test-pattern

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t v4] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-12 23:28     ` [igt-dev] [PATCH i-g-t v4] " Manasi Navare
@ 2019-09-13  9:49       ` Petri Latvala
  2019-09-13 18:16         ` Manasi Navare
  2019-09-13 11:41       ` Ser, Simon
  2019-09-13 23:48       ` [igt-dev] [PATCH i-g-t v5] " Manasi Navare
  2 siblings, 1 reply; 34+ messages in thread
From: Petri Latvala @ 2019-09-13  9:49 UTC (permalink / raw)
  To: Manasi Navare; +Cc: igt-dev, madhumitha.tp

On Thu, Sep 12, 2019 at 04:28:30PM -0700, Manasi Navare wrote:
> From: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> 
> This test validates the tiled DP displays to display a test pattern
> seamlessly across the two tiles. It validates the transcoder port
> sync feature on i915 to get a tearfree tiled display output.
> 
> Related kernel work patches-
> https://patchwork.freedesktop.org/series/66403/
> 
> This test can eventually be extended to cover tiled display support
> on other connector types.
> 
> v4:
> * Add the logic to check there are
> page flips per connector (Simon)
> * Calloc instead of malloc to initialize (Manasi)
> 
> v3:
> * Fix the pointer leaks (Simon)
> * Code indentation (Manasi)
> * Compare two consecutive flip timestamps (Simon)
> * Use single fb across tiles (Simon)
> * Fix reset mode logic (Manasi)
> 
> v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
>     Minor style changes (Simon)
>    Code clean-up and reordering
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Simon Ser <simon.ser@intel.com>
> Cc: <madhumitha.tp@gmail.com>
> Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
>  tests/Makefile.sources       |   1 +
>  tests/kms_dp_tiled_display.c | 397 +++++++++++++++++++++++++++++++++++
>  tests/meson.build            |   1 +
>  3 files changed, 399 insertions(+)
>  create mode 100644 tests/kms_dp_tiled_display.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index c02e4d94..7561ab9b 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -41,6 +41,7 @@ TESTS_progs = \
>  	kms_cursor_edge_walk \
>  	kms_cursor_legacy \
>  	kms_dp_dsc \
> +	kms_dp_tiled_display \
>  	kms_draw_crc \
>  	kms_fbcon_fbt \
>  	kms_fence_pin_leak \
> diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> new file mode 100644
> index 00000000..3055c6c3
> --- /dev/null
> +++ b/tests/kms_dp_tiled_display.c
> @@ -0,0 +1,397 @@
> +/*
> + * Copyright © 2018 Intel Corporation


2019?


> + *
> + * 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:
> + *  Madhumitha Tolakanahalli Pradeep
> + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> + *  Manasi Navare <manasi.d.navare@intel.com>
> + *
> + * Display Port Tiled Display Test
> + * This test parses the tile information of the connectors that have TILE
> + * property set, sets up the framebuffer with correct offsets corresponding to
> + * the tile offsets and does an atomic modeset with two CRTCs for two
> + * connectors. Page flip event timestamp from each CRTC is collected and
> + * compared to make sure that they occurred in a synchronous manner.
> + *
> + * This test currently supports only horizontally tiled displays, in line with
> + * the displays supported by the kernel at the moment.
> + */
> +
> +#include "igt.h"
> +#include "poll.h"
> +#include "drm_mode.h"
> +#include "drm_fourcc.h"
> +
> +IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
> +
> +typedef struct {
> +	igt_output_t *output;
> +	igt_tile_info_t tile;
> +	enum pipe pipe;
> +	drmModeConnectorPtr connector;
> +	bool got_page_flip;
> +} data_connector_t;
> +
> +typedef struct {
> +	int drm_fd;
> +	int num_h_tiles;
> +	igt_fb_t fb_test_pattern;
> +	igt_display_t *display;
> +	data_connector_t *conns;
> +	enum igt_commit_style commit;
> +} data_t;
> +
> +static int drm_property_is_tile(drmModePropertyPtr prop)
> +{
> +	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
> +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> +}
> +
> +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> +				     igt_tile_info_t *tile)
> +{
> +	int i = 0;
> +	drmModePropertyPtr prop;
> +	drmModePropertyBlobPtr blob;
> +
> +	for (i = 0; i < conn->count_props; i++) {
> +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> +
> +		igt_assert(prop);
> +
> +		if (!drm_property_is_tile(prop)) {
> +			drmModeFreeProperty(prop);
> +			continue;
> +		}
> +
> +		blob = drmModeGetPropertyBlob(data->drm_fd,
> +				conn->prop_values[i]);
> +
> +		if (!blob)
> +			goto cleanup;
> +
> +		igt_parse_connector_tile_blob(blob, tile);
> +		break;
> +	}
> +
> +cleanup:
> +	drmModeFreeProperty(prop);
> +	drmModeFreePropertyBlob(blob);
> +}
> +
> +static void get_number_of_h_tiles(data_t *data)
> +{
> +	int i;
> +	drmModeResPtr res;
> +	drmModeConnectorPtr connector;
> +	igt_tile_info_t tile = {.num_h_tile = 0};
> +
> +	igt_assert(res = drmModeGetResources(data->drm_fd));
> +
> +	for (i = 0; i < res->count_connectors; i++) {
> +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> +				res->connectors[i]);
> +
> +		igt_assert(connector);
> +
> +		if (connector->connection != DRM_MODE_CONNECTED ||
> +		    connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) {
> +			drmModeFreeConnector(connector);
> +			continue;
> +		}
> +
> +		get_connector_tile_props(data, connector, &tile);
> +		data->num_h_tiles = tile.num_h_tile;
> +		break;
> +	}
> +
> +	drmModeFreeResources(res);
> +	drmModeFreeConnector(connector);
> +}
> +
> +static void get_connectors(data_t *data)
> +{
> +	int count = 0;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	for_each_connected_output(data->display, output) {
> +		conns[count].connector = drmModeGetConnector(data->display->drm_fd,
> +							     output->id);
> +
> +		igt_assert(conns[count].connector);
> +
> +		if (conns[count].connector->connector_type !=
> +		    DRM_MODE_CONNECTOR_DisplayPort) {
> +			drmModeFreeConnector(conns[count].connector);
> +			continue;
> +		}
> +
> +		get_connector_tile_props(data, conns[count].connector,
> +					 &conns[count].tile);
> +
> +		/* Check if the connectors belong to the same tile group */
> +		if (count > 0)
> +			igt_assert(conns[count].tile.tile_group_id ==
> +				   conns[count-1].tile.tile_group_id);
> +
> +		count++;
> +	}
> +}
> +
> +static void
> +reset_plane(igt_output_t *output)
> +{
> +	igt_plane_t *primary;
> +
> +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +}
> +
> +static void reset_output(igt_output_t *output)
> +{
> +	igt_output_set_pipe(output, PIPE_NONE);
> +}
> +
> +static void reset_mode(data_t *data)
> +{
> +	int count;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		output = igt_output_from_connector(data->display,
> +						   conns[count].connector);
> +		igt_output_set_pipe(output, PIPE_NONE);
> +	}
> +	igt_display_commit2(data->display, data->commit);
> +}
> +
> +static void test_cleanup(data_t *data)
> +{
> +	int count;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		if (conns[count].output) {
> +			reset_plane(conns[count].output);
> +			reset_output(conns[count].output);
> +		}
> +	}
> +	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
> +	igt_display_commit2(data->display, data->commit);
> +	memset(conns, 0, sizeof(data_connector_t) * data->num_h_tiles);
> +}
> +
> +static void setup_mode(data_t *data)
> +{
> +	int count = 0;
> +	enum pipe pipe;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	/*
> +	 * The output is set to PIPE_NONE and then assigned a pipe.
> +	 * This is done to ensure a complete modeset occures every
> +	 * time the test is run.
> +	 */
> +	reset_mode(data);
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		output = igt_output_from_connector(data->display,
> +						   conns[count].connector);
> +
> +		for_each_pipe(data->display, pipe) {
> +			if (count > 0 && pipe == conns[count-1].pipe)
> +				continue;
> +
> +			if (igt_pipe_connector_valid(pipe, output)) {
> +
> +				conns[count].pipe = pipe;
> +				conns[count].output = output;
> +
> +				igt_output_set_pipe(conns[count].output,
> +						    conns[count].pipe);
> +				break;
> +			}
> +		}
> +	}
> +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +				  NULL);
> +}
> +
> +static void setup_framebuffer(data_t *data)
> +{
> +	int count;
> +	igt_plane_t *primary;
> +	int fb_h_size = 0, fb_v_size = 0;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +
> +		fb_h_size += conns[count].tile.tile_h_size;
> +		/* We support only horizontal tiles, so vertical size is same
> +		 * for all tiles and needs to be assigned only once.
> +		 */
> +		if (!fb_v_size)
> +			fb_v_size = conns[count].tile.tile_v_size;
> +	}
> +
> +	igt_create_pattern_fb(data->drm_fd,
> +			      fb_h_size,
> +			      fb_v_size,
> +			      DRM_FORMAT_XBGR8888,
> +			      LOCAL_DRM_FORMAT_MOD_NONE,
> +			      &data->fb_test_pattern);
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +
> +		primary = igt_output_get_plane_type(conns[count].output,
> +						    DRM_PLANE_TYPE_PRIMARY);
> +
> +		igt_plane_set_fb(primary, &data->fb_test_pattern);
> +
> +		igt_fb_set_size(&data->fb_test_pattern, primary,
> +				conns[count].tile.tile_h_size,
> +				conns[count].tile.tile_v_size);
> +
> +		igt_fb_set_position(&data->fb_test_pattern, primary,
> +				    (conns[count].tile.tile_h_size *
> +				     conns[count].tile.tile_h_loc),
> +				    (conns[count].tile.tile_v_size *
> +				     conns[count].tile.tile_v_loc));
> +
> +		igt_plane_set_size(primary,
> +				   conns[count].tile.tile_h_size,
> +				   conns[count].tile.tile_v_size);
> +	}
> +}
> +
> +static void page_flip_handler(int fd, unsigned int seq,
> +			      unsigned int tv_sec, unsigned int tv_usec,
> +			      unsigned int crtc_id, void *_data)
> +{
> +	data_t *data = _data;
> +	data_connector_t *conn;
> +	bool is_on_time = false;
> +	static unsigned int _tv_sec, _tv_usec;
> +	int i;
> +
> +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> +		  tv_sec, tv_usec);
> +
> +	for (i = 0; i < data->num_h_tiles; i++) {
> +
> +		conn = &data->conns[i];
> +		if (data->display->pipes[conn->pipe].crtc_id == crtc_id) {
> +			igt_assert_f(!conn->got_page_flip,
> +				     "Got two page-flips for CRTC %u\n",
> +				     crtc_id);
> +			conn->got_page_flip = true;
> +
> +			/* Skip the following checks for the first page flip event */
> +			if (_tv_sec == 0 || _tv_usec == 0) {
> +				_tv_sec = tv_sec;
> +				_tv_usec = tv_usec;
> +				return;
> +			}
> +			/*
> +			 * For seamless tear-free display, the page flip event timestamps
> +			 * from all the tiles should not differ by more than 10us.
> +			 */
> +			is_on_time = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> +
> +			igt_fail_on_f(!is_on_time, "Delayed page flip event from CRTC:%d at %u:%u\n",
> +				      crtc_id, tv_sec, tv_usec);
> +			return;
> +		}
> +	}
> +
> +	igt_assert_f(false, "Got page-flip event for unexpected CRTC %u\n",
> +		     crtc_id);
> +}
> +
> +static bool got_all_page_flips(data_t *data)
> +{
> +	int i;
> +
> +	for (i = 0; i < data->num_h_tiles; i++) {
> +		if (!data->conns[i].got_page_flip)
> +			return false;
> +	}
> +
> +	return true;
> +}
> +
> +igt_main
> +{
> +	igt_display_t display;
> +	data_t data = {0};
> +	struct pollfd pfd = {0};
> +	drmEventContext drm_event = {0};
> +	int ret;
> +
> +	igt_fixture {
> +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> +
> +		kmstest_set_vt_graphics_mode();
> +		igt_display_require(&display, data.drm_fd);
> +		igt_display_reset(&display);
> +
> +		data.display = &display;
> +		pfd.fd = data.drm_fd;
> +		pfd.events = POLLIN;
> +		drm_event.version = 3;
> +		drm_event.page_flip_handler2 = page_flip_handler;
> +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> +		igt_require(data.commit == COMMIT_ATOMIC);
> +
> +		get_number_of_h_tiles(&data);
> +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> +		igt_require(data.num_h_tiles > 0);
> +		data.conns = calloc(data.num_h_tiles, sizeof(data_connector_t));
> +	}
> +
> +	igt_subtest("basic-test-pattern") {

Please document this subtest with igt_describe.


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

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

* Re: [igt-dev] [PATCH i-g-t v4] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-12 23:28     ` [igt-dev] [PATCH i-g-t v4] " Manasi Navare
  2019-09-13  9:49       ` Petri Latvala
@ 2019-09-13 11:41       ` Ser, Simon
  2019-09-13 23:48       ` [igt-dev] [PATCH i-g-t v5] " Manasi Navare
  2 siblings, 0 replies; 34+ messages in thread
From: Ser, Simon @ 2019-09-13 11:41 UTC (permalink / raw)
  To: igt-dev, Navare, Manasi D; +Cc: madhumitha.tp, Latvala, Petri

Hi,

Thanks for this new version, I like it. The updated page-flip checks
look good to me. Here is my last round of comments, with the non-nit
ones fixed, this is:

Reviewed-by: Simon Ser <simon.ser@intel.com>

On Thu, 2019-09-12 at 16:28 -0700, Manasi Navare wrote:
> From: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> 
> This test validates the tiled DP displays to display a test pattern
> seamlessly across the two tiles. It validates the transcoder port
> sync feature on i915 to get a tearfree tiled display output.
> 
> Related kernel work patches-
> https://patchwork.freedesktop.org/series/66403/
> 
> This test can eventually be extended to cover tiled display support
> on other connector types.
> 
> v4:
> * Add the logic to check there are
> page flips per connector (Simon)
> * Calloc instead of malloc to initialize (Manasi)
> 
> v3:
> * Fix the pointer leaks (Simon)
> * Code indentation (Manasi)
> * Compare two consecutive flip timestamps (Simon)
> * Use single fb across tiles (Simon)
> * Fix reset mode logic (Manasi)
> 
> v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
>     Minor style changes (Simon)
>    Code clean-up and reordering
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Simon Ser <simon.ser@intel.com>
> Cc: <madhumitha.tp@gmail.com>
> Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
>  tests/Makefile.sources       |   1 +
>  tests/kms_dp_tiled_display.c | 397 +++++++++++++++++++++++++++++++++++
>  tests/meson.build            |   1 +
>  3 files changed, 399 insertions(+)
>  create mode 100644 tests/kms_dp_tiled_display.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index c02e4d94..7561ab9b 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -41,6 +41,7 @@ TESTS_progs = \
>  	kms_cursor_edge_walk \
>  	kms_cursor_legacy \
>  	kms_dp_dsc \
> +	kms_dp_tiled_display \
>  	kms_draw_crc \
>  	kms_fbcon_fbt \
>  	kms_fence_pin_leak \
> diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> new file mode 100644
> index 00000000..3055c6c3
> --- /dev/null
> +++ b/tests/kms_dp_tiled_display.c
> @@ -0,0 +1,397 @@
> +/*
> + * 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:
> + *  Madhumitha Tolakanahalli Pradeep
> + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> + *  Manasi Navare <manasi.d.navare@intel.com>
> + *
> + * Display Port Tiled Display Test
> + * This test parses the tile information of the connectors that have TILE
> + * property set, sets up the framebuffer with correct offsets corresponding to
> + * the tile offsets and does an atomic modeset with two CRTCs for two
> + * connectors. Page flip event timestamp from each CRTC is collected and
> + * compared to make sure that they occurred in a synchronous manner.
> + *
> + * This test currently supports only horizontally tiled displays, in line with
> + * the displays supported by the kernel at the moment.
> + */
> +
> +#include "igt.h"
> +#include "poll.h"
> +#include "drm_mode.h"
> +#include "drm_fourcc.h"
> +
> +IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
> +
> +typedef struct {
> +	igt_output_t *output;
> +	igt_tile_info_t tile;
> +	enum pipe pipe;
> +	drmModeConnectorPtr connector;
> +	bool got_page_flip;
> +} data_connector_t;
> +
> +typedef struct {
> +	int drm_fd;
> +	int num_h_tiles;
> +	igt_fb_t fb_test_pattern;
> +	igt_display_t *display;
> +	data_connector_t *conns;
> +	enum igt_commit_style commit;
> +} data_t;
> +
> +static int drm_property_is_tile(drmModePropertyPtr prop)
> +{
> +	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
> +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> +}
> +
> +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> +				     igt_tile_info_t *tile)
> +{
> +	int i = 0;
> +	drmModePropertyPtr prop;
> +	drmModePropertyBlobPtr blob;
> +
> +	for (i = 0; i < conn->count_props; i++) {
> +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> +
> +		igt_assert(prop);
> +
> +		if (!drm_property_is_tile(prop)) {
> +			drmModeFreeProperty(prop);
> +			continue;
> +		}
> +
> +		blob = drmModeGetPropertyBlob(data->drm_fd,
> +				conn->prop_values[i]);
> +
> +		if (!blob)
> +			goto cleanup;
> +
> +		igt_parse_connector_tile_blob(blob, tile);
> +		break;
> +	}
> +
> +cleanup:
> +	drmModeFreeProperty(prop);
> +	drmModeFreePropertyBlob(blob);
> +}
> +
> +static void get_number_of_h_tiles(data_t *data)
> +{
> +	int i;
> +	drmModeResPtr res;
> +	drmModeConnectorPtr connector;
> +	igt_tile_info_t tile = {.num_h_tile = 0};
> +
> +	igt_assert(res = drmModeGetResources(data->drm_fd));
> +
> +	for (i = 0; i < res->count_connectors; i++) {
> +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> +				res->connectors[i]);
> +
> +		igt_assert(connector);
> +
> +		if (connector->connection != DRM_MODE_CONNECTED ||
> +		    connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) {
> +			drmModeFreeConnector(connector);
> +			continue;
> +		}
> +
> +		get_connector_tile_props(data, connector, &tile);
> +		data->num_h_tiles = tile.num_h_tile;
> +		break;

In case there is a connected DisplayPort screen which isn't tiled, this
will bail out even if there is also a tiled screen connected.

Would be nice to:

	if (tile.num_h_tile == 0) {
		drmModeFreeConnector(connector);
		continue;
	}

> +	}
> +
> +	drmModeFreeResources(res);
> +	drmModeFreeConnector(connector);
> +}
> +
> +static void get_connectors(data_t *data)
> +{
> +	int count = 0;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	for_each_connected_output(data->display, output) {
> +		conns[count].connector = drmModeGetConnector(data->display->drm_fd,
> +							     output->id);
> +
> +		igt_assert(conns[count].connector);
> +
> +		if (conns[count].connector->connector_type !=
> +		    DRM_MODE_CONNECTOR_DisplayPort) {
> +			drmModeFreeConnector(conns[count].connector);
> +			continue;
> +		}
> +
> +		get_connector_tile_props(data, conns[count].connector,
> +					 &conns[count].tile);

Ditto, would be nice to skip if conns[count].tile.num_h_tile == 0.

> +		/* Check if the connectors belong to the same tile group */
> +		if (count > 0)
> +			igt_assert(conns[count].tile.tile_group_id ==
> +				   conns[count-1].tile.tile_group_id);
> +
> +		count++;
> +	}
> +}
> +
> +static void
> +reset_plane(igt_output_t *output)
> +{
> +	igt_plane_t *primary;
> +
> +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +}
> +
> +static void reset_output(igt_output_t *output)
> +{
> +	igt_output_set_pipe(output, PIPE_NONE);
> +}
> +
> +static void reset_mode(data_t *data)
> +{
> +	int count;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		output = igt_output_from_connector(data->display,
> +						   conns[count].connector);
> +		igt_output_set_pipe(output, PIPE_NONE);
> +	}
> +	igt_display_commit2(data->display, data->commit);
> +}
> +
> +static void test_cleanup(data_t *data)
> +{
> +	int count;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		if (conns[count].output) {
> +			reset_plane(conns[count].output);
> +			reset_output(conns[count].output);
> +		}
> +	}
> +	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
> +	igt_display_commit2(data->display, data->commit);
> +	memset(conns, 0, sizeof(data_connector_t) * data->num_h_tiles);
> +}
> +
> +static void setup_mode(data_t *data)
> +{
> +	int count = 0;
> +	enum pipe pipe;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	/*
> +	 * The output is set to PIPE_NONE and then assigned a pipe.
> +	 * This is done to ensure a complete modeset occures every
> +	 * time the test is run.
> +	 */
> +	reset_mode(data);
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		output = igt_output_from_connector(data->display,
> +						   conns[count].connector);
> +
> +		for_each_pipe(data->display, pipe) {
> +			if (count > 0 && pipe == conns[count-1].pipe)
> +				continue;

This only checks whether the previous connector picked this pipe. We
need to make sure none of the previous connectors picked this pipe.

For instance, if num_h_tiles == 3, maybe conns[0] has picked pipe A,
and we want to prevent conns[2] from also picking pipe A.

So the easiest way to fix it is to iterate over all previous connectors
(conns[0] till conns[count-1]) and make sure nobody picked the pipe
already. This wouldn't be very efficient, but who cares.

Alternatively, see pick_n_outputs in my kms_atomic_multi patch, which
does it the other way around: iterate over all pipes then iterate over
all connectors. Doing it that way allows output->pending_pipe to be
checked.

> +
> +			if (igt_pipe_connector_valid(pipe, output)) {
> +

Style nit: stray newline here ^

> +				conns[count].pipe = pipe;
> +				conns[count].output = output;
> +
> +				igt_output_set_pipe(conns[count].output,
> +						    conns[count].pipe);
> +				break;
> +			}
> +		}
> +	}
> +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +				  NULL);
> +}
> +
> +static void setup_framebuffer(data_t *data)
> +{
> +	int count;
> +	igt_plane_t *primary;
> +	int fb_h_size = 0, fb_v_size = 0;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +

Style nit: stray newline here ^

> +		fb_h_size += conns[count].tile.tile_h_size;
> +		/* We support only horizontal tiles, so vertical size is same
> +		 * for all tiles and needs to be assigned only once.
> +		 */
> +		if (!fb_v_size)
> +			fb_v_size = conns[count].tile.tile_v_size;

Nit: maybe igt_assert (or igt_require?) that tile_v_size is the same
for all  tiles?

> +	}
> +
> +	igt_create_pattern_fb(data->drm_fd,
> +			      fb_h_size,
> +			      fb_v_size,
> +			      DRM_FORMAT_XBGR8888,
> +			      LOCAL_DRM_FORMAT_MOD_NONE,
> +			      &data->fb_test_pattern);
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +

Style nit: stray newline here ^

> +		primary = igt_output_get_plane_type(conns[count].output,
> +						    DRM_PLANE_TYPE_PRIMARY);
> +
> +		igt_plane_set_fb(primary, &data->fb_test_pattern);
> +
> +		igt_fb_set_size(&data->fb_test_pattern, primary,
> +				conns[count].tile.tile_h_size,
> +				conns[count].tile.tile_v_size);
> +
> +		igt_fb_set_position(&data->fb_test_pattern, primary,
> +				    (conns[count].tile.tile_h_size *
> +				     conns[count].tile.tile_h_loc),
> +				    (conns[count].tile.tile_v_size *
> +				     conns[count].tile.tile_v_loc));
> +
> +		igt_plane_set_size(primary,
> +				   conns[count].tile.tile_h_size,
> +				   conns[count].tile.tile_v_size);
> +	}
> +}
> +
> +static void page_flip_handler(int fd, unsigned int seq,
> +			      unsigned int tv_sec, unsigned int tv_usec,
> +			      unsigned int crtc_id, void *_data)
> +{
> +	data_t *data = _data;
> +	data_connector_t *conn;
> +	bool is_on_time = false;
> +	static unsigned int _tv_sec, _tv_usec;
> +	int i;
> +
> +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> +		  tv_sec, tv_usec);
> +
> +	for (i = 0; i < data->num_h_tiles; i++) {
> +

Style nit: stray newline here ^

> +		conn = &data->conns[i];
> +		if (data->display->pipes[conn->pipe].crtc_id == crtc_id) {
> +			igt_assert_f(!conn->got_page_flip,
> +				     "Got two page-flips for CRTC %u\n",
> +				     crtc_id);
> +			conn->got_page_flip = true;
> +
> +			/* Skip the following checks for the first page flip event */
> +			if (_tv_sec == 0 || _tv_usec == 0) {
> +				_tv_sec = tv_sec;
> +				_tv_usec = tv_usec;
> +				return;
> +			}
> +			/*
> +			 * For seamless tear-free display, the page flip event timestamps
> +			 * from all the tiles should not differ by more than 10us.
> +			 */
> +			is_on_time = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> +
> +			igt_fail_on_f(!is_on_time, "Delayed page flip event from CRTC:%d at %u:%u\n",
> +				      crtc_id, tv_sec, tv_usec);
> +			return;
> +		}
> +	}
> +
> +	igt_assert_f(false, "Got page-flip event for unexpected CRTC %u\n",
> +		     crtc_id);
> +}
> +
> +static bool got_all_page_flips(data_t *data)
> +{
> +	int i;
> +
> +	for (i = 0; i < data->num_h_tiles; i++) {
> +		if (!data->conns[i].got_page_flip)
> +			return false;
> +	}
> +
> +	return true;
> +}
> +
> +igt_main
> +{
> +	igt_display_t display;
> +	data_t data = {0};
> +	struct pollfd pfd = {0};
> +	drmEventContext drm_event = {0};
> +	int ret;
> +
> +	igt_fixture {
> +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> +
> +		kmstest_set_vt_graphics_mode();
> +		igt_display_require(&display, data.drm_fd);
> +		igt_display_reset(&display);
> +
> +		data.display = &display;
> +		pfd.fd = data.drm_fd;
> +		pfd.events = POLLIN;
> +		drm_event.version = 3;
> +		drm_event.page_flip_handler2 = page_flip_handler;
> +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> +		igt_require(data.commit == COMMIT_ATOMIC);
> +
> +		get_number_of_h_tiles(&data);
> +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> +		igt_require(data.num_h_tiles > 0);
> +		data.conns = calloc(data.num_h_tiles, sizeof(data_connector_t));
> +	}
> +
> +	igt_subtest("basic-test-pattern") {
> +		igt_assert(data.conns);
> +
> +		get_connectors(&data);
> +		setup_mode(&data);
> +		setup_framebuffer(&data);
> +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> +					  DRM_MODE_PAGE_FLIP_EVENT, &data);
> +		while (!got_all_page_flips(&data)) {
> +			ret = poll(&pfd, 1, 1000);
> +			igt_assert(ret == 1);
> +			drmHandleEvent(data.drm_fd, &drm_event);
> +		}
> +
> +		test_cleanup(&data);
> +	}
> +
> +	igt_fixture {
> +		free(data.conns);
> +		close(data.drm_fd);
> +		kmstest_restore_vt_mode();
> +		igt_display_fini(data.display);
> +	}
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index a7b2b322..50292df8 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -26,6 +26,7 @@ test_progs = [
>  	'kms_cursor_edge_walk',
>  	'kms_cursor_legacy',
>  	'kms_dp_dsc',
> +	'kms_dp_tiled_display',
>  	'kms_draw_crc',
>  	'kms_fbcon_fbt',
>  	'kms_fence_pin_leak',
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.IGT: failure for Added tile property parser library function and IGT test for DP tiled displays (rev4)
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
                   ` (6 preceding siblings ...)
  2019-09-13  0:07 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev4) Patchwork
@ 2019-09-13 17:21 ` Patchwork
  2019-09-14  0:14 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev5) Patchwork
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2019-09-13 17:21 UTC (permalink / raw)
  To: Manasi Navare; +Cc: igt-dev

== Series Details ==

Series: Added tile property parser library function and IGT test for DP tiled displays (rev4)
URL   : https://patchwork.freedesktop.org/series/65652/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6885_full -> IGTPW_3451_full
====================================================

Summary
-------

  **FAILURE**

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

  External URL: https://patchwork.freedesktop.org/api/1.0/series/65652/revisions/4/mbox/

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@gem_exec_schedule@smoketest-vebox:
    - shard-kbl:          [PASS][1] -> [DMESG-WARN][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-kbl4/igt@gem_exec_schedule@smoketest-vebox.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-kbl4/igt@gem_exec_schedule@smoketest-vebox.html

  * {igt@kms_dp_tiled_display@basic-test-pattern} (NEW):
    - shard-glk:          NOTRUN -> [FAIL][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-glk2/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-hsw:          NOTRUN -> [FAIL][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-hsw5/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-iclb:         NOTRUN -> [SKIP][5]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb3/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-snb:          NOTRUN -> [FAIL][6]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-snb4/igt@kms_dp_tiled_display@basic-test-pattern.html

  
New tests
---------

  New tests have been introduced between CI_DRM_6885_full and IGTPW_3451_full:

### New IGT tests (1) ###

  * igt@kms_dp_tiled_display@basic-test-pattern:
    - Statuses : 3 fail(s) 3 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_isolation@bcs0-s3:
    - shard-apl:          [PASS][7] -> [DMESG-WARN][8] ([fdo#108566]) +3 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-apl3/igt@gem_ctx_isolation@bcs0-s3.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-apl1/igt@gem_ctx_isolation@bcs0-s3.html

  * igt@gem_exec_schedule@fifo-bsd:
    - shard-iclb:         [PASS][9] -> [SKIP][10] ([fdo#111325]) +7 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb5/igt@gem_exec_schedule@fifo-bsd.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb4/igt@gem_exec_schedule@fifo-bsd.html

  * igt@gem_exec_schedule@preempt-bsd1:
    - shard-iclb:         [PASS][11] -> [SKIP][12] ([fdo#109276]) +14 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb4/igt@gem_exec_schedule@preempt-bsd1.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb6/igt@gem_exec_schedule@preempt-bsd1.html

  * igt@gem_tiled_wb:
    - shard-apl:          [PASS][13] -> [INCOMPLETE][14] ([fdo#103927])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-apl8/igt@gem_tiled_wb.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-apl1/igt@gem_tiled_wb.html

  * igt@kms_cursor_crc@pipe-c-cursor-alpha-opaque:
    - shard-apl:          [PASS][15] -> [FAIL][16] ([fdo#103232])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-apl8/igt@kms_cursor_crc@pipe-c-cursor-alpha-opaque.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-apl7/igt@kms_cursor_crc@pipe-c-cursor-alpha-opaque.html
    - shard-kbl:          [PASS][17] -> [FAIL][18] ([fdo#103232])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-kbl7/igt@kms_cursor_crc@pipe-c-cursor-alpha-opaque.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-kbl1/igt@kms_cursor_crc@pipe-c-cursor-alpha-opaque.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
    - shard-glk:          [PASS][19] -> [FAIL][20] ([fdo#103167])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-glk8/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-glk3/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
    - shard-iclb:         [PASS][21] -> [FAIL][22] ([fdo#103167]) +2 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_psr2_su@page_flip:
    - shard-iclb:         [PASS][23] -> [SKIP][24] ([fdo#109642] / [fdo#111068])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb2/igt@kms_psr2_su@page_flip.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb4/igt@kms_psr2_su@page_flip.html

  * igt@kms_psr@psr2_cursor_plane_onoff:
    - shard-iclb:         [PASS][25] -> [SKIP][26] ([fdo#109441]) +1 similar issue
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb7/igt@kms_psr@psr2_cursor_plane_onoff.html

  
#### Possible fixes ####

  * igt@gem_ctx_switch@legacy-bsd2-heavy:
    - shard-iclb:         [SKIP][27] ([fdo#109276]) -> [PASS][28] +13 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb5/igt@gem_ctx_switch@legacy-bsd2-heavy.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb1/igt@gem_ctx_switch@legacy-bsd2-heavy.html

  * igt@gem_eio@unwedge-stress:
    - shard-apl:          [INCOMPLETE][29] ([fdo#103927]) -> [PASS][30] +2 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-apl5/igt@gem_eio@unwedge-stress.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-apl4/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_schedule@pi-ringfull-bsd:
    - shard-iclb:         [SKIP][31] ([fdo#111325]) -> [PASS][32] +3 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb1/igt@gem_exec_schedule@pi-ringfull-bsd.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb5/igt@gem_exec_schedule@pi-ringfull-bsd.html

  * igt@gem_partial_pwrite_pread@writes-after-reads-display:
    - shard-iclb:         [INCOMPLETE][33] ([fdo#107713]) -> [PASS][34] +1 similar issue
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb7/igt@gem_partial_pwrite_pread@writes-after-reads-display.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb3/igt@gem_partial_pwrite_pread@writes-after-reads-display.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-snb:          [SKIP][35] ([fdo#109271]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-snb4/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-snb4/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@i915_suspend@debugfs-reader:
    - shard-apl:          [DMESG-WARN][37] ([fdo#108566]) -> [PASS][38] +5 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-apl3/igt@i915_suspend@debugfs-reader.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-apl6/igt@i915_suspend@debugfs-reader.html

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
    - shard-glk:          [FAIL][39] ([fdo#104873]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-glk6/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-glk3/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite:
    - shard-iclb:         [FAIL][41] ([fdo#103167]) -> [PASS][42] +8 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         [FAIL][43] ([fdo#103166]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb4/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb1/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr@psr2_sprite_mmap_gtt:
    - shard-iclb:         [SKIP][45] ([fdo#109441]) -> [PASS][46] +1 similar issue
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb8/igt@kms_psr@psr2_sprite_mmap_gtt.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-isolation-bsd2:
    - shard-iclb:         [SKIP][47] ([fdo#109276]) -> [FAIL][48] ([fdo#111330])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6885/shard-iclb7/igt@gem_mocs_settings@mocs-isolation-bsd2.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/shard-iclb4/igt@gem_mocs_settings@mocs-isolation-bsd2.html

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

  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330


Participating hosts (10 -> 6)
------------------------------

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


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5178 -> IGTPW_3451
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_6885: 11786d27cb029a083556ac9b82e33d74e250ce26 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3451: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3451/
  IGT_5178: efb4539494d94f03374874d3b61bd04ef3802aaa @ 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_3451/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v4] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-13  9:49       ` Petri Latvala
@ 2019-09-13 18:16         ` Manasi Navare
  0 siblings, 0 replies; 34+ messages in thread
From: Manasi Navare @ 2019-09-13 18:16 UTC (permalink / raw)
  To: igt-dev, Madhumitha Tolakanahalli Pradeep, Simon Ser, madhumitha.tp

On Fri, Sep 13, 2019 at 12:49:18PM +0300, Petri Latvala wrote:
> On Thu, Sep 12, 2019 at 04:28:30PM -0700, Manasi Navare wrote:
> > From: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> > 
> > This test validates the tiled DP displays to display a test pattern
> > seamlessly across the two tiles. It validates the transcoder port
> > sync feature on i915 to get a tearfree tiled display output.
> > 
> > Related kernel work patches-
> > https://patchwork.freedesktop.org/series/66403/
> > 
> > This test can eventually be extended to cover tiled display support
> > on other connector types.
> > 
> > v4:
> > * Add the logic to check there are
> > page flips per connector (Simon)
> > * Calloc instead of malloc to initialize (Manasi)
> > 
> > v3:
> > * Fix the pointer leaks (Simon)
> > * Code indentation (Manasi)
> > * Compare two consecutive flip timestamps (Simon)
> > * Use single fb across tiles (Simon)
> > * Fix reset mode logic (Manasi)
> > 
> > v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
> >     Minor style changes (Simon)
> >    Code clean-up and reordering
> > 
> > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > Cc: Petri Latvala <petri.latvala@intel.com>
> > Cc: Simon Ser <simon.ser@intel.com>
> > Cc: <madhumitha.tp@gmail.com>
> > Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > ---
> >  tests/Makefile.sources       |   1 +
> >  tests/kms_dp_tiled_display.c | 397 +++++++++++++++++++++++++++++++++++
> >  tests/meson.build            |   1 +
> >  3 files changed, 399 insertions(+)
> >  create mode 100644 tests/kms_dp_tiled_display.c
> > 
> > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > index c02e4d94..7561ab9b 100644
> > --- a/tests/Makefile.sources
> > +++ b/tests/Makefile.sources
> > @@ -41,6 +41,7 @@ TESTS_progs = \
> >  	kms_cursor_edge_walk \
> >  	kms_cursor_legacy \
> >  	kms_dp_dsc \
> > +	kms_dp_tiled_display \
> >  	kms_draw_crc \
> >  	kms_fbcon_fbt \
> >  	kms_fence_pin_leak \
> > diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> > new file mode 100644
> > index 00000000..3055c6c3
> > --- /dev/null
> > +++ b/tests/kms_dp_tiled_display.c
> > @@ -0,0 +1,397 @@
> > +/*
> > + * Copyright © 2018 Intel Corporation
> 
> 
> 2019?

Yes will update this

> 
> 
> > + *
> > + * 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:
> > + *  Madhumitha Tolakanahalli Pradeep
> > + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> > + *  Manasi Navare <manasi.d.navare@intel.com>
> > + *
> > + * Display Port Tiled Display Test
> > + * This test parses the tile information of the connectors that have TILE
> > + * property set, sets up the framebuffer with correct offsets corresponding to
> > + * the tile offsets and does an atomic modeset with two CRTCs for two
> > + * connectors. Page flip event timestamp from each CRTC is collected and
> > + * compared to make sure that they occurred in a synchronous manner.
> > + *
> > + * This test currently supports only horizontally tiled displays, in line with
> > + * the displays supported by the kernel at the moment.
> > + */
> > +
> > +#include "igt.h"
> > +#include "poll.h"
> > +#include "drm_mode.h"
> > +#include "drm_fourcc.h"
> > +
> > +IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
> > +
> > +typedef struct {
> > +	igt_output_t *output;
> > +	igt_tile_info_t tile;
> > +	enum pipe pipe;
> > +	drmModeConnectorPtr connector;
> > +	bool got_page_flip;
> > +} data_connector_t;
> > +
> > +typedef struct {
> > +	int drm_fd;
> > +	int num_h_tiles;
> > +	igt_fb_t fb_test_pattern;
> > +	igt_display_t *display;
> > +	data_connector_t *conns;
> > +	enum igt_commit_style commit;
> > +} data_t;
> > +
> > +static int drm_property_is_tile(drmModePropertyPtr prop)
> > +{
> > +	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
> > +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> > +}
> > +
> > +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> > +				     igt_tile_info_t *tile)
> > +{
> > +	int i = 0;
> > +	drmModePropertyPtr prop;
> > +	drmModePropertyBlobPtr blob;
> > +
> > +	for (i = 0; i < conn->count_props; i++) {
> > +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> > +
> > +		igt_assert(prop);
> > +
> > +		if (!drm_property_is_tile(prop)) {
> > +			drmModeFreeProperty(prop);
> > +			continue;
> > +		}
> > +
> > +		blob = drmModeGetPropertyBlob(data->drm_fd,
> > +				conn->prop_values[i]);
> > +
> > +		if (!blob)
> > +			goto cleanup;
> > +
> > +		igt_parse_connector_tile_blob(blob, tile);
> > +		break;
> > +	}
> > +
> > +cleanup:
> > +	drmModeFreeProperty(prop);
> > +	drmModeFreePropertyBlob(blob);
> > +}
> > +
> > +static void get_number_of_h_tiles(data_t *data)
> > +{
> > +	int i;
> > +	drmModeResPtr res;
> > +	drmModeConnectorPtr connector;
> > +	igt_tile_info_t tile = {.num_h_tile = 0};
> > +
> > +	igt_assert(res = drmModeGetResources(data->drm_fd));
> > +
> > +	for (i = 0; i < res->count_connectors; i++) {
> > +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> > +				res->connectors[i]);
> > +
> > +		igt_assert(connector);
> > +
> > +		if (connector->connection != DRM_MODE_CONNECTED ||
> > +		    connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) {
> > +			drmModeFreeConnector(connector);
> > +			continue;
> > +		}
> > +
> > +		get_connector_tile_props(data, connector, &tile);
> > +		data->num_h_tiles = tile.num_h_tile;
> > +		break;
> > +	}
> > +
> > +	drmModeFreeResources(res);
> > +	drmModeFreeConnector(connector);
> > +}
> > +
> > +static void get_connectors(data_t *data)
> > +{
> > +	int count = 0;
> > +	igt_output_t *output;
> > +	data_connector_t *conns = data->conns;
> > +
> > +	for_each_connected_output(data->display, output) {
> > +		conns[count].connector = drmModeGetConnector(data->display->drm_fd,
> > +							     output->id);
> > +
> > +		igt_assert(conns[count].connector);
> > +
> > +		if (conns[count].connector->connector_type !=
> > +		    DRM_MODE_CONNECTOR_DisplayPort) {
> > +			drmModeFreeConnector(conns[count].connector);
> > +			continue;
> > +		}
> > +
> > +		get_connector_tile_props(data, conns[count].connector,
> > +					 &conns[count].tile);
> > +
> > +		/* Check if the connectors belong to the same tile group */
> > +		if (count > 0)
> > +			igt_assert(conns[count].tile.tile_group_id ==
> > +				   conns[count-1].tile.tile_group_id);
> > +
> > +		count++;
> > +	}
> > +}
> > +
> > +static void
> > +reset_plane(igt_output_t *output)
> > +{
> > +	igt_plane_t *primary;
> > +
> > +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > +	igt_plane_set_fb(primary, NULL);
> > +}
> > +
> > +static void reset_output(igt_output_t *output)
> > +{
> > +	igt_output_set_pipe(output, PIPE_NONE);
> > +}
> > +
> > +static void reset_mode(data_t *data)
> > +{
> > +	int count;
> > +	igt_output_t *output;
> > +	data_connector_t *conns = data->conns;
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +		output = igt_output_from_connector(data->display,
> > +						   conns[count].connector);
> > +		igt_output_set_pipe(output, PIPE_NONE);
> > +	}
> > +	igt_display_commit2(data->display, data->commit);
> > +}
> > +
> > +static void test_cleanup(data_t *data)
> > +{
> > +	int count;
> > +	data_connector_t *conns = data->conns;
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +		if (conns[count].output) {
> > +			reset_plane(conns[count].output);
> > +			reset_output(conns[count].output);
> > +		}
> > +	}
> > +	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
> > +	igt_display_commit2(data->display, data->commit);
> > +	memset(conns, 0, sizeof(data_connector_t) * data->num_h_tiles);
> > +}
> > +
> > +static void setup_mode(data_t *data)
> > +{
> > +	int count = 0;
> > +	enum pipe pipe;
> > +	igt_output_t *output;
> > +	data_connector_t *conns = data->conns;
> > +
> > +	/*
> > +	 * The output is set to PIPE_NONE and then assigned a pipe.
> > +	 * This is done to ensure a complete modeset occures every
> > +	 * time the test is run.
> > +	 */
> > +	reset_mode(data);
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +		output = igt_output_from_connector(data->display,
> > +						   conns[count].connector);
> > +
> > +		for_each_pipe(data->display, pipe) {
> > +			if (count > 0 && pipe == conns[count-1].pipe)
> > +				continue;
> > +
> > +			if (igt_pipe_connector_valid(pipe, output)) {
> > +
> > +				conns[count].pipe = pipe;
> > +				conns[count].output = output;
> > +
> > +				igt_output_set_pipe(conns[count].output,
> > +						    conns[count].pipe);
> > +				break;
> > +			}
> > +		}
> > +	}
> > +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> > +				  NULL);
> > +}
> > +
> > +static void setup_framebuffer(data_t *data)
> > +{
> > +	int count;
> > +	igt_plane_t *primary;
> > +	int fb_h_size = 0, fb_v_size = 0;
> > +	data_connector_t *conns = data->conns;
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +
> > +		fb_h_size += conns[count].tile.tile_h_size;
> > +		/* We support only horizontal tiles, so vertical size is same
> > +		 * for all tiles and needs to be assigned only once.
> > +		 */
> > +		if (!fb_v_size)
> > +			fb_v_size = conns[count].tile.tile_v_size;
> > +	}
> > +
> > +	igt_create_pattern_fb(data->drm_fd,
> > +			      fb_h_size,
> > +			      fb_v_size,
> > +			      DRM_FORMAT_XBGR8888,
> > +			      LOCAL_DRM_FORMAT_MOD_NONE,
> > +			      &data->fb_test_pattern);
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +
> > +		primary = igt_output_get_plane_type(conns[count].output,
> > +						    DRM_PLANE_TYPE_PRIMARY);
> > +
> > +		igt_plane_set_fb(primary, &data->fb_test_pattern);
> > +
> > +		igt_fb_set_size(&data->fb_test_pattern, primary,
> > +				conns[count].tile.tile_h_size,
> > +				conns[count].tile.tile_v_size);
> > +
> > +		igt_fb_set_position(&data->fb_test_pattern, primary,
> > +				    (conns[count].tile.tile_h_size *
> > +				     conns[count].tile.tile_h_loc),
> > +				    (conns[count].tile.tile_v_size *
> > +				     conns[count].tile.tile_v_loc));
> > +
> > +		igt_plane_set_size(primary,
> > +				   conns[count].tile.tile_h_size,
> > +				   conns[count].tile.tile_v_size);
> > +	}
> > +}
> > +
> > +static void page_flip_handler(int fd, unsigned int seq,
> > +			      unsigned int tv_sec, unsigned int tv_usec,
> > +			      unsigned int crtc_id, void *_data)
> > +{
> > +	data_t *data = _data;
> > +	data_connector_t *conn;
> > +	bool is_on_time = false;
> > +	static unsigned int _tv_sec, _tv_usec;
> > +	int i;
> > +
> > +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> > +		  tv_sec, tv_usec);
> > +
> > +	for (i = 0; i < data->num_h_tiles; i++) {
> > +
> > +		conn = &data->conns[i];
> > +		if (data->display->pipes[conn->pipe].crtc_id == crtc_id) {
> > +			igt_assert_f(!conn->got_page_flip,
> > +				     "Got two page-flips for CRTC %u\n",
> > +				     crtc_id);
> > +			conn->got_page_flip = true;
> > +
> > +			/* Skip the following checks for the first page flip event */
> > +			if (_tv_sec == 0 || _tv_usec == 0) {
> > +				_tv_sec = tv_sec;
> > +				_tv_usec = tv_usec;
> > +				return;
> > +			}
> > +			/*
> > +			 * For seamless tear-free display, the page flip event timestamps
> > +			 * from all the tiles should not differ by more than 10us.
> > +			 */
> > +			is_on_time = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> > +
> > +			igt_fail_on_f(!is_on_time, "Delayed page flip event from CRTC:%d at %u:%u\n",
> > +				      crtc_id, tv_sec, tv_usec);
> > +			return;
> > +		}
> > +	}
> > +
> > +	igt_assert_f(false, "Got page-flip event for unexpected CRTC %u\n",
> > +		     crtc_id);
> > +}
> > +
> > +static bool got_all_page_flips(data_t *data)
> > +{
> > +	int i;
> > +
> > +	for (i = 0; i < data->num_h_tiles; i++) {
> > +		if (!data->conns[i].got_page_flip)
> > +			return false;
> > +	}
> > +
> > +	return true;
> > +}
> > +
> > +igt_main
> > +{
> > +	igt_display_t display;
> > +	data_t data = {0};
> > +	struct pollfd pfd = {0};
> > +	drmEventContext drm_event = {0};
> > +	int ret;
> > +
> > +	igt_fixture {
> > +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > +
> > +		kmstest_set_vt_graphics_mode();
> > +		igt_display_require(&display, data.drm_fd);
> > +		igt_display_reset(&display);
> > +
> > +		data.display = &display;
> > +		pfd.fd = data.drm_fd;
> > +		pfd.events = POLLIN;
> > +		drm_event.version = 3;
> > +		drm_event.page_flip_handler2 = page_flip_handler;
> > +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> > +		igt_require(data.commit == COMMIT_ATOMIC);
> > +
> > +		get_number_of_h_tiles(&data);
> > +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> > +		igt_require(data.num_h_tiles > 0);
> > +		data.conns = calloc(data.num_h_tiles, sizeof(data_connector_t));
> > +	}
> > +
> > +	igt_subtest("basic-test-pattern") {
> 
> Please document this subtest with igt_describe.

Yes will add igt_describe on top of igt_subtest, thanks for pointing this out

Regards
Manasi
> 
> 
> -- 
> Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v5] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-12 23:28     ` [igt-dev] [PATCH i-g-t v4] " Manasi Navare
  2019-09-13  9:49       ` Petri Latvala
  2019-09-13 11:41       ` Ser, Simon
@ 2019-09-13 23:48       ` Manasi Navare
  2019-09-16 19:17         ` Simon Ser
  2019-09-16 19:34         ` [igt-dev] [PATCH i-g-t v6] " Manasi Navare
  2 siblings, 2 replies; 34+ messages in thread
From: Manasi Navare @ 2019-09-13 23:48 UTC (permalink / raw)
  To: igt-dev; +Cc: madhumitha.tp, Petri Latvala, Simon Ser

From: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>

This test validates the tiled DP displays to display a test pattern
seamlessly across the two tiles. It validates the transcoder port
sync feature on i915 to get a tearfree tiled display output.

Related kernel work patches-
https://patchwork.freedesktop.org/series/66403/

This test can eventually be extended to cover tiled display support
on other connector types.

v5:
* Addresses newline nits (Simon)
* Add 2019 copyright, igt_describe (Petri)
* Check all prev connectors for pipe assignments (Simon)
* Continue if num_h_tiles = 0 (Simon)
v4:
* Add the logic to check there are
page flips per connector (Simon)
* Calloc instead of malloc to initialize (Manasi)

v3:
* Fix the pointer leaks (Simon)
* Code indentation (Manasi)
* Compare two consecutive flip timestamps (Simon)
* Use single fb across tiles (Simon)
* Fix reset mode logic (Manasi)

v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
    Minor style changes (Simon)
   Code clean-up and reordering

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Simon Ser <simon.ser@intel.com>
Cc: <madhumitha.tp@gmail.com>
Cc: Simon Ser <contact@emersion.fr>
Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 tests/Makefile.sources       |   1 +
 tests/kms_dp_tiled_display.c | 422 +++++++++++++++++++++++++++++++++++
 tests/meson.build            |   1 +
 3 files changed, 424 insertions(+)
 create mode 100644 tests/kms_dp_tiled_display.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c02e4d94..7561ab9b 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -41,6 +41,7 @@ TESTS_progs = \
 	kms_cursor_edge_walk \
 	kms_cursor_legacy \
 	kms_dp_dsc \
+	kms_dp_tiled_display \
 	kms_draw_crc \
 	kms_fbcon_fbt \
 	kms_fence_pin_leak \
diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
new file mode 100644
index 00000000..9e9047ae
--- /dev/null
+++ b/tests/kms_dp_tiled_display.c
@@ -0,0 +1,422 @@
+/*
+ * Copyright © 2019 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:
+ *  Madhumitha Tolakanahalli Pradeep
+ *      <madhumitha.tolakanahalli.pradeep@intel.com>
+ *  Manasi Navare <manasi.d.navare@intel.com>
+ *
+ * Display Port Tiled Display Test
+ * This test parses the tile information of the connectors that have TILE
+ * property set, sets up the framebuffer with correct offsets corresponding to
+ * the tile offsets and does an atomic modeset with two CRTCs for two
+ * connectors. Page flip event timestamp from each CRTC is collected and
+ * compared to make sure that they occurred in a synchronous manner.
+ *
+ * This test currently supports only horizontally tiled displays, in line with
+ * the displays supported by the kernel at the moment.
+ */
+
+#include "igt.h"
+#include "poll.h"
+#include "drm_mode.h"
+#include "drm_fourcc.h"
+
+IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
+
+typedef struct {
+	igt_output_t *output;
+	igt_tile_info_t tile;
+	enum pipe pipe;
+	drmModeConnectorPtr connector;
+	bool got_page_flip;
+} data_connector_t;
+
+typedef struct {
+	int drm_fd;
+	int num_h_tiles;
+	igt_fb_t fb_test_pattern;
+	igt_display_t *display;
+	data_connector_t *conns;
+	enum igt_commit_style commit;
+} data_t;
+
+static int drm_property_is_tile(drmModePropertyPtr prop)
+{
+	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
+			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
+}
+
+static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
+				     igt_tile_info_t *tile)
+{
+	int i = 0;
+	drmModePropertyPtr prop;
+	drmModePropertyBlobPtr blob;
+
+	for (i = 0; i < conn->count_props; i++) {
+		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
+
+		igt_assert(prop);
+
+		if (!drm_property_is_tile(prop)) {
+			drmModeFreeProperty(prop);
+			continue;
+		}
+
+		blob = drmModeGetPropertyBlob(data->drm_fd,
+				conn->prop_values[i]);
+
+		if (!blob)
+			goto cleanup;
+
+		igt_parse_connector_tile_blob(blob, tile);
+		break;
+	}
+
+cleanup:
+	drmModeFreeProperty(prop);
+	drmModeFreePropertyBlob(blob);
+}
+
+static void get_number_of_h_tiles(data_t *data)
+{
+	int i;
+	drmModeResPtr res;
+	drmModeConnectorPtr connector;
+	igt_tile_info_t tile = {.num_h_tile = 0};
+
+	igt_assert(res = drmModeGetResources(data->drm_fd));
+
+	for (i = 0; i < res->count_connectors; i++) {
+		connector = drmModeGetConnectorCurrent(data->drm_fd,
+						       res->connectors[i]);
+
+		igt_assert(connector);
+
+		if (connector->connection != DRM_MODE_CONNECTED ||
+		    connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) {
+			drmModeFreeConnector(connector);
+			continue;
+		}
+
+		get_connector_tile_props(data, connector, &tile);
+
+		if (tile.num_h_tile == 0) {
+			drmModeFreeConnector(connector);
+			continue;
+		}
+		data->num_h_tiles = tile.num_h_tile;
+		break;
+	}
+
+	drmModeFreeResources(res);
+	drmModeFreeConnector(connector);
+}
+
+static void get_connectors(data_t *data)
+{
+	int count = 0;
+	igt_output_t *output;
+	data_connector_t *conns = data->conns;
+
+	for_each_connected_output(data->display, output) {
+		conns[count].connector = drmModeGetConnector(data->display->drm_fd,
+							     output->id);
+
+		igt_assert(conns[count].connector);
+
+		if (conns[count].connector->connector_type !=
+		    DRM_MODE_CONNECTOR_DisplayPort) {
+			drmModeFreeConnector(conns[count].connector);
+			continue;
+		}
+
+		get_connector_tile_props(data, conns[count].connector,
+					 &conns[count].tile);
+
+		if (conns[count].tile.num_h_tile == 0) {
+			drmModeFreeConnector(conns[count].connector);
+			continue;
+		}
+
+		/* Check if the connectors belong to the same tile group */
+		if (count > 0)
+			igt_assert(conns[count].tile.tile_group_id ==
+				   conns[count-1].tile.tile_group_id);
+
+		count++;
+	}
+}
+
+static void
+reset_plane(igt_output_t *output)
+{
+	igt_plane_t *primary;
+
+	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	igt_plane_set_fb(primary, NULL);
+}
+
+static void reset_output(igt_output_t *output)
+{
+	igt_output_set_pipe(output, PIPE_NONE);
+}
+
+static void reset_mode(data_t *data)
+{
+	int count;
+	igt_output_t *output;
+	data_connector_t *conns = data->conns;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		output = igt_output_from_connector(data->display,
+						   conns[count].connector);
+		igt_output_set_pipe(output, PIPE_NONE);
+	}
+	igt_display_commit2(data->display, data->commit);
+}
+
+static void test_cleanup(data_t *data)
+{
+	int count;
+	data_connector_t *conns = data->conns;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		if (conns[count].output) {
+			reset_plane(conns[count].output);
+			reset_output(conns[count].output);
+		}
+	}
+	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
+	igt_display_commit2(data->display, data->commit);
+	memset(conns, 0, sizeof(data_connector_t) * data->num_h_tiles);
+}
+
+static void setup_mode(data_t *data)
+{
+	int count = 0, prev = 0;
+	bool pipe_in_use = false;
+	enum pipe pipe;
+	igt_output_t *output;
+	data_connector_t *conns = data->conns;
+
+	/*
+	 * The output is set to PIPE_NONE and then assigned a pipe.
+	 * This is done to ensure a complete modeset occures every
+	 * time the test is run.
+	 */
+	reset_mode(data);
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		output = igt_output_from_connector(data->display,
+						   conns[count].connector);
+
+		for_each_pipe(data->display, pipe) {
+			pipe_in_use = false;
+			if (count > 0) {
+				for (prev = count - 1; prev >= 0; prev--) {
+					if (pipe == conns[prev].pipe) {
+						pipe_in_use = true;
+						break;
+					}
+				}
+				if (pipe_in_use)
+					continue;
+			}
+
+			if (igt_pipe_connector_valid(pipe, output)) {
+				conns[count].pipe = pipe;
+				conns[count].output = output;
+
+				igt_output_set_pipe(conns[count].output,
+						    conns[count].pipe);
+				break;
+			}
+		}
+		igt_assert(conns[count].pipe != PIPE_NONE);
+	}
+	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
+				  NULL);
+}
+
+static void setup_framebuffer(data_t *data)
+{
+	int count;
+	igt_plane_t *primary;
+	int fb_h_size = 0, fb_v_size = 0;
+	data_connector_t *conns = data->conns;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+
+		fb_h_size += conns[count].tile.tile_h_size;
+		/* We support only horizontal tiles, so vertical size is same
+		 * for all tiles and needs to be assigned only once.
+		 */
+		if (!fb_v_size)
+			fb_v_size = conns[count].tile.tile_v_size;
+
+		if (count > 0)
+			igt_assert(conns[count].tile.tile_v_size ==
+				   conns[count-1].tile.tile_v_size);
+	}
+
+	igt_create_pattern_fb(data->drm_fd,
+			      fb_h_size,
+			      fb_v_size,
+			      DRM_FORMAT_XBGR8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE,
+			      &data->fb_test_pattern);
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		primary = igt_output_get_plane_type(conns[count].output,
+						    DRM_PLANE_TYPE_PRIMARY);
+
+		igt_plane_set_fb(primary, &data->fb_test_pattern);
+
+		igt_fb_set_size(&data->fb_test_pattern, primary,
+				conns[count].tile.tile_h_size,
+				conns[count].tile.tile_v_size);
+
+		igt_fb_set_position(&data->fb_test_pattern, primary,
+				    (conns[count].tile.tile_h_size *
+				     conns[count].tile.tile_h_loc),
+				    (conns[count].tile.tile_v_size *
+				     conns[count].tile.tile_v_loc));
+
+		igt_plane_set_size(primary,
+				   conns[count].tile.tile_h_size,
+				   conns[count].tile.tile_v_size);
+	}
+}
+
+static void page_flip_handler(int fd, unsigned int seq,
+			      unsigned int tv_sec, unsigned int tv_usec,
+			      unsigned int crtc_id, void *_data)
+{
+	data_t *data = _data;
+	data_connector_t *conn;
+	bool is_on_time = false;
+	static unsigned int _tv_sec, _tv_usec;
+	int i;
+
+	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
+		  tv_sec, tv_usec);
+
+	for (i = 0; i < data->num_h_tiles; i++) {
+
+		conn = &data->conns[i];
+		if (data->display->pipes[conn->pipe].crtc_id == crtc_id) {
+			igt_assert_f(!conn->got_page_flip,
+				     "Got two page-flips for CRTC %u\n",
+				     crtc_id);
+			conn->got_page_flip = true;
+
+			/* Skip the following checks for the first page flip event */
+			if (_tv_sec == 0 || _tv_usec == 0) {
+				_tv_sec = tv_sec;
+				_tv_usec = tv_usec;
+				return;
+			}
+			/*
+			 * For seamless tear-free display, the page flip event timestamps
+			 * from all the tiles should not differ by more than 10us.
+			 */
+			is_on_time = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
+
+			igt_fail_on_f(!is_on_time, "Delayed page flip event from CRTC:%d at %u:%u\n",
+				      crtc_id, tv_sec, tv_usec);
+			return;
+		}
+	}
+
+	igt_assert_f(false, "Got page-flip event for unexpected CRTC %u\n",
+		     crtc_id);
+}
+
+static bool got_all_page_flips(data_t *data)
+{
+	int i;
+
+	for (i = 0; i < data->num_h_tiles; i++) {
+		if (!data->conns[i].got_page_flip)
+			return false;
+	}
+
+	return true;
+}
+
+igt_main
+{
+	igt_display_t display;
+	data_t data = {0};
+	struct pollfd pfd = {0};
+	drmEventContext drm_event = {0};
+	int ret;
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
+
+		kmstest_set_vt_graphics_mode();
+		igt_display_require(&display, data.drm_fd);
+		igt_display_reset(&display);
+
+		data.display = &display;
+		pfd.fd = data.drm_fd;
+		pfd.events = POLLIN;
+		drm_event.version = 3;
+		drm_event.page_flip_handler2 = page_flip_handler;
+		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
+		igt_require(data.commit == COMMIT_ATOMIC);
+
+		get_number_of_h_tiles(&data);
+		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
+		igt_require(data.num_h_tiles > 0);
+		data.conns = calloc(data.num_h_tiles, sizeof(data_connector_t));
+	}
+
+	igt_describe("Make sure the Tiled CRTCs are synchronized and we get "
+		     "page flips for all tiled CRTCs in one vblank.");
+	igt_subtest("basic-test-pattern") {
+		igt_assert(data.conns);
+
+		get_connectors(&data);
+		setup_mode(&data);
+		setup_framebuffer(&data);
+		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
+					  DRM_MODE_PAGE_FLIP_EVENT, &data);
+		while (!got_all_page_flips(&data)) {
+			ret = poll(&pfd, 1, 1000);
+			igt_assert(ret == 1);
+			drmHandleEvent(data.drm_fd, &drm_event);
+		}
+
+		test_cleanup(&data);
+	}
+
+	igt_fixture {
+		free(data.conns);
+		close(data.drm_fd);
+		kmstest_restore_vt_mode();
+		igt_display_fini(data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index a7b2b322..50292df8 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -26,6 +26,7 @@ test_progs = [
 	'kms_cursor_edge_walk',
 	'kms_cursor_legacy',
 	'kms_dp_dsc',
+	'kms_dp_tiled_display',
 	'kms_draw_crc',
 	'kms_fbcon_fbt',
 	'kms_fence_pin_leak',
-- 
2.19.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev5)
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
                   ` (7 preceding siblings ...)
  2019-09-13 17:21 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2019-09-14  0:14 ` Patchwork
  2019-09-15 10:28 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2019-09-14  0:14 UTC (permalink / raw)
  To: Manasi Navare; +Cc: igt-dev

== Series Details ==

Series: Added tile property parser library function and IGT test for DP tiled displays (rev5)
URL   : https://patchwork.freedesktop.org/series/65652/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6894 -> IGTPW_3461
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/65652/revisions/5/mbox/

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

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

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@gem_exec_fence@nb-await-default:
    - {fi-tgl-u}:         [FAIL][1] ([fdo#111562] / [fdo#111597]) -> [WARN][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/fi-tgl-u/igt@gem_exec_fence@nb-await-default.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/fi-tgl-u/igt@gem_exec_fence@nb-await-default.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-blb-e6850:       [PASS][3] -> [INCOMPLETE][4] ([fdo#107718])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html

  * igt@i915_selftest@live_execlists:
    - fi-skl-gvtdvm:      [PASS][5] -> [DMESG-FAIL][6] ([fdo#111108])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html

  
#### Possible fixes ####

  * igt@gem_ctx_switch@legacy-render:
    - {fi-icl-guc}:       [INCOMPLETE][7] ([fdo#107713] / [fdo#111381]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/fi-icl-guc/igt@gem_ctx_switch@legacy-render.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/fi-icl-guc/igt@gem_ctx_switch@legacy-render.html

  * igt@gem_mmap_gtt@basic-write-cpu-read-gtt:
    - fi-icl-u3:          [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10] +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/fi-icl-u3/igt@gem_mmap_gtt@basic-write-cpu-read-gtt.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/fi-icl-u3/igt@gem_mmap_gtt@basic-write-cpu-read-gtt.html

  * igt@kms_chamelium@hdmi-crc-fast:
    - fi-icl-u2:          [FAIL][11] ([fdo#109635 ]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/fi-icl-u2/igt@kms_chamelium@hdmi-crc-fast.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/fi-icl-u2/igt@kms_chamelium@hdmi-crc-fast.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][13] ([fdo#111096]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

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

  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635 
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111108]: https://bugs.freedesktop.org/show_bug.cgi?id=111108
  [fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
  [fdo#111562]: https://bugs.freedesktop.org/show_bug.cgi?id=111562
  [fdo#111597]: https://bugs.freedesktop.org/show_bug.cgi?id=111597
  [fdo#111600]: https://bugs.freedesktop.org/show_bug.cgi?id=111600


Participating hosts (54 -> 46)
------------------------------

  Missing    (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-pnv-d510 fi-icl-y fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5182 -> IGTPW_3461

  CI-20190529: 20190529
  CI_DRM_6894: a323fd657c577491b1660662624bac36bb964222 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3461: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/
  IGT_5182: f7104497049e3761ac297b66fd5586849b3cfcc8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_dp_tiled_display@basic-test-pattern

== Logs ==

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for Added tile property parser library function and IGT test for DP tiled displays (rev5)
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
                   ` (8 preceding siblings ...)
  2019-09-14  0:14 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev5) Patchwork
@ 2019-09-15 10:28 ` Patchwork
  2019-09-16 19:59 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev6) Patchwork
  2019-09-17  3:06 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  11 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2019-09-15 10:28 UTC (permalink / raw)
  To: Manasi Navare; +Cc: igt-dev

== Series Details ==

Series: Added tile property parser library function and IGT test for DP tiled displays (rev5)
URL   : https://patchwork.freedesktop.org/series/65652/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6894_full -> IGTPW_3461_full
====================================================

Summary
-------

  **FAILURE**

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

  External URL: https://patchwork.freedesktop.org/api/1.0/series/65652/revisions/5/mbox/

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_dp_tiled_display@basic-test-pattern} (NEW):
    - shard-glk:          NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-glk4/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-hsw:          NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-hsw8/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-kbl:          NOTRUN -> [FAIL][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-kbl2/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-iclb:         NOTRUN -> [SKIP][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb2/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-snb:          NOTRUN -> [FAIL][5]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-snb5/igt@kms_dp_tiled_display@basic-test-pattern.html

  * igt@kms_universal_plane@universal-plane-pipe-b-functional:
    - shard-glk:          [PASS][6] -> [FAIL][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-glk1/igt@kms_universal_plane@universal-plane-pipe-b-functional.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-glk3/igt@kms_universal_plane@universal-plane-pipe-b-functional.html

  
New tests
---------

  New tests have been introduced between CI_DRM_6894_full and IGTPW_3461_full:

### New IGT tests (1) ###

  * igt@kms_dp_tiled_display@basic-test-pattern:
    - Statuses : 4 fail(s) 2 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_shared@exec-single-timeline-bsd:
    - shard-iclb:         [PASS][8] -> [SKIP][9] ([fdo#110841])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb7/igt@gem_ctx_shared@exec-single-timeline-bsd.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb1/igt@gem_ctx_shared@exec-single-timeline-bsd.html

  * igt@gem_ctx_shared@q-smoketest-all:
    - shard-apl:          [PASS][10] -> [INCOMPLETE][11] ([fdo#103927]) +3 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-apl7/igt@gem_ctx_shared@q-smoketest-all.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-apl6/igt@gem_ctx_shared@q-smoketest-all.html

  * igt@gem_ctx_switch@legacy-bsd2-heavy:
    - shard-iclb:         [PASS][12] -> [SKIP][13] ([fdo#109276]) +22 similar issues
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb2/igt@gem_ctx_switch@legacy-bsd2-heavy.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb6/igt@gem_ctx_switch@legacy-bsd2-heavy.html

  * igt@gem_eio@in-flight-suspend:
    - shard-kbl:          [PASS][14] -> [DMESG-WARN][15] ([fdo#108566])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-kbl2/igt@gem_eio@in-flight-suspend.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-kbl2/igt@gem_eio@in-flight-suspend.html

  * igt@gem_exec_schedule@promotion-bsd:
    - shard-iclb:         [PASS][16] -> [SKIP][17] ([fdo#111325]) +4 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb8/igt@gem_exec_schedule@promotion-bsd.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb4/igt@gem_exec_schedule@promotion-bsd.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-apl:          [PASS][18] -> [DMESG-WARN][19] ([fdo#108566]) +7 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-apl1/igt@i915_suspend@fence-restore-tiled2untiled.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-apl2/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding:
    - shard-apl:          [PASS][20] -> [FAIL][21] ([fdo#103232])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-apl5/igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-apl8/igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding.html
    - shard-kbl:          [PASS][22] -> [FAIL][23] ([fdo#103232])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-kbl3/igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-kbl1/igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding.html

  * igt@kms_flip@flip-vs-suspend:
    - shard-snb:          [PASS][24] -> [INCOMPLETE][25] ([fdo#105411])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-snb5/igt@kms_flip@flip-vs-suspend.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-snb1/igt@kms_flip@flip-vs-suspend.html

  * igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary:
    - shard-iclb:         [PASS][26] -> [FAIL][27] ([fdo#103167]) +5 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [PASS][28] -> [SKIP][29] ([fdo#109441]) +2 similar issues
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb3/igt@kms_psr@psr2_cursor_render.html

  * igt@kms_universal_plane@universal-plane-pipe-b-functional:
    - shard-apl:          [PASS][30] -> [FAIL][31] ([fdo#111134])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-apl7/igt@kms_universal_plane@universal-plane-pipe-b-functional.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-apl1/igt@kms_universal_plane@universal-plane-pipe-b-functional.html
    - shard-kbl:          [PASS][32] -> [FAIL][33] ([fdo#111134])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-kbl1/igt@kms_universal_plane@universal-plane-pipe-b-functional.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-kbl4/igt@kms_universal_plane@universal-plane-pipe-b-functional.html

  * igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
    - shard-kbl:          [PASS][34] -> [INCOMPLETE][35] ([fdo#103665])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-kbl3/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-kbl2/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-iclb:         [PASS][36] -> [TIMEOUT][37] ([fdo#109673])
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb2/igt@perf_pmu@cpu-hotplug.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb7/igt@perf_pmu@cpu-hotplug.html

  
#### Possible fixes ####

  * igt@gem_exec_schedule@pi-ringfull-bsd:
    - shard-iclb:         [SKIP][38] ([fdo#111325]) -> [PASS][39] +2 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb4/igt@gem_exec_schedule@pi-ringfull-bsd.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb7/igt@gem_exec_schedule@pi-ringfull-bsd.html

  * igt@gem_exec_schedule@preempt-bsd1:
    - shard-iclb:         [SKIP][40] ([fdo#109276]) -> [PASS][41] +15 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb5/igt@gem_exec_schedule@preempt-bsd1.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb1/igt@gem_exec_schedule@preempt-bsd1.html

  * igt@gem_workarounds@suspend-resume:
    - shard-apl:          [DMESG-WARN][42] ([fdo#108566]) -> [PASS][43] +5 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-apl8/igt@gem_workarounds@suspend-resume.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-apl5/igt@gem_workarounds@suspend-resume.html

  * igt@kms_cursor_crc@pipe-c-cursor-128x42-offscreen:
    - shard-hsw:          [INCOMPLETE][44] ([fdo#103540]) -> [PASS][45]
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-hsw8/igt@kms_cursor_crc@pipe-c-cursor-128x42-offscreen.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-hsw2/igt@kms_cursor_crc@pipe-c-cursor-128x42-offscreen.html

  * igt@kms_cursor_crc@pipe-c-cursor-64x21-random:
    - shard-apl:          [FAIL][46] ([fdo#103232]) -> [PASS][47] +1 similar issue
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-apl2/igt@kms_cursor_crc@pipe-c-cursor-64x21-random.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-apl7/igt@kms_cursor_crc@pipe-c-cursor-64x21-random.html
    - shard-kbl:          [FAIL][48] ([fdo#103232]) -> [PASS][49]
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-kbl3/igt@kms_cursor_crc@pipe-c-cursor-64x21-random.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-kbl3/igt@kms_cursor_crc@pipe-c-cursor-64x21-random.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-kbl:          [DMESG-WARN][50] ([fdo#108566]) -> [PASS][51] +1 similar issue
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-kbl3/igt@kms_flip@flip-vs-suspend-interruptible.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-kbl3/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
    - shard-iclb:         [FAIL][52] ([fdo#103167]) -> [PASS][53] +2 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt.html

  * igt@kms_psr@psr2_cursor_mmap_gtt:
    - shard-iclb:         [SKIP][54] ([fdo#109441]) -> [PASS][55]
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb5/igt@kms_psr@psr2_cursor_mmap_gtt.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_gtt.html

  * igt@kms_rotation_crc@cursor-rotation-180:
    - shard-iclb:         [INCOMPLETE][56] ([fdo#107713] / [fdo#110026]) -> [PASS][57]
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb7/igt@kms_rotation_crc@cursor-rotation-180.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb4/igt@kms_rotation_crc@cursor-rotation-180.html

  
#### Warnings ####

  * igt@gem_ctx_isolation@vcs1-nonpriv:
    - shard-iclb:         [FAIL][58] ([fdo#111329]) -> [SKIP][59] ([fdo#109276])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb4/igt@gem_ctx_isolation@vcs1-nonpriv.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb6/igt@gem_ctx_isolation@vcs1-nonpriv.html

  * igt@gem_mocs_settings@mocs-rc6-bsd2:
    - shard-iclb:         [SKIP][60] ([fdo#109276]) -> [FAIL][61] ([fdo#111330])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb7/igt@gem_mocs_settings@mocs-rc6-bsd2.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb2/igt@gem_mocs_settings@mocs-rc6-bsd2.html

  * igt@gem_mocs_settings@mocs-reset-bsd2:
    - shard-iclb:         [FAIL][62] ([fdo#111330]) -> [SKIP][63] ([fdo#109276])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6894/shard-iclb1/igt@gem_mocs_settings@mocs-reset-bsd2.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/shard-iclb8/igt@gem_mocs_settings@mocs-reset-bsd2.html

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
  [fdo#110026]: https://bugs.freedesktop.org/show_bug.cgi?id=110026
  [fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
  [fdo#111134]: https://bugs.freedesktop.org/show_bug.cgi?id=111134
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330


Participating hosts (10 -> 6)
------------------------------

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


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5182 -> IGTPW_3461
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_6894: a323fd657c577491b1660662624bac36bb964222 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3461: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3461/
  IGT_5182: f7104497049e3761ac297b66fd5586849b3cfcc8 @ 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_3461/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v5] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-13 23:48       ` [igt-dev] [PATCH i-g-t v5] " Manasi Navare
@ 2019-09-16 19:17         ` Simon Ser
  2019-09-16 19:29           ` Manasi Navare
  2019-09-16 19:34         ` [igt-dev] [PATCH i-g-t v6] " Manasi Navare
  1 sibling, 1 reply; 34+ messages in thread
From: Simon Ser @ 2019-09-16 19:17 UTC (permalink / raw)
  To: Manasi Navare; +Cc: igt-dev, madhumitha.tp, Petri Latvala

On Saturday, September 14, 2019 2:47 AM, Manasi Navare <manasi.d.navare@intel.com> wrote:
> From: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
>
> This test validates the tiled DP displays to display a test pattern
> seamlessly across the two tiles. It validates the transcoder port
> sync feature on i915 to get a tearfree tiled display output.
>
> Related kernel work patches-
> https://patchwork.freedesktop.org/series/66403/
>
> This test can eventually be extended to cover tiled display support
> on other connector types.
>
> v5:
> * Addresses newline nits (Simon)
> * Add 2019 copyright, igt_describe (Petri)
> * Check all prev connectors for pipe assignments (Simon)
> * Continue if num_h_tiles = 0 (Simon)
> v4:
> * Add the logic to check there are
> page flips per connector (Simon)
> * Calloc instead of malloc to initialize (Manasi)
>
> v3:
> * Fix the pointer leaks (Simon)
> * Code indentation (Manasi)
> * Compare two consecutive flip timestamps (Simon)
> * Use single fb across tiles (Simon)
> * Fix reset mode logic (Manasi)
>
> v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
>     Minor style changes (Simon)
>    Code clean-up and reordering
>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Simon Ser <simon.ser@intel.com>
> Cc: <madhumitha.tp@gmail.com>
> Cc: Simon Ser <contact@emersion.fr>
> Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
>  tests/Makefile.sources       |   1 +
>  tests/kms_dp_tiled_display.c | 422 +++++++++++++++++++++++++++++++++++
>  tests/meson.build            |   1 +
>  3 files changed, 424 insertions(+)
>  create mode 100644 tests/kms_dp_tiled_display.c
>
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index c02e4d94..7561ab9b 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -41,6 +41,7 @@ TESTS_progs = \
>  	kms_cursor_edge_walk \
>  	kms_cursor_legacy \
>  	kms_dp_dsc \
> +	kms_dp_tiled_display \
>  	kms_draw_crc \
>  	kms_fbcon_fbt \
>  	kms_fence_pin_leak \
> diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> new file mode 100644
> index 00000000..9e9047ae
> --- /dev/null
> +++ b/tests/kms_dp_tiled_display.c
> @@ -0,0 +1,422 @@
> +/*
> + * Copyright © 2019 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:
> + *  Madhumitha Tolakanahalli Pradeep
> + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> + *  Manasi Navare <manasi.d.navare@intel.com>
> + *
> + * Display Port Tiled Display Test
> + * This test parses the tile information of the connectors that have TILE
> + * property set, sets up the framebuffer with correct offsets corresponding to
> + * the tile offsets and does an atomic modeset with two CRTCs for two
> + * connectors. Page flip event timestamp from each CRTC is collected and
> + * compared to make sure that they occurred in a synchronous manner.
> + *
> + * This test currently supports only horizontally tiled displays, in line with
> + * the displays supported by the kernel at the moment.
> + */
> +
> +#include "igt.h"
> +#include "poll.h"
> +#include "drm_mode.h"
> +#include "drm_fourcc.h"
> +
> +IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
> +
> +typedef struct {
> +	igt_output_t *output;
> +	igt_tile_info_t tile;
> +	enum pipe pipe;
> +	drmModeConnectorPtr connector;
> +	bool got_page_flip;
> +} data_connector_t;
> +
> +typedef struct {
> +	int drm_fd;
> +	int num_h_tiles;
> +	igt_fb_t fb_test_pattern;
> +	igt_display_t *display;
> +	data_connector_t *conns;
> +	enum igt_commit_style commit;
> +} data_t;
> +
> +static int drm_property_is_tile(drmModePropertyPtr prop)
> +{
> +	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
> +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> +}
> +
> +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> +				     igt_tile_info_t *tile)
> +{
> +	int i = 0;
> +	drmModePropertyPtr prop;
> +	drmModePropertyBlobPtr blob;
> +
> +	for (i = 0; i < conn->count_props; i++) {
> +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> +
> +		igt_assert(prop);
> +
> +		if (!drm_property_is_tile(prop)) {
> +			drmModeFreeProperty(prop);
> +			continue;
> +		}
> +
> +		blob = drmModeGetPropertyBlob(data->drm_fd,
> +				conn->prop_values[i]);
> +
> +		if (!blob)
> +			goto cleanup;
> +
> +		igt_parse_connector_tile_blob(blob, tile);
> +		break;
> +	}
> +
> +cleanup:
> +	drmModeFreeProperty(prop);
> +	drmModeFreePropertyBlob(blob);
> +}
> +
> +static void get_number_of_h_tiles(data_t *data)
> +{
> +	int i;
> +	drmModeResPtr res;
> +	drmModeConnectorPtr connector;
> +	igt_tile_info_t tile = {.num_h_tile = 0};
> +
> +	igt_assert(res = drmModeGetResources(data->drm_fd));
> +
> +	for (i = 0; i < res->count_connectors; i++) {
> +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> +						       res->connectors[i]);
> +
> +		igt_assert(connector);
> +
> +		if (connector->connection != DRM_MODE_CONNECTED ||
> +		    connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) {
> +			drmModeFreeConnector(connector);
> +			continue;
> +		}
> +
> +		get_connector_tile_props(data, connector, &tile);
> +
> +		if (tile.num_h_tile == 0) {
> +			drmModeFreeConnector(connector);
> +			continue;
> +		}
> +		data->num_h_tiles = tile.num_h_tile;
> +		break;
> +	}
> +
> +	drmModeFreeResources(res);
> +	drmModeFreeConnector(connector);
> +}
> +
> +static void get_connectors(data_t *data)
> +{
> +	int count = 0;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	for_each_connected_output(data->display, output) {
> +		conns[count].connector = drmModeGetConnector(data->display->drm_fd,
> +							     output->id);
> +
> +		igt_assert(conns[count].connector);
> +
> +		if (conns[count].connector->connector_type !=
> +		    DRM_MODE_CONNECTOR_DisplayPort) {
> +			drmModeFreeConnector(conns[count].connector);
> +			continue;
> +		}
> +
> +		get_connector_tile_props(data, conns[count].connector,
> +					 &conns[count].tile);
> +
> +		if (conns[count].tile.num_h_tile == 0) {
> +			drmModeFreeConnector(conns[count].connector);
> +			continue;
> +		}
> +
> +		/* Check if the connectors belong to the same tile group */
> +		if (count > 0)
> +			igt_assert(conns[count].tile.tile_group_id ==
> +				   conns[count-1].tile.tile_group_id);
> +
> +		count++;
> +	}
> +}
> +
> +static void
> +reset_plane(igt_output_t *output)
> +{
> +	igt_plane_t *primary;
> +
> +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +}
> +
> +static void reset_output(igt_output_t *output)
> +{
> +	igt_output_set_pipe(output, PIPE_NONE);
> +}
> +
> +static void reset_mode(data_t *data)
> +{
> +	int count;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		output = igt_output_from_connector(data->display,
> +						   conns[count].connector);
> +		igt_output_set_pipe(output, PIPE_NONE);
> +	}
> +	igt_display_commit2(data->display, data->commit);
> +}
> +
> +static void test_cleanup(data_t *data)
> +{
> +	int count;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		if (conns[count].output) {
> +			reset_plane(conns[count].output);
> +			reset_output(conns[count].output);
> +		}
> +	}
> +	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
> +	igt_display_commit2(data->display, data->commit);
> +	memset(conns, 0, sizeof(data_connector_t) * data->num_h_tiles);
> +}
> +
> +static void setup_mode(data_t *data)
> +{
> +	int count = 0, prev = 0;
> +	bool pipe_in_use = false;
> +	enum pipe pipe;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	/*
> +	 * The output is set to PIPE_NONE and then assigned a pipe.
> +	 * This is done to ensure a complete modeset occures every
> +	 * time the test is run.
> +	 */
> +	reset_mode(data);
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		output = igt_output_from_connector(data->display,
> +						   conns[count].connector);
> +
> +		for_each_pipe(data->display, pipe) {
> +			pipe_in_use = false;
> +			if (count > 0) {
> +				for (prev = count - 1; prev >= 0; prev--) {
> +					if (pipe == conns[prev].pipe) {
> +						pipe_in_use = true;
> +						break;
> +					}
> +				}
> +				if (pipe_in_use)
> +					continue;
> +			}
> +
> +			if (igt_pipe_connector_valid(pipe, output)) {
> +				conns[count].pipe = pipe;
> +				conns[count].output = output;
> +
> +				igt_output_set_pipe(conns[count].output,
> +						    conns[count].pipe);
> +				break;
> +			}
> +		}
> +		igt_assert(conns[count].pipe != PIPE_NONE);

Minor nit: should this be igt_require instead, so that we skip the test if we
don't have enough pipes?

Regardless, this is:

Reviewed-by: Simon Ser <simon.ser@intel.com>

Feel free to push it, thanks for your work!

> +	}
> +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +				  NULL);
> +}
> +
> +static void setup_framebuffer(data_t *data)
> +{
> +	int count;
> +	igt_plane_t *primary;
> +	int fb_h_size = 0, fb_v_size = 0;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +
> +		fb_h_size += conns[count].tile.tile_h_size;
> +		/* We support only horizontal tiles, so vertical size is same
> +		 * for all tiles and needs to be assigned only once.
> +		 */
> +		if (!fb_v_size)
> +			fb_v_size = conns[count].tile.tile_v_size;
> +
> +		if (count > 0)
> +			igt_assert(conns[count].tile.tile_v_size ==
> +				   conns[count-1].tile.tile_v_size);
> +	}
> +
> +	igt_create_pattern_fb(data->drm_fd,
> +			      fb_h_size,
> +			      fb_v_size,
> +			      DRM_FORMAT_XBGR8888,
> +			      LOCAL_DRM_FORMAT_MOD_NONE,
> +			      &data->fb_test_pattern);
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		primary = igt_output_get_plane_type(conns[count].output,
> +						    DRM_PLANE_TYPE_PRIMARY);
> +
> +		igt_plane_set_fb(primary, &data->fb_test_pattern);
> +
> +		igt_fb_set_size(&data->fb_test_pattern, primary,
> +				conns[count].tile.tile_h_size,
> +				conns[count].tile.tile_v_size);
> +
> +		igt_fb_set_position(&data->fb_test_pattern, primary,
> +				    (conns[count].tile.tile_h_size *
> +				     conns[count].tile.tile_h_loc),
> +				    (conns[count].tile.tile_v_size *
> +				     conns[count].tile.tile_v_loc));
> +
> +		igt_plane_set_size(primary,
> +				   conns[count].tile.tile_h_size,
> +				   conns[count].tile.tile_v_size);
> +	}
> +}
> +
> +static void page_flip_handler(int fd, unsigned int seq,
> +			      unsigned int tv_sec, unsigned int tv_usec,
> +			      unsigned int crtc_id, void *_data)
> +{
> +	data_t *data = _data;
> +	data_connector_t *conn;
> +	bool is_on_time = false;
> +	static unsigned int _tv_sec, _tv_usec;
> +	int i;
> +
> +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> +		  tv_sec, tv_usec);
> +
> +	for (i = 0; i < data->num_h_tiles; i++) {
> +
> +		conn = &data->conns[i];
> +		if (data->display->pipes[conn->pipe].crtc_id == crtc_id) {
> +			igt_assert_f(!conn->got_page_flip,
> +				     "Got two page-flips for CRTC %u\n",
> +				     crtc_id);
> +			conn->got_page_flip = true;
> +
> +			/* Skip the following checks for the first page flip event */
> +			if (_tv_sec == 0 || _tv_usec == 0) {
> +				_tv_sec = tv_sec;
> +				_tv_usec = tv_usec;
> +				return;
> +			}
> +			/*
> +			 * For seamless tear-free display, the page flip event timestamps
> +			 * from all the tiles should not differ by more than 10us.
> +			 */
> +			is_on_time = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> +
> +			igt_fail_on_f(!is_on_time, "Delayed page flip event from CRTC:%d at %u:%u\n",
> +				      crtc_id, tv_sec, tv_usec);
> +			return;
> +		}
> +	}
> +
> +	igt_assert_f(false, "Got page-flip event for unexpected CRTC %u\n",
> +		     crtc_id);
> +}
> +
> +static bool got_all_page_flips(data_t *data)
> +{
> +	int i;
> +
> +	for (i = 0; i < data->num_h_tiles; i++) {
> +		if (!data->conns[i].got_page_flip)
> +			return false;
> +	}
> +
> +	return true;
> +}
> +
> +igt_main
> +{
> +	igt_display_t display;
> +	data_t data = {0};
> +	struct pollfd pfd = {0};
> +	drmEventContext drm_event = {0};
> +	int ret;
> +
> +	igt_fixture {
> +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> +
> +		kmstest_set_vt_graphics_mode();
> +		igt_display_require(&display, data.drm_fd);
> +		igt_display_reset(&display);
> +
> +		data.display = &display;
> +		pfd.fd = data.drm_fd;
> +		pfd.events = POLLIN;
> +		drm_event.version = 3;
> +		drm_event.page_flip_handler2 = page_flip_handler;
> +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> +		igt_require(data.commit == COMMIT_ATOMIC);
> +
> +		get_number_of_h_tiles(&data);
> +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> +		igt_require(data.num_h_tiles > 0);
> +		data.conns = calloc(data.num_h_tiles, sizeof(data_connector_t));
> +	}
> +
> +	igt_describe("Make sure the Tiled CRTCs are synchronized and we get "
> +		     "page flips for all tiled CRTCs in one vblank.");
> +	igt_subtest("basic-test-pattern") {
> +		igt_assert(data.conns);
> +
> +		get_connectors(&data);
> +		setup_mode(&data);
> +		setup_framebuffer(&data);
> +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> +					  DRM_MODE_PAGE_FLIP_EVENT, &data);
> +		while (!got_all_page_flips(&data)) {
> +			ret = poll(&pfd, 1, 1000);
> +			igt_assert(ret == 1);
> +			drmHandleEvent(data.drm_fd, &drm_event);
> +		}
> +
> +		test_cleanup(&data);
> +	}
> +
> +	igt_fixture {
> +		free(data.conns);
> +		close(data.drm_fd);
> +		kmstest_restore_vt_mode();
> +		igt_display_fini(data.display);
> +	}
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index a7b2b322..50292df8 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -26,6 +26,7 @@ test_progs = [
>  	'kms_cursor_edge_walk',
>  	'kms_cursor_legacy',
>  	'kms_dp_dsc',
> +	'kms_dp_tiled_display',
>  	'kms_draw_crc',
>  	'kms_fbcon_fbt',
>  	'kms_fence_pin_leak',
> --
> 2.19.1


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

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

* Re: [igt-dev] [PATCH i-g-t v5] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-16 19:17         ` Simon Ser
@ 2019-09-16 19:29           ` Manasi Navare
  0 siblings, 0 replies; 34+ messages in thread
From: Manasi Navare @ 2019-09-16 19:29 UTC (permalink / raw)
  To: Simon Ser; +Cc: igt-dev, madhumitha.tp, Petri Latvala

On Mon, Sep 16, 2019 at 07:17:54PM +0000, Simon Ser wrote:
> On Saturday, September 14, 2019 2:47 AM, Manasi Navare <manasi.d.navare@intel.com> wrote:
> > From: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> >
> > This test validates the tiled DP displays to display a test pattern
> > seamlessly across the two tiles. It validates the transcoder port
> > sync feature on i915 to get a tearfree tiled display output.
> >
> > Related kernel work patches-
> > https://patchwork.freedesktop.org/series/66403/
> >
> > This test can eventually be extended to cover tiled display support
> > on other connector types.
> >
> > v5:
> > * Addresses newline nits (Simon)
> > * Add 2019 copyright, igt_describe (Petri)
> > * Check all prev connectors for pipe assignments (Simon)
> > * Continue if num_h_tiles = 0 (Simon)
> > v4:
> > * Add the logic to check there are
> > page flips per connector (Simon)
> > * Calloc instead of malloc to initialize (Manasi)
> >
> > v3:
> > * Fix the pointer leaks (Simon)
> > * Code indentation (Manasi)
> > * Compare two consecutive flip timestamps (Simon)
> > * Use single fb across tiles (Simon)
> > * Fix reset mode logic (Manasi)
> >
> > v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
> >     Minor style changes (Simon)
> >    Code clean-up and reordering
> >
> > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > Cc: Petri Latvala <petri.latvala@intel.com>
> > Cc: Simon Ser <simon.ser@intel.com>
> > Cc: <madhumitha.tp@gmail.com>
> > Cc: Simon Ser <contact@emersion.fr>
> > Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > ---
> >  tests/Makefile.sources       |   1 +
> >  tests/kms_dp_tiled_display.c | 422 +++++++++++++++++++++++++++++++++++
> >  tests/meson.build            |   1 +
> >  3 files changed, 424 insertions(+)
> >  create mode 100644 tests/kms_dp_tiled_display.c
> >
> > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > index c02e4d94..7561ab9b 100644
> > --- a/tests/Makefile.sources
> > +++ b/tests/Makefile.sources
> > @@ -41,6 +41,7 @@ TESTS_progs = \
> >  	kms_cursor_edge_walk \
> >  	kms_cursor_legacy \
> >  	kms_dp_dsc \
> > +	kms_dp_tiled_display \
> >  	kms_draw_crc \
> >  	kms_fbcon_fbt \
> >  	kms_fence_pin_leak \
> > diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> > new file mode 100644
> > index 00000000..9e9047ae
> > --- /dev/null
> > +++ b/tests/kms_dp_tiled_display.c
> > @@ -0,0 +1,422 @@
> > +/*
> > + * Copyright © 2019 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:
> > + *  Madhumitha Tolakanahalli Pradeep
> > + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> > + *  Manasi Navare <manasi.d.navare@intel.com>
> > + *
> > + * Display Port Tiled Display Test
> > + * This test parses the tile information of the connectors that have TILE
> > + * property set, sets up the framebuffer with correct offsets corresponding to
> > + * the tile offsets and does an atomic modeset with two CRTCs for two
> > + * connectors. Page flip event timestamp from each CRTC is collected and
> > + * compared to make sure that they occurred in a synchronous manner.
> > + *
> > + * This test currently supports only horizontally tiled displays, in line with
> > + * the displays supported by the kernel at the moment.
> > + */
> > +
> > +#include "igt.h"
> > +#include "poll.h"
> > +#include "drm_mode.h"
> > +#include "drm_fourcc.h"
> > +
> > +IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
> > +
> > +typedef struct {
> > +	igt_output_t *output;
> > +	igt_tile_info_t tile;
> > +	enum pipe pipe;
> > +	drmModeConnectorPtr connector;
> > +	bool got_page_flip;
> > +} data_connector_t;
> > +
> > +typedef struct {
> > +	int drm_fd;
> > +	int num_h_tiles;
> > +	igt_fb_t fb_test_pattern;
> > +	igt_display_t *display;
> > +	data_connector_t *conns;
> > +	enum igt_commit_style commit;
> > +} data_t;
> > +
> > +static int drm_property_is_tile(drmModePropertyPtr prop)
> > +{
> > +	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
> > +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> > +}
> > +
> > +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> > +				     igt_tile_info_t *tile)
> > +{
> > +	int i = 0;
> > +	drmModePropertyPtr prop;
> > +	drmModePropertyBlobPtr blob;
> > +
> > +	for (i = 0; i < conn->count_props; i++) {
> > +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> > +
> > +		igt_assert(prop);
> > +
> > +		if (!drm_property_is_tile(prop)) {
> > +			drmModeFreeProperty(prop);
> > +			continue;
> > +		}
> > +
> > +		blob = drmModeGetPropertyBlob(data->drm_fd,
> > +				conn->prop_values[i]);
> > +
> > +		if (!blob)
> > +			goto cleanup;
> > +
> > +		igt_parse_connector_tile_blob(blob, tile);
> > +		break;
> > +	}
> > +
> > +cleanup:
> > +	drmModeFreeProperty(prop);
> > +	drmModeFreePropertyBlob(blob);
> > +}
> > +
> > +static void get_number_of_h_tiles(data_t *data)
> > +{
> > +	int i;
> > +	drmModeResPtr res;
> > +	drmModeConnectorPtr connector;
> > +	igt_tile_info_t tile = {.num_h_tile = 0};
> > +
> > +	igt_assert(res = drmModeGetResources(data->drm_fd));
> > +
> > +	for (i = 0; i < res->count_connectors; i++) {
> > +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> > +						       res->connectors[i]);
> > +
> > +		igt_assert(connector);
> > +
> > +		if (connector->connection != DRM_MODE_CONNECTED ||
> > +		    connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) {
> > +			drmModeFreeConnector(connector);
> > +			continue;
> > +		}
> > +
> > +		get_connector_tile_props(data, connector, &tile);
> > +
> > +		if (tile.num_h_tile == 0) {
> > +			drmModeFreeConnector(connector);
> > +			continue;
> > +		}
> > +		data->num_h_tiles = tile.num_h_tile;
> > +		break;
> > +	}
> > +
> > +	drmModeFreeResources(res);
> > +	drmModeFreeConnector(connector);
> > +}
> > +
> > +static void get_connectors(data_t *data)
> > +{
> > +	int count = 0;
> > +	igt_output_t *output;
> > +	data_connector_t *conns = data->conns;
> > +
> > +	for_each_connected_output(data->display, output) {
> > +		conns[count].connector = drmModeGetConnector(data->display->drm_fd,
> > +							     output->id);
> > +
> > +		igt_assert(conns[count].connector);
> > +
> > +		if (conns[count].connector->connector_type !=
> > +		    DRM_MODE_CONNECTOR_DisplayPort) {
> > +			drmModeFreeConnector(conns[count].connector);
> > +			continue;
> > +		}
> > +
> > +		get_connector_tile_props(data, conns[count].connector,
> > +					 &conns[count].tile);
> > +
> > +		if (conns[count].tile.num_h_tile == 0) {
> > +			drmModeFreeConnector(conns[count].connector);
> > +			continue;
> > +		}
> > +
> > +		/* Check if the connectors belong to the same tile group */
> > +		if (count > 0)
> > +			igt_assert(conns[count].tile.tile_group_id ==
> > +				   conns[count-1].tile.tile_group_id);
> > +
> > +		count++;
> > +	}
> > +}
> > +
> > +static void
> > +reset_plane(igt_output_t *output)
> > +{
> > +	igt_plane_t *primary;
> > +
> > +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > +	igt_plane_set_fb(primary, NULL);
> > +}
> > +
> > +static void reset_output(igt_output_t *output)
> > +{
> > +	igt_output_set_pipe(output, PIPE_NONE);
> > +}
> > +
> > +static void reset_mode(data_t *data)
> > +{
> > +	int count;
> > +	igt_output_t *output;
> > +	data_connector_t *conns = data->conns;
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +		output = igt_output_from_connector(data->display,
> > +						   conns[count].connector);
> > +		igt_output_set_pipe(output, PIPE_NONE);
> > +	}
> > +	igt_display_commit2(data->display, data->commit);
> > +}
> > +
> > +static void test_cleanup(data_t *data)
> > +{
> > +	int count;
> > +	data_connector_t *conns = data->conns;
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +		if (conns[count].output) {
> > +			reset_plane(conns[count].output);
> > +			reset_output(conns[count].output);
> > +		}
> > +	}
> > +	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
> > +	igt_display_commit2(data->display, data->commit);
> > +	memset(conns, 0, sizeof(data_connector_t) * data->num_h_tiles);
> > +}
> > +
> > +static void setup_mode(data_t *data)
> > +{
> > +	int count = 0, prev = 0;
> > +	bool pipe_in_use = false;
> > +	enum pipe pipe;
> > +	igt_output_t *output;
> > +	data_connector_t *conns = data->conns;
> > +
> > +	/*
> > +	 * The output is set to PIPE_NONE and then assigned a pipe.
> > +	 * This is done to ensure a complete modeset occures every
> > +	 * time the test is run.
> > +	 */
> > +	reset_mode(data);
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +		output = igt_output_from_connector(data->display,
> > +						   conns[count].connector);
> > +
> > +		for_each_pipe(data->display, pipe) {
> > +			pipe_in_use = false;
> > +			if (count > 0) {
> > +				for (prev = count - 1; prev >= 0; prev--) {
> > +					if (pipe == conns[prev].pipe) {
> > +						pipe_in_use = true;
> > +						break;
> > +					}
> > +				}
> > +				if (pipe_in_use)
> > +					continue;
> > +			}
> > +
> > +			if (igt_pipe_connector_valid(pipe, output)) {
> > +				conns[count].pipe = pipe;
> > +				conns[count].output = output;
> > +
> > +				igt_output_set_pipe(conns[count].output,
> > +						    conns[count].pipe);
> > +				break;
> > +			}
> > +		}
> > +		igt_assert(conns[count].pipe != PIPE_NONE);
> 
> Minor nit: should this be igt_require instead, so that we skip the test if we
> don't have enough pipes?

Yes makes sense to make this a igt_require to skip the test if HW configuration
is not supported Will change this and add your r-b and push it

Regards
Manasi

> 
> Regardless, this is:
> 
> Reviewed-by: Simon Ser <simon.ser@intel.com>
> 
> Feel free to push it, thanks for your work!
> 
> > +	}
> > +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> > +				  NULL);
> > +}
> > +
> > +static void setup_framebuffer(data_t *data)
> > +{
> > +	int count;
> > +	igt_plane_t *primary;
> > +	int fb_h_size = 0, fb_v_size = 0;
> > +	data_connector_t *conns = data->conns;
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +
> > +		fb_h_size += conns[count].tile.tile_h_size;
> > +		/* We support only horizontal tiles, so vertical size is same
> > +		 * for all tiles and needs to be assigned only once.
> > +		 */
> > +		if (!fb_v_size)
> > +			fb_v_size = conns[count].tile.tile_v_size;
> > +
> > +		if (count > 0)
> > +			igt_assert(conns[count].tile.tile_v_size ==
> > +				   conns[count-1].tile.tile_v_size);
> > +	}
> > +
> > +	igt_create_pattern_fb(data->drm_fd,
> > +			      fb_h_size,
> > +			      fb_v_size,
> > +			      DRM_FORMAT_XBGR8888,
> > +			      LOCAL_DRM_FORMAT_MOD_NONE,
> > +			      &data->fb_test_pattern);
> > +
> > +	for (count = 0; count < data->num_h_tiles; count++) {
> > +		primary = igt_output_get_plane_type(conns[count].output,
> > +						    DRM_PLANE_TYPE_PRIMARY);
> > +
> > +		igt_plane_set_fb(primary, &data->fb_test_pattern);
> > +
> > +		igt_fb_set_size(&data->fb_test_pattern, primary,
> > +				conns[count].tile.tile_h_size,
> > +				conns[count].tile.tile_v_size);
> > +
> > +		igt_fb_set_position(&data->fb_test_pattern, primary,
> > +				    (conns[count].tile.tile_h_size *
> > +				     conns[count].tile.tile_h_loc),
> > +				    (conns[count].tile.tile_v_size *
> > +				     conns[count].tile.tile_v_loc));
> > +
> > +		igt_plane_set_size(primary,
> > +				   conns[count].tile.tile_h_size,
> > +				   conns[count].tile.tile_v_size);
> > +	}
> > +}
> > +
> > +static void page_flip_handler(int fd, unsigned int seq,
> > +			      unsigned int tv_sec, unsigned int tv_usec,
> > +			      unsigned int crtc_id, void *_data)
> > +{
> > +	data_t *data = _data;
> > +	data_connector_t *conn;
> > +	bool is_on_time = false;
> > +	static unsigned int _tv_sec, _tv_usec;
> > +	int i;
> > +
> > +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> > +		  tv_sec, tv_usec);
> > +
> > +	for (i = 0; i < data->num_h_tiles; i++) {
> > +
> > +		conn = &data->conns[i];
> > +		if (data->display->pipes[conn->pipe].crtc_id == crtc_id) {
> > +			igt_assert_f(!conn->got_page_flip,
> > +				     "Got two page-flips for CRTC %u\n",
> > +				     crtc_id);
> > +			conn->got_page_flip = true;
> > +
> > +			/* Skip the following checks for the first page flip event */
> > +			if (_tv_sec == 0 || _tv_usec == 0) {
> > +				_tv_sec = tv_sec;
> > +				_tv_usec = tv_usec;
> > +				return;
> > +			}
> > +			/*
> > +			 * For seamless tear-free display, the page flip event timestamps
> > +			 * from all the tiles should not differ by more than 10us.
> > +			 */
> > +			is_on_time = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> > +
> > +			igt_fail_on_f(!is_on_time, "Delayed page flip event from CRTC:%d at %u:%u\n",
> > +				      crtc_id, tv_sec, tv_usec);
> > +			return;
> > +		}
> > +	}
> > +
> > +	igt_assert_f(false, "Got page-flip event for unexpected CRTC %u\n",
> > +		     crtc_id);
> > +}
> > +
> > +static bool got_all_page_flips(data_t *data)
> > +{
> > +	int i;
> > +
> > +	for (i = 0; i < data->num_h_tiles; i++) {
> > +		if (!data->conns[i].got_page_flip)
> > +			return false;
> > +	}
> > +
> > +	return true;
> > +}
> > +
> > +igt_main
> > +{
> > +	igt_display_t display;
> > +	data_t data = {0};
> > +	struct pollfd pfd = {0};
> > +	drmEventContext drm_event = {0};
> > +	int ret;
> > +
> > +	igt_fixture {
> > +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > +
> > +		kmstest_set_vt_graphics_mode();
> > +		igt_display_require(&display, data.drm_fd);
> > +		igt_display_reset(&display);
> > +
> > +		data.display = &display;
> > +		pfd.fd = data.drm_fd;
> > +		pfd.events = POLLIN;
> > +		drm_event.version = 3;
> > +		drm_event.page_flip_handler2 = page_flip_handler;
> > +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> > +		igt_require(data.commit == COMMIT_ATOMIC);
> > +
> > +		get_number_of_h_tiles(&data);
> > +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> > +		igt_require(data.num_h_tiles > 0);
> > +		data.conns = calloc(data.num_h_tiles, sizeof(data_connector_t));
> > +	}
> > +
> > +	igt_describe("Make sure the Tiled CRTCs are synchronized and we get "
> > +		     "page flips for all tiled CRTCs in one vblank.");
> > +	igt_subtest("basic-test-pattern") {
> > +		igt_assert(data.conns);
> > +
> > +		get_connectors(&data);
> > +		setup_mode(&data);
> > +		setup_framebuffer(&data);
> > +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> > +					  DRM_MODE_PAGE_FLIP_EVENT, &data);
> > +		while (!got_all_page_flips(&data)) {
> > +			ret = poll(&pfd, 1, 1000);
> > +			igt_assert(ret == 1);
> > +			drmHandleEvent(data.drm_fd, &drm_event);
> > +		}
> > +
> > +		test_cleanup(&data);
> > +	}
> > +
> > +	igt_fixture {
> > +		free(data.conns);
> > +		close(data.drm_fd);
> > +		kmstest_restore_vt_mode();
> > +		igt_display_fini(data.display);
> > +	}
> > +}
> > diff --git a/tests/meson.build b/tests/meson.build
> > index a7b2b322..50292df8 100644
> > --- a/tests/meson.build
> > +++ b/tests/meson.build
> > @@ -26,6 +26,7 @@ test_progs = [
> >  	'kms_cursor_edge_walk',
> >  	'kms_cursor_legacy',
> >  	'kms_dp_dsc',
> > +	'kms_dp_tiled_display',
> >  	'kms_draw_crc',
> >  	'kms_fbcon_fbt',
> >  	'kms_fence_pin_leak',
> > --
> > 2.19.1
> 
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t v6] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-13 23:48       ` [igt-dev] [PATCH i-g-t v5] " Manasi Navare
  2019-09-16 19:17         ` Simon Ser
@ 2019-09-16 19:34         ` Manasi Navare
  2019-09-16 19:42           ` Manasi Navare
  1 sibling, 1 reply; 34+ messages in thread
From: Manasi Navare @ 2019-09-16 19:34 UTC (permalink / raw)
  To: igt-dev; +Cc: madhumitha.tp, Petri Latvala, Simon Ser

From: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>

This test validates the tiled DP displays to display a test pattern
seamlessly across the two tiles. It validates the transcoder port
sync feature on i915 to get a tearfree tiled display output.

Related kernel work patches-
https://patchwork.freedesktop.org/series/66403/

This test can eventually be extended to cover tiled display support
on other connector types.

v6:
* igt_require if enough pipes not available (Simon, Petri)
v5:
* Addresses newline nits (Simon)
* Add 2019 copyright, igt_describe (Petri)
* Check all prev connectors for pipe assignments (Simon)
* Continue if num_h_tiles = 0 (Simon)
v4:
* Add the logic to check there are
page flips per connector (Simon)
* Calloc instead of malloc to initialize (Manasi)

v3:
* Fix the pointer leaks (Simon)
* Code indentation (Manasi)
* Compare two consecutive flip timestamps (Simon)
* Use single fb across tiles (Simon)
* Fix reset mode logic (Manasi)

v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
    Minor style changes (Simon)
   Code clean-up and reordering

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Simon Ser <simon.ser@intel.com>
Cc: <madhumitha.tp@gmail.com>
Cc: Simon Ser <contact@emersion.fr>
Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Simon Ser <simon.ser@intel.com>
---
 tests/Makefile.sources       |   1 +
 tests/kms_dp_tiled_display.c | 422 +++++++++++++++++++++++++++++++++++
 tests/meson.build            |   1 +
 3 files changed, 424 insertions(+)
 create mode 100644 tests/kms_dp_tiled_display.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c02e4d94..7561ab9b 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -41,6 +41,7 @@ TESTS_progs = \
 	kms_cursor_edge_walk \
 	kms_cursor_legacy \
 	kms_dp_dsc \
+	kms_dp_tiled_display \
 	kms_draw_crc \
 	kms_fbcon_fbt \
 	kms_fence_pin_leak \
diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
new file mode 100644
index 00000000..c4643c35
--- /dev/null
+++ b/tests/kms_dp_tiled_display.c
@@ -0,0 +1,422 @@
+/*
+ * Copyright © 2019 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:
+ *  Madhumitha Tolakanahalli Pradeep
+ *      <madhumitha.tolakanahalli.pradeep@intel.com>
+ *  Manasi Navare <manasi.d.navare@intel.com>
+ *
+ * Display Port Tiled Display Test
+ * This test parses the tile information of the connectors that have TILE
+ * property set, sets up the framebuffer with correct offsets corresponding to
+ * the tile offsets and does an atomic modeset with two CRTCs for two
+ * connectors. Page flip event timestamp from each CRTC is collected and
+ * compared to make sure that they occurred in a synchronous manner.
+ *
+ * This test currently supports only horizontally tiled displays, in line with
+ * the displays supported by the kernel at the moment.
+ */
+
+#include "igt.h"
+#include "poll.h"
+#include "drm_mode.h"
+#include "drm_fourcc.h"
+
+IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
+
+typedef struct {
+	igt_output_t *output;
+	igt_tile_info_t tile;
+	enum pipe pipe;
+	drmModeConnectorPtr connector;
+	bool got_page_flip;
+} data_connector_t;
+
+typedef struct {
+	int drm_fd;
+	int num_h_tiles;
+	igt_fb_t fb_test_pattern;
+	igt_display_t *display;
+	data_connector_t *conns;
+	enum igt_commit_style commit;
+} data_t;
+
+static int drm_property_is_tile(drmModePropertyPtr prop)
+{
+	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
+			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
+}
+
+static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
+				     igt_tile_info_t *tile)
+{
+	int i = 0;
+	drmModePropertyPtr prop;
+	drmModePropertyBlobPtr blob;
+
+	for (i = 0; i < conn->count_props; i++) {
+		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
+
+		igt_assert(prop);
+
+		if (!drm_property_is_tile(prop)) {
+			drmModeFreeProperty(prop);
+			continue;
+		}
+
+		blob = drmModeGetPropertyBlob(data->drm_fd,
+				conn->prop_values[i]);
+
+		if (!blob)
+			goto cleanup;
+
+		igt_parse_connector_tile_blob(blob, tile);
+		break;
+	}
+
+cleanup:
+	drmModeFreeProperty(prop);
+	drmModeFreePropertyBlob(blob);
+}
+
+static void get_number_of_h_tiles(data_t *data)
+{
+	int i;
+	drmModeResPtr res;
+	drmModeConnectorPtr connector;
+	igt_tile_info_t tile = {.num_h_tile = 0};
+
+	igt_assert(res = drmModeGetResources(data->drm_fd));
+
+	for (i = 0; i < res->count_connectors; i++) {
+		connector = drmModeGetConnectorCurrent(data->drm_fd,
+						       res->connectors[i]);
+
+		igt_assert(connector);
+
+		if (connector->connection != DRM_MODE_CONNECTED ||
+		    connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) {
+			drmModeFreeConnector(connector);
+			continue;
+		}
+
+		get_connector_tile_props(data, connector, &tile);
+
+		if (tile.num_h_tile == 0) {
+			drmModeFreeConnector(connector);
+			continue;
+		}
+		data->num_h_tiles = tile.num_h_tile;
+		break;
+	}
+
+	drmModeFreeResources(res);
+	drmModeFreeConnector(connector);
+}
+
+static void get_connectors(data_t *data)
+{
+	int count = 0;
+	igt_output_t *output;
+	data_connector_t *conns = data->conns;
+
+	for_each_connected_output(data->display, output) {
+		conns[count].connector = drmModeGetConnector(data->display->drm_fd,
+							     output->id);
+
+		igt_assert(conns[count].connector);
+
+		if (conns[count].connector->connector_type !=
+		    DRM_MODE_CONNECTOR_DisplayPort) {
+			drmModeFreeConnector(conns[count].connector);
+			continue;
+		}
+
+		get_connector_tile_props(data, conns[count].connector,
+					 &conns[count].tile);
+
+		if (conns[count].tile.num_h_tile == 0) {
+			drmModeFreeConnector(conns[count].connector);
+			continue;
+		}
+
+		/* Check if the connectors belong to the same tile group */
+		if (count > 0)
+			igt_assert(conns[count].tile.tile_group_id ==
+				   conns[count-1].tile.tile_group_id);
+
+		count++;
+	}
+}
+
+static void
+reset_plane(igt_output_t *output)
+{
+	igt_plane_t *primary;
+
+	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	igt_plane_set_fb(primary, NULL);
+}
+
+static void reset_output(igt_output_t *output)
+{
+	igt_output_set_pipe(output, PIPE_NONE);
+}
+
+static void reset_mode(data_t *data)
+{
+	int count;
+	igt_output_t *output;
+	data_connector_t *conns = data->conns;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		output = igt_output_from_connector(data->display,
+						   conns[count].connector);
+		igt_output_set_pipe(output, PIPE_NONE);
+	}
+	igt_display_commit2(data->display, data->commit);
+}
+
+static void test_cleanup(data_t *data)
+{
+	int count;
+	data_connector_t *conns = data->conns;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		if (conns[count].output) {
+			reset_plane(conns[count].output);
+			reset_output(conns[count].output);
+		}
+	}
+	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
+	igt_display_commit2(data->display, data->commit);
+	memset(conns, 0, sizeof(data_connector_t) * data->num_h_tiles);
+}
+
+static void setup_mode(data_t *data)
+{
+	int count = 0, prev = 0;
+	bool pipe_in_use = false;
+	enum pipe pipe;
+	igt_output_t *output;
+	data_connector_t *conns = data->conns;
+
+	/*
+	 * The output is set to PIPE_NONE and then assigned a pipe.
+	 * This is done to ensure a complete modeset occures every
+	 * time the test is run.
+	 */
+	reset_mode(data);
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		output = igt_output_from_connector(data->display,
+						   conns[count].connector);
+
+		for_each_pipe(data->display, pipe) {
+			pipe_in_use = false;
+			if (count > 0) {
+				for (prev = count - 1; prev >= 0; prev--) {
+					if (pipe == conns[prev].pipe) {
+						pipe_in_use = true;
+						break;
+					}
+				}
+				if (pipe_in_use)
+					continue;
+			}
+
+			if (igt_pipe_connector_valid(pipe, output)) {
+				conns[count].pipe = pipe;
+				conns[count].output = output;
+
+				igt_output_set_pipe(conns[count].output,
+						    conns[count].pipe);
+				break;
+			}
+		}
+		igt_require(conns[count].pipe != PIPE_NONE);
+	}
+	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
+				  NULL);
+}
+
+static void setup_framebuffer(data_t *data)
+{
+	int count;
+	igt_plane_t *primary;
+	int fb_h_size = 0, fb_v_size = 0;
+	data_connector_t *conns = data->conns;
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+
+		fb_h_size += conns[count].tile.tile_h_size;
+		/* We support only horizontal tiles, so vertical size is same
+		 * for all tiles and needs to be assigned only once.
+		 */
+		if (!fb_v_size)
+			fb_v_size = conns[count].tile.tile_v_size;
+
+		if (count > 0)
+			igt_assert(conns[count].tile.tile_v_size ==
+				   conns[count-1].tile.tile_v_size);
+	}
+
+	igt_create_pattern_fb(data->drm_fd,
+			      fb_h_size,
+			      fb_v_size,
+			      DRM_FORMAT_XBGR8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE,
+			      &data->fb_test_pattern);
+
+	for (count = 0; count < data->num_h_tiles; count++) {
+		primary = igt_output_get_plane_type(conns[count].output,
+						    DRM_PLANE_TYPE_PRIMARY);
+
+		igt_plane_set_fb(primary, &data->fb_test_pattern);
+
+		igt_fb_set_size(&data->fb_test_pattern, primary,
+				conns[count].tile.tile_h_size,
+				conns[count].tile.tile_v_size);
+
+		igt_fb_set_position(&data->fb_test_pattern, primary,
+				    (conns[count].tile.tile_h_size *
+				     conns[count].tile.tile_h_loc),
+				    (conns[count].tile.tile_v_size *
+				     conns[count].tile.tile_v_loc));
+
+		igt_plane_set_size(primary,
+				   conns[count].tile.tile_h_size,
+				   conns[count].tile.tile_v_size);
+	}
+}
+
+static void page_flip_handler(int fd, unsigned int seq,
+			      unsigned int tv_sec, unsigned int tv_usec,
+			      unsigned int crtc_id, void *_data)
+{
+	data_t *data = _data;
+	data_connector_t *conn;
+	bool is_on_time = false;
+	static unsigned int _tv_sec, _tv_usec;
+	int i;
+
+	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
+		  tv_sec, tv_usec);
+
+	for (i = 0; i < data->num_h_tiles; i++) {
+
+		conn = &data->conns[i];
+		if (data->display->pipes[conn->pipe].crtc_id == crtc_id) {
+			igt_assert_f(!conn->got_page_flip,
+				     "Got two page-flips for CRTC %u\n",
+				     crtc_id);
+			conn->got_page_flip = true;
+
+			/* Skip the following checks for the first page flip event */
+			if (_tv_sec == 0 || _tv_usec == 0) {
+				_tv_sec = tv_sec;
+				_tv_usec = tv_usec;
+				return;
+			}
+			/*
+			 * For seamless tear-free display, the page flip event timestamps
+			 * from all the tiles should not differ by more than 10us.
+			 */
+			is_on_time = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
+
+			igt_fail_on_f(!is_on_time, "Delayed page flip event from CRTC:%d at %u:%u\n",
+				      crtc_id, tv_sec, tv_usec);
+			return;
+		}
+	}
+
+	igt_assert_f(false, "Got page-flip event for unexpected CRTC %u\n",
+		     crtc_id);
+}
+
+static bool got_all_page_flips(data_t *data)
+{
+	int i;
+
+	for (i = 0; i < data->num_h_tiles; i++) {
+		if (!data->conns[i].got_page_flip)
+			return false;
+	}
+
+	return true;
+}
+
+igt_main
+{
+	igt_display_t display;
+	data_t data = {0};
+	struct pollfd pfd = {0};
+	drmEventContext drm_event = {0};
+	int ret;
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
+
+		kmstest_set_vt_graphics_mode();
+		igt_display_require(&display, data.drm_fd);
+		igt_display_reset(&display);
+
+		data.display = &display;
+		pfd.fd = data.drm_fd;
+		pfd.events = POLLIN;
+		drm_event.version = 3;
+		drm_event.page_flip_handler2 = page_flip_handler;
+		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
+		igt_require(data.commit == COMMIT_ATOMIC);
+
+		get_number_of_h_tiles(&data);
+		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
+		igt_require(data.num_h_tiles > 0);
+		data.conns = calloc(data.num_h_tiles, sizeof(data_connector_t));
+	}
+
+	igt_describe("Make sure the Tiled CRTCs are synchronized and we get "
+		     "page flips for all tiled CRTCs in one vblank.");
+	igt_subtest("basic-test-pattern") {
+		igt_assert(data.conns);
+
+		get_connectors(&data);
+		setup_mode(&data);
+		setup_framebuffer(&data);
+		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
+					  DRM_MODE_PAGE_FLIP_EVENT, &data);
+		while (!got_all_page_flips(&data)) {
+			ret = poll(&pfd, 1, 1000);
+			igt_assert(ret == 1);
+			drmHandleEvent(data.drm_fd, &drm_event);
+		}
+
+		test_cleanup(&data);
+	}
+
+	igt_fixture {
+		free(data.conns);
+		close(data.drm_fd);
+		kmstest_restore_vt_mode();
+		igt_display_fini(data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index a7b2b322..50292df8 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -26,6 +26,7 @@ test_progs = [
 	'kms_cursor_edge_walk',
 	'kms_cursor_legacy',
 	'kms_dp_dsc',
+	'kms_dp_tiled_display',
 	'kms_draw_crc',
 	'kms_fbcon_fbt',
 	'kms_fence_pin_leak',
-- 
2.19.1

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

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

* Re: [igt-dev] [PATCH i-g-t v6] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays
  2019-09-16 19:34         ` [igt-dev] [PATCH i-g-t v6] " Manasi Navare
@ 2019-09-16 19:42           ` Manasi Navare
  0 siblings, 0 replies; 34+ messages in thread
From: Manasi Navare @ 2019-09-16 19:42 UTC (permalink / raw)
  To: igt-dev; +Cc: Simon Ser, madhumitha.tp, Petri Latvala

Thanks for the patch and the reviews, pushed to igt-dev

Regards
Manasi


On Mon, Sep 16, 2019 at 12:34:57PM -0700, Manasi Navare wrote:
> From: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> 
> This test validates the tiled DP displays to display a test pattern
> seamlessly across the two tiles. It validates the transcoder port
> sync feature on i915 to get a tearfree tiled display output.
> 
> Related kernel work patches-
> https://patchwork.freedesktop.org/series/66403/
> 
> This test can eventually be extended to cover tiled display support
> on other connector types.
> 
> v6:
> * igt_require if enough pipes not available (Simon, Petri)
> v5:
> * Addresses newline nits (Simon)
> * Add 2019 copyright, igt_describe (Petri)
> * Check all prev connectors for pipe assignments (Simon)
> * Continue if num_h_tiles = 0 (Simon)
> v4:
> * Add the logic to check there are
> page flips per connector (Simon)
> * Calloc instead of malloc to initialize (Manasi)
> 
> v3:
> * Fix the pointer leaks (Simon)
> * Code indentation (Manasi)
> * Compare two consecutive flip timestamps (Simon)
> * Use single fb across tiles (Simon)
> * Fix reset mode logic (Manasi)
> 
> v2: Added a check for checking pageflip event timestamps (Simon, Manasi)
>     Minor style changes (Simon)
>    Code clean-up and reordering
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Simon Ser <simon.ser@intel.com>
> Cc: <madhumitha.tp@gmail.com>
> Cc: Simon Ser <contact@emersion.fr>
> Signed-off-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> Reviewed-by: Simon Ser <simon.ser@intel.com>
> ---
>  tests/Makefile.sources       |   1 +
>  tests/kms_dp_tiled_display.c | 422 +++++++++++++++++++++++++++++++++++
>  tests/meson.build            |   1 +
>  3 files changed, 424 insertions(+)
>  create mode 100644 tests/kms_dp_tiled_display.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index c02e4d94..7561ab9b 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -41,6 +41,7 @@ TESTS_progs = \
>  	kms_cursor_edge_walk \
>  	kms_cursor_legacy \
>  	kms_dp_dsc \
> +	kms_dp_tiled_display \
>  	kms_draw_crc \
>  	kms_fbcon_fbt \
>  	kms_fence_pin_leak \
> diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> new file mode 100644
> index 00000000..c4643c35
> --- /dev/null
> +++ b/tests/kms_dp_tiled_display.c
> @@ -0,0 +1,422 @@
> +/*
> + * Copyright © 2019 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:
> + *  Madhumitha Tolakanahalli Pradeep
> + *      <madhumitha.tolakanahalli.pradeep@intel.com>
> + *  Manasi Navare <manasi.d.navare@intel.com>
> + *
> + * Display Port Tiled Display Test
> + * This test parses the tile information of the connectors that have TILE
> + * property set, sets up the framebuffer with correct offsets corresponding to
> + * the tile offsets and does an atomic modeset with two CRTCs for two
> + * connectors. Page flip event timestamp from each CRTC is collected and
> + * compared to make sure that they occurred in a synchronous manner.
> + *
> + * This test currently supports only horizontally tiled displays, in line with
> + * the displays supported by the kernel at the moment.
> + */
> +
> +#include "igt.h"
> +#include "poll.h"
> +#include "drm_mode.h"
> +#include "drm_fourcc.h"
> +
> +IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
> +
> +typedef struct {
> +	igt_output_t *output;
> +	igt_tile_info_t tile;
> +	enum pipe pipe;
> +	drmModeConnectorPtr connector;
> +	bool got_page_flip;
> +} data_connector_t;
> +
> +typedef struct {
> +	int drm_fd;
> +	int num_h_tiles;
> +	igt_fb_t fb_test_pattern;
> +	igt_display_t *display;
> +	data_connector_t *conns;
> +	enum igt_commit_style commit;
> +} data_t;
> +
> +static int drm_property_is_tile(drmModePropertyPtr prop)
> +{
> +	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
> +			 drm_property_type_is(prop, DRM_MODE_PROP_BLOB);
> +}
> +
> +static void get_connector_tile_props(data_t *data, drmModeConnectorPtr conn,
> +				     igt_tile_info_t *tile)
> +{
> +	int i = 0;
> +	drmModePropertyPtr prop;
> +	drmModePropertyBlobPtr blob;
> +
> +	for (i = 0; i < conn->count_props; i++) {
> +		prop = drmModeGetProperty(data->drm_fd, conn->props[i]);
> +
> +		igt_assert(prop);
> +
> +		if (!drm_property_is_tile(prop)) {
> +			drmModeFreeProperty(prop);
> +			continue;
> +		}
> +
> +		blob = drmModeGetPropertyBlob(data->drm_fd,
> +				conn->prop_values[i]);
> +
> +		if (!blob)
> +			goto cleanup;
> +
> +		igt_parse_connector_tile_blob(blob, tile);
> +		break;
> +	}
> +
> +cleanup:
> +	drmModeFreeProperty(prop);
> +	drmModeFreePropertyBlob(blob);
> +}
> +
> +static void get_number_of_h_tiles(data_t *data)
> +{
> +	int i;
> +	drmModeResPtr res;
> +	drmModeConnectorPtr connector;
> +	igt_tile_info_t tile = {.num_h_tile = 0};
> +
> +	igt_assert(res = drmModeGetResources(data->drm_fd));
> +
> +	for (i = 0; i < res->count_connectors; i++) {
> +		connector = drmModeGetConnectorCurrent(data->drm_fd,
> +						       res->connectors[i]);
> +
> +		igt_assert(connector);
> +
> +		if (connector->connection != DRM_MODE_CONNECTED ||
> +		    connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) {
> +			drmModeFreeConnector(connector);
> +			continue;
> +		}
> +
> +		get_connector_tile_props(data, connector, &tile);
> +
> +		if (tile.num_h_tile == 0) {
> +			drmModeFreeConnector(connector);
> +			continue;
> +		}
> +		data->num_h_tiles = tile.num_h_tile;
> +		break;
> +	}
> +
> +	drmModeFreeResources(res);
> +	drmModeFreeConnector(connector);
> +}
> +
> +static void get_connectors(data_t *data)
> +{
> +	int count = 0;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	for_each_connected_output(data->display, output) {
> +		conns[count].connector = drmModeGetConnector(data->display->drm_fd,
> +							     output->id);
> +
> +		igt_assert(conns[count].connector);
> +
> +		if (conns[count].connector->connector_type !=
> +		    DRM_MODE_CONNECTOR_DisplayPort) {
> +			drmModeFreeConnector(conns[count].connector);
> +			continue;
> +		}
> +
> +		get_connector_tile_props(data, conns[count].connector,
> +					 &conns[count].tile);
> +
> +		if (conns[count].tile.num_h_tile == 0) {
> +			drmModeFreeConnector(conns[count].connector);
> +			continue;
> +		}
> +
> +		/* Check if the connectors belong to the same tile group */
> +		if (count > 0)
> +			igt_assert(conns[count].tile.tile_group_id ==
> +				   conns[count-1].tile.tile_group_id);
> +
> +		count++;
> +	}
> +}
> +
> +static void
> +reset_plane(igt_output_t *output)
> +{
> +	igt_plane_t *primary;
> +
> +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +}
> +
> +static void reset_output(igt_output_t *output)
> +{
> +	igt_output_set_pipe(output, PIPE_NONE);
> +}
> +
> +static void reset_mode(data_t *data)
> +{
> +	int count;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		output = igt_output_from_connector(data->display,
> +						   conns[count].connector);
> +		igt_output_set_pipe(output, PIPE_NONE);
> +	}
> +	igt_display_commit2(data->display, data->commit);
> +}
> +
> +static void test_cleanup(data_t *data)
> +{
> +	int count;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		if (conns[count].output) {
> +			reset_plane(conns[count].output);
> +			reset_output(conns[count].output);
> +		}
> +	}
> +	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
> +	igt_display_commit2(data->display, data->commit);
> +	memset(conns, 0, sizeof(data_connector_t) * data->num_h_tiles);
> +}
> +
> +static void setup_mode(data_t *data)
> +{
> +	int count = 0, prev = 0;
> +	bool pipe_in_use = false;
> +	enum pipe pipe;
> +	igt_output_t *output;
> +	data_connector_t *conns = data->conns;
> +
> +	/*
> +	 * The output is set to PIPE_NONE and then assigned a pipe.
> +	 * This is done to ensure a complete modeset occures every
> +	 * time the test is run.
> +	 */
> +	reset_mode(data);
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		output = igt_output_from_connector(data->display,
> +						   conns[count].connector);
> +
> +		for_each_pipe(data->display, pipe) {
> +			pipe_in_use = false;
> +			if (count > 0) {
> +				for (prev = count - 1; prev >= 0; prev--) {
> +					if (pipe == conns[prev].pipe) {
> +						pipe_in_use = true;
> +						break;
> +					}
> +				}
> +				if (pipe_in_use)
> +					continue;
> +			}
> +
> +			if (igt_pipe_connector_valid(pipe, output)) {
> +				conns[count].pipe = pipe;
> +				conns[count].output = output;
> +
> +				igt_output_set_pipe(conns[count].output,
> +						    conns[count].pipe);
> +				break;
> +			}
> +		}
> +		igt_require(conns[count].pipe != PIPE_NONE);
> +	}
> +	igt_display_commit_atomic(data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +				  NULL);
> +}
> +
> +static void setup_framebuffer(data_t *data)
> +{
> +	int count;
> +	igt_plane_t *primary;
> +	int fb_h_size = 0, fb_v_size = 0;
> +	data_connector_t *conns = data->conns;
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +
> +		fb_h_size += conns[count].tile.tile_h_size;
> +		/* We support only horizontal tiles, so vertical size is same
> +		 * for all tiles and needs to be assigned only once.
> +		 */
> +		if (!fb_v_size)
> +			fb_v_size = conns[count].tile.tile_v_size;
> +
> +		if (count > 0)
> +			igt_assert(conns[count].tile.tile_v_size ==
> +				   conns[count-1].tile.tile_v_size);
> +	}
> +
> +	igt_create_pattern_fb(data->drm_fd,
> +			      fb_h_size,
> +			      fb_v_size,
> +			      DRM_FORMAT_XBGR8888,
> +			      LOCAL_DRM_FORMAT_MOD_NONE,
> +			      &data->fb_test_pattern);
> +
> +	for (count = 0; count < data->num_h_tiles; count++) {
> +		primary = igt_output_get_plane_type(conns[count].output,
> +						    DRM_PLANE_TYPE_PRIMARY);
> +
> +		igt_plane_set_fb(primary, &data->fb_test_pattern);
> +
> +		igt_fb_set_size(&data->fb_test_pattern, primary,
> +				conns[count].tile.tile_h_size,
> +				conns[count].tile.tile_v_size);
> +
> +		igt_fb_set_position(&data->fb_test_pattern, primary,
> +				    (conns[count].tile.tile_h_size *
> +				     conns[count].tile.tile_h_loc),
> +				    (conns[count].tile.tile_v_size *
> +				     conns[count].tile.tile_v_loc));
> +
> +		igt_plane_set_size(primary,
> +				   conns[count].tile.tile_h_size,
> +				   conns[count].tile.tile_v_size);
> +	}
> +}
> +
> +static void page_flip_handler(int fd, unsigned int seq,
> +			      unsigned int tv_sec, unsigned int tv_usec,
> +			      unsigned int crtc_id, void *_data)
> +{
> +	data_t *data = _data;
> +	data_connector_t *conn;
> +	bool is_on_time = false;
> +	static unsigned int _tv_sec, _tv_usec;
> +	int i;
> +
> +	igt_debug("Page Flip Event received from CRTC:%d at %u:%u\n", crtc_id,
> +		  tv_sec, tv_usec);
> +
> +	for (i = 0; i < data->num_h_tiles; i++) {
> +
> +		conn = &data->conns[i];
> +		if (data->display->pipes[conn->pipe].crtc_id == crtc_id) {
> +			igt_assert_f(!conn->got_page_flip,
> +				     "Got two page-flips for CRTC %u\n",
> +				     crtc_id);
> +			conn->got_page_flip = true;
> +
> +			/* Skip the following checks for the first page flip event */
> +			if (_tv_sec == 0 || _tv_usec == 0) {
> +				_tv_sec = tv_sec;
> +				_tv_usec = tv_usec;
> +				return;
> +			}
> +			/*
> +			 * For seamless tear-free display, the page flip event timestamps
> +			 * from all the tiles should not differ by more than 10us.
> +			 */
> +			is_on_time = tv_sec == _tv_sec && (abs(tv_usec - _tv_usec) < 10);
> +
> +			igt_fail_on_f(!is_on_time, "Delayed page flip event from CRTC:%d at %u:%u\n",
> +				      crtc_id, tv_sec, tv_usec);
> +			return;
> +		}
> +	}
> +
> +	igt_assert_f(false, "Got page-flip event for unexpected CRTC %u\n",
> +		     crtc_id);
> +}
> +
> +static bool got_all_page_flips(data_t *data)
> +{
> +	int i;
> +
> +	for (i = 0; i < data->num_h_tiles; i++) {
> +		if (!data->conns[i].got_page_flip)
> +			return false;
> +	}
> +
> +	return true;
> +}
> +
> +igt_main
> +{
> +	igt_display_t display;
> +	data_t data = {0};
> +	struct pollfd pfd = {0};
> +	drmEventContext drm_event = {0};
> +	int ret;
> +
> +	igt_fixture {
> +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> +
> +		kmstest_set_vt_graphics_mode();
> +		igt_display_require(&display, data.drm_fd);
> +		igt_display_reset(&display);
> +
> +		data.display = &display;
> +		pfd.fd = data.drm_fd;
> +		pfd.events = POLLIN;
> +		drm_event.version = 3;
> +		drm_event.page_flip_handler2 = page_flip_handler;
> +		data.commit = data.display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY;
> +		igt_require(data.commit == COMMIT_ATOMIC);
> +
> +		get_number_of_h_tiles(&data);
> +		igt_debug("Number of Horizontal Tiles: %d\n", data.num_h_tiles);
> +		igt_require(data.num_h_tiles > 0);
> +		data.conns = calloc(data.num_h_tiles, sizeof(data_connector_t));
> +	}
> +
> +	igt_describe("Make sure the Tiled CRTCs are synchronized and we get "
> +		     "page flips for all tiled CRTCs in one vblank.");
> +	igt_subtest("basic-test-pattern") {
> +		igt_assert(data.conns);
> +
> +		get_connectors(&data);
> +		setup_mode(&data);
> +		setup_framebuffer(&data);
> +		igt_display_commit_atomic(data.display, DRM_MODE_ATOMIC_NONBLOCK |
> +					  DRM_MODE_PAGE_FLIP_EVENT, &data);
> +		while (!got_all_page_flips(&data)) {
> +			ret = poll(&pfd, 1, 1000);
> +			igt_assert(ret == 1);
> +			drmHandleEvent(data.drm_fd, &drm_event);
> +		}
> +
> +		test_cleanup(&data);
> +	}
> +
> +	igt_fixture {
> +		free(data.conns);
> +		close(data.drm_fd);
> +		kmstest_restore_vt_mode();
> +		igt_display_fini(data.display);
> +	}
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index a7b2b322..50292df8 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -26,6 +26,7 @@ test_progs = [
>  	'kms_cursor_edge_walk',
>  	'kms_cursor_legacy',
>  	'kms_dp_dsc',
> +	'kms_dp_tiled_display',
>  	'kms_draw_crc',
>  	'kms_fbcon_fbt',
>  	'kms_fence_pin_leak',
> -- 
> 2.19.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev6)
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
                   ` (9 preceding siblings ...)
  2019-09-15 10:28 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2019-09-16 19:59 ` Patchwork
  2019-09-17  3:06 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  11 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2019-09-16 19:59 UTC (permalink / raw)
  To: Manasi Navare; +Cc: igt-dev

== Series Details ==

Series: Added tile property parser library function and IGT test for DP tiled displays (rev6)
URL   : https://patchwork.freedesktop.org/series/65652/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6903 -> IGTPW_3465
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/65652/revisions/6/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_chamelium@dp-edid-read:
    - fi-kbl-7500u:       [PASS][1] -> [WARN][2] ([fdo#109483])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/fi-kbl-7500u/igt@kms_chamelium@dp-edid-read.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/fi-kbl-7500u/igt@kms_chamelium@dp-edid-read.html

  
#### Possible fixes ####

  * igt@gem_exec_fence@nb-await-default:
    - {fi-tgl-u2}:        [FAIL][3] ([fdo#111562] / [fdo#111597]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/fi-tgl-u2/igt@gem_exec_fence@nb-await-default.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/fi-tgl-u2/igt@gem_exec_fence@nb-await-default.html

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-blb-e6850:       [INCOMPLETE][5] ([fdo#107718]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html

  * igt@i915_selftest@live_execlists:
    - fi-skl-gvtdvm:      [DMESG-FAIL][7] ([fdo#111108]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html

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

  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
  [fdo#111108]: https://bugs.freedesktop.org/show_bug.cgi?id=111108
  [fdo#111562]: https://bugs.freedesktop.org/show_bug.cgi?id=111562
  [fdo#111597]: https://bugs.freedesktop.org/show_bug.cgi?id=111597


Participating hosts (55 -> 46)
------------------------------

  Additional (1): fi-bwr-2160 
  Missing    (10): fi-ilk-m540 fi-bxt-dsi fi-tgl-u fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-icl-guc fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5185 -> IGTPW_3465

  CI-20190529: 20190529
  CI_DRM_6903: a9be0ab0d5980df4f018b20a210fab58d7165fc7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3465: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/
  IGT_5185: f02123bfa6ec6baf8ca67459cf4d8b4ea588ca08 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_dp_tiled_display@basic-test-pattern

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for Added tile property parser library function and IGT test for DP tiled displays (rev6)
  2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
                   ` (10 preceding siblings ...)
  2019-09-16 19:59 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev6) Patchwork
@ 2019-09-17  3:06 ` Patchwork
  11 siblings, 0 replies; 34+ messages in thread
From: Patchwork @ 2019-09-17  3:06 UTC (permalink / raw)
  To: Manasi Navare; +Cc: igt-dev

== Series Details ==

Series: Added tile property parser library function and IGT test for DP tiled displays (rev6)
URL   : https://patchwork.freedesktop.org/series/65652/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6903_full -> IGTPW_3465_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/65652/revisions/6/mbox/

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_dp_tiled_display@basic-test-pattern} (NEW):
    - shard-glk:          NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-glk7/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-hsw:          NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-hsw4/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-kbl:          NOTRUN -> [FAIL][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-kbl7/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-iclb:         NOTRUN -> [SKIP][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb3/igt@kms_dp_tiled_display@basic-test-pattern.html
    - shard-snb:          NOTRUN -> [FAIL][5]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-snb4/igt@kms_dp_tiled_display@basic-test-pattern.html

  
New tests
---------

  New tests have been introduced between CI_DRM_6903_full and IGTPW_3465_full:

### New IGT tests (1) ###

  * igt@kms_dp_tiled_display@basic-test-pattern:
    - Statuses : 4 fail(s) 2 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_isolation@bcs0-s3:
    - shard-apl:          [PASS][6] -> [DMESG-WARN][7] ([fdo#108566]) +2 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-apl8/igt@gem_ctx_isolation@bcs0-s3.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-apl2/igt@gem_ctx_isolation@bcs0-s3.html

  * igt@gem_exec_schedule@preempt-other-bsd1:
    - shard-iclb:         [PASS][8] -> [SKIP][9] ([fdo#109276]) +14 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb1/igt@gem_exec_schedule@preempt-other-bsd1.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb3/igt@gem_exec_schedule@preempt-other-bsd1.html

  * igt@gem_exec_schedule@preempt-other-chain-bsd:
    - shard-iclb:         [PASS][10] -> [SKIP][11] ([fdo#111325]) +4 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb3/igt@gem_exec_schedule@preempt-other-chain-bsd.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb2/igt@gem_exec_schedule@preempt-other-chain-bsd.html

  * igt@kms_cursor_crc@pipe-b-cursor-256x256-offscreen:
    - shard-iclb:         [PASS][12] -> [INCOMPLETE][13] ([fdo#107713])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb1/igt@kms_cursor_crc@pipe-b-cursor-256x256-offscreen.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb7/igt@kms_cursor_crc@pipe-b-cursor-256x256-offscreen.html

  * igt@kms_flip@flip-vs-panning-vs-hang:
    - shard-apl:          [PASS][14] -> [INCOMPLETE][15] ([fdo#103927]) +3 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-apl3/igt@kms_flip@flip-vs-panning-vs-hang.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-apl7/igt@kms_flip@flip-vs-panning-vs-hang.html

  * igt@kms_flip@flip-vs-suspend:
    - shard-hsw:          [PASS][16] -> [INCOMPLETE][17] ([fdo#103540])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-hsw6/igt@kms_flip@flip-vs-suspend.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-hsw6/igt@kms_flip@flip-vs-suspend.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-render:
    - shard-iclb:         [PASS][18] -> [FAIL][19] ([fdo#103167]) +2 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-render.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-render.html

  
#### Possible fixes ####

  * igt@gem_ctx_switch@legacy-bsd2-heavy:
    - shard-iclb:         [SKIP][20] ([fdo#109276]) -> [PASS][21] +14 similar issues
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb7/igt@gem_ctx_switch@legacy-bsd2-heavy.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb4/igt@gem_ctx_switch@legacy-bsd2-heavy.html

  * igt@gem_exec_schedule@fifo-bsd:
    - shard-iclb:         [SKIP][22] ([fdo#111325]) -> [PASS][23] +1 similar issue
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb1/igt@gem_exec_schedule@fifo-bsd.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb5/igt@gem_exec_schedule@fifo-bsd.html

  * igt@gem_exec_suspend@basic:
    - shard-iclb:         [FAIL][24] -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb6/igt@gem_exec_suspend@basic.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb2/igt@gem_exec_suspend@basic.html

  * igt@gem_pipe_control_store_loop@fresh-buffer:
    - shard-apl:          [INCOMPLETE][26] ([fdo#103927]) -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-apl2/igt@gem_pipe_control_store_loop@fresh-buffer.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-apl7/igt@gem_pipe_control_store_loop@fresh-buffer.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-snb:          [SKIP][28] ([fdo#109271]) -> [PASS][29]
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-snb2/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-snb1/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen:
    - shard-iclb:         [INCOMPLETE][30] ([fdo#107713]) -> [PASS][31]
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb1/igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb2/igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-apl:          [DMESG-WARN][32] ([fdo#108566]) -> [PASS][33]
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-apl4/igt@kms_flip@flip-vs-suspend-interruptible.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-apl8/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-pwrite:
    - shard-glk:          [FAIL][34] ([fdo#103167]) -> [PASS][35]
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-glk6/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-pwrite.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-glk3/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-pwrite.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
    - shard-iclb:         [FAIL][36] ([fdo#103167]) -> [PASS][37] +5 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
    - shard-snb:          [DMESG-WARN][38] ([fdo#102365]) -> [PASS][39]
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-snb7/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-snb7/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-iclb:         [SKIP][40] ([fdo#109642] / [fdo#111068]) -> [PASS][41]
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb3/igt@kms_psr2_su@frontbuffer.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb2/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@psr2_sprite_plane_onoff:
    - shard-iclb:         [SKIP][42] ([fdo#109441]) -> [PASS][43] +1 similar issue
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb1/igt@kms_psr@psr2_sprite_plane_onoff.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb2/igt@kms_psr@psr2_sprite_plane_onoff.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][44] ([fdo#99912]) -> [PASS][45]
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-apl2/igt@kms_setmode@basic.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-apl6/igt@kms_setmode@basic.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-reset-bsd2:
    - shard-iclb:         [SKIP][46] ([fdo#109276]) -> [FAIL][47] ([fdo#111330])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb5/igt@gem_mocs_settings@mocs-reset-bsd2.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb2/igt@gem_mocs_settings@mocs-reset-bsd2.html

  * igt@gem_mocs_settings@mocs-settings-bsd2:
    - shard-iclb:         [FAIL][48] ([fdo#111330]) -> [SKIP][49] ([fdo#109276]) +1 similar issue
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6903/shard-iclb2/igt@gem_mocs_settings@mocs-settings-bsd2.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/shard-iclb8/igt@gem_mocs_settings@mocs-settings-bsd2.html

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

  [fdo#102365]: https://bugs.freedesktop.org/show_bug.cgi?id=102365
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (9 -> 6)
------------------------------

  Missing    (3): pig-skl-6260u shard-skl pig-glk-j5005 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5185 -> IGTPW_3465
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_6903: a9be0ab0d5980df4f018b20a210fab58d7165fc7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3465: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3465/
  IGT_5185: f02123bfa6ec6baf8ca67459cf4d8b4ea588ca08 @ 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_3465/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

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

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 18:23 [igt-dev] [PATCH i-g-t v2 0/2] Added tile property parser library function and IGT test for DP tiled displays Madhumitha Tolakanahalli Pradeep
2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_kms: added tile property parser Madhumitha Tolakanahalli Pradeep
2019-08-27  7:33   ` Ser, Simon
2019-09-09  3:49     ` Manasi Navare
2019-09-09 10:41       ` Ser, Simon
2019-09-09 20:06   ` Manasi Navare
2019-08-23 18:23 ` [igt-dev] [PATCH i-g-t v2 2/2] igt/tests/kms_dp_tiled_display: kms test for display port tiled displays Madhumitha Tolakanahalli Pradeep
2019-08-27 10:49   ` Ser, Simon
2019-08-27 21:29     ` Manasi Navare
2019-08-28 22:35       ` Manasi Navare
2019-08-30 11:39       ` Ser, Simon
2019-09-12  0:47         ` Manasi Navare
2019-09-12 12:51           ` Ser, Simon
2019-09-12 23:23             ` Manasi Navare
2019-09-12  1:31   ` [igt-dev] [PATCH i-g-t v3] " Manasi Navare
2019-09-12 23:28     ` [igt-dev] [PATCH i-g-t v4] " Manasi Navare
2019-09-13  9:49       ` Petri Latvala
2019-09-13 18:16         ` Manasi Navare
2019-09-13 11:41       ` Ser, Simon
2019-09-13 23:48       ` [igt-dev] [PATCH i-g-t v5] " Manasi Navare
2019-09-16 19:17         ` Simon Ser
2019-09-16 19:29           ` Manasi Navare
2019-09-16 19:34         ` [igt-dev] [PATCH i-g-t v6] " Manasi Navare
2019-09-16 19:42           ` Manasi Navare
2019-08-23 20:01 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev2) Patchwork
2019-08-24 22:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-09-12  4:43 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev3) Patchwork
2019-09-12  7:35 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-09-13  0:07 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev4) Patchwork
2019-09-13 17:21 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-09-14  0:14 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev5) Patchwork
2019-09-15 10:28 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-09-16 19:59 ` [igt-dev] ✓ Fi.CI.BAT: success for Added tile property parser library function and IGT test for DP tiled displays (rev6) Patchwork
2019-09-17  3:06 ` [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.