All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with
@ 2020-07-11 20:05 Mohammed Khajapasha
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 01/11] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
                   ` (13 more replies)
  0 siblings, 14 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:05 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

With non-contiguous pipes display, pipe mapping is always not same as
crtc mapping, For i915 pipe is enum id of i915's crtc object and
it is not equal to crtc offset of a pipe in mode config list.
Hence allocating upper bound array for igt_pipe and reading
pipe id using GET_PIPE_FROM_CRTC_ID ioctl.
Using crtc offset for a pipe to do ordering pipe with crtc list.

Example:
	With a non-contiguous pipe display, with PIPE_A & PIPE_D
	are enabled, PIPE_C & PIPE_B disabled configuration,
	the pipe for PIPE_A & D will be '0' and '3' and crtc offsets
	are '0' & '1' in mode config list using crtc offset to ordering
	enabled pipes with crtc list in mode config.

v7:
	Modified documentation for using crtc offset for a pipe

Mohammed Khajapasha (11):
  lib/igt_kms: Add support for display with non-contiguous pipes
  lib/igt_kms: Add igt_require_pipe() function
  tests/kms_cursor_legacy: Read crtc id for enable pipes
  tests/kms_lease: Get pipe from crtc for enable pipes
  tests/kms_lease: Read crtc id for a valid pipe
  lib/kms: Skip igt test cases for disabled display pipes
  tests/kms: Skip kms test cases for disabled pipes
  tests/kms_atomic_transition: Set modeset for enable pipes only
  i915/gem_eio: Set modeset for enable pipes
  lib/kms: Convert pipe id flags for a vblank using crtc offset
  tests/kms: Use crtc offset to read vblank event for a pipe

 lib/igt_kms.c                   | 141 +++++++++++++++++++++++++-------
 lib/igt_kms.h                   |  41 ++++++++--
 tests/i915/gem_eio.c            |   2 +
 tests/i915/perf_pmu.c           |   3 +-
 tests/kms_atomic_transition.c   |  15 +++-
 tests/kms_available_modes_crc.c |   4 +-
 tests/kms_color.c               |  37 ++++++---
 tests/kms_color_chamelium.c     |   2 +-
 tests/kms_concurrent.c          |   2 +-
 tests/kms_cursor_crc.c          |  18 ++--
 tests/kms_cursor_edge_walk.c    |   4 +-
 tests/kms_cursor_legacy.c       |  13 +--
 tests/kms_lease.c               |  26 ++++--
 tests/kms_pipe_crc_basic.c      |   9 +-
 tests/kms_plane.c               |  10 ++-
 tests/kms_plane_lowres.c        |   2 +-
 tests/kms_plane_multiple.c      |   2 +-
 tests/kms_sequence.c            |   3 +-
 tests/kms_universal_plane.c     |  12 +--
 tests/kms_vblank.c              |   3 +-
 20 files changed, 258 insertions(+), 91 deletions(-)

-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 01/11] lib/igt_kms: Add support for display with non-contiguous pipes
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-07-11 20:05 ` Mohammed Khajapasha
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 02/11] lib/igt_kms: Add igt_require_pipe() function Mohammed Khajapasha
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:05 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

Add support for non-contiguous pipe display by allocating
upper bound pipes array for display. Set the pipe enum name
to igt pipe for enabled pipes in drm.

v5:
    Updated documentation in igt_require_display() fn
    Made minor changes in __igt_pipe_populate_outputs() fn

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 lib/igt_kms.c | 68 ++++++++++++++++++++++++++++++++++++++++++++-------
 lib/igt_kms.h | 14 +++++++----
 2 files changed, 68 insertions(+), 14 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 27f85859..5a80d17f 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1873,6 +1873,21 @@ void igt_display_reset(igt_display_t *display)
 static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane);
 static void igt_fill_display_format_mod(igt_display_t *display);
 
+/* Get crtc mask for a pipe using crtc id */
+static int
+__get_crtc_mask_for_pipe(drmModeRes *resources, igt_pipe_t *pipe)
+{
+	int offset;
+
+	for (offset = 0; offset < resources->count_crtcs; offset++)
+	{
+		if(pipe->crtc_id == resources->crtcs[offset])
+			break;
+	}
+
+	return (1 << offset);
+}
+
 /**
  * igt_display_require:
  * @display: a pointer to an #igt_display_t structure
@@ -1889,12 +1904,14 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 	drmModeRes *resources;
 	drmModePlaneRes *plane_resources;
 	int i;
+	bool is_i915_dev;
 
 	memset(display, 0, sizeof(igt_display_t));
 
 	LOG_INDENT(display, "init");
 
 	display->drm_fd = drm_fd;
+	is_i915_dev = is_i915_device(drm_fd);
 
 	resources = drmModeGetResources(display->drm_fd);
 	if (!resources)
@@ -1918,13 +1935,39 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 #endif
 
 	/*
-	 * We cache the number of pipes, that number is a physical limit of the
-	 * hardware and cannot change of time (for now, at least).
+	 * With non-contiguous pipes display, crtc mapping is not always same
+	 * as pipe mapping, In i915 pipe is enum id of i915's crtc object.
+	 * hence allocating upper bound igt_pipe array to support non-contiguos
+	 * pipe display and reading pipe enum for a crtc using GET_PIPE_FROM_CRTC_ID ioctl
+	 * for a pipe to do pipe ordering with respect to crtc list.
 	 */
-	display->n_pipes = resources->count_crtcs;
+	display->n_pipes = IGT_MAX_PIPES;
 	display->pipes = calloc(sizeof(igt_pipe_t), display->n_pipes);
 	igt_assert_f(display->pipes, "Failed to allocate memory for %d pipes\n", display->n_pipes);
 
+	for (i = 0; i < resources->count_crtcs; i++) {
+		igt_pipe_t *pipe;
+
+		if (is_i915_dev) {
+			struct drm_i915_get_pipe_from_crtc_id get_pipe;
+
+			get_pipe.pipe = 0;
+			get_pipe.crtc_id =  resources->crtcs[i];
+			do_ioctl(display->drm_fd,
+					DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID, &get_pipe);
+			pipe = &display->pipes[get_pipe.pipe];
+			pipe->pipe = get_pipe.pipe;
+		}
+		else {
+			pipe = &display->pipes[i];
+			pipe->pipe = i;
+		}
+
+		/* pipe is enabled/disabled */
+		pipe->enabled = true;
+		pipe->crtc_id = resources->crtcs[i];
+	}
+
 	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
 	if (drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1) == 0)
 		display->is_atomic = 1;
@@ -1955,25 +1998,26 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 	for_each_pipe(display, i) {
 		igt_pipe_t *pipe = &display->pipes[i];
 		igt_plane_t *plane;
-		int p = 1;
+		int p = 1, crtc_mask = 0;
 		int j, type;
 		uint8_t last_plane = 0, n_planes = 0;
 
-		pipe->crtc_id = resources->crtcs[i];
 		pipe->display = display;
-		pipe->pipe = i;
 		pipe->plane_cursor = -1;
 		pipe->plane_primary = -1;
 		pipe->planes = NULL;
 
 		igt_fill_pipe_props(display, pipe, IGT_NUM_CRTC_PROPS, igt_crtc_prop_names);
 
+		/* Get valid crtc index from crtcs for a pipe */
+		crtc_mask = __get_crtc_mask_for_pipe(resources, pipe);
+
 		/* count number of valid planes */
 		for (j = 0; j < display->n_planes; j++) {
 			drmModePlane *drm_plane = display->planes[j].drm_plane;
 			igt_assert(drm_plane);
 
-			if (drm_plane->possible_crtcs & (1 << i))
+			if (drm_plane->possible_crtcs & crtc_mask)
 				n_planes++;
 		}
 
@@ -1987,7 +2031,7 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 			igt_plane_t *global_plane = &display->planes[j];
 			drmModePlane *drm_plane = global_plane->drm_plane;
 
-			if (!(drm_plane->possible_crtcs & (1 << i)))
+			if (!(drm_plane->possible_crtcs & crtc_mask))
 				continue;
 
 			type = global_plane->type;
@@ -2409,12 +2453,18 @@ static bool output_is_internal_panel(igt_output_t *output)
 
 igt_output_t **__igt_pipe_populate_outputs(igt_display_t *display, igt_output_t **chosen_outputs)
 {
-	unsigned full_pipe_mask = (1 << (display->n_pipes)) - 1, assigned_pipes = 0;
+	unsigned full_pipe_mask, assigned_pipes = 0;
 	igt_output_t *output;
 	int i, j;
 
 	memset(chosen_outputs, 0, sizeof(*chosen_outputs) * display->n_pipes);
 
+	for (i = 0; i < display->n_pipes; i++) {
+		igt_pipe_t *pipe = &display->pipes[i];
+		if (pipe->enabled)
+			full_pipe_mask |= (1 << i);
+	}
+
 	/*
 	 * Try to assign all outputs to the first available CRTC for
 	 * it, start with the outputs restricted to 1 pipe, then increase
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 416e737c..f9bbddc5 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -341,6 +341,8 @@ typedef struct igt_plane {
 struct igt_pipe {
 	igt_display_t *display;
 	enum pipe pipe;
+	/* pipe is enabled or not */
+	bool enabled;
 
 	int n_planes;
 	int plane_cursor;
@@ -510,8 +512,9 @@ static inline bool igt_output_is_connected(igt_output_t *output)
  * depends upon runtime probing of the actual kms driver that is being tested.
  * Use #for_each_pipe_static instead.
  */
-#define for_each_pipe(display, pipe)					\
-	for (pipe = 0; assert(igt_can_fail()), pipe < igt_display_get_n_pipes(display); pipe++)
+#define for_each_pipe(display, pipe) \
+	for_each_pipe_static(pipe) \
+		for_each_if((display)->pipes[(pipe)].enabled)
 
 /**
  * for_each_pipe_with_valid_output:
@@ -530,8 +533,9 @@ static inline bool igt_output_is_connected(igt_output_t *output)
 	for (int con__ = (pipe) = 0; \
 	     assert(igt_can_fail()), (pipe) < igt_display_get_n_pipes((display)) && con__ < (display)->n_outputs; \
 	     con__ = (con__ + 1 < (display)->n_outputs) ? con__ + 1 : (pipe = pipe + 1, 0)) \
-		for_each_if ((((output) = &(display)->outputs[con__]), \
-			     igt_pipe_connector_valid((pipe), (output))))
+		 for_each_if((display)->pipes[pipe].enabled) \
+			for_each_if ((((output) = &(display)->outputs[con__]), \
+						igt_pipe_connector_valid((pipe), (output))))
 
 igt_output_t **__igt_pipe_populate_outputs(igt_display_t *display,
 					   igt_output_t **chosen_outputs);
@@ -549,7 +553,7 @@ igt_output_t **__igt_pipe_populate_outputs(igt_display_t *display,
 #define for_each_pipe_with_single_output(display, pipe, output) \
 	for (igt_output_t *__outputs[(display)->n_pipes], \
 	     **__output = __igt_pipe_populate_outputs((display), __outputs); \
-	     __output < &__outputs[(display)->n_pipes]; __output++) \
+		 __output < &__outputs[(display)->n_pipes]; __output++) \
 		for_each_if (*__output && \
 			     ((pipe) = (__output - __outputs), (output) = *__output, 1))
 
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 02/11] lib/igt_kms: Add igt_require_pipe() function
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 01/11] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
@ 2020-07-11 20:05 ` Mohammed Khajapasha
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 03/11] tests/kms_cursor_legacy: Read crtc id for enable pipes Mohammed Khajapasha
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:05 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

Add igt_require_pipe() fn to check whether a pipe is enabled or not

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 lib/igt_kms.c | 17 +++++++++++++++++
 lib/igt_kms.h | 13 +++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5a80d17f..5b68ffda 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1873,6 +1873,23 @@ void igt_display_reset(igt_display_t *display)
 static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane);
 static void igt_fill_display_format_mod(igt_display_t *display);
 
+/*
+ * igt_require_pipe:
+ * @display: pointer to igt_display_t
+ * @pipe: pipe which need to check
+ *
+ * Skip a (sub-)test if the pipe not enabled.
+ *
+ * Should be used everywhere where a test checks pipe and skip
+ * test when pipe is not enabled.
+ */
+void igt_require_pipe(igt_display_t *display, enum pipe pipe)
+{
+	igt_skip_on_f(!display->pipes[pipe].enabled,
+			"Pipe %s does not exist or not enabled\n",
+			kmstest_pipe_name(pipe));
+}
+
 /* Get crtc mask for a pipe using crtc id */
 static int
 __get_crtc_mask_for_pipe(drmModeRes *resources, igt_pipe_t *pipe)
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index f9bbddc5..7109c9a5 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -858,4 +858,17 @@ int igt_connector_sysfs_open(int drm_fd,
 			     drmModeConnector *connector);
 uint32_t igt_reduce_format(uint32_t format);
 
+/*
+ * igt_require_pipe:
+ * @display: pointer to igt_display_t
+ * @pipe: pipe which need to check
+ *
+ * Skip a (sub-)test if the pipe not enabled.
+ *
+ * Should be used everywhere where a test checks pipe and skip
+ * test when pipe is not enabled.
+ */
+void igt_require_pipe(igt_display_t *display,
+		enum pipe pipe);
+
 #endif /* __IGT_KMS_H__ */
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 03/11] tests/kms_cursor_legacy: Read crtc id for enable pipes
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 01/11] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 02/11] lib/igt_kms: Add igt_require_pipe() function Mohammed Khajapasha
@ 2020-07-11 20:05 ` Mohammed Khajapasha
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 04/11] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:05 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

Read the crtc ids for enable pipes only in display.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 tests/kms_cursor_legacy.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 344442e8..e631f087 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -58,7 +58,7 @@ static void stress(igt_display_t *display,
 	uint64_t *results;
 	bool torture;
 	int n;
-	unsigned crtc_id[IGT_MAX_PIPES], num_crtcs;
+	unsigned crtc_id[IGT_MAX_PIPES] = {0}, num_crtcs;
 
 	torture = false;
 	if (num_children < 0) {
@@ -84,8 +84,10 @@ static void stress(igt_display_t *display,
 		}
 	} else {
 		num_crtcs = 1;
-		arg.crtc_id = crtc_id[0] = display->pipes[pipe].crtc_id;
-		do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg);
+		if(display->pipes[pipe].enabled) {
+			arg.crtc_id = crtc_id[0] = display->pipes[pipe].crtc_id;
+			do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg);
+		}
 	}
 
 	arg.flags = mode;
@@ -103,7 +105,8 @@ static void stress(igt_display_t *display,
 		hars_petruska_f54_1_random_perturb(child);
 		igt_until_timeout(timeout) {
 			arg.crtc_id = crtc_id[hars_petruska_f54_1_random_unsafe() % num_crtcs];
-			do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg);
+			if (arg.crtc_id)
+				do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg);
 			count++;
 		}
 
@@ -1390,7 +1393,7 @@ igt_main
 			errno = 0;
 
 			igt_fixture {
-				igt_skip_on(n >= display.n_pipes);
+				igt_require_pipe(&display, n);
 			}
 
 			igt_subtest_f("pipe-%s-single-bo", kmstest_pipe_name(n))
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 04/11] tests/kms_lease: Get pipe from crtc for enable pipes
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (2 preceding siblings ...)
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 03/11] tests/kms_cursor_legacy: Read crtc id for enable pipes Mohammed Khajapasha
@ 2020-07-11 20:05 ` Mohammed Khajapasha
  2020-07-15 14:21   ` Arkadiusz Hiler
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 05/11] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
                   ` (9 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:05 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

Get pipe from drm crtc for enabled pipes only.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 tests/kms_lease.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index 2e6cf9b0..75a1149c 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -684,6 +684,8 @@ static void lease_unleased_crtc(data_t *data)
 	/* Find another CRTC that we don't control */
 	bad_crtc_id = 0;
 	for (p = 0; bad_crtc_id == 0 && p < data->master.display.n_pipes; p++) {
+		if(!(data->master.display.pipes[p].enabled))
+			continue;
 		if (pipe_to_crtc_id(&data->master.display, p) != data->crtc_id)
 			bad_crtc_id = pipe_to_crtc_id(&data->master.display, p);
 	}
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 05/11] tests/kms_lease: Read crtc id for a valid pipe
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (3 preceding siblings ...)
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 04/11] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
@ 2020-07-11 20:05 ` Mohammed Khajapasha
  2020-07-15 14:19   ` Arkadiusz Hiler
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 06/11] lib/kms: Skip igt test cases for disabled display pipes Mohammed Khajapasha
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:05 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

Read crtc id for enabled pipes only.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 tests/kms_lease.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index 75a1149c..4045fbca 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -136,9 +136,11 @@ static enum pipe crtc_id_to_pipe(igt_display_t *display, uint32_t crtc_id)
 {
 	enum pipe pipe;
 
-	for (pipe = 0; pipe < display->n_pipes; pipe++)
-		if (display->pipes[pipe].crtc_id == crtc_id)
+	for (pipe = 0; pipe < display->n_pipes; pipe++) {
+		if (display->pipes[pipe].enabled &&
+				display->pipes[pipe].crtc_id == crtc_id)
 			return pipe;
+	}
 	return -1;
 }
 
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 06/11] lib/kms: Skip igt test cases for disabled display pipes
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (4 preceding siblings ...)
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 05/11] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
@ 2020-07-11 20:05 ` Mohammed Khajapasha
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 07/11] tests/kms: Skip kms test cases for disabled pipes Mohammed Khajapasha
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:05 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

Skip igt test cases for disabled pipes.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 lib/igt_kms.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5b68ffda..d56f2e56 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2191,8 +2191,7 @@ void igt_display_require_output_on_pipe(igt_display_t *display, enum pipe pipe)
 {
 	igt_output_t *output;
 
-	igt_skip_on_f(pipe >= igt_display_get_n_pipes(display),
-		      "Pipe %s does not exist.\n", kmstest_pipe_name(pipe));
+	igt_require_pipe(display, pipe);
 
 	for_each_valid_output_on_pipe(display, pipe, output)
 		return;
@@ -2547,7 +2546,7 @@ igt_output_t *igt_get_single_output_for_pipe(igt_display_t *display, enum pipe p
 	igt_output_t *chosen_outputs[display->n_pipes];
 
 	igt_assert(pipe != PIPE_NONE);
-	igt_require(pipe < display->n_pipes);
+	igt_require_pipe(display, pipe);
 
 	__igt_pipe_populate_outputs(display, chosen_outputs);
 
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 07/11] tests/kms: Skip kms test cases for disabled pipes
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (5 preceding siblings ...)
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 06/11] lib/kms: Skip igt test cases for disabled display pipes Mohammed Khajapasha
@ 2020-07-11 20:05 ` Mohammed Khajapasha
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 08/11] tests/kms_atomic_transition: Set modeset for enable pipes only Mohammed Khajapasha
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:05 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

Skip the kms test cases for disabled pipes with
non-contiguous pipe display.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 tests/kms_color.c           |  2 +-
 tests/kms_color_chamelium.c |  2 +-
 tests/kms_concurrent.c      |  2 +-
 tests/kms_pipe_crc_basic.c  |  4 ++--
 tests/kms_plane.c           |  2 +-
 tests/kms_plane_lowres.c    |  2 +-
 tests/kms_plane_multiple.c  |  2 +-
 tests/kms_universal_plane.c | 12 ++++++------
 8 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index 7f2fbd4a..8c50ee66 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -628,7 +628,7 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 	igt_fixture {
 		igt_require_pipe_crc(data->drm_fd);
 
-		igt_require(p < data->display.n_pipes);
+		igt_require_pipe(&data->display, p);
 
 		pipe = &data->display.pipes[p];
 		igt_require(pipe->n_planes >= 0);
diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c
index 7f5a911c..310c021a 100644
--- a/tests/kms_color_chamelium.c
+++ b/tests/kms_color_chamelium.c
@@ -519,7 +519,7 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 
 	igt_fixture {
 
-		igt_require(p < data->display.n_pipes);
+		igt_require_pipe(&data->display, p);
 
 		pipe = &data->display.pipes[p];
 		igt_require(pipe->n_planes >= 0);
diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index 9a4dab24..573631e0 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -320,7 +320,7 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
 	igt_fixture {
 		int valid_tests = 0;
 
-		igt_skip_on(pipe >= data->display.n_pipes);
+		igt_require_pipe(&data->display, pipe);
 		igt_require(data->display.pipes[pipe].n_planes > 0);
 
 		for_each_valid_output_on_pipe(&data->display, pipe, output)
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index d169b7bd..82856efa 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -71,7 +71,7 @@ static void test_read_crc(data_t *data, enum pipe pipe, unsigned flags)
 	igt_crc_t *crcs = NULL;
 	int c, j;
 
-	igt_skip_on(pipe >= data->display.n_pipes);
+	igt_require_pipe(display, pipe);
 	igt_require_f(output, "No connector found for pipe %s\n",
 		      kmstest_pipe_name(pipe));
 
@@ -187,7 +187,7 @@ igt_main
 			test_read_crc(&data, pipe, TEST_SEQUENCE | TEST_NONBLOCK);
 
 		igt_subtest_f("suspend-read-crc-pipe-%s", kmstest_pipe_name(pipe)) {
-			igt_skip_on(pipe >= data.display.n_pipes);
+			igt_require_pipe(&data.display, pipe);
 
 			test_read_crc(&data, pipe, 0);
 
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index e75c045b..42088488 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -940,7 +940,7 @@ static void
 run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 {
 	igt_fixture {
-		igt_skip_on(pipe >= data->display.n_pipes);
+		igt_require_pipe(&data->display, pipe);
 		igt_require(data->display.pipes[pipe].n_planes > 0);
 	}
 
diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index 94b18df6..a5af1f8a 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -259,7 +259,7 @@ test_planes_on_pipe(data_t *data, uint64_t modifier)
 	igt_plane_t *plane;
 	unsigned tested = 0;
 
-	igt_skip_on(data->pipe >= data->display.n_pipes);
+	igt_require_pipe(&data->display, data->pipe);
 	igt_display_require_output_on_pipe(&data->display, data->pipe);
 	igt_skip_on(!igt_display_has_format_mod(&data->display,
 						DRM_FORMAT_XRGB8888, modifier));
diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 29b6397b..8310981c 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -378,7 +378,7 @@ static void
 run_tests_for_pipe(data_t *data, enum pipe pipe)
 {
 	igt_fixture {
-		igt_skip_on(pipe >= data->display.n_pipes);
+		igt_require_pipe(&data->display, pipe);
 		igt_require(data->display.pipes[pipe].n_planes > 0);
 	}
 
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 676be633..46d6d180 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -135,7 +135,7 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 	int num_primary = 0, num_cursor = 0;
 	int i;
 
-	igt_skip_on(pipe >= display->n_pipes);
+	igt_require_pipe(display, pipe);
 
 	igt_info("Testing connector %s using pipe %s\n", igt_output_name(output),
 		 kmstest_pipe_name(pipe));
@@ -364,7 +364,7 @@ sanity_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 	int i;
 	int expect;
 
-	igt_skip_on(pipe >= data->display.n_pipes);
+	igt_require_pipe(&data->display, pipe);
 
 	igt_output_set_pipe(output, pipe);
 	mode = igt_output_get_mode(output);
@@ -476,7 +476,7 @@ pageflip_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 	fd_set fds;
 	int ret = 0;
 
-	igt_skip_on(pipe >= data->display.n_pipes);
+	igt_require_pipe(&data->display, pipe);
 
 	igt_output_set_pipe(output, pipe);
 
@@ -577,7 +577,7 @@ cursor_leak_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 	int r, g, b;
 	int count1, count2;
 
-	igt_skip_on(pipe >= display->n_pipes);
+	igt_require_pipe(display, pipe);
 	igt_require(display->has_cursor_plane);
 
 	igt_output_set_pipe(output, pipe);
@@ -705,7 +705,7 @@ gen9_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 	int ret = 0;
 
 	igt_skip_on(data->gen < 9);
-	igt_skip_on(pipe >= data->display.n_pipes);
+	igt_require_pipe(&data->display, pipe);
 
 	igt_output_set_pipe(output, pipe);
 
@@ -750,7 +750,7 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
 	igt_fixture {
 		int valid_tests = 0;
 
-		igt_skip_on(pipe >= data->display.n_pipes);
+		igt_require_pipe(&data->display, pipe);
 
 		for_each_valid_output_on_pipe(&data->display, pipe, output)
 			valid_tests++;
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 08/11] tests/kms_atomic_transition: Set modeset for enable pipes only
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (6 preceding siblings ...)
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 07/11] tests/kms: Skip kms test cases for disabled pipes Mohammed Khajapasha
@ 2020-07-11 20:05 ` Mohammed Khajapasha
  2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 09/11] i915/gem_eio: Set modeset for enable pipes Mohammed Khajapasha
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:05 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

Set the modeset for enable pipes only by using max iteration
from enable pipe count.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 tests/kms_atomic_transition.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 754a4969..8c1c1d93 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -737,8 +737,8 @@ static void collect_crcs_mask(igt_pipe_crc_t **pipe_crcs, unsigned mask, igt_crc
 static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblocking, bool fencing)
 {
 	struct igt_fb fbs[2];
-	int i, j;
-	unsigned iter_max = 1 << display->n_pipes;
+	int i, j = 0;
+	unsigned iter_max;
 	igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
 	igt_output_t *output;
 	unsigned width = 0, height = 0;
@@ -762,6 +762,9 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
 		igt_plane_t *plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
 		drmModeModeInfo *mode = NULL;
 
+		/* count enable pipes to set max iteration */
+		j += 1;
+
 		if (is_i915_device(display->drm_fd))
 			pipe_crcs[i] = igt_pipe_crc_new(display->drm_fd, i, INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -785,6 +788,8 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
 			igt_plane_set_fb(plane, NULL);
 	}
 
+	iter_max = 1 << j;
+
 	igt_display_commit2(display, COMMIT_ATOMIC);
 
 	for (i = 0; i < iter_max; i++) {
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 09/11] i915/gem_eio: Set modeset for enable pipes
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (7 preceding siblings ...)
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 08/11] tests/kms_atomic_transition: Set modeset for enable pipes only Mohammed Khajapasha
@ 2020-07-11 20:06 ` Mohammed Khajapasha
  2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:06 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

Set modeset for enable pipes only in kms test

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 tests/i915/gem_eio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index cfc3f668..c5ef61bd 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -851,6 +851,8 @@ static void display_helper(igt_display_t *dpy, int *done)
 		int pipe;
 
 		pipe = rand() % dpy->n_pipes;
+		if (!dpy->pipes[pipe].enabled)
+			continue;
 		output = igt_get_single_output_for_pipe(dpy, pipe);
 		if (!output)
 			continue;
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (8 preceding siblings ...)
  2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 09/11] i915/gem_eio: Set modeset for enable pipes Mohammed Khajapasha
@ 2020-07-11 20:06 ` Mohammed Khajapasha
  2020-07-15 14:50   ` Arkadiusz Hiler
  2020-07-17 13:02   ` Arkadiusz Hiler
  2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 11/11] tests/kms: Use crtc offset to read vblank event for a pipe Mohammed Khajapasha
                   ` (3 subsequent siblings)
  13 siblings, 2 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:06 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

In i915 with non-contiguous pipes display, pipes always not same
as crtc index in display pipes array. Hence reading pipe id flags
for a vblank event using crtc offset.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 lib/igt_kms.c | 51 +++++++++++++++++++++++++++++++++++----------------
 lib/igt_kms.h | 14 +++++++++++---
 2 files changed, 46 insertions(+), 19 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index d56f2e56..5b9f2175 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1983,6 +1983,8 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 		/* pipe is enabled/disabled */
 		pipe->enabled = true;
 		pipe->crtc_id = resources->crtcs[i];
+		/* offset of a pipe in crtcs list */
+		pipe->crtc_offset = i;
 	}
 
 	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
@@ -4131,18 +4133,23 @@ void igt_pipe_request_out_fence(igt_pipe_t *pipe)
 /**
  * igt_wait_for_vblank_count:
  * @drm_fd: A drm file descriptor
- * @pipe: Pipe to wait_for_vblank on
+ * @crtc_offset: offset of a Pipe to wait_for_vblank on
  * @count: Number of vblanks to wait on
  *
+ * With non-contiguous pipe display, pipe mapping always
+ * not same with crtc mapping, for i915 pipe is enum id of i915's crtc object
+ * and pipe id not equal to crtc offset in mode config list hence passing
+ * crtc offset to read vblank count for a pipe.
+ *
  * Waits for a given number of vertical blank intervals
  */
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count)
 {
 	drmVBlank wait_vbl;
 	uint32_t pipe_id_flag;
 
 	memset(&wait_vbl, 0, sizeof(wait_vbl));
-	pipe_id_flag = kmstest_get_vbl_flag(pipe);
+	pipe_id_flag = kmstest_get_vbl_flag(crtc_offset);
 
 	wait_vbl.request.type = DRM_VBLANK_RELATIVE;
 	wait_vbl.request.type |= pipe_id_flag;
@@ -4154,13 +4161,18 @@ void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
 /**
  * igt_wait_for_vblank:
  * @drm_fd: A drm file descriptor
- * @pipe: Pipe to wait_for_vblank on
+ * @crtc_offset: offset of a Pipe to wait_for_vblank on
+ *
+ * With non-contiguous pipe display, pipe mapping always
+ * not same with crtc mapping, for i915 pipe is enum id of i915's crtc object
+ * and pipe id not equal to crtc offset in mode config list hence passing
+ * crtc offset to read vblank count for a pipe.
  *
  * Waits for 1 vertical blank intervals
  */
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
+void igt_wait_for_vblank(int drm_fd, int crtc_offset)
 {
-	igt_wait_for_vblank_count(drm_fd, pipe, 1);
+	igt_wait_for_vblank_count(drm_fd, crtc_offset, 1);
 }
 
 /**
@@ -4383,22 +4395,29 @@ void igt_cleanup_uevents(struct udev_monitor *mon)
 
 /**
  * kmstest_get_vbl_flag:
- * @pipe_id: Pipe to convert to flag representation.
+ * @crtc_offset: CRTC offset to convert into pipe flag representation.
  *
- * Convert a pipe id into the flag representation
- * expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
+ * With non-contiguous pipe display, pipe mapping always
+ * not same with crtc mapping, for i915 pipe is enum id of i915's crtc object
+ * and pipe id not equal to crtc offset in mode config list hence passing
+ * crtc offset of a pipe to convert into the pipe flag representation
+ * which expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
  */
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
+uint32_t kmstest_get_vbl_flag(int crtc_offset)
 {
-	if (pipe_id == 0)
-		return 0;
-	else if (pipe_id == 1)
-		return _DRM_VBLANK_SECONDARY;
+	uint32_t pipe_id;
+
+	if (crtc_offset == 0)
+		pipe_id = 0;
+	else if (crtc_offset == 1)
+		pipe_id = _DRM_VBLANK_SECONDARY;
 	else {
-		uint32_t pipe_flag = pipe_id << 1;
+		uint32_t pipe_flag = crtc_offset << 1;
 		igt_assert(!(pipe_flag & ~DRM_VBLANK_HIGH_CRTC_MASK));
-		return pipe_flag;
+		pipe_id = pipe_flag;
 	}
+
+	return pipe_id;
 }
 
 static inline const uint32_t *
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 7109c9a5..162c4850 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -338,8 +338,14 @@ typedef struct igt_plane {
 	int format_mod_count;
 } igt_plane_t;
 
+/*
+ * In i915, with non-contiguous pipe display, a pipe is not always
+ * same as a crtc mapping in display, pipe is enum id of a i915's crtc object
+ * using crtc offset to get the offset of a pipe from mode config list
+ */
 struct igt_pipe {
 	igt_display_t *display;
+	/* Id of a pipe object */
 	enum pipe pipe;
 	/* pipe is enabled or not */
 	bool enabled;
@@ -354,6 +360,8 @@ struct igt_pipe {
 	uint64_t values[IGT_NUM_CRTC_PROPS];
 
 	uint32_t crtc_id;
+	/* crtc offset of a pipe in mode config list */
+	uint32_t crtc_offset;
 
 	int32_t out_fence_fd;
 };
@@ -448,8 +456,8 @@ void igt_fb_set_position(struct igt_fb *fb, igt_plane_t *plane,
 void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane,
 	uint32_t w, uint32_t h);
 
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe);
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count);
+void igt_wait_for_vblank(int drm_fd, int crtc_offset);
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count);
 
 static inline bool igt_output_is_connected(igt_output_t *output)
 {
@@ -769,7 +777,7 @@ void igt_pipe_refresh(igt_display_t *display, enum pipe pipe, bool force);
 void igt_enable_connectors(int drm_fd);
 void igt_reset_connectors(void);
 
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id);
+uint32_t kmstest_get_vbl_flag(int crtc_offset);
 
 const struct edid *igt_kms_get_base_edid(void);
 const struct edid *igt_kms_get_alt_edid(void);
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 11/11] tests/kms: Use crtc offset to read vblank event for a pipe
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (9 preceding siblings ...)
  2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
@ 2020-07-11 20:06 ` Mohammed Khajapasha
  2020-07-11 20:41 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_kms: Add support for display with (rev7) Patchwork
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 20:06 UTC (permalink / raw)
  To: igt-dev, arkadiusz.hiler

Pass crtc_offset parameter to read a vblank event for a pipe
to vblank helper functions.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 tests/i915/perf_pmu.c           |  3 ++-
 tests/kms_atomic_transition.c   |  6 ++++--
 tests/kms_available_modes_crc.c |  4 +++-
 tests/kms_color.c               | 35 +++++++++++++++++++++++----------
 tests/kms_cursor_crc.c          | 18 +++++++++++------
 tests/kms_cursor_edge_walk.c    |  4 +++-
 tests/kms_lease.c               | 18 ++++++++++++-----
 tests/kms_pipe_crc_basic.c      |  5 +++--
 tests/kms_plane.c               |  8 ++++++--
 tests/kms_sequence.c            |  3 ++-
 tests/kms_vblank.c              |  3 ++-
 11 files changed, 75 insertions(+), 32 deletions(-)

diff --git a/tests/i915/perf_pmu.c b/tests/i915/perf_pmu.c
index f4db3c10..13e1bd93 100644
--- a/tests/i915/perf_pmu.c
+++ b/tests/i915/perf_pmu.c
@@ -874,7 +874,8 @@ static void prepare_crtc(data_t *data, int fd, igt_output_t *output)
 
 	igt_display_commit(display);
 
-	igt_wait_for_vblank(fd, data->pipe);
+	igt_wait_for_vblank(fd,
+			display->pipes[data->pipe].crtc_offset);
 }
 
 static void cleanup_crtc(data_t *data, int fd, igt_output_t *output)
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 8c1c1d93..35e435f9 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -77,13 +77,15 @@ run_primary_test(igt_display_t *display, enum pipe pipe, igt_output_t *output)
 		igt_display_commit2(display, COMMIT_ATOMIC);
 
 		if (!(i & 1))
-			igt_wait_for_vblank(display->drm_fd, pipe);
+			igt_wait_for_vblank(display->drm_fd,
+					display->pipes[pipe].crtc_offset);
 
 		igt_plane_set_fb(primary, (i & 1) ? &fb : NULL);
 		igt_display_commit2(display, COMMIT_ATOMIC);
 
 		if (i & 1)
-			igt_wait_for_vblank(display->drm_fd, pipe);
+			igt_wait_for_vblank(display->drm_fd,
+					display->pipes[pipe].crtc_offset);
 
 		igt_plane_set_fb(primary, (i & 1) ? NULL : &fb);
 	}
diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 23d035f7..09785ed8 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -285,6 +285,7 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	int i;
+	igt_display_t *display = &data->display;
 
 	/*
 	 * Limit tests only to those fb formats listed in fillers table
@@ -304,7 +305,8 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 		igt_fb_set_position(&data->fb, plane, 0, 0);
 		igt_display_commit2(&data->display, data->commit);
 
-		igt_wait_for_vblank(data->gfx_fd, pipe);
+		igt_wait_for_vblank(data->gfx_fd,
+				display->pipes[pipe].crtc_offset);
 		igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &current_crc);
 
 		if (plane->type != DRM_PLANE_TYPE_CURSOR) {
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 8c50ee66..f2686f57 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -30,6 +30,7 @@ static void test_pipe_degamma(data_t *data,
 			      igt_plane_t *primary)
 {
 	igt_output_t *output;
+	igt_display_t *display = &data->display;
 	gamma_lut_t *degamma_linear, *degamma_full;
 	gamma_lut_t *gamma_linear;
 	color_t red_green_blue[] = {
@@ -82,7 +83,8 @@ static void test_pipe_degamma(data_t *data,
 		paint_rectangles(data, mode, red_green_blue, &fb);
 		igt_plane_set_fb(primary, &fb);
 		igt_display_commit(&data->display);
-		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[primary->pipe->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullcolors);
 
 		/* Draw a gradient with degamma LUT to remap all
@@ -92,7 +94,8 @@ static void test_pipe_degamma(data_t *data,
 		igt_plane_set_fb(primary, &fb);
 		set_degamma(data, primary->pipe, degamma_full);
 		igt_display_commit(&data->display);
-		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[primary->pipe->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullgamma);
 
 		/* Verify that the CRC of the software computed output is
@@ -117,6 +120,7 @@ static void test_pipe_gamma(data_t *data,
 			    igt_plane_t *primary)
 {
 	igt_output_t *output;
+	igt_display_t *display = &data->display;
 	gamma_lut_t *gamma_full;
 	color_t red_green_blue[] = {
 		{ 1.0, 0.0, 0.0 },
@@ -164,7 +168,8 @@ static void test_pipe_gamma(data_t *data,
 		paint_rectangles(data, mode, red_green_blue, &fb);
 		igt_plane_set_fb(primary, &fb);
 		igt_display_commit(&data->display);
-		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[primary->pipe->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullcolors);
 
 		/* Draw a gradient with gamma LUT to remap all values
@@ -173,7 +178,8 @@ static void test_pipe_gamma(data_t *data,
 		paint_gradient_rectangles(data, mode, red_green_blue, &fb);
 		igt_plane_set_fb(primary, &fb);
 		igt_display_commit(&data->display);
-		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[primary->pipe->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullgamma);
 
 		/* Verify that the CRC of the software computed output is
@@ -197,6 +203,7 @@ static void test_pipe_legacy_gamma(data_t *data,
 				   igt_plane_t *primary)
 {
 	igt_output_t *output;
+	igt_display_t *display = &data->display;
 	color_t red_green_blue[] = {
 		{ 1.0, 0.0, 0.0 },
 		{ 0.0, 1.0, 0.0 },
@@ -250,7 +257,8 @@ static void test_pipe_legacy_gamma(data_t *data,
 		paint_rectangles(data, mode, red_green_blue, &fb);
 		igt_plane_set_fb(primary, &fb);
 		igt_display_commit(&data->display);
-		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[primary->pipe->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullcolors);
 
 		/* Draw a gradient with gamma LUT to remap all values
@@ -265,7 +273,8 @@ static void test_pipe_legacy_gamma(data_t *data,
 		igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, primary->pipe->crtc_id,
 						  legacy_lut_size, red_lut, green_lut, blue_lut), 0);
 		igt_display_commit(&data->display);
-		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[primary->pipe->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullgamma);
 
 		/* Verify that the CRC of the software computed output is
@@ -426,6 +435,7 @@ static bool test_pipe_ctm(data_t *data,
 	gamma_lut_t *degamma_linear, *gamma_linear;
 	igt_output_t *output;
 	bool ret = true;
+	igt_display_t *display = &data->display;
 
 	igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_CTM));
 
@@ -480,7 +490,8 @@ static bool test_pipe_ctm(data_t *data,
 		igt_plane_set_fb(primary, &fb);
 		set_ctm(primary->pipe, ctm_identity);
 		igt_display_commit(&data->display);
-		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[primary->pipe->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_software);
 
 		/* With CTM transformation. */
@@ -488,7 +499,8 @@ static bool test_pipe_ctm(data_t *data,
 		igt_plane_set_fb(primary, &fb);
 		set_ctm(primary->pipe, ctm_matrix);
 		igt_display_commit(&data->display);
-		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[primary->pipe->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_hardware);
 
 		/* Verify that the CRC of the software computed output is
@@ -539,6 +551,7 @@ static void test_pipe_limited_range_ctm(data_t *data,
 	gamma_lut_t *degamma_linear, *gamma_linear;
 	igt_output_t *output;
 	bool has_broadcast_rgb_output = false;
+	igt_display_t *display = &data->display;
 
 	degamma_linear = generate_table(data->degamma_lut_size, 1.0);
 	gamma_linear = generate_table(data->gamma_lut_size, 1.0);
@@ -583,7 +596,8 @@ static void test_pipe_limited_range_ctm(data_t *data,
 		paint_rectangles(data, mode, red_green_blue_limited, &fb);
 		igt_plane_set_fb(primary, &fb);
 		igt_display_commit(&data->display);
-		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[primary->pipe->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_full);
 
 		/* Set the output into limited range. */
@@ -591,7 +605,8 @@ static void test_pipe_limited_range_ctm(data_t *data,
 		paint_rectangles(data, mode, red_green_blue_full, &fb);
 		igt_plane_set_fb(primary, &fb);
 		igt_display_commit(&data->display);
-		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[primary->pipe->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_limited);
 
 		/* And reset.. */
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 7e6b24cc..88265fd9 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -199,7 +199,8 @@ static void do_single_test(data_t *data, int x, int y)
 	igt_display_commit(display);
 
 	/* Extra vblank wait is because nonblocking cursor ioctl */
-	igt_wait_for_vblank(data->drm_fd, data->pipe);
+	igt_wait_for_vblank(data->drm_fd,
+			display->pipes[data->pipe].crtc_offset);
 	igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
 
 	if (data->flags & (TEST_DPMS | TEST_SUSPEND)) {
@@ -238,7 +239,8 @@ static void do_single_test(data_t *data, int x, int y)
 	igt_display_commit(display);
 	igt_dirty_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
 	/* Extra vblank wait is because nonblocking cursor ioctl */
-	igt_wait_for_vblank(data->drm_fd, data->pipe);
+	igt_wait_for_vblank(data->drm_fd,
+			display->pipes[data->pipe].crtc_offset);
 
 	igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
 	igt_assert_crc_equal(&crc, &ref_crc);
@@ -496,7 +498,8 @@ static void test_cursor_alpha(data_t *data, double a)
 	/*Hardware Test*/
 	cursor_enable(data);
 	igt_display_commit(display);
-	igt_wait_for_vblank(data->drm_fd, data->pipe);
+	igt_wait_for_vblank(data->drm_fd,
+			display->pipes[data->pipe].crtc_offset);
 	igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
 	cursor_disable(data);
 	igt_remove_fb(data->drm_fd, &data->fb);
@@ -507,7 +510,8 @@ static void test_cursor_alpha(data_t *data, double a)
 	igt_put_cairo_ctx(cr);
 
 	igt_display_commit(display);
-	igt_wait_for_vblank(data->drm_fd, data->pipe);
+	igt_wait_for_vblank(data->drm_fd,
+			display->pipes[data->pipe].crtc_offset);
 	igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
 	igt_assert_crc_equal(&crc, &ref_crc);
 
@@ -612,7 +616,8 @@ static void test_cursor_size(data_t *data)
 		igt_plane_set_size(data->cursor, size, size);
 		igt_fb_set_size(&data->fb, data->cursor, size, size);
 		igt_display_commit(display);
-		igt_wait_for_vblank(data->drm_fd, data->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc[i]);
 	}
 	cursor_disable(data);
@@ -626,7 +631,8 @@ static void test_cursor_size(data_t *data)
 		igt_put_cairo_ctx(cr);
 
 		igt_display_commit(display);
-		igt_wait_for_vblank(data->drm_fd, data->pipe);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
 		/* Clear screen afterwards */
 		cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
diff --git a/tests/kms_cursor_edge_walk.c b/tests/kms_cursor_edge_walk.c
index 96a78792..32b8e711 100644
--- a/tests/kms_cursor_edge_walk.c
+++ b/tests/kms_cursor_edge_walk.c
@@ -84,6 +84,7 @@ static void create_cursor_fb(data_t *data, int cur_w, int cur_h)
 static void cursor_move(data_t *data, int x, int y, int i)
 {
 	int crtc_id = data->output->config.crtc->crtc_id;
+	igt_display_t *display = &data->display;
 
 	igt_debug("[%d] x=%d, y=%d\n", i, x, y);
 
@@ -95,7 +96,8 @@ static void cursor_move(data_t *data, int x, int y, int i)
 	igt_assert(drmModeMoveCursor(data->drm_fd, crtc_id, x, y) == 0 ||
 		   (IS_CHERRYVIEW(data->devid) && data->pipe == PIPE_C &&
 		    x < 0 && x > -data->curw));
-	igt_wait_for_vblank(data->drm_fd, data->pipe);
+	igt_wait_for_vblank(data->drm_fd,
+			display->pipes[data->pipe].crtc_offset);
 }
 
 #define XSTEP 8
diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index 4045fbca..cd8928fb 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -183,7 +183,7 @@ static int prepare_crtc(lease_t *lease, uint32_t connector_id, uint32_t crtc_id)
 	if (ret)
 		return ret;
 
-	igt_wait_for_vblank(lease->fd, pipe);
+	igt_wait_for_vblank(lease->fd, display->pipes[pipe].crtc_offset);
 
 	lease->output = output;
 	lease->mode = mode;
@@ -321,6 +321,8 @@ static void page_flip_implicit_plane(data_t *data)
 	drmModePlaneRes *plane_resources;
 	uint32_t wrong_plane_id = 0;
 	int i;
+	enum pipe pipe;
+	igt_display_t *display;
 
 	/* find a plane which isn't the primary one for us */
 	plane_resources = drmModeGetPlaneResources(data->master.fd);
@@ -351,9 +353,13 @@ static void page_flip_implicit_plane(data_t *data)
 	do_or_die(drmModePageFlip(data->master.fd, data->crtc_id,
 			      data->master.primary_fb.fb_id,
 			      0, NULL));
+
+	display = &data->master.display;
+	pipe = crtc_id_to_pipe(display, data->crtc_id);
+
 	igt_wait_for_vblank_count(data->master.fd,
-				  crtc_id_to_pipe(&data->master.display, data->crtc_id),
-				  1);
+			display->pipes[pipe].crtc_offset, 1);
+
 	do_or_die(drmModePageFlip(mcl.fd, data->crtc_id,
 			      data->master.primary_fb.fb_id,
 			      0, NULL));
@@ -362,9 +368,11 @@ static void page_flip_implicit_plane(data_t *data)
 	object_ids[mcl.object_count++] = wrong_plane_id;
 	do_or_die(create_lease(data->master.fd, &mcl));
 
+	pipe = crtc_id_to_pipe(display, data->crtc_id);
+
 	igt_wait_for_vblank_count(data->master.fd,
-				  crtc_id_to_pipe(&data->master.display, data->crtc_id),
-				  1);
+			display->pipes[pipe].crtc_offset, 1);
+
 	igt_assert_eq(drmModePageFlip(mcl.fd, data->crtc_id,
 				      data->master.primary_fb.fb_id,
 				      0, NULL),
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 82856efa..cb93c1ad 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -105,10 +105,11 @@ static void test_read_crc(data_t *data, enum pipe pipe, unsigned flags)
 			igt_pipe_crc_t *pipe_crc;
 
 			pipe_crc = igt_pipe_crc_new_nonblock(data->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
-			igt_wait_for_vblank(data->drm_fd, pipe);
+			igt_wait_for_vblank(data->drm_fd, display->pipes[pipe].crtc_offset);
 			igt_pipe_crc_start(pipe_crc);
 
-			igt_wait_for_vblank_count(data->drm_fd, pipe, N_CRCS);
+			igt_wait_for_vblank_count(data->drm_fd,
+					display->pipes[pipe].crtc_offset, N_CRCS);
 			n_crcs = igt_pipe_crc_get_crcs(pipe_crc, N_CRCS+1, &crcs);
 			igt_pipe_crc_stop(pipe_crc);
 			igt_pipe_crc_free(pipe_crc);
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 42088488..430210d8 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -593,8 +593,12 @@ static void capture_format_crcs(data_t *data, enum pipe pipe,
 			igt_display_commit2(&data->display, COMMIT_UNIVERSAL);
 
 			/* setplane for the cursor does not block */
-			if (plane->type == DRM_PLANE_TYPE_CURSOR)
-				igt_wait_for_vblank(data->drm_fd, pipe);
+			if (plane->type == DRM_PLANE_TYPE_CURSOR) {
+				igt_display_t *display = &data->display;
+
+				igt_wait_for_vblank(data->drm_fd,
+						display->pipes[pipe].crtc_offset);
+			}
 		}
 
 		igt_remove_fb(data->drm_fd, &old_fb);
diff --git a/tests/kms_sequence.c b/tests/kms_sequence.c
index ff2d73cd..a21ab55c 100644
--- a/tests/kms_sequence.c
+++ b/tests/kms_sequence.c
@@ -117,7 +117,8 @@ static void prepare_crtc(data_t *data, int fd, igt_output_t *output)
 
 	igt_display_commit(display);
 
-	igt_wait_for_vblank(fd, data->pipe);
+	igt_wait_for_vblank(fd,
+			display->pipes[data->pipe].crtc_offset);
 }
 
 static void cleanup_crtc(data_t *data, int fd, igt_output_t *output)
diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index a895ab80..be001312 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -92,7 +92,8 @@ static void prepare_crtc(data_t *data, int fd, igt_output_t *output)
 
 	igt_display_commit(display);
 
-	igt_wait_for_vblank(fd, data->pipe);
+	igt_wait_for_vblank(fd,
+			display->pipes[data->pipe].crtc_offset);
 }
 
 static void cleanup_crtc(data_t *data, int fd, igt_output_t *output)
-- 
2.24.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_kms: Add support for display with (rev7)
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (10 preceding siblings ...)
  2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 11/11] tests/kms: Use crtc offset to read vblank event for a pipe Mohammed Khajapasha
@ 2020-07-11 20:41 ` Patchwork
  2020-07-11 21:53 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  2020-07-15 11:54 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
  13 siblings, 0 replies; 31+ messages in thread
From: Patchwork @ 2020-07-11 20:41 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev

== Series Details ==

Series: lib/igt_kms: Add support for display with (rev7)
URL   : https://patchwork.freedesktop.org/series/78482/
State : success

== Summary ==

CI Bug Log - changes from IGT_5733 -> IGTPW_4757
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Possible fixes ####

  * igt@i915_selftest@live@gt_timelines:
    - fi-tgl-u2:          [DMESG-FAIL][1] -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/fi-tgl-u2/igt@i915_selftest@live@gt_timelines.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/fi-tgl-u2/igt@i915_selftest@live@gt_timelines.html

  * igt@kms_chamelium@dp-crc-fast:
    - fi-icl-u2:          [FAIL][3] ([i915#262]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/fi-icl-u2/igt@kms_chamelium@dp-crc-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/fi-icl-u2/igt@kms_chamelium@dp-crc-fast.html

  
#### Warnings ####

  * igt@debugfs_test@read_all_entries:
    - fi-kbl-x1275:       [DMESG-WARN][5] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][6] ([i915#62] / [i915#92]) +4 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/fi-kbl-x1275/igt@debugfs_test@read_all_entries.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/fi-kbl-x1275/igt@debugfs_test@read_all_entries.html

  * igt@kms_flip@basic-plain-flip@a-dp1:
    - fi-kbl-x1275:       [DMESG-WARN][7] ([i915#62] / [i915#92]) -> [DMESG-WARN][8] ([i915#62] / [i915#92] / [i915#95])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/fi-kbl-x1275/igt@kms_flip@basic-plain-flip@a-dp1.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/fi-kbl-x1275/igt@kms_flip@basic-plain-flip@a-dp1.html

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

  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#262]: https://gitlab.freedesktop.org/drm/intel/issues/262
  [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
  [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (41 -> 34)
------------------------------

  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5733 -> IGTPW_4757

  CI-20190529: 20190529
  CI_DRM_8732: 4c05e94181f1a8ea4c91a5bd90e81f3275b51332 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4757: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/index.html
  IGT_5733: b793b4b40e42300f165dd3fdd670c2a85bd657c6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for lib/igt_kms: Add support for display with (rev7)
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (11 preceding siblings ...)
  2020-07-11 20:41 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_kms: Add support for display with (rev7) Patchwork
@ 2020-07-11 21:53 ` Patchwork
  2020-07-15 11:54 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
  13 siblings, 0 replies; 31+ messages in thread
From: Patchwork @ 2020-07-11 21:53 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev

== Series Details ==

Series: lib/igt_kms: Add support for display with (rev7)
URL   : https://patchwork.freedesktop.org/series/78482/
State : failure

== Summary ==

CI Bug Log - changes from IGT_5733_full -> IGTPW_4757_full
====================================================

Summary
-------

  **FAILURE**

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

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

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@gem_mmap_gtt@fault-concurrent:
    - shard-glk:          [PASS][1] -> [DMESG-WARN][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk3/igt@gem_mmap_gtt@fault-concurrent.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk6/igt@gem_mmap_gtt@fault-concurrent.html

  * igt@kms_multipipe_modeset@basic-max-pipe-crc-check:
    - shard-tglb:         NOTRUN -> [SKIP][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb2/igt@kms_multipipe_modeset@basic-max-pipe-crc-check.html
    - shard-iclb:         NOTRUN -> [SKIP][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb1/igt@kms_multipipe_modeset@basic-max-pipe-crc-check.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic:
    - shard-hsw:          [PASS][5] -> [TIMEOUT][6] ([i915#1958] / [i915#2119]) +3 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-hsw6/igt@gem_exec_suspend@basic.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-hsw4/igt@gem_exec_suspend@basic.html
    - shard-snb:          [PASS][7] -> [TIMEOUT][8] ([i915#1958] / [i915#2119]) +2 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-snb5/igt@gem_exec_suspend@basic.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-snb1/igt@gem_exec_suspend@basic.html

  * igt@kms_addfb_basic@legacy-format:
    - shard-kbl:          [PASS][9] -> [DMESG-WARN][10] ([i915#93] / [i915#95]) +31 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl1/igt@kms_addfb_basic@legacy-format.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl4/igt@kms_addfb_basic@legacy-format.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x128-random:
    - shard-apl:          [PASS][11] -> [DMESG-FAIL][12] ([i915#1635] / [i915#54] / [i915#95]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl1/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl6/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html

  * igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding:
    - shard-apl:          [PASS][13] -> [DMESG-WARN][14] ([i915#1635] / [i915#95]) +20 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl3/igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl4/igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen:
    - shard-kbl:          [PASS][15] -> [DMESG-FAIL][16] ([i915#54] / [i915#95]) +3 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl1/igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen.html

  * igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge:
    - shard-glk:          [PASS][17] -> [DMESG-WARN][18] ([i915#1982])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk6/igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk8/igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge.html

  * igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2:
    - shard-glk:          [PASS][19] -> [FAIL][20] ([i915#79])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk2/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk6/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html

  * igt@kms_flip@flip-vs-suspend@a-dp1:
    - shard-kbl:          [PASS][21] -> [DMESG-WARN][22] ([i915#180]) +2 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl2/igt@kms_flip@flip-vs-suspend@a-dp1.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl3/igt@kms_flip@flip-vs-suspend@a-dp1.html

  * igt@kms_frontbuffer_tracking@psr-1p-pri-indfb-multidraw:
    - shard-tglb:         [PASS][23] -> [DMESG-WARN][24] ([i915#1982])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-tglb1/igt@kms_frontbuffer_tracking@psr-1p-pri-indfb-multidraw.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb6/igt@kms_frontbuffer_tracking@psr-1p-pri-indfb-multidraw.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
    - shard-iclb:         [PASS][25] -> [INCOMPLETE][26] ([i915#1185])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb5/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [PASS][27] -> [SKIP][28] ([fdo#109441]) +1 similar issue
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb3/igt@kms_psr@psr2_cursor_render.html

  
#### Possible fixes ####

  * igt@gem_exec_whisper@basic-normal-all:
    - shard-glk:          [DMESG-WARN][29] ([i915#118] / [i915#95]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk7/igt@gem_exec_whisper@basic-normal-all.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk6/igt@gem_exec_whisper@basic-normal-all.html

  * igt@kms_big_fb@linear-64bpp-rotate-0:
    - shard-apl:          [DMESG-WARN][31] ([i915#1635] / [i915#1982]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl2/igt@kms_big_fb@linear-64bpp-rotate-0.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl1/igt@kms_big_fb@linear-64bpp-rotate-0.html
    - shard-glk:          [DMESG-FAIL][33] ([i915#118] / [i915#95]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk8/igt@kms_big_fb@linear-64bpp-rotate-0.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk9/igt@kms_big_fb@linear-64bpp-rotate-0.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x128-rapid-movement:
    - shard-hsw:          [TIMEOUT][35] ([i915#1958] / [i915#2119]) -> [PASS][36] +2 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-hsw4/igt@kms_cursor_crc@pipe-a-cursor-128x128-rapid-movement.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-hsw7/igt@kms_cursor_crc@pipe-a-cursor-128x128-rapid-movement.html

  * igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen:
    - shard-kbl:          [DMESG-FAIL][37] ([i915#54] / [i915#95]) -> [PASS][38] +1 similar issue
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen.html

  * igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge:
    - shard-apl:          [DMESG-WARN][39] ([i915#1635] / [i915#95]) -> [PASS][40] +37 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl7/igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl7/igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge.html

  * igt@kms_draw_crc@draw-method-xrgb2101010-render-xtiled:
    - shard-tglb:         [DMESG-WARN][41] ([i915#402]) -> [PASS][42] +1 similar issue
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-tglb3/igt@kms_draw_crc@draw-method-xrgb2101010-render-xtiled.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb8/igt@kms_draw_crc@draw-method-xrgb2101010-render-xtiled.html

  * igt@kms_flip@flip-vs-suspend@c-dp1:
    - shard-kbl:          [DMESG-WARN][43] ([i915#180]) -> [PASS][44] +6 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl2/igt@kms_flip@flip-vs-suspend@c-dp1.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl3/igt@kms_flip@flip-vs-suspend@c-dp1.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-cpu:
    - shard-tglb:         [DMESG-WARN][45] ([i915#1982]) -> [PASS][46] +2 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-tglb1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-cpu.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb3/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-cpu.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          [DMESG-FAIL][47] ([i915#95]) -> [PASS][48] +1 similar issue
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
    - shard-apl:          [DMESG-FAIL][49] ([i915#1635] / [i915#95]) -> [PASS][50] +1 similar issue
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl6/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant:
    - shard-kbl:          [DMESG-FAIL][51] ([fdo#108145] / [i915#95]) -> [PASS][52]
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl3/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl4/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html
    - shard-apl:          [DMESG-FAIL][53] ([fdo#108145] / [i915#1635] / [i915#95]) -> [PASS][54]
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl2/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl2/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html

  * igt@kms_plane_cursor@pipe-a-primary-size-128:
    - shard-kbl:          [DMESG-WARN][55] ([i915#93] / [i915#95]) -> [PASS][56] +48 similar issues
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl1/igt@kms_plane_cursor@pipe-a-primary-size-128.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl6/igt@kms_plane_cursor@pipe-a-primary-size-128.html

  * igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
    - shard-iclb:         [DMESG-WARN][57] ([i915#1982]) -> [PASS][58] +1 similar issue
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb3/igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb7/igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping.html

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

  * igt@kms_setmode@basic:
    - shard-glk:          [FAIL][61] ([i915#31]) -> [PASS][62]
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk1/igt@kms_setmode@basic.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk9/igt@kms_setmode@basic.html

  * igt@perf_pmu@semaphore-busy@rcs0:
    - shard-kbl:          [FAIL][63] ([i915#1820]) -> [PASS][64]
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl1/igt@perf_pmu@semaphore-busy@rcs0.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl1/igt@perf_pmu@semaphore-busy@rcs0.html

  
#### Warnings ####

  * igt@gem_exec_reloc@basic-concurrent16:
    - shard-snb:          [FAIL][65] ([i915#1930]) -> [TIMEOUT][66] ([i915#1958] / [i915#2119])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-snb1/igt@gem_exec_reloc@basic-concurrent16.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-snb1/igt@gem_exec_reloc@basic-concurrent16.html

  * igt@kms_color@pipe-d-ctm-0-25:
    - shard-iclb:         [SKIP][67] ([fdo#109278] / [fdo#112010] / [i915#1149]) -> [SKIP][68] ([fdo#109278] / [i915#1149]) +9 similar issues
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb7/igt@kms_color@pipe-d-ctm-0-25.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb3/igt@kms_color@pipe-d-ctm-0-25.html

  * igt@kms_content_protection@lic:
    - shard-kbl:          [TIMEOUT][69] ([i915#1319] / [i915#2119]) -> [TIMEOUT][70] ([i915#1319] / [i915#1958] / [i915#2119])
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl2/igt@kms_content_protection@lic.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl4/igt@kms_content_protection@lic.html

  * igt@kms_cursor_crc@pipe-b-cursor-512x170-offscreen:
    - shard-iclb:         [SKIP][71] ([fdo#109279]) -> [SKIP][72] ([fdo#109278] / [fdo#109279]) +24 similar issues
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb6/igt@kms_cursor_crc@pipe-b-cursor-512x170-offscreen.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb4/igt@kms_cursor_crc@pipe-b-cursor-512x170-offscreen.html

  * igt@kms_cursor_crc@pipe-d-cursor-64x21-sliding:
    - shard-iclb:         [SKIP][73] ([fdo#109278] / [fdo#112010] / [i915#508]) -> [SKIP][74] ([fdo#109278])
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb1/igt@kms_cursor_crc@pipe-d-cursor-64x21-sliding.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb7/igt@kms_cursor_crc@pipe-d-cursor-64x21-sliding.html

  * igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy:
    - shard-iclb:         [SKIP][75] ([fdo#109274]) -> [SKIP][76] ([fdo#109274] / [fdo#109278]) +23 similar issues
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb4/igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb2/igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy.html

  * igt@kms_cursor_legacy@pipe-c-torture-move:
    - shard-snb:          [SKIP][77] ([fdo#109271]) -> [TIMEOUT][78] ([i915#1958] / [i915#2119]) +2 similar issues
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-snb1/igt@kms_cursor_legacy@pipe-c-torture-move.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-snb1/igt@kms_cursor_legacy@pipe-c-torture-move.html

  * igt@kms_cursor_legacy@pipe-d-single-move:
    - shard-iclb:         [SKIP][79] ([fdo#109278] / [fdo#112010]) -> [SKIP][80] ([fdo#109278]) +74 similar issues
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb6/igt@kms_cursor_legacy@pipe-d-single-move.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb3/igt@kms_cursor_legacy@pipe-d-single-move.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-cur-indfb-draw-render:
    - shard-hsw:          [TIMEOUT][81] ([i915#1958] / [i915#2119]) -> [SKIP][82] ([fdo#109271])
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-hsw4/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-cur-indfb-draw-render.html
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-hsw1/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-cur-indfb-draw-render.html

  * igt@kms_plane@plane-position-hole-dpms-pipe-d-planes:
    - shard-hsw:          [SKIP][83] ([fdo#109271]) -> [TIMEOUT][84] ([i915#1958] / [i915#2119]) +1 similar issue
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-hsw4/igt@kms_plane@plane-position-hole-dpms-pipe-d-planes.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-hsw4/igt@kms_plane@plane-position-hole-dpms-pipe-d-planes.html

  * igt@kms_plane_multiple@atomic-pipe-d-tiling-yf:
    - shard-tglb:         [SKIP][85] ([fdo#112025] / [fdo#112054]) -> [SKIP][86] ([fdo#112054])
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-tglb6/igt@kms_plane_multiple@atomic-pipe-d-tiling-yf.html
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb7/igt@kms_plane_multiple@atomic-pipe-d-tiling-yf.html

  * igt@kms_plane_scaling@2x-scaler-multi-pipe:
    - shard-tglb:         [SKIP][87] ([fdo#111825] / [fdo#112015]) -> [SKIP][88] ([fdo#111825])
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-tglb8/igt@kms_plane_scaling@2x-scaler-multi-pipe.html
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb6/igt@kms_plane_scaling@2x-scaler-multi-pipe.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][89] ([i915#1635] / [i915#31]) -> [DMESG-FAIL][90] ([i915#1635] / [i915#31] / [i915#95])
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl4/igt@kms_setmode@basic.html
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl7/igt@kms_setmode@basic.html
    - shard-kbl:          [FAIL][91] ([i915#31]) -> [DMESG-WARN][92] ([i915#93] / [i915#95])
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl2/igt@kms_setmode@basic.html
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl2/igt@kms_setmode@basic.html

  * igt@runner@aborted:
    - shard-apl:          ([FAIL][93], [FAIL][94], [FAIL][95], [FAIL][96], [FAIL][97], [FAIL][98]) ([i915#1610] / [i915#1635] / [i915#2110]) -> [FAIL][99] ([i915#1635] / [i915#2110])
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl6/igt@runner@aborted.html
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl4/igt@runner@aborted.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl3/igt@runner@aborted.html
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl7/igt@runner@aborted.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl2/igt@runner@aborted.html
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl7/igt@runner@aborted.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl3/igt@runner@aborted.html
    - shard-glk:          [FAIL][100] ([i915#2110] / [k.org#202321]) -> [FAIL][101] ([i915#1611] / [k.org#202321])
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk2/igt@runner@aborted.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk6/igt@runner@aborted.html

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

  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#112010]: https://bugs.freedesktop.org/show_bug.cgi?id=112010
  [fdo#112015]: https://bugs.freedesktop.org/show_bug.cgi?id=112015
  [fdo#112025]: https://bugs.freedesktop.org/show_bug.cgi?id=112025
  [fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
  [i915#1149]: https://gitlab.freedesktop.org/drm/intel/issues/1149
  [i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
  [i915#1185]: https://gitlab.freedesktop.org/drm/intel/issues/1185
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#1610]: https://gitlab.freedesktop.org/drm/intel/issues/1610
  [i915#1611]: https://gitlab.freedesktop.org/drm/intel/issues/1611
  [i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1820]: https://gitlab.freedesktop.org/drm/intel/issues/1820
  [i915#1930]: https://gitlab.freedesktop.org/drm/intel/issues/1930
  [i915#1958]: https://gitlab.freedesktop.org/drm/intel/issues/1958
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2110]: https://gitlab.freedesktop.org/drm/intel/issues/2110
  [i915#2119]: https://gitlab.freedesktop.org/drm/intel/issues/2119
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#508]: https://gitlab.freedesktop.org/drm/intel/issues/508
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
  [k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321


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

  No changes in participating hosts


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5733 -> IGTPW_4757

  CI-20190529: 20190529
  CI_DRM_8732: 4c05e94181f1a8ea4c91a5bd90e81f3275b51332 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4757: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/index.html
  IGT_5733: b793b4b40e42300f165dd3fdd670c2a85bd657c6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for lib/igt_kms: Add support for display with (rev7)
  2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
                   ` (12 preceding siblings ...)
  2020-07-11 21:53 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2020-07-15 11:54 ` Patchwork
  13 siblings, 0 replies; 31+ messages in thread
From: Patchwork @ 2020-07-15 11:54 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 21852 bytes --]

== Series Details ==

Series: lib/igt_kms: Add support for display with (rev7)
URL   : https://patchwork.freedesktop.org/series/78482/
State : success

== Summary ==

CI Bug Log - changes from IGT_5733_full -> IGTPW_4757_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic:
    - shard-hsw:          [PASS][1] -> [TIMEOUT][2] ([i915#1958] / [i915#2119]) +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-hsw6/igt@gem_exec_suspend@basic.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-hsw4/igt@gem_exec_suspend@basic.html
    - shard-snb:          [PASS][3] -> [TIMEOUT][4] ([i915#1958] / [i915#2119]) +2 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-snb5/igt@gem_exec_suspend@basic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-snb1/igt@gem_exec_suspend@basic.html

  * igt@gem_mmap_gtt@fault-concurrent:
    - shard-glk:          [PASS][5] -> [DMESG-WARN][6] ([i915#2165])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk3/igt@gem_mmap_gtt@fault-concurrent.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk6/igt@gem_mmap_gtt@fault-concurrent.html

  * igt@kms_addfb_basic@legacy-format:
    - shard-kbl:          [PASS][7] -> [DMESG-WARN][8] ([i915#93] / [i915#95]) +31 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl1/igt@kms_addfb_basic@legacy-format.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl4/igt@kms_addfb_basic@legacy-format.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x128-random:
    - shard-apl:          [PASS][9] -> [DMESG-FAIL][10] ([i915#1635] / [i915#54] / [i915#95]) +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl1/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl6/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html

  * igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding:
    - shard-apl:          [PASS][11] -> [DMESG-WARN][12] ([i915#1635] / [i915#95]) +20 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl3/igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl4/igt@kms_cursor_crc@pipe-a-cursor-256x256-sliding.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen:
    - shard-kbl:          [PASS][13] -> [DMESG-FAIL][14] ([i915#54] / [i915#95]) +3 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl1/igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen.html

  * igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge:
    - shard-glk:          [PASS][15] -> [DMESG-WARN][16] ([i915#1982])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk6/igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk8/igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge.html

  * igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2:
    - shard-glk:          [PASS][17] -> [FAIL][18] ([i915#79])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk2/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk6/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html

  * igt@kms_flip@flip-vs-suspend@a-dp1:
    - shard-kbl:          [PASS][19] -> [DMESG-WARN][20] ([i915#180]) +2 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl2/igt@kms_flip@flip-vs-suspend@a-dp1.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl3/igt@kms_flip@flip-vs-suspend@a-dp1.html

  * igt@kms_frontbuffer_tracking@psr-1p-pri-indfb-multidraw:
    - shard-tglb:         [PASS][21] -> [DMESG-WARN][22] ([i915#1982])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-tglb1/igt@kms_frontbuffer_tracking@psr-1p-pri-indfb-multidraw.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb6/igt@kms_frontbuffer_tracking@psr-1p-pri-indfb-multidraw.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
    - shard-iclb:         [PASS][23] -> [INCOMPLETE][24] ([i915#1185])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb5/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html

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

  
#### Possible fixes ####

  * igt@gem_exec_whisper@basic-normal-all:
    - shard-glk:          [DMESG-WARN][27] ([i915#118] / [i915#95]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk7/igt@gem_exec_whisper@basic-normal-all.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk6/igt@gem_exec_whisper@basic-normal-all.html

  * igt@kms_big_fb@linear-64bpp-rotate-0:
    - shard-apl:          [DMESG-WARN][29] ([i915#1635] / [i915#1982]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl2/igt@kms_big_fb@linear-64bpp-rotate-0.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl1/igt@kms_big_fb@linear-64bpp-rotate-0.html
    - shard-glk:          [DMESG-FAIL][31] ([i915#118] / [i915#95]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk8/igt@kms_big_fb@linear-64bpp-rotate-0.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk9/igt@kms_big_fb@linear-64bpp-rotate-0.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x128-rapid-movement:
    - shard-hsw:          [TIMEOUT][33] ([i915#1958] / [i915#2119]) -> [PASS][34] +2 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-hsw4/igt@kms_cursor_crc@pipe-a-cursor-128x128-rapid-movement.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-hsw7/igt@kms_cursor_crc@pipe-a-cursor-128x128-rapid-movement.html

  * igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen:
    - shard-kbl:          [DMESG-FAIL][35] ([i915#54] / [i915#95]) -> [PASS][36] +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen.html

  * igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge:
    - shard-apl:          [DMESG-WARN][37] ([i915#1635] / [i915#95]) -> [PASS][38] +37 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl7/igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl7/igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge.html

  * igt@kms_draw_crc@draw-method-xrgb2101010-render-xtiled:
    - shard-tglb:         [DMESG-WARN][39] ([i915#402]) -> [PASS][40] +1 similar issue
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-tglb3/igt@kms_draw_crc@draw-method-xrgb2101010-render-xtiled.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb8/igt@kms_draw_crc@draw-method-xrgb2101010-render-xtiled.html

  * igt@kms_flip@flip-vs-suspend@c-dp1:
    - shard-kbl:          [DMESG-WARN][41] ([i915#180]) -> [PASS][42] +6 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl2/igt@kms_flip@flip-vs-suspend@c-dp1.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl3/igt@kms_flip@flip-vs-suspend@c-dp1.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-cpu:
    - shard-tglb:         [DMESG-WARN][43] ([i915#1982]) -> [PASS][44] +2 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-tglb1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-cpu.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb3/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-cpu.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          [DMESG-FAIL][45] ([i915#95]) -> [PASS][46] +1 similar issue
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
    - shard-apl:          [DMESG-FAIL][47] ([i915#1635] / [i915#95]) -> [PASS][48] +1 similar issue
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl6/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant:
    - shard-kbl:          [DMESG-FAIL][49] ([fdo#108145] / [i915#95]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl3/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl4/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html
    - shard-apl:          [DMESG-FAIL][51] ([fdo#108145] / [i915#1635] / [i915#95]) -> [PASS][52]
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl2/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl2/igt@kms_plane_alpha_blend@pipe-a-coverage-vs-premult-vs-constant.html

  * igt@kms_plane_cursor@pipe-a-primary-size-128:
    - shard-kbl:          [DMESG-WARN][53] ([i915#93] / [i915#95]) -> [PASS][54] +48 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl1/igt@kms_plane_cursor@pipe-a-primary-size-128.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl6/igt@kms_plane_cursor@pipe-a-primary-size-128.html

  * igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
    - shard-iclb:         [DMESG-WARN][55] ([i915#1982]) -> [PASS][56] +1 similar issue
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb3/igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb7/igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping.html

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

  * igt@kms_setmode@basic:
    - shard-glk:          [FAIL][59] ([i915#31]) -> [PASS][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk1/igt@kms_setmode@basic.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk9/igt@kms_setmode@basic.html

  * igt@perf_pmu@semaphore-busy@rcs0:
    - shard-kbl:          [FAIL][61] ([i915#1820]) -> [PASS][62]
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl1/igt@perf_pmu@semaphore-busy@rcs0.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl1/igt@perf_pmu@semaphore-busy@rcs0.html

  
#### Warnings ####

  * igt@gem_exec_reloc@basic-concurrent16:
    - shard-snb:          [FAIL][63] ([i915#1930]) -> [TIMEOUT][64] ([i915#1958] / [i915#2119])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-snb1/igt@gem_exec_reloc@basic-concurrent16.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-snb1/igt@gem_exec_reloc@basic-concurrent16.html

  * igt@kms_color@pipe-d-ctm-0-25:
    - shard-iclb:         [SKIP][65] ([fdo#109278] / [fdo#112010] / [i915#1149]) -> [SKIP][66] ([fdo#109278] / [i915#1149]) +9 similar issues
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb7/igt@kms_color@pipe-d-ctm-0-25.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb3/igt@kms_color@pipe-d-ctm-0-25.html

  * igt@kms_content_protection@lic:
    - shard-kbl:          [TIMEOUT][67] ([i915#1319] / [i915#2119]) -> [TIMEOUT][68] ([i915#1319] / [i915#1958] / [i915#2119])
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl2/igt@kms_content_protection@lic.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl4/igt@kms_content_protection@lic.html

  * igt@kms_cursor_crc@pipe-b-cursor-512x170-offscreen:
    - shard-iclb:         [SKIP][69] ([fdo#109279]) -> [SKIP][70] ([fdo#109278] / [fdo#109279]) +24 similar issues
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb6/igt@kms_cursor_crc@pipe-b-cursor-512x170-offscreen.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb4/igt@kms_cursor_crc@pipe-b-cursor-512x170-offscreen.html

  * igt@kms_cursor_crc@pipe-d-cursor-64x21-sliding:
    - shard-iclb:         [SKIP][71] ([fdo#109278] / [fdo#112010] / [i915#508]) -> [SKIP][72] ([fdo#109278])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb1/igt@kms_cursor_crc@pipe-d-cursor-64x21-sliding.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb7/igt@kms_cursor_crc@pipe-d-cursor-64x21-sliding.html

  * igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy:
    - shard-iclb:         [SKIP][73] ([fdo#109274]) -> [SKIP][74] ([fdo#109274] / [fdo#109278]) +23 similar issues
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb4/igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb2/igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy.html

  * igt@kms_cursor_legacy@pipe-c-torture-move:
    - shard-snb:          [SKIP][75] ([fdo#109271]) -> [TIMEOUT][76] ([i915#1958] / [i915#2119]) +2 similar issues
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-snb1/igt@kms_cursor_legacy@pipe-c-torture-move.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-snb1/igt@kms_cursor_legacy@pipe-c-torture-move.html

  * igt@kms_cursor_legacy@pipe-d-single-move:
    - shard-iclb:         [SKIP][77] ([fdo#109278] / [fdo#112010]) -> [SKIP][78] ([fdo#109278]) +74 similar issues
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-iclb6/igt@kms_cursor_legacy@pipe-d-single-move.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-iclb3/igt@kms_cursor_legacy@pipe-d-single-move.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-cur-indfb-draw-render:
    - shard-hsw:          [TIMEOUT][79] ([i915#1958] / [i915#2119]) -> [SKIP][80] ([fdo#109271])
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-hsw4/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-cur-indfb-draw-render.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-hsw1/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-cur-indfb-draw-render.html

  * igt@kms_plane@plane-position-hole-dpms-pipe-d-planes:
    - shard-hsw:          [SKIP][81] ([fdo#109271]) -> [TIMEOUT][82] ([i915#1958] / [i915#2119]) +1 similar issue
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-hsw4/igt@kms_plane@plane-position-hole-dpms-pipe-d-planes.html
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-hsw4/igt@kms_plane@plane-position-hole-dpms-pipe-d-planes.html

  * igt@kms_plane_multiple@atomic-pipe-d-tiling-yf:
    - shard-tglb:         [SKIP][83] ([fdo#112025] / [fdo#112054]) -> [SKIP][84] ([fdo#112054])
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-tglb6/igt@kms_plane_multiple@atomic-pipe-d-tiling-yf.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb7/igt@kms_plane_multiple@atomic-pipe-d-tiling-yf.html

  * igt@kms_plane_scaling@2x-scaler-multi-pipe:
    - shard-tglb:         [SKIP][85] ([fdo#111825] / [fdo#112015]) -> [SKIP][86] ([fdo#111825])
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-tglb8/igt@kms_plane_scaling@2x-scaler-multi-pipe.html
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-tglb6/igt@kms_plane_scaling@2x-scaler-multi-pipe.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][87] ([i915#1635] / [i915#31]) -> [DMESG-FAIL][88] ([i915#1635] / [i915#31] / [i915#95])
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl4/igt@kms_setmode@basic.html
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl7/igt@kms_setmode@basic.html
    - shard-kbl:          [FAIL][89] ([i915#31]) -> [DMESG-WARN][90] ([i915#93] / [i915#95])
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-kbl2/igt@kms_setmode@basic.html
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-kbl2/igt@kms_setmode@basic.html

  * igt@runner@aborted:
    - shard-apl:          ([FAIL][91], [FAIL][92], [FAIL][93], [FAIL][94], [FAIL][95], [FAIL][96]) ([i915#1610] / [i915#1635] / [i915#2110]) -> [FAIL][97] ([i915#1635] / [i915#2110])
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl6/igt@runner@aborted.html
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl4/igt@runner@aborted.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl3/igt@runner@aborted.html
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl7/igt@runner@aborted.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl2/igt@runner@aborted.html
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-apl7/igt@runner@aborted.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-apl3/igt@runner@aborted.html
    - shard-glk:          [FAIL][98] ([i915#2110] / [k.org#202321]) -> [FAIL][99] ([i915#1611] / [k.org#202321])
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5733/shard-glk2/igt@runner@aborted.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/shard-glk6/igt@runner@aborted.html

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

  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#112010]: https://bugs.freedesktop.org/show_bug.cgi?id=112010
  [fdo#112015]: https://bugs.freedesktop.org/show_bug.cgi?id=112015
  [fdo#112025]: https://bugs.freedesktop.org/show_bug.cgi?id=112025
  [fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
  [i915#1149]: https://gitlab.freedesktop.org/drm/intel/issues/1149
  [i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
  [i915#1185]: https://gitlab.freedesktop.org/drm/intel/issues/1185
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#1610]: https://gitlab.freedesktop.org/drm/intel/issues/1610
  [i915#1611]: https://gitlab.freedesktop.org/drm/intel/issues/1611
  [i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1820]: https://gitlab.freedesktop.org/drm/intel/issues/1820
  [i915#1930]: https://gitlab.freedesktop.org/drm/intel/issues/1930
  [i915#1958]: https://gitlab.freedesktop.org/drm/intel/issues/1958
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2110]: https://gitlab.freedesktop.org/drm/intel/issues/2110
  [i915#2119]: https://gitlab.freedesktop.org/drm/intel/issues/2119
  [i915#2165]: https://gitlab.freedesktop.org/drm/intel/issues/2165
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#508]: https://gitlab.freedesktop.org/drm/intel/issues/508
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
  [k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321


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

  No changes in participating hosts


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5733 -> IGTPW_4757

  CI-20190529: 20190529
  CI_DRM_8732: 4c05e94181f1a8ea4c91a5bd90e81f3275b51332 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4757: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/index.html
  IGT_5733: b793b4b40e42300f165dd3fdd670c2a85bd657c6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4757/index.html

[-- Attachment #1.2: Type: text/html, Size: 28644 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* Re: [igt-dev] [PATCH i-g-t 05/11] tests/kms_lease: Read crtc id for a valid pipe
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 05/11] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
@ 2020-07-15 14:19   ` Arkadiusz Hiler
  0 siblings, 0 replies; 31+ messages in thread
From: Arkadiusz Hiler @ 2020-07-15 14:19 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev

On Sun, Jul 12, 2020 at 01:35:56AM +0530, Mohammed Khajapasha wrote:
> Read crtc id for enabled pipes only.
> 
> Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
> ---
>  tests/kms_lease.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index 75a1149c..4045fbca 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -136,9 +136,11 @@ static enum pipe crtc_id_to_pipe(igt_display_t *display, uint32_t crtc_id)
>  {
>  	enum pipe pipe;
>  
> -	for (pipe = 0; pipe < display->n_pipes; pipe++)
> -		if (display->pipes[pipe].crtc_id == crtc_id)
> +	for (pipe = 0; pipe < display->n_pipes; pipe++) {
> +		if (display->pipes[pipe].enabled &&
> +				display->pipes[pipe].crtc_id == crtc_id)

for_each_pipe is already iterating over enabled pipes only, you could
use just that instead of hand-rolling iteration here

-- 
Cheers,
Arek

>  			return pipe;
> +	}
>  	return -1;
>  }
>  
> -- 
> 2.24.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 04/11] tests/kms_lease: Get pipe from crtc for enable pipes
  2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 04/11] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
@ 2020-07-15 14:21   ` Arkadiusz Hiler
  0 siblings, 0 replies; 31+ messages in thread
From: Arkadiusz Hiler @ 2020-07-15 14:21 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev

On Sun, Jul 12, 2020 at 01:35:55AM +0530, Mohammed Khajapasha wrote:
> Get pipe from drm crtc for enabled pipes only.
> 
> Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
> ---
>  tests/kms_lease.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index 2e6cf9b0..75a1149c 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -684,6 +684,8 @@ static void lease_unleased_crtc(data_t *data)
>  	/* Find another CRTC that we don't control */
>  	bad_crtc_id = 0;
>  	for (p = 0; bad_crtc_id == 0 && p < data->master.display.n_pipes; p++) {
> +		if(!(data->master.display.pipes[p].enabled))
> +			continue;
>  		if (pipe_to_crtc_id(&data->master.display, p) != data->crtc_id)
>  			bad_crtc_id = pipe_to_crtc_id(&data->master.display, p);

this also can be turned into for_each_pipe, which is a bit better than
adding enabled checks everywhere


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

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

* Re: [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
@ 2020-07-15 14:50   ` Arkadiusz Hiler
  2020-07-16 10:12     ` Jani Nikula
  2020-07-16 17:23     ` Khajapasha, Mohammed
  2020-07-17 13:02   ` Arkadiusz Hiler
  1 sibling, 2 replies; 31+ messages in thread
From: Arkadiusz Hiler @ 2020-07-15 14:50 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev

On Sun, Jul 12, 2020 at 01:36:01AM +0530, Mohammed Khajapasha wrote:
> In i915 with non-contiguous pipes display, pipes always not same
> as crtc index in display pipes array. Hence reading pipe id flags
> for a vblank event using crtc offset.
> 
> Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
> ---
>  lib/igt_kms.c | 51 +++++++++++++++++++++++++++++++++++----------------
>  lib/igt_kms.h | 14 +++++++++++---
>  2 files changed, 46 insertions(+), 19 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index d56f2e56..5b9f2175 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1983,6 +1983,8 @@ void igt_display_require(igt_display_t *display, int drm_fd)
>  		/* pipe is enabled/disabled */
>  		pipe->enabled = true;
>  		pipe->crtc_id = resources->crtcs[i];
> +		/* offset of a pipe in crtcs list */
> +		pipe->crtc_offset = i;
>  	}
>  
>  	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
> @@ -4131,18 +4133,23 @@ void igt_pipe_request_out_fence(igt_pipe_t *pipe)
>  /**
>   * igt_wait_for_vblank_count:
>   * @drm_fd: A drm file descriptor
> - * @pipe: Pipe to wait_for_vblank on
> + * @crtc_offset: offset of a Pipe to wait_for_vblank on
>   * @count: Number of vblanks to wait on
>   *
> + * With non-contiguous pipe display, pipe mapping always
> + * not same with crtc mapping, for i915 pipe is enum id of i915's crtc object
> + * and pipe id not equal to crtc offset in mode config list hence passing
> + * crtc offset to read vblank count for a pipe.
> + *

Hey,

In KMS & i915 there are two thing that are called pipe:

1. offset of the crtc in the mode resources array, it's used by drm_wait_vblank_ioctl
   https://elixir.bootlin.com/linux/v5.7.8/source/drivers/gpu/drm/drm_vblank.c#L1658

2. intel concept of a pipe with its separate numbering:
   https://elixir.bootlin.com/linux/v5.7.8/source/drivers/gpu/drm/i915/display/intel_display.c#L16722

Those two concepts are incompatible. We can see this in the kms_lease
tests - if we lease PIPE_C only it becomes PIPE_A for (1) and stays
PIPE_C in the sense of (2).

Why is it so important that in IGT we use the (2) meaning? How are you
planning on using it? Why the kernel can't hide the missing pipe from
our sight just as it does when leasing?

I see few options with non-continuous pipes:

a. keep pipe as it is now (so it actually is "crtc offset") as this is
   what most of the IOCTLs expect. If you ever need to use the (2)
   meaning of pipe you can use intel_get_pipe_from_crtc_id_ioctl there

b. same as above but rename PIPE_ prefix to CRTC_, so we end up with
   CRTC_A, CRTC_B, CRTC_C, etc.

c. this patch series - we use the second meaning of pipe (2) and
   introduce some complications for the sake of places where we need the
   first meaning (1)

I think this series lacks justification why this option has been chosen
- it may be me not understating something that you find obvious.

Is there any practical reason besides people wanting to have test
results for pipe-c corresponding to Intel's hardware understanding of
what pipe-c is?

You may need to ELI5 that to me. I have very rudimentary understanding
of this area and only learned about the multiple meanings of "pipe"
while doing the review here :-)

The code looks good otherwise.

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

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

* Re: [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-15 14:50   ` Arkadiusz Hiler
@ 2020-07-16 10:12     ` Jani Nikula
  2020-07-16 10:40       ` Arkadiusz Hiler
  2020-07-16 17:23     ` Khajapasha, Mohammed
  1 sibling, 1 reply; 31+ messages in thread
From: Jani Nikula @ 2020-07-16 10:12 UTC (permalink / raw)
  To: Arkadiusz Hiler, Mohammed Khajapasha; +Cc: igt-dev

On Wed, 15 Jul 2020, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
> In KMS & i915 there are two thing that are called pipe:

...

> Is there any practical reason besides people wanting to have test
> results for pipe-c corresponding to Intel's hardware understanding of
> what pipe-c is?
>
> You may need to ELI5 that to me. I have very rudimentary understanding
> of this area and only learned about the multiple meanings of "pipe"
> while doing the review here :-)

Something I've been saying all along: If you call something a "pipe", it
*must* mean Intel hardware pipe. If you call something "crtc index", it
*must* mean the ABI crtc index. Don't mix the two. Don't implicitly
convert between the two (i.e. you need explicit conversion using the
IOCTL). Assume it's purely a coincidence that they've previously matched
1:1.

In this case, naming is everything, and proper naming leads to clarity
of the concepts and implementation.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-16 10:12     ` Jani Nikula
@ 2020-07-16 10:40       ` Arkadiusz Hiler
  0 siblings, 0 replies; 31+ messages in thread
From: Arkadiusz Hiler @ 2020-07-16 10:40 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Mohammed Khajapasha, igt-dev

On Thu, Jul 16, 2020 at 01:12:38PM +0300, Jani Nikula wrote:
> On Wed, 15 Jul 2020, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
> > In KMS & i915 there are two thing that are called pipe:
> 
> ...
> 
> > Is there any practical reason besides people wanting to have test
> > results for pipe-c corresponding to Intel's hardware understanding of
> > what pipe-c is?
> >
> > You may need to ELI5 that to me. I have very rudimentary understanding
> > of this area and only learned about the multiple meanings of "pipe"
> > while doing the review here :-)
> 
> Something I've been saying all along: If you call something a "pipe", it
> *must* mean Intel hardware pipe. If you call something "crtc index", it
> *must* mean the ABI crtc index. Don't mix the two. Don't implicitly
> convert between the two (i.e. you need explicit conversion using the
> IOCTL). Assume it's purely a coincidence that they've previously matched
> 1:1.

I am all for clarifying things up, but I am not very familiar with the
history of how we ended up here - that's why I am asking all those
questions.

What bothers me is that pipe already has multiple meanings, not only in IGT.

From https://www.keithp.com/blogs/DRM-lease-4/ :
"It has been kludged into supporting multiple CRTCs by taking bits from
the 'type' parameter to hold a 'pipe' number, which is the index in the
kernel into the array of CRTCs."

https://elixir.bootlin.com/linux/v5.7.8/source/drivers/gpu/drm/drm_vblank.c#L1658

So pipe = crtc index (or offset) in the array of CRTCs, not the hardware
concept of a pipe. It's not the IGT inventing this terminology, and
there is already a precedent where the mapping doesn't have to be 1:1
(DRM Lease).

> In this case, naming is everything, and proper naming leads to clarity
> of the concepts and implementation.

crtc_index is also not awfully clear as it's too easy to confuse it with
crtc_id.

https://gitlab.freedesktop.org/mesa/drm/-/blob/master/xf86drmMode.h#L272


I am fine with IGT:
 1. using crtc_id for crtc_id
 2. using crtc_offset for the offset of that CRTC in the drmModeRes.crtcs
 3. using pipe to describe the hardware context

And I think that this patch series gets us there.


But I am afraid that we will diverge too much form kernel's vocabulary
which won't help with the core of the confusion.

Do you happen to know how the CRTC/pipe situation looks like with other
vendors?

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

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

* Re: [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-15 14:50   ` Arkadiusz Hiler
  2020-07-16 10:12     ` Jani Nikula
@ 2020-07-16 17:23     ` Khajapasha, Mohammed
  2020-07-16 18:07       ` Khajapasha, Mohammed
  1 sibling, 1 reply; 31+ messages in thread
From: Khajapasha, Mohammed @ 2020-07-16 17:23 UTC (permalink / raw)
  To: Hiler, Arkadiusz; +Cc: igt-dev



> -----Original Message-----
> From: Hiler, Arkadiusz <arkadiusz.hiler@intel.com>
> Sent: Wednesday, July 15, 2020 8:20 PM
> To: Khajapasha, Mohammed <mohammed.khajapasha@intel.com>
> Cc: igt-dev@lists.freedesktop.org; Jani Nikula <jani.nikula@linux.intel.com>
> Subject: Re: [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank
> using crtc offset
> 
> On Sun, Jul 12, 2020 at 01:36:01AM +0530, Mohammed Khajapasha wrote:
> > In i915 with non-contiguous pipes display, pipes always not same as
> > crtc index in display pipes array. Hence reading pipe id flags for a
> > vblank event using crtc offset.
> >
> > Signed-off-by: Mohammed Khajapasha
> <mohammed.khajapasha@intel.com>
> > ---
> >  lib/igt_kms.c | 51
> > +++++++++++++++++++++++++++++++++++----------------
> >  lib/igt_kms.h | 14 +++++++++++---
> >  2 files changed, 46 insertions(+), 19 deletions(-)
> >
> > diff --git a/lib/igt_kms.c b/lib/igt_kms.c index d56f2e56..5b9f2175
> > 100644
> > --- a/lib/igt_kms.c
> > +++ b/lib/igt_kms.c
> > @@ -1983,6 +1983,8 @@ void igt_display_require(igt_display_t *display,
> int drm_fd)
> >  		/* pipe is enabled/disabled */
> >  		pipe->enabled = true;
> >  		pipe->crtc_id = resources->crtcs[i];
> > +		/* offset of a pipe in crtcs list */
> > +		pipe->crtc_offset = i;
> >  	}
> >
> >  	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES,
> 1); @@
> > -4131,18 +4133,23 @@ void igt_pipe_request_out_fence(igt_pipe_t
> *pipe)
> >  /**
> >   * igt_wait_for_vblank_count:
> >   * @drm_fd: A drm file descriptor
> > - * @pipe: Pipe to wait_for_vblank on
> > + * @crtc_offset: offset of a Pipe to wait_for_vblank on
> >   * @count: Number of vblanks to wait on
> >   *
> > + * With non-contiguous pipe display, pipe mapping always
> > + * not same with crtc mapping, for i915 pipe is enum id of i915's
> > + crtc object
> > + * and pipe id not equal to crtc offset in mode config list hence
> > + passing
> > + * crtc offset to read vblank count for a pipe.
> > + *
> 
> Hey,
> 
> In KMS & i915 there are two thing that are called pipe:
> 
> 1. offset of the crtc in the mode resources array, it's used by
> drm_wait_vblank_ioctl
> 
> https://elixir.bootlin.com/linux/v5.7.8/source/drivers/gpu/drm/drm_vblank
> .c#L1658

I was grepping the reason for using "pipe" & "pipe_index" terminology for these variable,
And even in code certain bit & left shift operations done using DRM_VBLANK_HIGH_CRTC_SHIFT macro
If it is a pipe then they should have using a macro which contains PIPE, but in this it is CRTC_SHIFT.

> 
> 2. intel concept of a pipe with its separate numbering:
> 
> https://elixir.bootlin.com/linux/v5.7.8/source/drivers/gpu/drm/i915/display
> /intel_display.c#L16722
> 
> Those two concepts are incompatible. We can see this in the kms_lease
> tests - if we lease PIPE_C only it becomes PIPE_A for (1) and stays PIPE_C in
> the sense of (2).
> 
> Why is it so important that in IGT we use the (2) meaning? How are you
> planning on using it? Why the kernel can't hide the missing pipe from our
> sight just as it does when leasing?

Not sure why pipe terminology has been used from initial stage of IGT.
As per my understanding pipe is a H/W specific terminology used to represent a h/w crtc
Still if driver allows it can assign id for h/w crtc using mode config list index.

> 
> I see few options with non-continuous pipes:
> 
> a. keep pipe as it is now (so it actually is "crtc offset") as this is
>    what most of the IOCTLs expect. If you ever need to use the (2)
>    meaning of pipe you can use intel_get_pipe_from_crtc_id_ioctl there
> 
> b. same as above but rename PIPE_ prefix to CRTC_, so we end up with
>    CRTC_A, CRTC_B, CRTC_C, etc.
> 
> c. this patch series - we use the second meaning of pipe (2) and
>    introduce some complications for the sake of places where we need the
>    first meaning (1)
> 
> I think this series lacks justification why this option has been chosen
> - it may be me not understating something that you find obvious.
> 
> Is there any practical reason besides people wanting to have test results for
> pipe-c corresponding to Intel's hardware understanding of what pipe-c is?
> 
> You may need to ELI5 that to me. I have very rudimentary understanding of
> this area and only learned about the multiple meanings of "pipe"
> while doing the review here :-)
> 
> The code looks good otherwise.
> 
> --
> Cheers,
> Arek
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-16 17:23     ` Khajapasha, Mohammed
@ 2020-07-16 18:07       ` Khajapasha, Mohammed
  0 siblings, 0 replies; 31+ messages in thread
From: Khajapasha, Mohammed @ 2020-07-16 18:07 UTC (permalink / raw)
  To: Hiler, Arkadiusz; +Cc: igt-dev



> -----Original Message-----
> From: Khajapasha, Mohammed
> Sent: Thursday, July 16, 2020 10:53 PM
> To: Hiler, Arkadiusz <arkadiusz.hiler@intel.com>
> Cc: igt-dev@lists.freedesktop.org; Jani Nikula <jani.nikula@linux.intel.com>
> Subject: RE: [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank
> using crtc offset
> 
> 
> 
> > -----Original Message-----
> > From: Hiler, Arkadiusz <arkadiusz.hiler@intel.com>
> > Sent: Wednesday, July 15, 2020 8:20 PM
> > To: Khajapasha, Mohammed <mohammed.khajapasha@intel.com>
> > Cc: igt-dev@lists.freedesktop.org; Jani Nikula
> > <jani.nikula@linux.intel.com>
> > Subject: Re: [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a
> > vblank using crtc offset
> >
> > On Sun, Jul 12, 2020 at 01:36:01AM +0530, Mohammed Khajapasha wrote:
> > > In i915 with non-contiguous pipes display, pipes always not same as
> > > crtc index in display pipes array. Hence reading pipe id flags for a
> > > vblank event using crtc offset.
> > >
> > > Signed-off-by: Mohammed Khajapasha
> > <mohammed.khajapasha@intel.com>
> > > ---
> > >  lib/igt_kms.c | 51
> > > +++++++++++++++++++++++++++++++++++----------------
> > >  lib/igt_kms.h | 14 +++++++++++---
> > >  2 files changed, 46 insertions(+), 19 deletions(-)
> > >
> > > diff --git a/lib/igt_kms.c b/lib/igt_kms.c index d56f2e56..5b9f2175
> > > 100644
> > > --- a/lib/igt_kms.c
> > > +++ b/lib/igt_kms.c
> > > @@ -1983,6 +1983,8 @@ void igt_display_require(igt_display_t
> > > *display,
> > int drm_fd)
> > >  		/* pipe is enabled/disabled */
> > >  		pipe->enabled = true;
> > >  		pipe->crtc_id = resources->crtcs[i];
> > > +		/* offset of a pipe in crtcs list */
> > > +		pipe->crtc_offset = i;
> > >  	}
> > >
> > >  	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES,
> > 1); @@
> > > -4131,18 +4133,23 @@ void igt_pipe_request_out_fence(igt_pipe_t
> > *pipe)
> > >  /**
> > >   * igt_wait_for_vblank_count:
> > >   * @drm_fd: A drm file descriptor
> > > - * @pipe: Pipe to wait_for_vblank on
> > > + * @crtc_offset: offset of a Pipe to wait_for_vblank on
> > >   * @count: Number of vblanks to wait on
> > >   *
> > > + * With non-contiguous pipe display, pipe mapping always
> > > + * not same with crtc mapping, for i915 pipe is enum id of i915's
> > > + crtc object
> > > + * and pipe id not equal to crtc offset in mode config list hence
> > > + passing
> > > + * crtc offset to read vblank count for a pipe.
> > > + *
> >
> > Hey,
> >
> > In KMS & i915 there are two thing that are called pipe:
> >
> > 1. offset of the crtc in the mode resources array, it's used by
> > drm_wait_vblank_ioctl
> >
> > https://elixir.bootlin.com/linux/v5.7.8/source/drivers/gpu/drm/drm_vbl
> > ank
> > .c#L1658
> 
> I was grepping the reason for using "pipe" & "pipe_index" terminology for
> these variable, And even in code certain bit & left shift operations done
> using DRM_VBLANK_HIGH_CRTC_SHIFT macro If it is a pipe then they
> should have using a macro which contains PIPE, but in this it is CRTC_SHIFT.

From below code snippet from drm_vblank_init() fn and 'struct drm_vblank_crtc'
the pipe nothing but a crtc index only.

Snippet
/*
/**
* @vblank:
*
* Array of vblank tracking structures, one per &struct drm_crtc. For
* historical reasons (vblank support predates kernel modesetting) this
* is free-standing and not part of &struct drm_crtc itself. It must be
* initialized explicitly by calling drm_vblank_init().
*/
struct drm_vblank_crtc *vblank;
int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs)
{
	/*
	*/

    for (i = 0; i < num_crtcs; i++) {
        struct drm_vblank_crtc *vblank = &dev->vblank[i];

        vblank->dev = dev;
        vblank->pipe = i;



struct drm_vblank_crtc {
	/*
	*/
/**
 * @pipe: drm_crtc_index() of the &drm_crtc corresponding to this
 * structure.
 */
unsigned int pipe;

*/
end of snippet

> >
> > 2. intel concept of a pipe with its separate numbering:
> >
> > https://elixir.bootlin.com/linux/v5.7.8/source/drivers/gpu/drm/i915/di
> > splay
> > /intel_display.c#L16722
> >
> > Those two concepts are incompatible. We can see this in the kms_lease
> > tests - if we lease PIPE_C only it becomes PIPE_A for (1) and stays
> > PIPE_C in the sense of (2).
> >
> > Why is it so important that in IGT we use the (2) meaning? How are you
> > planning on using it? Why the kernel can't hide the missing pipe from
> > our sight just as it does when leasing?
> 
> Not sure why pipe terminology has been used from initial stage of IGT.
> As per my understanding pipe is a H/W specific terminology used to
> represent a h/w crtc Still if driver allows it can assign id for h/w crtc using
> mode config list index.
> 
> >
> > I see few options with non-continuous pipes:
> >
> > a. keep pipe as it is now (so it actually is "crtc offset") as this is
> >    what most of the IOCTLs expect. If you ever need to use the (2)
> >    meaning of pipe you can use intel_get_pipe_from_crtc_id_ioctl there
> >
> > b. same as above but rename PIPE_ prefix to CRTC_, so we end up with
> >    CRTC_A, CRTC_B, CRTC_C, etc.
> >
> > c. this patch series - we use the second meaning of pipe (2) and
> >    introduce some complications for the sake of places where we need the
> >    first meaning (1)
> >
> > I think this series lacks justification why this option has been
> > chosen
> > - it may be me not understating something that you find obvious.
> >
> > Is there any practical reason besides people wanting to have test
> > results for pipe-c corresponding to Intel's hardware understanding of
> what pipe-c is?
> >
> > You may need to ELI5 that to me. I have very rudimentary understanding
> > of this area and only learned about the multiple meanings of "pipe"
> > while doing the review here :-)
> >
> > The code looks good otherwise.
> >
> > --
> > Cheers,
> > Arek
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
  2020-07-15 14:50   ` Arkadiusz Hiler
@ 2020-07-17 13:02   ` Arkadiusz Hiler
  2020-07-17 15:43     ` Khajapasha, Mohammed
  1 sibling, 1 reply; 31+ messages in thread
From: Arkadiusz Hiler @ 2020-07-17 13:02 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev

On Sun, Jul 12, 2020 at 01:36:01AM +0530, Mohammed Khajapasha wrote:
> In i915 with non-contiguous pipes display, pipes always not same
> as crtc index in display pipes array. Hence reading pipe id flags
> for a vblank event using crtc offset.

Mention in the commit message that crtc_offset was chosen because
crtc_index is too close to crtc_id which can cause confusion.

> Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
> ---
>  lib/igt_kms.c | 51 +++++++++++++++++++++++++++++++++++----------------
>  lib/igt_kms.h | 14 +++++++++++---
>  2 files changed, 46 insertions(+), 19 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index d56f2e56..5b9f2175 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1983,6 +1983,8 @@ void igt_display_require(igt_display_t *display, int drm_fd)
>  		/* pipe is enabled/disabled */
>  		pipe->enabled = true;
>  		pipe->crtc_id = resources->crtcs[i];
> +		/* offset of a pipe in crtcs list */
> +		pipe->crtc_offset = i;
>  	}
>  
>  	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
> @@ -4131,18 +4133,23 @@ void igt_pipe_request_out_fence(igt_pipe_t *pipe)
>  /**
>   * igt_wait_for_vblank_count:
>   * @drm_fd: A drm file descriptor
> - * @pipe: Pipe to wait_for_vblank on
> + * @crtc_offset: offset of a Pipe to wait_for_vblank on

I would change that to:

@crtc_offset: offset of the crtc in drmModeRes.crtcs


>   * @count: Number of vblanks to wait on
>   *
> + * With non-contiguous pipe display, pipe mapping always
> + * not same with crtc mapping, for i915 pipe is enum id of i915's crtc object
> + * and pipe id not equal to crtc offset in mode config list hence passing
> + * crtc offset to read vblank count for a pipe.
> + *

I would change that to:

What kernel addressed internally as a "pipe" for DRM_IOCTL_WAIT_VBLANK
is actually a crtc_offset of a given crtc in drmModeRes.crtcs. It may
not correspond to HW concept of a pipe (e.g. with DRM lease or
non-contiguous pipes).


>   * Waits for a given number of vertical blank intervals
>   */
> -void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
> +void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count)
>  {
>  	drmVBlank wait_vbl;
>  	uint32_t pipe_id_flag;
>  
>  	memset(&wait_vbl, 0, sizeof(wait_vbl));
> -	pipe_id_flag = kmstest_get_vbl_flag(pipe);
> +	pipe_id_flag = kmstest_get_vbl_flag(crtc_offset);
>  
>  	wait_vbl.request.type = DRM_VBLANK_RELATIVE;
>  	wait_vbl.request.type |= pipe_id_flag;
> @@ -4154,13 +4161,18 @@ void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
>  /**
>   * igt_wait_for_vblank:
>   * @drm_fd: A drm file descriptor
> - * @pipe: Pipe to wait_for_vblank on
> + * @crtc_offset: offset of a Pipe to wait_for_vblank on

use the same description as above

> + *
> + * With non-contiguous pipe display, pipe mapping always
> + * not same with crtc mapping, for i915 pipe is enum id of i915's crtc object
> + * and pipe id not equal to crtc offset in mode config list hence passing
> + * crtc offset to read vblank count for a pipe.

Instead of duplicating the comment here I would just refer the reader to
igt_wait_for_vblank_count()'s documentation. e.g.:

Wait for a single vblank. See #igt_wait_for_vblank_count for more
details.

>   *
>   * Waits for 1 vertical blank intervals
>   */
> -void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
> +void igt_wait_for_vblank(int drm_fd, int crtc_offset)
>  {
> -	igt_wait_for_vblank_count(drm_fd, pipe, 1);
> +	igt_wait_for_vblank_count(drm_fd, crtc_offset, 1);
>  }
>  
>  /**
> @@ -4383,22 +4395,29 @@ void igt_cleanup_uevents(struct udev_monitor *mon)
>  
>  /**
>   * kmstest_get_vbl_flag:
> - * @pipe_id: Pipe to convert to flag representation.
> + * @crtc_offset: CRTC offset to convert into pipe flag representation.
>   *
> - * Convert a pipe id into the flag representation
> - * expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
> + * With non-contiguous pipe display, pipe mapping always
> + * not same with crtc mapping, for i915 pipe is enum id of i915's crtc object
> + * and pipe id not equal to crtc offset in mode config list hence passing
> + * crtc offset of a pipe to convert into the pipe flag representation
> + * which expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.

Same here. I would avoid referring to i915 and instead explain that in
the terms of vocabulary. E.g.:

Convert an offset of an crtc in drmModeRes.crtcs into the flag
representation expected by DRM_IOCTL_WAIT_VBLANK. See
#igt_wait_for_vblank_count for details.

>   */
> -uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
> +uint32_t kmstest_get_vbl_flag(int crtc_offset)
>  {
> -	if (pipe_id == 0)
> -		return 0;
> -	else if (pipe_id == 1)
> -		return _DRM_VBLANK_SECONDARY;
> +	uint32_t pipe_id;
> +
> +	if (crtc_offset == 0)
> +		pipe_id = 0;
> +	else if (crtc_offset == 1)
> +		pipe_id = _DRM_VBLANK_SECONDARY;
>  	else {
> -		uint32_t pipe_flag = pipe_id << 1;
> +		uint32_t pipe_flag = crtc_offset << 1;
>  		igt_assert(!(pipe_flag & ~DRM_VBLANK_HIGH_CRTC_MASK));
> -		return pipe_flag;
> +		pipe_id = pipe_flag;
>  	}
> +
> +	return pipe_id;
>  }
>  
>  static inline const uint32_t *
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 7109c9a5..162c4850 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -338,8 +338,14 @@ typedef struct igt_plane {
>  	int format_mod_count;
>  } igt_plane_t;
>  
> +/*
> + * In i915, with non-contiguous pipe display, a pipe is not always
> + * same as a crtc mapping in display, pipe is enum id of a i915's crtc object
> + * using crtc offset to get the offset of a pipe from mode config list
> + */
>  struct igt_pipe {
>  	igt_display_t *display;
> +	/* Id of a pipe object */

/* ID of a hardware pipe */

>  	enum pipe pipe;
>  	/* pipe is enabled or not */
>  	bool enabled;
> @@ -354,6 +360,8 @@ struct igt_pipe {
>  	uint64_t values[IGT_NUM_CRTC_PROPS];
>  

/* ID of KMS CRTC object */
>  	uint32_t crtc_id;


> +	/* crtc offset of a pipe in mode config list */

/*
 * Offset of crtc in drmModeRes.crtc used by some IOCTLs and sometimes
 * confusingly called pipe_index or pipe in the kernel.
 *
 * It may correspond to hardware pipes but doesn't have to in case of
 * e.g.: DRM lease or non-contiguous pipes.
 *
 * See #igt_wait_for_vblank_count
 */

> +	uint32_t crtc_offset;

Sorry if my expectations weren't clear to you - they were not clear to
me either, as I was figuring those things along the way.

My main gripe was with the comments and explanations. They focus too
much on i915 and our non-contiguous pipes instead of trying to
straighten the vocabulary and make sure that we draw a hard distinction
of what's a pipe and what's a crtc_offset. Some of the function
documentation was still using those interchangeably.

You can find suggestion on how to fix that above. Please make sure that
they make sense :-)

Also keep in mind that everything you contained in the cover letter
doesn't get preserved after the series get merged, so everything
important from there should get spread around in form of comments and
commit messages.

-- 
Cheers,
Arek

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

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

* Re: [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-17 13:02   ` Arkadiusz Hiler
@ 2020-07-17 15:43     ` Khajapasha, Mohammed
  2020-07-20  9:44       ` Arkadiusz Hiler
  0 siblings, 1 reply; 31+ messages in thread
From: Khajapasha, Mohammed @ 2020-07-17 15:43 UTC (permalink / raw)
  To: Hiler, Arkadiusz; +Cc: igt-dev



> -----Original Message-----
> From: Hiler, Arkadiusz <arkadiusz.hiler@intel.com>
> Sent: Friday, July 17, 2020 6:33 PM
> To: Khajapasha, Mohammed <mohammed.khajapasha@intel.com>
> Cc: igt-dev@lists.freedesktop.org
> Subject: Re: [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank
> using crtc offset
> 
> On Sun, Jul 12, 2020 at 01:36:01AM +0530, Mohammed Khajapasha wrote:
> > In i915 with non-contiguous pipes display, pipes always not same as
> > crtc index in display pipes array. Hence reading pipe id flags for a
> > vblank event using crtc offset.
> 
> Mention in the commit message that crtc_offset was chosen because
> crtc_index is too close to crtc_id which can cause confusion.

As per my understanding crtc_index and crtc_id are different, crtc_id is DRM mode object id
assigned by DRM for each drm object. And crtc_index & crtc_offset both are same for list
crtc in mode config list.
 
> 
> > Signed-off-by: Mohammed Khajapasha
> <mohammed.khajapasha@intel.com>
> > ---
> >  lib/igt_kms.c | 51
> > +++++++++++++++++++++++++++++++++++----------------
> >  lib/igt_kms.h | 14 +++++++++++---
> >  2 files changed, 46 insertions(+), 19 deletions(-)
> >
> > diff --git a/lib/igt_kms.c b/lib/igt_kms.c index d56f2e56..5b9f2175
> > 100644
> > --- a/lib/igt_kms.c
> > +++ b/lib/igt_kms.c
> > @@ -1983,6 +1983,8 @@ void igt_display_require(igt_display_t *display,
> int drm_fd)
> >  		/* pipe is enabled/disabled */
> >  		pipe->enabled = true;
> >  		pipe->crtc_id = resources->crtcs[i];
> > +		/* offset of a pipe in crtcs list */
> > +		pipe->crtc_offset = i;
> >  	}
> >
> >  	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES,
> 1); @@
> > -4131,18 +4133,23 @@ void igt_pipe_request_out_fence(igt_pipe_t
> *pipe)
> >  /**
> >   * igt_wait_for_vblank_count:
> >   * @drm_fd: A drm file descriptor
> > - * @pipe: Pipe to wait_for_vblank on
> > + * @crtc_offset: offset of a Pipe to wait_for_vblank on
> 
> I would change that to:
> 
> @crtc_offset: offset of the crtc in drmModeRes.crtcs
> 
> 
> >   * @count: Number of vblanks to wait on
> >   *
> > + * With non-contiguous pipe display, pipe mapping always
> > + * not same with crtc mapping, for i915 pipe is enum id of i915's
> > + crtc object
> > + * and pipe id not equal to crtc offset in mode config list hence
> > + passing
> > + * crtc offset to read vblank count for a pipe.
> > + *
> 
> I would change that to:
> 
> What kernel addressed internally as a "pipe" for DRM_IOCTL_WAIT_VBLANK
> is actually a crtc_offset of a given crtc in drmModeRes.crtcs. It may not
> correspond to HW concept of a pipe (e.g. with DRM lease or non-
> contiguous pipes).
> 
> 
> >   * Waits for a given number of vertical blank intervals
> >   */
> > -void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
> > +void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int
> > +count)
> >  {
> >  	drmVBlank wait_vbl;
> >  	uint32_t pipe_id_flag;
> >
> >  	memset(&wait_vbl, 0, sizeof(wait_vbl));
> > -	pipe_id_flag = kmstest_get_vbl_flag(pipe);
> > +	pipe_id_flag = kmstest_get_vbl_flag(crtc_offset);
> >
> >  	wait_vbl.request.type = DRM_VBLANK_RELATIVE;
> >  	wait_vbl.request.type |= pipe_id_flag; @@ -4154,13 +4161,18 @@
> void
> > igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
> >  /**
> >   * igt_wait_for_vblank:
> >   * @drm_fd: A drm file descriptor
> > - * @pipe: Pipe to wait_for_vblank on
> > + * @crtc_offset: offset of a Pipe to wait_for_vblank on
> 
> use the same description as above
> 
> > + *
> > + * With non-contiguous pipe display, pipe mapping always
> > + * not same with crtc mapping, for i915 pipe is enum id of i915's
> > + crtc object
> > + * and pipe id not equal to crtc offset in mode config list hence
> > + passing
> > + * crtc offset to read vblank count for a pipe.
> 
> Instead of duplicating the comment here I would just refer the reader to
> igt_wait_for_vblank_count()'s documentation. e.g.:
> 
> Wait for a single vblank. See #igt_wait_for_vblank_count for more details.
> 
> >   *
> >   * Waits for 1 vertical blank intervals
> >   */
> > -void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
> > +void igt_wait_for_vblank(int drm_fd, int crtc_offset)
> >  {
> > -	igt_wait_for_vblank_count(drm_fd, pipe, 1);
> > +	igt_wait_for_vblank_count(drm_fd, crtc_offset, 1);
> >  }
> >
> >  /**
> > @@ -4383,22 +4395,29 @@ void igt_cleanup_uevents(struct
> udev_monitor
> > *mon)
> >
> >  /**
> >   * kmstest_get_vbl_flag:
> > - * @pipe_id: Pipe to convert to flag representation.
> > + * @crtc_offset: CRTC offset to convert into pipe flag representation.
> >   *
> > - * Convert a pipe id into the flag representation
> > - * expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
> > + * With non-contiguous pipe display, pipe mapping always
> > + * not same with crtc mapping, for i915 pipe is enum id of i915's
> > + crtc object
> > + * and pipe id not equal to crtc offset in mode config list hence
> > + passing
> > + * crtc offset of a pipe to convert into the pipe flag representation
> > + * which expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
> 
> Same here. I would avoid referring to i915 and instead explain that in the
> terms of vocabulary. E.g.:
> 
> Convert an offset of an crtc in drmModeRes.crtcs into the flag
> representation expected by DRM_IOCTL_WAIT_VBLANK. See
> #igt_wait_for_vblank_count for details.
> 
> >   */
> > -uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
> > +uint32_t kmstest_get_vbl_flag(int crtc_offset)
> >  {
> > -	if (pipe_id == 0)
> > -		return 0;
> > -	else if (pipe_id == 1)
> > -		return _DRM_VBLANK_SECONDARY;
> > +	uint32_t pipe_id;
> > +
> > +	if (crtc_offset == 0)
> > +		pipe_id = 0;
> > +	else if (crtc_offset == 1)
> > +		pipe_id = _DRM_VBLANK_SECONDARY;
> >  	else {
> > -		uint32_t pipe_flag = pipe_id << 1;
> > +		uint32_t pipe_flag = crtc_offset << 1;
> >  		igt_assert(!(pipe_flag &
> ~DRM_VBLANK_HIGH_CRTC_MASK));
> > -		return pipe_flag;
> > +		pipe_id = pipe_flag;
> >  	}
> > +
> > +	return pipe_id;
> >  }
> >
> >  static inline const uint32_t *
> > diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 7109c9a5..162c4850
> > 100644
> > --- a/lib/igt_kms.h
> > +++ b/lib/igt_kms.h
> > @@ -338,8 +338,14 @@ typedef struct igt_plane {
> >  	int format_mod_count;
> >  } igt_plane_t;
> >
> > +/*
> > + * In i915, with non-contiguous pipe display, a pipe is not always
> > + * same as a crtc mapping in display, pipe is enum id of a i915's
> > +crtc object
> > + * using crtc offset to get the offset of a pipe from mode config
> > +list  */
> >  struct igt_pipe {
> >  	igt_display_t *display;
> > +	/* Id of a pipe object */
> 
> /* ID of a hardware pipe */
> 
> >  	enum pipe pipe;
> >  	/* pipe is enabled or not */
> >  	bool enabled;
> > @@ -354,6 +360,8 @@ struct igt_pipe {
> >  	uint64_t values[IGT_NUM_CRTC_PROPS];
> >
> 
> /* ID of KMS CRTC object */
> >  	uint32_t crtc_id;
> 
> 
> > +	/* crtc offset of a pipe in mode config list */
> 
> /*
>  * Offset of crtc in drmModeRes.crtc used by some IOCTLs and sometimes
>  * confusingly called pipe_index or pipe in the kernel.
>  *
>  * It may correspond to hardware pipes but doesn't have to in case of
>  * e.g.: DRM lease or non-contiguous pipes.
>  *
>  * See #igt_wait_for_vblank_count
>  */
> 
> > +	uint32_t crtc_offset;
> 
> Sorry if my expectations weren't clear to you - they were not clear to me
> either, as I was figuring those things along the way.
> 
> My main gripe was with the comments and explanations. They focus too
> much on i915 and our non-contiguous pipes instead of trying to straighten
> the vocabulary and make sure that we draw a hard distinction of what's a
> pipe and what's a crtc_offset. Some of the function documentation was still
> using those interchangeably.
> 
> You can find suggestion on how to fix that above. Please make sure that
> they make sense :-)
> 
> Also keep in mind that everything you contained in the cover letter doesn't
> get preserved after the series get merged, so everything important from
> there should get spread around in form of comments and commit
> messages.
> 
> --
> Cheers,
> Arek

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

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

* Re: [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-17 15:43     ` Khajapasha, Mohammed
@ 2020-07-20  9:44       ` Arkadiusz Hiler
  0 siblings, 0 replies; 31+ messages in thread
From: Arkadiusz Hiler @ 2020-07-20  9:44 UTC (permalink / raw)
  To: Khajapasha, Mohammed; +Cc: igt-dev

On Fri, Jul 17, 2020 at 06:43:59PM +0300, Khajapasha, Mohammed wrote:
> 
> 
> > -----Original Message-----
> > From: Hiler, Arkadiusz <arkadiusz.hiler@intel.com>
> > Sent: Friday, July 17, 2020 6:33 PM
> > To: Khajapasha, Mohammed <mohammed.khajapasha@intel.com>
> > Cc: igt-dev@lists.freedesktop.org
> > Subject: Re: [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank
> > using crtc offset
> >
> > On Sun, Jul 12, 2020 at 01:36:01AM +0530, Mohammed Khajapasha wrote:
> > > In i915 with non-contiguous pipes display, pipes always not same as
> > > crtc index in display pipes array. Hence reading pipe id flags for a
> > > vblank event using crtc offset.
> >
> > Mention in the commit message that crtc_offset was chosen because
> > crtc_index is too close to crtc_id which can cause confusion.
> 
> As per my understanding crtc_index and crtc_id are different, crtc_id is DRM mode object id
> assigned by DRM for each drm object. And crtc_index & crtc_offset both are same for list
> crtc in mode config list.

Yes, you are correct. IMO crtc_offset is a better name than crtc_index.

Imagine having crtc_id and crtc_index sprinkled all throughout the code.
It's very easy to mistake one for the other.

It's harder to make a similar mistake with crtc_id and crtc_offset.

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

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

* [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-20 15:20 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-07-20 15:20 ` Mohammed Khajapasha
  0 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-20 15:20 UTC (permalink / raw)
  To: arkadiusz.hiler, igt-dev

In i915 with non-contiguous pipes display, pipes always not same
as crtc index in display pipes array. Hence reading pipe id flags
for a vblank event using crtc offset.

Example:
With PIPE_A & PIPE_D enabled and PIPE_B & PIPE_C disabled
configuration, pipe enum ids for pipe A & D are '0' and '3',
and crtc offsets in mode config list for pipe A & D are '0' and '1'
hence using crtc offset to read a vblank event for a pipe, as
DRM vblank ioctl expect crtc offset for a pipe.

v3:
    Addressed review comments for documentation <Hiler, Arkadiusz>

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 lib/igt_kms.c | 50 ++++++++++++++++++++++++++++++++++----------------
 lib/igt_kms.h | 16 +++++++++++++---
 2 files changed, 47 insertions(+), 19 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index d56f2e56..f57972f1 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1983,6 +1983,8 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 		/* pipe is enabled/disabled */
 		pipe->enabled = true;
 		pipe->crtc_id = resources->crtcs[i];
+		/* offset of a pipe in crtcs list */
+		pipe->crtc_offset = i;
 	}
 
 	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
@@ -4131,18 +4133,27 @@ void igt_pipe_request_out_fence(igt_pipe_t *pipe)
 /**
  * igt_wait_for_vblank_count:
  * @drm_fd: A drm file descriptor
- * @pipe: Pipe to wait_for_vblank on
+ * @crtc_offset: offset of the crtc in drmModeRes.crtcs
  * @count: Number of vblanks to wait on
  *
  * Waits for a given number of vertical blank intervals
+ *
+ * In DRM, 'Pipe', as understood by DRM_IOCTL_WAIT_VBLANK,
+ * is actually an offset of crtc in drmModeRes.crtcs
+ * and it has nothing to do with a hardware concept of a pipe.
+ * They can match but don't have to in case of DRM lease or
+ * non-contiguous pipes.
+ *
+ * To make thing clear we are calling DRM_IOCTL_WAIT_VBLANK's 'pipe'
+ * a crtc_offset.
  */
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count)
 {
 	drmVBlank wait_vbl;
 	uint32_t pipe_id_flag;
 
 	memset(&wait_vbl, 0, sizeof(wait_vbl));
-	pipe_id_flag = kmstest_get_vbl_flag(pipe);
+	pipe_id_flag = kmstest_get_vbl_flag(crtc_offset);
 
 	wait_vbl.request.type = DRM_VBLANK_RELATIVE;
 	wait_vbl.request.type |= pipe_id_flag;
@@ -4154,13 +4165,15 @@ void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
 /**
  * igt_wait_for_vblank:
  * @drm_fd: A drm file descriptor
- * @pipe: Pipe to wait_for_vblank on
+ * @crtc_offset: offset of a crtc in drmModeRes.crtcs
+ *
+ * See #igt_wait_for_vblank_count for more details
  *
  * Waits for 1 vertical blank intervals
  */
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
+void igt_wait_for_vblank(int drm_fd, int crtc_offset)
 {
-	igt_wait_for_vblank_count(drm_fd, pipe, 1);
+	igt_wait_for_vblank_count(drm_fd, crtc_offset, 1);
 }
 
 /**
@@ -4383,22 +4396,27 @@ void igt_cleanup_uevents(struct udev_monitor *mon)
 
 /**
  * kmstest_get_vbl_flag:
- * @pipe_id: Pipe to convert to flag representation.
+ * @crtc_offset: CRTC offset to convert into pipe flag representation.
  *
- * Convert a pipe id into the flag representation
- * expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
+ * Convert an offset of an crtc in drmModeRes.crtcs into flag representation
+ * expected by DRM_IOCTL_WAIT_VBLANK.
+ * See #igt_wait_for_vblank_count for details
  */
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
+uint32_t kmstest_get_vbl_flag(int crtc_offset)
 {
-	if (pipe_id == 0)
-		return 0;
-	else if (pipe_id == 1)
-		return _DRM_VBLANK_SECONDARY;
+	uint32_t pipe_id;
+
+	if (crtc_offset == 0)
+		pipe_id = 0;
+	else if (crtc_offset == 1)
+		pipe_id = _DRM_VBLANK_SECONDARY;
 	else {
-		uint32_t pipe_flag = pipe_id << 1;
+		uint32_t pipe_flag = crtc_offset << 1;
 		igt_assert(!(pipe_flag & ~DRM_VBLANK_HIGH_CRTC_MASK));
-		return pipe_flag;
+		pipe_id = pipe_flag;
 	}
+
+	return pipe_id;
 }
 
 static inline const uint32_t *
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 7109c9a5..26dc9f5f 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -338,8 +338,15 @@ typedef struct igt_plane {
 	int format_mod_count;
 } igt_plane_t;
 
+/*
+ * This struct represents a hardware pipe
+ *
+ * DRM_IOCTL_WAIT_VBLANK notion of pipe is confusing and we are using
+ * crtc_offset instead (refer people to #igt_wait_for_vblank_count)
+ */
 struct igt_pipe {
 	igt_display_t *display;
+	/* ID of a hardware pipe */
 	enum pipe pipe;
 	/* pipe is enabled or not */
 	bool enabled;
@@ -353,7 +360,10 @@ struct igt_pipe {
 	uint32_t props[IGT_NUM_CRTC_PROPS];
 	uint64_t values[IGT_NUM_CRTC_PROPS];
 
+	/* ID of KMS CRTC object */
 	uint32_t crtc_id;
+	/* offset of a pipe in drmModeRes.crtcs */
+	uint32_t crtc_offset;
 
 	int32_t out_fence_fd;
 };
@@ -448,8 +458,8 @@ void igt_fb_set_position(struct igt_fb *fb, igt_plane_t *plane,
 void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane,
 	uint32_t w, uint32_t h);
 
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe);
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count);
+void igt_wait_for_vblank(int drm_fd, int crtc_offset);
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count);
 
 static inline bool igt_output_is_connected(igt_output_t *output)
 {
@@ -769,7 +779,7 @@ void igt_pipe_refresh(igt_display_t *display, enum pipe pipe, bool force);
 void igt_enable_connectors(int drm_fd);
 void igt_reset_connectors(void);
 
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id);
+uint32_t kmstest_get_vbl_flag(int crtc_offset);
 
 const struct edid *igt_kms_get_base_edid(void);
 const struct edid *igt_kms_get_alt_edid(void);
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-20 11:48 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-07-20 11:48 ` Mohammed Khajapasha
  0 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-20 11:48 UTC (permalink / raw)
  To: arkadiusz.hiler, igt-dev

In i915 with non-contiguous pipes display, pipes always not same
as crtc index in display pipes array. Hence reading pipe id flags
for a vblank event using crtc offset.

Example:
With PIPE_A & PIPE_D enabled and PIPE_B & PIPE_C disabled
configuration, pipe enum ids for pipe A & D are '0' and '3',
and crtc offsets in mode config list for pipe A & D are '0' and '1'
hence using crtc offset to read a vblank event for a pipe, as
DRM vblank ioctl expect crtc offset for a pipe.

v3:
    Addressed review comments for documentation <Hiler, Arkadiusz>

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 lib/igt_kms.c | 50 ++++++++++++++++++++++++++++++++++----------------
 lib/igt_kms.h | 16 +++++++++++++---
 2 files changed, 47 insertions(+), 19 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index d56f2e56..f57972f1 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1983,6 +1983,8 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 		/* pipe is enabled/disabled */
 		pipe->enabled = true;
 		pipe->crtc_id = resources->crtcs[i];
+		/* offset of a pipe in crtcs list */
+		pipe->crtc_offset = i;
 	}
 
 	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
@@ -4131,18 +4133,27 @@ void igt_pipe_request_out_fence(igt_pipe_t *pipe)
 /**
  * igt_wait_for_vblank_count:
  * @drm_fd: A drm file descriptor
- * @pipe: Pipe to wait_for_vblank on
+ * @crtc_offset: offset of the crtc in drmModeRes.crtcs
  * @count: Number of vblanks to wait on
  *
  * Waits for a given number of vertical blank intervals
+ *
+ * In DRM, 'Pipe', as understood by DRM_IOCTL_WAIT_VBLANK,
+ * is actually an offset of crtc in drmModeRes.crtcs
+ * and it has nothing to do with a hardware concept of a pipe.
+ * They can match but don't have to in case of DRM lease or
+ * non-contiguous pipes.
+ *
+ * To make thing clear we are calling DRM_IOCTL_WAIT_VBLANK's 'pipe'
+ * a crtc_offset.
  */
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count)
 {
 	drmVBlank wait_vbl;
 	uint32_t pipe_id_flag;
 
 	memset(&wait_vbl, 0, sizeof(wait_vbl));
-	pipe_id_flag = kmstest_get_vbl_flag(pipe);
+	pipe_id_flag = kmstest_get_vbl_flag(crtc_offset);
 
 	wait_vbl.request.type = DRM_VBLANK_RELATIVE;
 	wait_vbl.request.type |= pipe_id_flag;
@@ -4154,13 +4165,15 @@ void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
 /**
  * igt_wait_for_vblank:
  * @drm_fd: A drm file descriptor
- * @pipe: Pipe to wait_for_vblank on
+ * @crtc_offset: offset of a crtc in drmModeRes.crtcs
+ *
+ * See #igt_wait_for_vblank_count for more details
  *
  * Waits for 1 vertical blank intervals
  */
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
+void igt_wait_for_vblank(int drm_fd, int crtc_offset)
 {
-	igt_wait_for_vblank_count(drm_fd, pipe, 1);
+	igt_wait_for_vblank_count(drm_fd, crtc_offset, 1);
 }
 
 /**
@@ -4383,22 +4396,27 @@ void igt_cleanup_uevents(struct udev_monitor *mon)
 
 /**
  * kmstest_get_vbl_flag:
- * @pipe_id: Pipe to convert to flag representation.
+ * @crtc_offset: CRTC offset to convert into pipe flag representation.
  *
- * Convert a pipe id into the flag representation
- * expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
+ * Convert an offset of an crtc in drmModeRes.crtcs into flag representation
+ * expected by DRM_IOCTL_WAIT_VBLANK.
+ * See #igt_wait_for_vblank_count for details
  */
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
+uint32_t kmstest_get_vbl_flag(int crtc_offset)
 {
-	if (pipe_id == 0)
-		return 0;
-	else if (pipe_id == 1)
-		return _DRM_VBLANK_SECONDARY;
+	uint32_t pipe_id;
+
+	if (crtc_offset == 0)
+		pipe_id = 0;
+	else if (crtc_offset == 1)
+		pipe_id = _DRM_VBLANK_SECONDARY;
 	else {
-		uint32_t pipe_flag = pipe_id << 1;
+		uint32_t pipe_flag = crtc_offset << 1;
 		igt_assert(!(pipe_flag & ~DRM_VBLANK_HIGH_CRTC_MASK));
-		return pipe_flag;
+		pipe_id = pipe_flag;
 	}
+
+	return pipe_id;
 }
 
 static inline const uint32_t *
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 7109c9a5..26dc9f5f 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -338,8 +338,15 @@ typedef struct igt_plane {
 	int format_mod_count;
 } igt_plane_t;
 
+/*
+ * This struct represents a hardware pipe
+ *
+ * DRM_IOCTL_WAIT_VBLANK notion of pipe is confusing and we are using
+ * crtc_offset instead (refer people to #igt_wait_for_vblank_count)
+ */
 struct igt_pipe {
 	igt_display_t *display;
+	/* ID of a hardware pipe */
 	enum pipe pipe;
 	/* pipe is enabled or not */
 	bool enabled;
@@ -353,7 +360,10 @@ struct igt_pipe {
 	uint32_t props[IGT_NUM_CRTC_PROPS];
 	uint64_t values[IGT_NUM_CRTC_PROPS];
 
+	/* ID of KMS CRTC object */
 	uint32_t crtc_id;
+	/* offset of a pipe in drmModeRes.crtcs */
+	uint32_t crtc_offset;
 
 	int32_t out_fence_fd;
 };
@@ -448,8 +458,8 @@ void igt_fb_set_position(struct igt_fb *fb, igt_plane_t *plane,
 void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane,
 	uint32_t w, uint32_t h);
 
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe);
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count);
+void igt_wait_for_vblank(int drm_fd, int crtc_offset);
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count);
 
 static inline bool igt_output_is_connected(igt_output_t *output)
 {
@@ -769,7 +779,7 @@ void igt_pipe_refresh(igt_display_t *display, enum pipe pipe, bool force);
 void igt_enable_connectors(int drm_fd);
 void igt_reset_connectors(void);
 
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id);
+uint32_t kmstest_get_vbl_flag(int crtc_offset);
 
 const struct edid *igt_kms_get_base_edid(void);
 const struct edid *igt_kms_get_alt_edid(void);
-- 
2.24.1

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

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

* Re: [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-17 15:41 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
@ 2020-07-20  9:35   ` Arkadiusz Hiler
  0 siblings, 0 replies; 31+ messages in thread
From: Arkadiusz Hiler @ 2020-07-20  9:35 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev, petri.latvala, kishore.kunche

On Fri, Jul 17, 2020 at 03:41:00PM +0000, Mohammed Khajapasha wrote:
> In i915 with non-contiguous pipes display, pipes always not same
> as crtc index in display pipes array. Hence reading pipe id flags
> for a vblank event using crtc offset.
> 
> Example:
> With PIPE_A & PIPE_D enabled and PIPE_B & PIPE_C disabled
> configuration, pipe enum ids for pipe A & D are '0' and '3',
> and crtc offsets in mode config list for pipe A & D are '0' and '1'
> hence using crtc offset to read a vblank event for a pipe, as
> DRM vblank ioctl expect crtc offset for a pipe.
> 
> v2:
>     Addressed review comments for commit & documentation <Hiler, Arkadiusz>
> 
> Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
> ---
>  lib/igt_kms.c | 48 ++++++++++++++++++++++++++++++++----------------
>  lib/igt_kms.h | 15 ++++++++++++---
>  2 files changed, 44 insertions(+), 19 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index d56f2e56..823e86c0 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1983,6 +1983,8 @@ void igt_display_require(igt_display_t *display, int drm_fd)
>  		/* pipe is enabled/disabled */
>  		pipe->enabled = true;
>  		pipe->crtc_id = resources->crtcs[i];
> +		/* offset of a pipe in crtcs list */
> +		pipe->crtc_offset = i;
>  	}
>  
>  	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
> @@ -4131,18 +4133,25 @@ void igt_pipe_request_out_fence(igt_pipe_t *pipe)
>  /**
>   * igt_wait_for_vblank_count:
>   * @drm_fd: A drm file descriptor
> - * @pipe: Pipe to wait_for_vblank on
> + * @crtc_offset: offset of the crtc in drmModeRes.crtcs
>   * @count: Number of vblanks to wait on
>   *
> + * With non-contiguous pipes configuration, pipe mapping always
> + * not same with crtc index in mode config list,

I don't understand this sentence.

> + * In DRM, 'pipe' for DRM_IOCTL_WAIT_VBLANK is actually a crtc offset
> + * of a given crtc in drmModeRes.crtcs but not HW concept of a pipe
> + * (e.g. with DRM lease or non-contiguous pipes), hence using crtc_offest
> + * to read a vblank event for a pipe.

This is good, but could be phrased so it parses more easily.

How about:

'Pipe', as understood by DRM_IOCTL_WAIT_VBLANK, is actually an offset of
crtc in drmModeRes.crtcs and it has nothing to do with a hardware
concept of a pipe. They can match but don't have to in case of DRM lease
or non-contiguous pipes.

To make thing clear we are calling DRM_IOCTL_WAIT_VBLANK's 'pipe'
a crtc_offset.

> + *
>   * Waits for a given number of vertical blank intervals

I would put this as the first paragraph.

>   */
> -void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
> +void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count)
>  {
>  	drmVBlank wait_vbl;
>  	uint32_t pipe_id_flag;
>  
>  	memset(&wait_vbl, 0, sizeof(wait_vbl));
> -	pipe_id_flag = kmstest_get_vbl_flag(pipe);
> +	pipe_id_flag = kmstest_get_vbl_flag(crtc_offset);
>  
>  	wait_vbl.request.type = DRM_VBLANK_RELATIVE;
>  	wait_vbl.request.type |= pipe_id_flag;
> @@ -4154,13 +4163,15 @@ void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
>  /**
>   * igt_wait_for_vblank:
>   * @drm_fd: A drm file descriptor
> - * @pipe: Pipe to wait_for_vblank on
> + * @crtc_offset: offset of a crtc in drmModeRes.crtcs
> + *
> + * See #igt_wait_for_vblank_count for more details
>   *
>   * Waits for 1 vertical blank intervals
>   */
> -void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
> +void igt_wait_for_vblank(int drm_fd, int crtc_offset)
>  {
> -	igt_wait_for_vblank_count(drm_fd, pipe, 1);
> +	igt_wait_for_vblank_count(drm_fd, crtc_offset, 1);
>  }
>  
>  /**
> @@ -4383,22 +4394,27 @@ void igt_cleanup_uevents(struct udev_monitor *mon)
>  
>  /**
>   * kmstest_get_vbl_flag:
> - * @pipe_id: Pipe to convert to flag representation.
> + * @crtc_offset: CRTC offset to convert into pipe flag representation.
>   *
> - * Convert a pipe id into the flag representation
> - * expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
> + * Convert an offset of an crtc in drmModeRes.crtcs into flag representation
> + * expected by DRM_IOCTL_WAIT_VBLANK.
> + * See #igt_wait_for_vblank_count for details
>   */
> -uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
> +uint32_t kmstest_get_vbl_flag(int crtc_offset)
>  {
> -	if (pipe_id == 0)
> -		return 0;
> -	else if (pipe_id == 1)
> -		return _DRM_VBLANK_SECONDARY;
> +	uint32_t pipe_id;
> +
> +	if (crtc_offset == 0)
> +		pipe_id = 0;
> +	else if (crtc_offset == 1)
> +		pipe_id = _DRM_VBLANK_SECONDARY;
>  	else {
> -		uint32_t pipe_flag = pipe_id << 1;
> +		uint32_t pipe_flag = crtc_offset << 1;
>  		igt_assert(!(pipe_flag & ~DRM_VBLANK_HIGH_CRTC_MASK));
> -		return pipe_flag;
> +		pipe_id = pipe_flag;
>  	}
> +
> +	return pipe_id;
>  }
>  
>  static inline const uint32_t *
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 7109c9a5..1ea3a72a 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -338,8 +338,14 @@ typedef struct igt_plane {
>  	int format_mod_count;
>  } igt_plane_t;
>  
> +/*
> + * In i915, with non-contiguous pipe display, a pipe is not always
> + * same as a crtc mapping in display, pipe is enum id of a i915's crtc object
> + * using crtc offset to get the offset of a pipe from mode config list

Again, IGT is not i915-only and you are using it to define things. Think
about the change in terms of DRM / KMS  vocabulary.

I am not sure what this message is trying to convey but I would describe
the following points:

 * this struct represents a hardware pipe

 * DRM_IOCTL_WAIT_VBLANK notion of pipe is confusing and we are using
   crtc_offset instead (refer people to #igt_wait_for_vblank_count)

> + */
>  struct igt_pipe {
>  	igt_display_t *display;
> +	/* ID of a hardware pipe */
>  	enum pipe pipe;
>  	/* pipe is enabled or not */
>  	bool enabled;
> @@ -353,7 +359,10 @@ struct igt_pipe {
>  	uint32_t props[IGT_NUM_CRTC_PROPS];
>  	uint64_t values[IGT_NUM_CRTC_PROPS];
>  
> +	/* ID of KMS CRTC object */
>  	uint32_t crtc_id;
> +	/* crtc offset of a pipe in mode config list */

offset of a pipe in drmModeRes.crtcs would be easier to understand

-- 
Cheers,
Arek

> +	uint32_t crtc_offset;
>  
>  	int32_t out_fence_fd;
>  };
> @@ -448,8 +457,8 @@ void igt_fb_set_position(struct igt_fb *fb, igt_plane_t *plane,
>  void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane,
>  	uint32_t w, uint32_t h);
>  
> -void igt_wait_for_vblank(int drm_fd, enum pipe pipe);
> -void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count);
> +void igt_wait_for_vblank(int drm_fd, int crtc_offset);
> +void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count);
>  
>  static inline bool igt_output_is_connected(igt_output_t *output)
>  {
> @@ -769,7 +778,7 @@ void igt_pipe_refresh(igt_display_t *display, enum pipe pipe, bool force);
>  void igt_enable_connectors(int drm_fd);
>  void igt_reset_connectors(void);
>  
> -uint32_t kmstest_get_vbl_flag(uint32_t pipe_id);
> +uint32_t kmstest_get_vbl_flag(int crtc_offset);
>  
>  const struct edid *igt_kms_get_base_edid(void);
>  const struct edid *igt_kms_get_alt_edid(void);
> -- 
> 2.25.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-17 15:40 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-07-17 15:41 ` Mohammed Khajapasha
  2020-07-20  9:35   ` Arkadiusz Hiler
  0 siblings, 1 reply; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-17 15:41 UTC (permalink / raw)
  To: arkadiusz.hiler, igt-dev, petri.latvala, kishore.kunche

In i915 with non-contiguous pipes display, pipes always not same
as crtc index in display pipes array. Hence reading pipe id flags
for a vblank event using crtc offset.

Example:
With PIPE_A & PIPE_D enabled and PIPE_B & PIPE_C disabled
configuration, pipe enum ids for pipe A & D are '0' and '3',
and crtc offsets in mode config list for pipe A & D are '0' and '1'
hence using crtc offset to read a vblank event for a pipe, as
DRM vblank ioctl expect crtc offset for a pipe.

v2:
    Addressed review comments for commit & documentation <Hiler, Arkadiusz>

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 lib/igt_kms.c | 48 ++++++++++++++++++++++++++++++++----------------
 lib/igt_kms.h | 15 ++++++++++++---
 2 files changed, 44 insertions(+), 19 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index d56f2e56..823e86c0 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1983,6 +1983,8 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 		/* pipe is enabled/disabled */
 		pipe->enabled = true;
 		pipe->crtc_id = resources->crtcs[i];
+		/* offset of a pipe in crtcs list */
+		pipe->crtc_offset = i;
 	}
 
 	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
@@ -4131,18 +4133,25 @@ void igt_pipe_request_out_fence(igt_pipe_t *pipe)
 /**
  * igt_wait_for_vblank_count:
  * @drm_fd: A drm file descriptor
- * @pipe: Pipe to wait_for_vblank on
+ * @crtc_offset: offset of the crtc in drmModeRes.crtcs
  * @count: Number of vblanks to wait on
  *
+ * With non-contiguous pipes configuration, pipe mapping always
+ * not same with crtc index in mode config list,
+ * In DRM, 'pipe' for DRM_IOCTL_WAIT_VBLANK is actually a crtc offset
+ * of a given crtc in drmModeRes.crtcs but not HW concept of a pipe
+ * (e.g. with DRM lease or non-contiguous pipes), hence using crtc_offest
+ * to read a vblank event for a pipe.
+ *
  * Waits for a given number of vertical blank intervals
  */
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count)
 {
 	drmVBlank wait_vbl;
 	uint32_t pipe_id_flag;
 
 	memset(&wait_vbl, 0, sizeof(wait_vbl));
-	pipe_id_flag = kmstest_get_vbl_flag(pipe);
+	pipe_id_flag = kmstest_get_vbl_flag(crtc_offset);
 
 	wait_vbl.request.type = DRM_VBLANK_RELATIVE;
 	wait_vbl.request.type |= pipe_id_flag;
@@ -4154,13 +4163,15 @@ void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
 /**
  * igt_wait_for_vblank:
  * @drm_fd: A drm file descriptor
- * @pipe: Pipe to wait_for_vblank on
+ * @crtc_offset: offset of a crtc in drmModeRes.crtcs
+ *
+ * See #igt_wait_for_vblank_count for more details
  *
  * Waits for 1 vertical blank intervals
  */
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
+void igt_wait_for_vblank(int drm_fd, int crtc_offset)
 {
-	igt_wait_for_vblank_count(drm_fd, pipe, 1);
+	igt_wait_for_vblank_count(drm_fd, crtc_offset, 1);
 }
 
 /**
@@ -4383,22 +4394,27 @@ void igt_cleanup_uevents(struct udev_monitor *mon)
 
 /**
  * kmstest_get_vbl_flag:
- * @pipe_id: Pipe to convert to flag representation.
+ * @crtc_offset: CRTC offset to convert into pipe flag representation.
  *
- * Convert a pipe id into the flag representation
- * expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
+ * Convert an offset of an crtc in drmModeRes.crtcs into flag representation
+ * expected by DRM_IOCTL_WAIT_VBLANK.
+ * See #igt_wait_for_vblank_count for details
  */
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
+uint32_t kmstest_get_vbl_flag(int crtc_offset)
 {
-	if (pipe_id == 0)
-		return 0;
-	else if (pipe_id == 1)
-		return _DRM_VBLANK_SECONDARY;
+	uint32_t pipe_id;
+
+	if (crtc_offset == 0)
+		pipe_id = 0;
+	else if (crtc_offset == 1)
+		pipe_id = _DRM_VBLANK_SECONDARY;
 	else {
-		uint32_t pipe_flag = pipe_id << 1;
+		uint32_t pipe_flag = crtc_offset << 1;
 		igt_assert(!(pipe_flag & ~DRM_VBLANK_HIGH_CRTC_MASK));
-		return pipe_flag;
+		pipe_id = pipe_flag;
 	}
+
+	return pipe_id;
 }
 
 static inline const uint32_t *
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 7109c9a5..1ea3a72a 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -338,8 +338,14 @@ typedef struct igt_plane {
 	int format_mod_count;
 } igt_plane_t;
 
+/*
+ * In i915, with non-contiguous pipe display, a pipe is not always
+ * same as a crtc mapping in display, pipe is enum id of a i915's crtc object
+ * using crtc offset to get the offset of a pipe from mode config list
+ */
 struct igt_pipe {
 	igt_display_t *display;
+	/* ID of a hardware pipe */
 	enum pipe pipe;
 	/* pipe is enabled or not */
 	bool enabled;
@@ -353,7 +359,10 @@ struct igt_pipe {
 	uint32_t props[IGT_NUM_CRTC_PROPS];
 	uint64_t values[IGT_NUM_CRTC_PROPS];
 
+	/* ID of KMS CRTC object */
 	uint32_t crtc_id;
+	/* crtc offset of a pipe in mode config list */
+	uint32_t crtc_offset;
 
 	int32_t out_fence_fd;
 };
@@ -448,8 +457,8 @@ void igt_fb_set_position(struct igt_fb *fb, igt_plane_t *plane,
 void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane,
 	uint32_t w, uint32_t h);
 
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe);
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count);
+void igt_wait_for_vblank(int drm_fd, int crtc_offset);
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count);
 
 static inline bool igt_output_is_connected(igt_output_t *output)
 {
@@ -769,7 +778,7 @@ void igt_pipe_refresh(igt_display_t *display, enum pipe pipe, bool force);
 void igt_enable_connectors(int drm_fd);
 void igt_reset_connectors(void);
 
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id);
+uint32_t kmstest_get_vbl_flag(int crtc_offset);
 
 const struct edid *igt_kms_get_base_edid(void);
 const struct edid *igt_kms_get_alt_edid(void);
-- 
2.25.1

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

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

* [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-11 18:04 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-07-11 18:04 ` Mohammed Khajapasha
  0 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-11 18:04 UTC (permalink / raw)
  To: igt-dev

In i915 with non-contiguous pipes display, pipes always not same
as crtc index in display pipes array. Hence reading pipe id flags
for a vblank event using crtc offset.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 lib/igt_kms.c | 48 ++++++++++++++++++++++++++++++++----------------
 lib/igt_kms.h | 14 +++++++++++---
 2 files changed, 43 insertions(+), 19 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 467df3ae..3b32a2d4 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1985,6 +1985,8 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 
 		pipe->enabled = true;
 		pipe->crtc_id = resources->crtcs[i];
+		/* offset of a pipe in crtcs list */
+		pipe->crtc_offset = i;
 	}
 
 	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
@@ -4133,18 +4135,22 @@ void igt_pipe_request_out_fence(igt_pipe_t *pipe)
 /**
  * igt_wait_for_vblank_count:
  * @drm_fd: A drm file descriptor
- * @pipe: Pipe to wait_for_vblank on
+ * @crtc_offset: offset of a Pipe to wait_for_vblank on
  * @count: Number of vblanks to wait on
  *
+ * In i915, with non-contiguous pipe display, pipe mapping always
+ * not same with crtc mapping, passing crtc offset of a pipe to
+ * read vblank count for a pipe, in i915 pipe is i915's crtc object id.
+ *
  * Waits for a given number of vertical blank intervals
  */
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count)
 {
 	drmVBlank wait_vbl;
 	uint32_t pipe_id_flag;
 
 	memset(&wait_vbl, 0, sizeof(wait_vbl));
-	pipe_id_flag = kmstest_get_vbl_flag(pipe);
+	pipe_id_flag = kmstest_get_vbl_flag(crtc_offset);
 
 	wait_vbl.request.type = DRM_VBLANK_RELATIVE;
 	wait_vbl.request.type |= pipe_id_flag;
@@ -4156,13 +4162,17 @@ void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
 /**
  * igt_wait_for_vblank:
  * @drm_fd: A drm file descriptor
- * @pipe: Pipe to wait_for_vblank on
+ * @crtc_offset: offset of a Pipe to wait_for_vblank on
+ *
+ * In i915, with non-contiguous pipe display, pipe mapping always
+ * not same with crtc mapping, passing crtc offset of a pipe to
+ * read vblank count for a pipe.
  *
  * Waits for 1 vertical blank intervals
  */
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
+void igt_wait_for_vblank(int drm_fd, int crtc_offset)
 {
-	igt_wait_for_vblank_count(drm_fd, pipe, 1);
+	igt_wait_for_vblank_count(drm_fd, crtc_offset, 1);
 }
 
 /**
@@ -4385,22 +4395,28 @@ void igt_cleanup_uevents(struct udev_monitor *mon)
 
 /**
  * kmstest_get_vbl_flag:
- * @pipe_id: Pipe to convert to flag representation.
+ * @crtc_offset: CRTC offset to convert into pipe flag representation.
  *
- * Convert a pipe id into the flag representation
- * expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
+ * In i915, with non-contiguous pipe display, pipe mapping always
+ * not same with crtc mapping, pipe is enum id of i915's crtc object
+ * passing crtc offset of a pipe to convert into the pipe flag
+ * representation expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
  */
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
+uint32_t kmstest_get_vbl_flag(int crtc_offset)
 {
-	if (pipe_id == 0)
-		return 0;
-	else if (pipe_id == 1)
-		return _DRM_VBLANK_SECONDARY;
+	uint32_t pipe_id;
+
+	if (crtc_offset == 0)
+		pipe_id = 0;
+	else if (crtc_offset == 1)
+		pipe_id = _DRM_VBLANK_SECONDARY;
 	else {
-		uint32_t pipe_flag = pipe_id << 1;
+		uint32_t pipe_flag = crtc_offset << 1;
 		igt_assert(!(pipe_flag & ~DRM_VBLANK_HIGH_CRTC_MASK));
-		return pipe_flag;
+		pipe_id = pipe_flag;
 	}
+
+	return pipe_id;
 }
 
 static inline const uint32_t *
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 7109c9a5..162c4850 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -338,8 +338,14 @@ typedef struct igt_plane {
 	int format_mod_count;
 } igt_plane_t;
 
+/*
+ * In i915, with non-contiguous pipe display, a pipe is not always
+ * same as a crtc mapping in display, pipe is enum id of a i915's crtc object
+ * using crtc offset to get the offset of a pipe from mode config list
+ */
 struct igt_pipe {
 	igt_display_t *display;
+	/* Id of a pipe object */
 	enum pipe pipe;
 	/* pipe is enabled or not */
 	bool enabled;
@@ -354,6 +360,8 @@ struct igt_pipe {
 	uint64_t values[IGT_NUM_CRTC_PROPS];
 
 	uint32_t crtc_id;
+	/* crtc offset of a pipe in mode config list */
+	uint32_t crtc_offset;
 
 	int32_t out_fence_fd;
 };
@@ -448,8 +456,8 @@ void igt_fb_set_position(struct igt_fb *fb, igt_plane_t *plane,
 void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane,
 	uint32_t w, uint32_t h);
 
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe);
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count);
+void igt_wait_for_vblank(int drm_fd, int crtc_offset);
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count);
 
 static inline bool igt_output_is_connected(igt_output_t *output)
 {
@@ -769,7 +777,7 @@ void igt_pipe_refresh(igt_display_t *display, enum pipe pipe, bool force);
 void igt_enable_connectors(int drm_fd);
 void igt_reset_connectors(void);
 
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id);
+uint32_t kmstest_get_vbl_flag(int crtc_offset);
 
 const struct edid *igt_kms_get_base_edid(void);
 const struct edid *igt_kms_get_alt_edid(void);
-- 
2.24.1

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

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

* [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
  2020-07-06  4:40 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-07-06  4:40 ` Mohammed Khajapasha
  0 siblings, 0 replies; 31+ messages in thread
From: Mohammed Khajapasha @ 2020-07-06  4:40 UTC (permalink / raw)
  To: arkadiusz.hiler, igt-dev

In i915 with non-contiguous pipes display, pipes always not same
as crtc index in display pipes array. Hence reading pipe id flags
for a vblank event using crtc offset.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 lib/igt_kms.c | 31 ++++++++++++++++++-------------
 lib/igt_kms.h |  7 ++++---
 2 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index b4029757..91c54002 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1984,6 +1984,7 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 
 		pipe->enabled = true;
 		pipe->crtc_id = resources->crtcs[i];
+		pipe->crtc_offset = i;
 	}
 
 	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
@@ -4137,13 +4138,13 @@ void igt_pipe_request_out_fence(igt_pipe_t *pipe)
  *
  * Waits for a given number of vertical blank intervals
  */
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count)
 {
 	drmVBlank wait_vbl;
 	uint32_t pipe_id_flag;
 
 	memset(&wait_vbl, 0, sizeof(wait_vbl));
-	pipe_id_flag = kmstest_get_vbl_flag(pipe);
+	pipe_id_flag = kmstest_get_vbl_flag(crtc_offset);
 
 	wait_vbl.request.type = DRM_VBLANK_RELATIVE;
 	wait_vbl.request.type |= pipe_id_flag;
@@ -4159,9 +4160,9 @@ void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count)
  *
  * Waits for 1 vertical blank intervals
  */
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
+void igt_wait_for_vblank(int drm_fd, int crtc_offset)
 {
-	igt_wait_for_vblank_count(drm_fd, pipe, 1);
+	igt_wait_for_vblank_count(drm_fd, crtc_offset, 1);
 }
 
 /**
@@ -4384,22 +4385,26 @@ void igt_cleanup_uevents(struct udev_monitor *mon)
 
 /**
  * kmstest_get_vbl_flag:
- * @pipe_id: Pipe to convert to flag representation.
+ * @crtc_offset: CRTC offset to convert to pipe flag representation.
  *
- * Convert a pipe id into the flag representation
+ * Convert a crtc offset into the pipe flag representation
  * expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
  */
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
+uint32_t kmstest_get_vbl_flag(int crtc_offset)
 {
-	if (pipe_id == 0)
-		return 0;
-	else if (pipe_id == 1)
-		return _DRM_VBLANK_SECONDARY;
+	uint32_t pipe_id;
+
+	if (crtc_offset == 0)
+		pipe_id = 0;
+	else if (crtc_offset == 1)
+		pipe_id = _DRM_VBLANK_SECONDARY;
 	else {
-		uint32_t pipe_flag = pipe_id << 1;
+		uint32_t pipe_flag = crtc_offset << 1;
 		igt_assert(!(pipe_flag & ~DRM_VBLANK_HIGH_CRTC_MASK));
-		return pipe_flag;
+		pipe_id = pipe_flag;
 	}
+
+	return pipe_id;
 }
 
 static inline const uint32_t *
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 36b15147..2a2eb0e4 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -353,6 +353,7 @@ struct igt_pipe {
 	uint64_t values[IGT_NUM_CRTC_PROPS];
 
 	uint32_t crtc_id;
+	uint32_t crtc_offset;
 
 	int32_t out_fence_fd;
 };
@@ -447,8 +448,8 @@ void igt_fb_set_position(struct igt_fb *fb, igt_plane_t *plane,
 void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane,
 	uint32_t w, uint32_t h);
 
-void igt_wait_for_vblank(int drm_fd, enum pipe pipe);
-void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count);
+void igt_wait_for_vblank(int drm_fd, int crtc_offset);
+void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count);
 
 static inline bool igt_output_is_connected(igt_output_t *output)
 {
@@ -768,7 +769,7 @@ void igt_pipe_refresh(igt_display_t *display, enum pipe pipe, bool force);
 void igt_enable_connectors(int drm_fd);
 void igt_reset_connectors(void);
 
-uint32_t kmstest_get_vbl_flag(uint32_t pipe_id);
+uint32_t kmstest_get_vbl_flag(int crtc_offset);
 
 const struct edid *igt_kms_get_base_edid(void);
 const struct edid *igt_kms_get_alt_edid(void);
-- 
2.24.1

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

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

end of thread, other threads:[~2020-07-20 15:21 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 01/11] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 02/11] lib/igt_kms: Add igt_require_pipe() function Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 03/11] tests/kms_cursor_legacy: Read crtc id for enable pipes Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 04/11] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
2020-07-15 14:21   ` Arkadiusz Hiler
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 05/11] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
2020-07-15 14:19   ` Arkadiusz Hiler
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 06/11] lib/kms: Skip igt test cases for disabled display pipes Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 07/11] tests/kms: Skip kms test cases for disabled pipes Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 08/11] tests/kms_atomic_transition: Set modeset for enable pipes only Mohammed Khajapasha
2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 09/11] i915/gem_eio: Set modeset for enable pipes Mohammed Khajapasha
2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
2020-07-15 14:50   ` Arkadiusz Hiler
2020-07-16 10:12     ` Jani Nikula
2020-07-16 10:40       ` Arkadiusz Hiler
2020-07-16 17:23     ` Khajapasha, Mohammed
2020-07-16 18:07       ` Khajapasha, Mohammed
2020-07-17 13:02   ` Arkadiusz Hiler
2020-07-17 15:43     ` Khajapasha, Mohammed
2020-07-20  9:44       ` Arkadiusz Hiler
2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 11/11] tests/kms: Use crtc offset to read vblank event for a pipe Mohammed Khajapasha
2020-07-11 20:41 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_kms: Add support for display with (rev7) Patchwork
2020-07-11 21:53 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-07-15 11:54 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-07-20 15:20 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-20 15:20 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
2020-07-20 11:48 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-20 11:48 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
2020-07-17 15:40 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-17 15:41 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
2020-07-20  9:35   ` Arkadiusz Hiler
2020-07-11 18:04 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-11 18:04 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
2020-07-06  4:40 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-06  4:40 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha

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.