public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [[RFC] i-g-t 0/1] lib/igt_kms: Add support for display with
@ 2020-06-10 19:37 Mohammed Khajapasha
  2020-06-10 19:37 ` [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-10 19:37 UTC (permalink / raw)
  To: igt-dev

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.

Mohammed Khajapasha (1):
  lib/igt_kms: Add support for display with non-contiguous pipes

 lib/igt_kms.c | 30 +++++++++++++++++++++++++-----
 lib/igt_kms.h | 13 ++++++++-----
 2 files changed, 33 insertions(+), 10 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] 23+ messages in thread

* [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes
  2020-06-10 19:37 [igt-dev] [[RFC] i-g-t 0/1] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-06-10 19:37 ` Mohammed Khajapasha
  2020-06-16 13:43   ` Petri Latvala
                     ` (2 more replies)
  2020-06-10 20:15 ` [igt-dev] ✓ Fi.CI.BAT: success for i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes Patchwork
  2020-06-11 11:07 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  2 siblings, 3 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-10 19:37 UTC (permalink / raw)
  To: igt-dev

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.

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

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index afef5939..2b1cf878 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1921,10 +1921,26 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 	 * We cache the number of pipes, that number is a physical limit of the
 	 * hardware and cannot change of time (for now, at least).
 	 */
-	display->n_pipes = resources->count_crtcs;
-	display->pipes = calloc(sizeof(igt_pipe_t), display->n_pipes);
+	display->n_pipes = IGT_MAX_PIPES;
+	display->pipes = calloc(sizeof(igt_pipe_t), IGT_MAX_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;
+		struct drm_i915_get_pipe_from_crtc_id get_pipe;
+
+		/* Get right pipe enum from kernel for a 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;
+		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;
@@ -1959,9 +1975,7 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 		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;
@@ -2409,12 +2423,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 << pipe->pipe);
+	}
+
 	/*
 	 * 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 32a0e4cc..e91a2094 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -341,6 +341,7 @@ typedef struct igt_plane {
 struct igt_pipe {
 	igt_display_t *display;
 	enum pipe pipe;
+	bool enabled;
 
 	int n_planes;
 	int plane_cursor;
@@ -510,8 +511,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 +532,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 +552,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] 23+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes
  2020-06-10 19:37 [igt-dev] [[RFC] i-g-t 0/1] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2020-06-10 19:37 ` [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
@ 2020-06-10 20:15 ` Patchwork
  2020-06-11 11:07 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  2 siblings, 0 replies; 23+ messages in thread
From: Patchwork @ 2020-06-10 20:15 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev

== Series Details ==

Series: i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes
URL   : https://patchwork.freedesktop.org/series/78198/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8611 -> IGTPW_4664
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload:
    - fi-byt-j1900:       [PASS][1] -> [DMESG-WARN][2] ([i915#1982])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/fi-byt-j1900/igt@i915_module_load@reload.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/fi-byt-j1900/igt@i915_module_load@reload.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-icl-guc:         [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/fi-icl-guc/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/fi-icl-guc/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  
#### Possible fixes ####

  * igt@i915_pm_rpm@module-reload:
    - fi-cml-s:           [DMESG-WARN][5] ([i915#1982]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/fi-cml-s/igt@i915_pm_rpm@module-reload.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/fi-cml-s/igt@i915_pm_rpm@module-reload.html

  * igt@kms_busy@basic@flip:
    - fi-kbl-x1275:       [DMESG-WARN][7] ([i915#62] / [i915#92] / [i915#95]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/fi-kbl-x1275/igt@kms_busy@basic@flip.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/fi-kbl-x1275/igt@kms_busy@basic@flip.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-bsw-kefka:       [DMESG-WARN][9] ([i915#1982]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  
#### Warnings ####

  * igt@gem_exec_suspend@basic-s0:
    - fi-kbl-x1275:       [DMESG-WARN][11] ([i915#62] / [i915#92]) -> [DMESG-WARN][12] ([i915#62] / [i915#92] / [i915#95]) +4 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/fi-kbl-x1275/igt@gem_exec_suspend@basic-s0.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/fi-kbl-x1275/igt@gem_exec_suspend@basic-s0.html

  * igt@kms_force_connector_basic@prune-stale-modes:
    - fi-kbl-x1275:       [DMESG-WARN][13] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][14] ([i915#62] / [i915#92]) +5 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/fi-kbl-x1275/igt@kms_force_connector_basic@prune-stale-modes.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/fi-kbl-x1275/igt@kms_force_connector_basic@prune-stale-modes.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#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 (48 -> 41)
------------------------------

  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_5702 -> IGTPW_4664

  CI-20190529: 20190529
  CI_DRM_8611: b87354483fa40fef86da19ade9bfe9349f0cf6d5 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4664: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/index.html
  IGT_5702: d16ad07e7f2a028e14d61f570931c87fa5ce404c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes
  2020-06-10 19:37 [igt-dev] [[RFC] i-g-t 0/1] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2020-06-10 19:37 ` [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
  2020-06-10 20:15 ` [igt-dev] ✓ Fi.CI.BAT: success for i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes Patchwork
@ 2020-06-11 11:07 ` Patchwork
  2 siblings, 0 replies; 23+ messages in thread
From: Patchwork @ 2020-06-11 11:07 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev

== Series Details ==

Series: i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes
URL   : https://patchwork.freedesktop.org/series/78198/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8611_full -> IGTPW_4664_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_4664_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_4664_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_4664/index.html

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
    - shard-apl:          NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl6/igt@kms_atomic_transition@1x-modeset-transitions-nonblocking.html
    - shard-tglb:         NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-tglb2/igt@kms_atomic_transition@1x-modeset-transitions-nonblocking.html
    - shard-snb:          NOTRUN -> [FAIL][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-snb1/igt@kms_atomic_transition@1x-modeset-transitions-nonblocking.html
    - shard-kbl:          NOTRUN -> [FAIL][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl1/igt@kms_atomic_transition@1x-modeset-transitions-nonblocking.html
    - shard-iclb:         NOTRUN -> [FAIL][5]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb5/igt@kms_atomic_transition@1x-modeset-transitions-nonblocking.html
    - shard-hsw:          NOTRUN -> [FAIL][6]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-hsw1/igt@kms_atomic_transition@1x-modeset-transitions-nonblocking.html

  * igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
    - shard-snb:          [PASS][7] -> [FAIL][8] +12 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-snb6/igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-snb1/igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing.html

  * igt@kms_cursor_legacy@all-pipes-forked-bo:
    - shard-glk:          [PASS][9] -> [FAIL][10] +14 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk7/igt@kms_cursor_legacy@all-pipes-forked-bo.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk8/igt@kms_cursor_legacy@all-pipes-forked-bo.html
    - shard-iclb:         [PASS][11] -> [FAIL][12] +11 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb1/igt@kms_cursor_legacy@all-pipes-forked-bo.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb2/igt@kms_cursor_legacy@all-pipes-forked-bo.html

  * igt@kms_cursor_legacy@all-pipes-single-move:
    - shard-tglb:         [PASS][13] -> [FAIL][14] +12 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-tglb8/igt@kms_cursor_legacy@all-pipes-single-move.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-tglb1/igt@kms_cursor_legacy@all-pipes-single-move.html
    - shard-hsw:          [PASS][15] -> [FAIL][16] +16 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-hsw6/igt@kms_cursor_legacy@all-pipes-single-move.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-hsw8/igt@kms_cursor_legacy@all-pipes-single-move.html

  * igt@kms_cursor_legacy@all-pipes-torture-bo:
    - shard-kbl:          [PASS][17] -> [FAIL][18] +11 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl6/igt@kms_cursor_legacy@all-pipes-torture-bo.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl4/igt@kms_cursor_legacy@all-pipes-torture-bo.html

  * igt@kms_cursor_legacy@pipe-d-forked-move:
    - shard-glk:          NOTRUN -> [FAIL][19] +2 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk4/igt@kms_cursor_legacy@pipe-d-forked-move.html

  * igt@kms_lease@lease_unleased_crtc:
    - shard-apl:          [PASS][20] -> [FAIL][21] +11 similar issues
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl6/igt@kms_lease@lease_unleased_crtc.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl2/igt@kms_lease@lease_unleased_crtc.html

  
#### Warnings ####

  * igt@kms_cursor_legacy@pipe-d-forked-move:
    - shard-apl:          [SKIP][22] ([fdo#109271]) -> [FAIL][23] +5 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl8/igt@kms_cursor_legacy@pipe-d-forked-move.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl8/igt@kms_cursor_legacy@pipe-d-forked-move.html

  * igt@kms_cursor_legacy@pipe-d-single-bo:
    - shard-glk:          [SKIP][24] ([fdo#109271]) -> [FAIL][25] +4 similar issues
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk2/igt@kms_cursor_legacy@pipe-d-single-bo.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk2/igt@kms_cursor_legacy@pipe-d-single-bo.html
    - shard-hsw:          [SKIP][26] ([fdo#109271]) -> [FAIL][27] +5 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-hsw1/igt@kms_cursor_legacy@pipe-d-single-bo.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-hsw6/igt@kms_cursor_legacy@pipe-d-single-bo.html

  * igt@kms_cursor_legacy@pipe-d-single-move:
    - shard-iclb:         [SKIP][28] ([fdo#109278] / [fdo#112010]) -> [FAIL][29] +5 similar issues
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb3/igt@kms_cursor_legacy@pipe-d-single-move.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb7/igt@kms_cursor_legacy@pipe-d-single-move.html
    - shard-kbl:          [SKIP][30] ([fdo#109271]) -> [FAIL][31] +5 similar issues
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl3/igt@kms_cursor_legacy@pipe-d-single-move.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl3/igt@kms_cursor_legacy@pipe-d-single-move.html

  * igt@kms_cursor_legacy@pipe-d-torture-bo:
    - shard-snb:          [SKIP][32] ([fdo#109271]) -> [FAIL][33] +11 similar issues
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-snb5/igt@kms_cursor_legacy@pipe-d-torture-bo.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-snb5/igt@kms_cursor_legacy@pipe-d-torture-bo.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_params@invalid-bsd1-flag-on-vebox:
    - shard-hsw:          [PASS][34] -> [TIMEOUT][35] ([i915#1958])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-hsw4/igt@gem_exec_params@invalid-bsd1-flag-on-vebox.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-hsw4/igt@gem_exec_params@invalid-bsd1-flag-on-vebox.html

  * igt@gem_exec_schedule@implicit-write-read@rcs0:
    - shard-snb:          [PASS][36] -> [INCOMPLETE][37] ([i915#82]) +1 similar issue
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-snb5/igt@gem_exec_schedule@implicit-write-read@rcs0.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-snb6/igt@gem_exec_schedule@implicit-write-read@rcs0.html

  * igt@gem_exec_whisper@basic-fds:
    - shard-glk:          [PASS][38] -> [DMESG-WARN][39] ([i915#118] / [i915#95])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk6/igt@gem_exec_whisper@basic-fds.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk8/igt@gem_exec_whisper@basic-fds.html

  * igt@gem_workarounds@suspend-resume:
    - shard-apl:          [PASS][40] -> [DMESG-WARN][41] ([i915#180]) +2 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl2/igt@gem_workarounds@suspend-resume.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl6/igt@gem_workarounds@suspend-resume.html

  * igt@gen9_exec_parse@allowed-all:
    - shard-glk:          [PASS][42] -> [DMESG-WARN][43] ([i915#1436] / [i915#716])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk9/igt@gen9_exec_parse@allowed-all.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk1/igt@gen9_exec_parse@allowed-all.html

  * igt@kms_big_fb@x-tiled-64bpp-rotate-0:
    - shard-glk:          [PASS][44] -> [DMESG-FAIL][45] ([i915#118] / [i915#95])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk4/igt@kms_big_fb@x-tiled-64bpp-rotate-0.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk8/igt@kms_big_fb@x-tiled-64bpp-rotate-0.html

  * igt@kms_big_fb@y-tiled-32bpp-rotate-0:
    - shard-glk:          [PASS][46] -> [DMESG-WARN][47] ([i915#1982])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk6/igt@kms_big_fb@y-tiled-32bpp-rotate-0.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk5/igt@kms_big_fb@y-tiled-32bpp-rotate-0.html
    - shard-apl:          [PASS][48] -> [DMESG-WARN][49] ([i915#1982])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl8/igt@kms_big_fb@y-tiled-32bpp-rotate-0.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl2/igt@kms_big_fb@y-tiled-32bpp-rotate-0.html

  * igt@kms_color@pipe-c-legacy-gamma-reset:
    - shard-tglb:         [PASS][50] -> [DMESG-WARN][51] ([i915#402]) +1 similar issue
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-tglb5/igt@kms_color@pipe-c-legacy-gamma-reset.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-tglb6/igt@kms_color@pipe-c-legacy-gamma-reset.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x128-onscreen:
    - shard-kbl:          [PASS][52] -> [DMESG-FAIL][53] ([i915#54] / [i915#95]) +1 similar issue
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-128x128-onscreen.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl3/igt@kms_cursor_crc@pipe-a-cursor-128x128-onscreen.html

  * igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge:
    - shard-apl:          [PASS][54] -> [DMESG-WARN][55] ([i915#95]) +35 similar issues
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl6/igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl1/igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge.html

  * igt@kms_cursor_edge_walk@pipe-b-256x256-right-edge:
    - shard-snb:          [PASS][56] -> [SKIP][57] ([fdo#109271]) +3 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-snb1/igt@kms_cursor_edge_walk@pipe-b-256x256-right-edge.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-snb6/igt@kms_cursor_edge_walk@pipe-b-256x256-right-edge.html

  * igt@kms_cursor_legacy@all-pipes-forked-bo:
    - shard-apl:          [PASS][58] -> [DMESG-FAIL][59] ([i915#95])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl3/igt@kms_cursor_legacy@all-pipes-forked-bo.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl1/igt@kms_cursor_legacy@all-pipes-forked-bo.html
    - shard-kbl:          [PASS][60] -> [DMESG-FAIL][61] ([i915#95])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl3/igt@kms_cursor_legacy@all-pipes-forked-bo.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl2/igt@kms_cursor_legacy@all-pipes-forked-bo.html

  * igt@kms_cursor_legacy@pipe-c-torture-move:
    - shard-hsw:          [PASS][62] -> [DMESG-WARN][63] ([i915#128])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-hsw1/igt@kms_cursor_legacy@pipe-c-torture-move.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-hsw4/igt@kms_cursor_legacy@pipe-c-torture-move.html

  * igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled:
    - shard-apl:          [PASS][64] -> [DMESG-FAIL][65] ([i915#54] / [i915#95])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl2/igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl2/igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-apl:          [PASS][66] -> [FAIL][67] ([i915#1525])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl6/igt@kms_fbcon_fbt@fbc-suspend.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl4/igt@kms_fbcon_fbt@fbc-suspend.html
    - shard-kbl:          [PASS][68] -> [FAIL][69] ([i915#64])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl1/igt@kms_fbcon_fbt@fbc-suspend.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl7/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_flip@2x-flip-vs-suspend@bc-vga1-hdmi-a1:
    - shard-hsw:          [PASS][70] -> [INCOMPLETE][71] ([i915#61]) +1 similar issue
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-hsw6/igt@kms_flip@2x-flip-vs-suspend@bc-vga1-hdmi-a1.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-hsw1/igt@kms_flip@2x-flip-vs-suspend@bc-vga1-hdmi-a1.html

  * igt@kms_flip@2x-plain-flip-fb-recreate@ac-hdmi-a1-hdmi-a2:
    - shard-glk:          [PASS][72] -> [FAIL][73] ([i915#1928]) +1 similar issue
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk2/igt@kms_flip@2x-plain-flip-fb-recreate@ac-hdmi-a1-hdmi-a2.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk5/igt@kms_flip@2x-plain-flip-fb-recreate@ac-hdmi-a1-hdmi-a2.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt:
    - shard-iclb:         [PASS][74] -> [DMESG-WARN][75] ([i915#1982])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-render:
    - shard-tglb:         [PASS][76] -> [DMESG-WARN][77] ([i915#1982]) +1 similar issue
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-render.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-tglb5/igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-render.html

  * igt@kms_frontbuffer_tracking@psr-suspend:
    - shard-iclb:         [PASS][78] -> [INCOMPLETE][79] ([i915#1185] / [i915#123])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb1/igt@kms_frontbuffer_tracking@psr-suspend.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb3/igt@kms_frontbuffer_tracking@psr-suspend.html

  * igt@kms_hdmi_inject@inject-audio:
    - shard-iclb:         [PASS][80] -> [SKIP][81] ([i915#433])
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb3/igt@kms_hdmi_inject@inject-audio.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb4/igt@kms_hdmi_inject@inject-audio.html

  * igt@kms_plane_cursor@pipe-b-primary-size-256:
    - shard-kbl:          [PASS][82] -> [DMESG-WARN][83] ([i915#1982])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl2/igt@kms_plane_cursor@pipe-b-primary-size-256.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl1/igt@kms_plane_cursor@pipe-b-primary-size-256.html

  * igt@kms_psr@psr2_sprite_mmap_gtt:
    - shard-iclb:         [PASS][84] -> [SKIP][85] ([fdo#109441]) +2 similar issues
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb4/igt@kms_psr@psr2_sprite_mmap_gtt.html

  * igt@kms_pwrite_crc:
    - shard-kbl:          [PASS][86] -> [DMESG-WARN][87] ([i915#93] / [i915#95]) +52 similar issues
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl4/igt@kms_pwrite_crc.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl1/igt@kms_pwrite_crc.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-kbl:          [PASS][88] -> [DMESG-WARN][89] ([i915#180]) +2 similar issues
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl1/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl6/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  * igt@perf@blocking-parameterized:
    - shard-hsw:          [PASS][90] -> [FAIL][91] ([i915#1542])
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-hsw2/igt@perf@blocking-parameterized.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-hsw6/igt@perf@blocking-parameterized.html

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@preservation-s3@vecs0:
    - shard-kbl:          [DMESG-WARN][92] ([i915#180]) -> [PASS][93] +2 similar issues
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl6/igt@gem_ctx_isolation@preservation-s3@vecs0.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl4/igt@gem_ctx_isolation@preservation-s3@vecs0.html

  * igt@gem_ctx_shared@disjoint-timelines:
    - shard-kbl:          [DMESG-WARN][94] ([i915#93] / [i915#95]) -> [PASS][95] +50 similar issues
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl6/igt@gem_ctx_shared@disjoint-timelines.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl7/igt@gem_ctx_shared@disjoint-timelines.html

  * igt@gem_exec_balancer@sliced:
    - shard-tglb:         [TIMEOUT][96] ([i915#1936]) -> [PASS][97]
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-tglb5/igt@gem_exec_balancer@sliced.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-tglb6/igt@gem_exec_balancer@sliced.html

  * igt@gem_exec_reloc@basic-wc-cpu-active:
    - shard-apl:          [DMESG-WARN][98] ([i915#95]) -> [PASS][99] +28 similar issues
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl4/igt@gem_exec_reloc@basic-wc-cpu-active.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl8/igt@gem_exec_reloc@basic-wc-cpu-active.html

  * igt@gem_exec_schedule@implicit-read-write@rcs0:
    - shard-snb:          [INCOMPLETE][100] ([i915#82]) -> [PASS][101]
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-snb2/igt@gem_exec_schedule@implicit-read-write@rcs0.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-snb1/igt@gem_exec_schedule@implicit-read-write@rcs0.html

  * igt@i915_pm_dc@dc6-psr:
    - shard-iclb:         [FAIL][102] ([i915#1899]) -> [PASS][103]
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb6/igt@i915_pm_dc@dc6-psr.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb2/igt@i915_pm_dc@dc6-psr.html

  * igt@i915_suspend@debugfs-reader:
    - shard-kbl:          [FAIL][104] ([fdo#103375]) -> [PASS][105]
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl7/igt@i915_suspend@debugfs-reader.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl6/igt@i915_suspend@debugfs-reader.html

  * igt@kms_addfb_basic@bad-pitch-32:
    - shard-hsw:          [TIMEOUT][106] ([i915#1958]) -> [PASS][107] +1 similar issue
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-hsw2/igt@kms_addfb_basic@bad-pitch-32.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-hsw4/igt@kms_addfb_basic@bad-pitch-32.html
    - shard-snb:          [TIMEOUT][108] ([i915#1958]) -> [PASS][109] +1 similar issue
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-snb2/igt@kms_addfb_basic@bad-pitch-32.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-snb2/igt@kms_addfb_basic@bad-pitch-32.html

  * igt@kms_big_fb@linear-8bpp-rotate-180:
    - shard-apl:          [DMESG-WARN][110] ([i915#1982]) -> [PASS][111]
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl7/igt@kms_big_fb@linear-8bpp-rotate-180.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl7/igt@kms_big_fb@linear-8bpp-rotate-180.html

  * igt@kms_big_fb@y-tiled-64bpp-rotate-180:
    - shard-glk:          [DMESG-FAIL][112] ([i915#118] / [i915#95]) -> [PASS][113] +1 similar issue
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk8/igt@kms_big_fb@y-tiled-64bpp-rotate-180.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk9/igt@kms_big_fb@y-tiled-64bpp-rotate-180.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen:
    - shard-kbl:          [DMESG-FAIL][114] ([i915#54] / [i915#95]) -> [PASS][115]
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl3/igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen.html

  * igt@kms_cursor_legacy@pipe-b-torture-move:
    - shard-tglb:         [DMESG-WARN][116] ([i915#128]) -> [PASS][117]
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-tglb2/igt@kms_cursor_legacy@pipe-b-torture-move.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-tglb7/igt@kms_cursor_legacy@pipe-b-torture-move.html

  * igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled:
    - shard-apl:          [DMESG-FAIL][118] ([i915#54] / [i915#95]) -> [PASS][119]
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl1/igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl4/igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1:
    - shard-iclb:         [FAIL][120] ([i915#79]) -> [PASS][121]
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb7/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb1/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1.html

  * igt@kms_flip@plain-flip-ts-check@a-dp1:
    - shard-kbl:          [DMESG-WARN][122] ([i915#1982]) -> [PASS][123] +1 similar issue
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl4/igt@kms_flip@plain-flip-ts-check@a-dp1.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl7/igt@kms_flip@plain-flip-ts-check@a-dp1.html

  * igt@kms_flip_tiling@flip-changes-tiling-yf:
    - shard-kbl:          [DMESG-FAIL][124] ([i915#95]) -> [PASS][125] +1 similar issue
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl2/igt@kms_flip_tiling@flip-changes-tiling-yf.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl4/igt@kms_flip_tiling@flip-changes-tiling-yf.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          [INCOMPLETE][126] ([i915#155]) -> [PASS][127]
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-kbl4/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-kbl3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
    - shard-glk:          [DMESG-WARN][128] ([i915#1982]) -> [PASS][129]
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk8/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk4/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html

  * igt@kms_plane_cursor@pipe-a-viewport-size-64:
    - shard-apl:          [DMESG-FAIL][130] ([i915#95]) -> [PASS][131] +1 similar issue
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-apl3/igt@kms_plane_cursor@pipe-a-viewport-size-64.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-apl4/igt@kms_plane_cursor@pipe-a-viewport-size-64.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-tglb:         [SKIP][132] ([i915#1911]) -> [PASS][133]
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-tglb5/igt@kms_psr2_su@frontbuffer.html
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-tglb3/igt@kms_psr2_su@frontbuffer.html
    - shard-iclb:         [SKIP][134] ([fdo#109642] / [fdo#111068]) -> [PASS][135]
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb7/igt@kms_psr2_su@frontbuffer.html
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb2/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@no_drrs:
    - shard-iclb:         [FAIL][136] ([i915#173]) -> [PASS][137]
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb1/igt@kms_psr@no_drrs.html
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb4/igt@kms_psr@no_drrs.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [SKIP][138] ([fdo#109441]) -> [PASS][139] +1 similar issue
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb6/igt@kms_psr@psr2_cursor_render.html
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb2/igt@kms_psr@psr2_cursor_render.html

  * igt@perf_pmu@module-unload:
    - shard-iclb:         [DMESG-WARN][140] ([i915#1982]) -> [PASS][141]
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb5/igt@perf_pmu@module-unload.html
   [141]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb4/igt@perf_pmu@module-unload.html

  * igt@perf_pmu@other-init-3:
    - shard-tglb:         [DMESG-WARN][142] ([i915#402]) -> [PASS][143] +1 similar issue
   [142]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-tglb6/igt@perf_pmu@other-init-3.html
   [143]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-tglb7/igt@perf_pmu@other-init-3.html

  * igt@syncobj_basic@test-valid-cycle:
    - shard-glk:          [TIMEOUT][144] ([i915#1958]) -> [PASS][145] +1 similar issue
   [144]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk5/igt@syncobj_basic@test-valid-cycle.html
   [145]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk7/igt@syncobj_basic@test-valid-cycle.html

  * igt@syncobj_wait@single-wait-all-for-submit-signaled:
    - shard-tglb:         [TIMEOUT][146] -> [PASS][147] +2 similar issues
   [146]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-tglb5/igt@syncobj_wait@single-wait-all-for-submit-signaled.html
   [147]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-tglb6/igt@syncobj_wait@single-wait-all-for-submit-signaled.html

  
#### Warnings ####

  * igt@gem_exec_reloc@basic-concurrent16:
    - shard-snb:          [TIMEOUT][148] ([i915#1958]) -> [FAIL][149] ([i915#1930])
   [148]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-snb2/igt@gem_exec_reloc@basic-concurrent16.html
   [149]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-snb2/igt@gem_exec_reloc@basic-concurrent16.html

  * igt@i915_pm_backlight@basic-brightness:
    - shard-hsw:          [SKIP][150] ([fdo#109271]) -> [TIMEOUT][151] ([i915#1958]) +2 similar issues
   [150]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-hsw4/igt@i915_pm_backlight@basic-brightness.html
   [151]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-hsw4/igt@i915_pm_backlight@basic-brightness.html

  * igt@i915_pm_dc@dc6-psr:
    - shard-tglb:         [FAIL][152] ([i915#1899]) -> [FAIL][153] ([i915#454])
   [152]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-tglb8/igt@i915_pm_dc@dc6-psr.html
   [153]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-tglb3/igt@i915_pm_dc@dc6-psr.html

  * igt@i915_pm_rc6_residency@rc6-idle:
    - shard-iclb:         [FAIL][154] ([i915#1515]) -> [WARN][155] ([i915#1515])
   [154]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb2/igt@i915_pm_rc6_residency@rc6-idle.html
   [155]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb6/igt@i915_pm_rc6_residency@rc6-idle.html

  * igt@kms_busy@basic-flip-pipe-d:
    - shard-hsw:          [TIMEOUT][156] ([i915#1958]) -> [SKIP][157] ([fdo#109271]) +1 similar issue
   [156]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-hsw2/igt@kms_busy@basic-flip-pipe-d.html
   [157]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-hsw6/igt@kms_busy@basic-flip-pipe-d.html
    - shard-glk:          [TIMEOUT][158] ([i915#1958]) -> [SKIP][159] ([fdo#109271]) +1 similar issue
   [158]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-glk5/igt@kms_busy@basic-flip-pipe-d.html
   [159]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-glk4/igt@kms_busy@basic-flip-pipe-d.html

  * igt@kms_color@pipe-d-ctm-0-25:
    - shard-iclb:         [SKIP][160] ([fdo#109278] / [fdo#112010] / [i915#1149]) -> [SKIP][161] ([fdo#109278] / [i915#1149]) +9 similar issues
   [160]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8611/shard-iclb1/igt@kms_color@pipe-d-ctm-0-25.html
   [161]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4664/shard-iclb6/igt@kms_color@pipe-d-ctm-0-25.html

  * igt@kms_content_protection@atomic:
    - shard-kbl:          [TIMEOUT][162] ([i915#1319]) -> [TIMEOUT][163] ([i915#1319] / [i915#1958])
   [162]: https://intel-g

== Logs ==

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

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

* Re: [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes
  2020-06-10 19:37 ` [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
@ 2020-06-16 13:43   ` Petri Latvala
  2020-06-17 11:20     ` Khajapasha, Mohammed
  2020-06-17 17:45   ` [igt-dev] [PATCH i-g-t v2 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2020-06-17 17:52   ` [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2 siblings, 1 reply; 23+ messages in thread
From: Petri Latvala @ 2020-06-16 13:43 UTC (permalink / raw)
  To: Mohammed Khajapasha; +Cc: igt-dev

On Thu, Jun 11, 2020 at 01:07:24AM +0530, Mohammed Khajapasha wrote:
> 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.
> 
> Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
> ---
>  lib/igt_kms.c | 30 +++++++++++++++++++++++++-----
>  lib/igt_kms.h | 13 ++++++++-----
>  2 files changed, 33 insertions(+), 10 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index afef5939..2b1cf878 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1921,10 +1921,26 @@ void igt_display_require(igt_display_t *display, int drm_fd)
>  	 * We cache the number of pipes, that number is a physical limit of the
>  	 * hardware and cannot change of time (for now, at least).
>  	 */
> -	display->n_pipes = resources->count_crtcs;
> -	display->pipes = calloc(sizeof(igt_pipe_t), display->n_pipes);
> +	display->n_pipes = IGT_MAX_PIPES;
> +	display->pipes = calloc(sizeof(igt_pipe_t), IGT_MAX_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;
> +		struct drm_i915_get_pipe_from_crtc_id get_pipe;
> +
> +		/* Get right pipe enum from kernel for a 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;
> +		pipe->enabled = true;
> +		pipe->crtc_id = resources->crtcs[i];
> +	}
> +

You need to eventually make sure to only do this dancing for i915
devices. Might as well get that done early. For non-i915 devices you
need to make pipe->pipe equal to i directly, and so on.

You also need to store i in the pipe objects. possible_crtcs from a
drm plane refers to the value of i, not the pipe enum. That also needs
to be handled correctly futher down.


>  	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
>  	if (drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1) == 0)
>  		display->is_atomic = 1;
> @@ -1959,9 +1975,7 @@ void igt_display_require(igt_display_t *display, int drm_fd)
>  		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;
> @@ -2409,12 +2423,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 << pipe->pipe);

full_pipe_mask operates on config->valid_crtc_idx_mask later in this
function, so it's one of those that needs to operate on the index (i),
not the pipe->pipe value.


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

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

* Re: [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes
  2020-06-16 13:43   ` Petri Latvala
@ 2020-06-17 11:20     ` Khajapasha, Mohammed
  2020-06-17 11:27       ` Petri Latvala
  0 siblings, 1 reply; 23+ messages in thread
From: Khajapasha, Mohammed @ 2020-06-17 11:20 UTC (permalink / raw)
  To: Latvala, Petri; +Cc: igt-dev@lists.freedesktop.org, Kunche, Kishore



> -----Original Message-----
> From: Latvala, Petri <petri.latvala@intel.com>
> Sent: Tuesday, June 16, 2020 7:14 PM
> To: Khajapasha, Mohammed <mohammed.khajapasha@intel.com>
> Cc: igt-dev@lists.freedesktop.org
> Subject: Re: [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display
> with non-contiguous pipes
> 
> On Thu, Jun 11, 2020 at 01:07:24AM +0530, Mohammed Khajapasha wrote:
> > 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.
> >
> > Signed-off-by: Mohammed Khajapasha
> <mohammed.khajapasha@intel.com>
> > ---
> >  lib/igt_kms.c | 30 +++++++++++++++++++++++++-----  lib/igt_kms.h | 13
> > ++++++++-----
> >  2 files changed, 33 insertions(+), 10 deletions(-)
> >
> > diff --git a/lib/igt_kms.c b/lib/igt_kms.c index afef5939..2b1cf878
> > 100644
> > --- a/lib/igt_kms.c
> > +++ b/lib/igt_kms.c
> > @@ -1921,10 +1921,26 @@ void igt_display_require(igt_display_t
> *display, int drm_fd)
> >  	 * We cache the number of pipes, that number is a physical limit of
> the
> >  	 * hardware and cannot change of time (for now, at least).
> >  	 */
> > -	display->n_pipes = resources->count_crtcs;
> > -	display->pipes = calloc(sizeof(igt_pipe_t), display->n_pipes);
> > +	display->n_pipes = IGT_MAX_PIPES;
> > +	display->pipes = calloc(sizeof(igt_pipe_t), IGT_MAX_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;
> > +		struct drm_i915_get_pipe_from_crtc_id get_pipe;
> > +
> > +		/* Get right pipe enum from kernel for a 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;
> > +		pipe->enabled = true;
> > +		pipe->crtc_id = resources->crtcs[i];
> > +	}
> > +
> 
> You need to eventually make sure to only do this dancing for i915 devices.
> Might as well get that done early. For non-i915 devices you need to make
> pipe->pipe equal to i directly, and so on.
> 
> You also need to store i in the pipe objects. possible_crtcs from a drm
> plane refers to the value of i, not the pipe enum. That also needs to be
> handled correctly futher down.
> 
> 
> >  	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES,
> 1);
> >  	if (drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1) == 0)
> >  		display->is_atomic = 1;
> > @@ -1959,9 +1975,7 @@ void igt_display_require(igt_display_t *display,
> int drm_fd)
> >  		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;
> > @@ -2409,12 +2423,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 << pipe->pipe);
> 
> full_pipe_mask operates on config->valid_crtc_idx_mask later in this
> function, so it's one of those that needs to operate on the index (i), not the
> pipe->pipe value.

With PIPE_A & PIPE_C configuration, if we use index(i) rather than pipe->pipe the full_pipe_mask will be 0x11
But from kernel the encoder->possible_crtcs can be set from individual encoder's pipe_mask
Snippet
/*
for_each_intel_crtc(dev, crtc) 
{
	if (encoder->pipe_mask & 
		BIT(crtc->pipe)) possible_crtcs |= drm_crtc_mask(&crtc->base);
}

and pipe_mask for invidual encoder can be set by 

intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_C) --> which is 0x0101

*/

So with PIPE_A & PIPE_C, the output connected to PIPE_C can be miss while populating outputs for pipes.
--
Khajapasha
> 
> 
> --
> Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes
  2020-06-17 11:20     ` Khajapasha, Mohammed
@ 2020-06-17 11:27       ` Petri Latvala
  2020-06-17 12:11         ` Khajapasha, Mohammed
  0 siblings, 1 reply; 23+ messages in thread
From: Petri Latvala @ 2020-06-17 11:27 UTC (permalink / raw)
  To: Khajapasha, Mohammed; +Cc: igt-dev@lists.freedesktop.org, Kunche, Kishore

On Wed, Jun 17, 2020 at 02:20:26PM +0300, Khajapasha, Mohammed wrote:
> 
> 
> > -----Original Message-----
> > From: Latvala, Petri <petri.latvala@intel.com>
> > Sent: Tuesday, June 16, 2020 7:14 PM
> > To: Khajapasha, Mohammed <mohammed.khajapasha@intel.com>
> > Cc: igt-dev@lists.freedesktop.org
> > Subject: Re: [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display
> > with non-contiguous pipes
> >
> > On Thu, Jun 11, 2020 at 01:07:24AM +0530, Mohammed Khajapasha wrote:
> > > 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.
> > >
> > > Signed-off-by: Mohammed Khajapasha
> > <mohammed.khajapasha@intel.com>
> > > ---
> > >  lib/igt_kms.c | 30 +++++++++++++++++++++++++-----  lib/igt_kms.h | 13
> > > ++++++++-----
> > >  2 files changed, 33 insertions(+), 10 deletions(-)
> > >
> > > diff --git a/lib/igt_kms.c b/lib/igt_kms.c index afef5939..2b1cf878
> > > 100644
> > > --- a/lib/igt_kms.c
> > > +++ b/lib/igt_kms.c
> > > @@ -1921,10 +1921,26 @@ void igt_display_require(igt_display_t
> > *display, int drm_fd)
> > >   * We cache the number of pipes, that number is a physical limit of
> > the
> > >   * hardware and cannot change of time (for now, at least).
> > >   */
> > > -display->n_pipes = resources->count_crtcs;
> > > -display->pipes = calloc(sizeof(igt_pipe_t), display->n_pipes);
> > > +display->n_pipes = IGT_MAX_PIPES;
> > > +display->pipes = calloc(sizeof(igt_pipe_t), IGT_MAX_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;
> > > +struct drm_i915_get_pipe_from_crtc_id get_pipe;
> > > +
> > > +/* Get right pipe enum from kernel for a 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;
> > > +pipe->enabled = true;
> > > +pipe->crtc_id = resources->crtcs[i];
> > > +}
> > > +
> >
> > You need to eventually make sure to only do this dancing for i915 devices.
> > Might as well get that done early. For non-i915 devices you need to make
> > pipe->pipe equal to i directly, and so on.
> >
> > You also need to store i in the pipe objects. possible_crtcs from a drm
> > plane refers to the value of i, not the pipe enum. That also needs to be
> > handled correctly futher down.
> >
> >
> > >  drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES,
> > 1);
> > >  if (drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1) == 0)
> > >  display->is_atomic = 1;
> > > @@ -1959,9 +1975,7 @@ void igt_display_require(igt_display_t *display,
> > int drm_fd)
> > >  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;
> > > @@ -2409,12 +2423,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 << pipe->pipe);
> >
> > full_pipe_mask operates on config->valid_crtc_idx_mask later in this
> > function, so it's one of those that needs to operate on the index (i), not the
> > pipe->pipe value.
> 
> With PIPE_A & PIPE_C configuration, if we use index(i) rather than pipe->pipe the full_pipe_mask will be 0x11
> But from kernel the encoder->possible_crtcs can be set from individual encoder's pipe_mask
> Snippet
> /*
> for_each_intel_crtc(dev, crtc)
> {
> if (encoder->pipe_mask &
> BIT(crtc->pipe)) possible_crtcs |= drm_crtc_mask(&crtc->base);
> }
> 
> and pipe_mask for invidual encoder can be set by
> 
> intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_C) --> which is 0x0101
> 
> */
> 
> So with PIPE_A & PIPE_C, the output connected to PIPE_C can be miss while populating outputs for pipes.

Yeah but possible_crtcs is set with drm_crtc_mask, not with pipe_mask.

static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
{
        return 1 << drm_crtc_index(crtc);
}



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

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

* Re: [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes
  2020-06-17 11:27       ` Petri Latvala
@ 2020-06-17 12:11         ` Khajapasha, Mohammed
  0 siblings, 0 replies; 23+ messages in thread
From: Khajapasha, Mohammed @ 2020-06-17 12:11 UTC (permalink / raw)
  To: Latvala, Petri; +Cc: igt-dev@lists.freedesktop.org, Kunche, Kishore



> -----Original Message-----
> From: Latvala, Petri <petri.latvala@intel.com>
> Sent: Wednesday, June 17, 2020 4:58 PM
> To: Khajapasha, Mohammed <mohammed.khajapasha@intel.com>
> Cc: igt-dev@lists.freedesktop.org; Kunche, Kishore
> <kishore.kunche@intel.com>
> Subject: Re: [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display
> with non-contiguous pipes
> 
> On Wed, Jun 17, 2020 at 02:20:26PM +0300, Khajapasha, Mohammed wrote:
> >
> >
> > > -----Original Message-----
> > > From: Latvala, Petri <petri.latvala@intel.com>
> > > Sent: Tuesday, June 16, 2020 7:14 PM
> > > To: Khajapasha, Mohammed <mohammed.khajapasha@intel.com>
> > > Cc: igt-dev@lists.freedesktop.org
> > > Subject: Re: [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support
> > > for display with non-contiguous pipes
> > >
> > > On Thu, Jun 11, 2020 at 01:07:24AM +0530, Mohammed Khajapasha
> wrote:
> > > > 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.
> > > >
> > > > Signed-off-by: Mohammed Khajapasha
> > > <mohammed.khajapasha@intel.com>
> > > > ---
> > > >  lib/igt_kms.c | 30 +++++++++++++++++++++++++-----  lib/igt_kms.h
> > > > | 13
> > > > ++++++++-----
> > > >  2 files changed, 33 insertions(+), 10 deletions(-)
> > > >
> > > > diff --git a/lib/igt_kms.c b/lib/igt_kms.c index
> > > > afef5939..2b1cf878
> > > > 100644
> > > > --- a/lib/igt_kms.c
> > > > +++ b/lib/igt_kms.c
> > > > @@ -1921,10 +1921,26 @@ void igt_display_require(igt_display_t
> > > *display, int drm_fd)
> > > >   * We cache the number of pipes, that number is a physical limit
> > > > of
> > > the
> > > >   * hardware and cannot change of time (for now, at least).
> > > >   */
> > > > -display->n_pipes = resources->count_crtcs; pipes =
> > > > -display->calloc(sizeof(igt_pipe_t), display->n_pipes);
> > > > +display->n_pipes = IGT_MAX_PIPES; pipes =
> > > > +display->calloc(sizeof(igt_pipe_t), IGT_MAX_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;
> > > > +struct drm_i915_get_pipe_from_crtc_id get_pipe;
> > > > +
> > > > +/* Get right pipe enum from kernel for a 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;
> > > > +pipe->enabled = true;
> > > > +pipe->crtc_id = resources->crtcs[i];
> > > > +}
> > > > +
> > >
> > > You need to eventually make sure to only do this dancing for i915
> devices.
> > > Might as well get that done early. For non-i915 devices you need to
> > > make
> > > pipe->pipe equal to i directly, and so on.
> > >
> > > You also need to store i in the pipe objects. possible_crtcs from a
> > > drm plane refers to the value of i, not the pipe enum. That also
> > > needs to be handled correctly futher down.
> > >
> > >
> > > >  drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES,
> > > 1);
> > > >  if (drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1) == 0)
> > > > display->is_atomic = 1; @@ -1959,9 +1975,7 @@ void
> > > > igt_display_require(igt_display_t *display,
> > > int drm_fd)
> > > >  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;
> > > > @@ -2409,12 +2423,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 <<
> > > > +pipe->pipe);
> > >
> > > full_pipe_mask operates on config->valid_crtc_idx_mask later in this
> > > function, so it's one of those that needs to operate on the index
> > > (i), not the
> > > pipe->pipe value.
> >
> > With PIPE_A & PIPE_C configuration, if we use index(i) rather than
> > pipe->pipe the full_pipe_mask will be 0x11 But from kernel the
> > encoder->possible_crtcs can be set from individual encoder's pipe_mask
> > Snippet
> > /*
> > for_each_intel_crtc(dev, crtc)
> > {
> > if (encoder->pipe_mask &
> > BIT(crtc->pipe)) possible_crtcs |= drm_crtc_mask(&crtc->base); }
> >
> > and pipe_mask for invidual encoder can be set by
> >
> > intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_C) --> which is
> > 0x0101
> >
> > */
> >
> > So with PIPE_A & PIPE_C, the output connected to PIPE_C can be miss
> while populating outputs for pipes.
> 
> Yeah but possible_crtcs is set with drm_crtc_mask, not with pipe_mask.
> 
> static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc) {
>         return 1 << drm_crtc_index(crtc); }
> 
> 

Yes, the possible_crtcs for drm_plane is set by drm_crtc_index, but encoder's possible_crtcs is set by pipe's bit map

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

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

* [igt-dev] [PATCH i-g-t v2 0/6] lib/igt_kms: Add support for display with
  2020-06-10 19:37 ` [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
  2020-06-16 13:43   ` Petri Latvala
@ 2020-06-17 17:45   ` Mohammed Khajapasha
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 1/6] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
                       ` (5 more replies)
  2020-06-17 17:52   ` [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2 siblings, 6 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:45 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

Add support for display with non-contiguous pipes.

Mohammed Khajapasha (6):
  lib/igt_kms: Add support for display with non-contiguous pipes
  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

 lib/igt_kms.c               | 62 ++++++++++++++++++++++++++++++-------
 lib/igt_kms.h               | 13 +++++---
 tests/kms_color.c           |  3 +-
 tests/kms_color_chamelium.c |  3 +-
 tests/kms_concurrent.c      |  3 +-
 tests/kms_cursor_legacy.c   | 14 ++++++---
 tests/kms_lease.c           |  8 +++--
 tests/kms_pipe_crc_basic.c  |  6 ++--
 tests/kms_plane.c           |  3 +-
 tests/kms_plane_lowres.c    |  3 +-
 tests/kms_plane_multiple.c  |  3 +-
 tests/kms_universal_plane.c | 18 +++++++----
 12 files changed, 102 insertions(+), 37 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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t v2 1/6] lib/igt_kms: Add support for display with non-contiguous pipes
  2020-06-17 17:45   ` [igt-dev] [PATCH i-g-t v2 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-06-17 17:45     ` Mohammed Khajapasha
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 2/6] tests/kms_cursor_legacy: Read crtc id for enable pipes Mohammed Khajapasha
                       ` (4 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:45 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

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.

v2:
    changed upper bound allocation for pipes for i915 device (Petri)
    assigned pipe for a drm plane as per possible crtcs for plane (Petri)
    changed full pipe mask for a output using index of i (Petri)

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

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index afef5939..277d5c37 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1888,13 +1888,14 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 {
 	drmModeRes *resources;
 	drmModePlaneRes *plane_resources;
-	int i;
+	int i, i915_dev;
 
 	memset(display, 0, sizeof(igt_display_t));
 
 	LOG_INDENT(display, "init");
 
 	display->drm_fd = drm_fd;
+	i915_dev = is_i915_device(drm_fd);
 
 	resources = drmModeGetResources(display->drm_fd);
 	if (!resources)
@@ -1921,10 +1922,33 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 	 * We cache the number of pipes, that number is a physical limit of the
 	 * hardware and cannot change of time (for now, at least).
 	 */
-	display->n_pipes = resources->count_crtcs;
+	if (i915_dev)
+		display->n_pipes = IGT_MAX_PIPES;
+	else
+		display->n_pipes = resources->count_crtcs;
+
 	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;
+		struct drm_i915_get_pipe_from_crtc_id get_pipe;
+
+		/* Get right pipe enum from kernel for a 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);
+
+		if (i915_dev)
+			pipe = &display->pipes[get_pipe.pipe];
+		else
+			pipe = &display->pipes[i];
+		pipe->pipe = get_pipe.pipe;
+		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 +1979,33 @@ 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, k = 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 */
+		if (i915_dev) {
+			for(k = 0; k < resources->count_crtcs; k++) {
+				if(pipe->crtc_id == resources->crtcs[k])
+					break;
+			}
+		} else {
+			k = i;
+		}
+
 		/* 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 & (1 << k))
 				n_planes++;
 		}
 
@@ -1987,7 +2019,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 & (1 << k)))
 				continue;
 
 			type = global_plane->type;
@@ -2409,12 +2441,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 32a0e4cc..e91a2094 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -341,6 +341,7 @@ typedef struct igt_plane {
 struct igt_pipe {
 	igt_display_t *display;
 	enum pipe pipe;
+	bool enabled;
 
 	int n_planes;
 	int plane_cursor;
@@ -510,8 +511,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 +532,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 +552,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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t v2 2/6] tests/kms_cursor_legacy: Read crtc id for enable pipes
  2020-06-17 17:45   ` [igt-dev] [PATCH i-g-t v2 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 1/6] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
@ 2020-06-17 17:45     ` Mohammed Khajapasha
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 3/6] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
                       ` (3 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:45 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

Read the crtc ids for enable pipes only in display.

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

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 344442e8..151bd31d 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,8 @@ igt_main
 			errno = 0;
 
 			igt_fixture {
-				igt_skip_on(n >= display.n_pipes);
+				igt_require_f(display.pipes[n].enabled,
+						"Pipe-%s not enabled\n", kmstest_pipe_name(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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t v2 3/6] tests/kms_lease: Get pipe from crtc for enable pipes
  2020-06-17 17:45   ` [igt-dev] [PATCH i-g-t v2 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 1/6] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 2/6] tests/kms_cursor_legacy: Read crtc id for enable pipes Mohammed Khajapasha
@ 2020-06-17 17:45     ` Mohammed Khajapasha
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 4/6] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
                       ` (2 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:45 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

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 927c2315..007ae47f 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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t v2 4/6] tests/kms_lease: Read crtc id for a valid pipe
  2020-06-17 17:45   ` [igt-dev] [PATCH i-g-t v2 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
                       ` (2 preceding siblings ...)
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 3/6] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
@ 2020-06-17 17:45     ` Mohammed Khajapasha
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 5/6] lib/kms: Skip igt test cases for disabled display pipes Mohammed Khajapasha
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 6/6] tests/kms: Skip kms test cases for disabled pipes Mohammed Khajapasha
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:45 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

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 007ae47f..3c92ca78 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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t v2 5/6] lib/kms: Skip igt test cases for disabled display pipes
  2020-06-17 17:45   ` [igt-dev] [PATCH i-g-t v2 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
                       ` (3 preceding siblings ...)
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 4/6] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
@ 2020-06-17 17:45     ` Mohammed Khajapasha
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 6/6] tests/kms: Skip kms test cases for disabled pipes Mohammed Khajapasha
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:45 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

Skip igt test cases for disabled pipes.

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

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 277d5c37..134b54dd 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2162,8 +2162,9 @@ 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_skip_on_f(((pipe >= igt_display_get_n_pipes(display)) ||
+				!(display->pipes[pipe].enabled)),
+			"Pipe %s does not exist or not enabled.\n", kmstest_pipe_name(pipe));
 
 	for_each_valid_output_on_pipe(display, pipe, output)
 		return;
@@ -2518,7 +2519,8 @@ 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->n_pipes) &&
+			display->pipes[pipe].enabled);
 
 	__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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t v2 6/6] tests/kms: Skip kms test cases for disabled pipes
  2020-06-17 17:45   ` [igt-dev] [PATCH i-g-t v2 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
                       ` (4 preceding siblings ...)
  2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 5/6] lib/kms: Skip igt test cases for disabled display pipes Mohammed Khajapasha
@ 2020-06-17 17:45     ` Mohammed Khajapasha
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:45 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

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           |  3 ++-
 tests/kms_color_chamelium.c |  3 ++-
 tests/kms_concurrent.c      |  3 ++-
 tests/kms_pipe_crc_basic.c  |  6 ++++--
 tests/kms_plane.c           |  3 ++-
 tests/kms_plane_lowres.c    |  3 ++-
 tests/kms_plane_multiple.c  |  3 ++-
 tests/kms_universal_plane.c | 18 ++++++++++++------
 8 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index 7f2fbd4a..19f0f9b5 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -628,7 +628,8 @@ 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((p < data->display.n_pipes) &&
+				(data->display.pipes[p].enabled));
 
 		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..2d690ca3 100644
--- a/tests/kms_color_chamelium.c
+++ b/tests/kms_color_chamelium.c
@@ -519,7 +519,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 
 	igt_fixture {
 
-		igt_require(p < data->display.n_pipes);
+		igt_require((p < data->display.n_pipes) &&
+				(data->display.pipes[p].enabled));
 
 		pipe = &data->display.pipes[p];
 		igt_require(pipe->n_planes >= 0);
diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index 89016563..1730bb2b 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -320,7 +320,8 @@ 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_skip_on((pipe >= data->display.n_pipes) ||
+				!(data->display.pipes[pipe].enabled));
 		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..ec31e2ca 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -71,7 +71,8 @@ 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_skip_on((pipe >= display->n_pipes) ||
+			!(display->pipes[pipe].enabled));
 	igt_require_f(output, "No connector found for pipe %s\n",
 		      kmstest_pipe_name(pipe));
 
@@ -187,7 +188,8 @@ 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_skip_on((pipe >= data.display.n_pipes) ||
+					!(data.display.pipes[pipe].enabled));
 
 			test_read_crc(&data, pipe, 0);
 
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index c6ead813..85ed4f94 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -940,7 +940,8 @@ static void
 run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 {
 	igt_fixture {
-		igt_skip_on(pipe >= data->display.n_pipes);
+		igt_skip_on((pipe >= data->display.n_pipes) ||
+				!(data->display.pipes[pipe].enabled));
 		igt_require(data->display.pipes[pipe].n_planes > 0);
 	}
 
diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index 012b25e3..16afe570 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -259,7 +259,8 @@ 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_skip_on((data->pipe >= data->display.n_pipes) ||
+			!(data->display.pipes[data->pipe].enabled));
 	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 6cf060b3..e7b5951c 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -378,7 +378,8 @@ static void
 run_tests_for_pipe(data_t *data, enum pipe pipe)
 {
 	igt_fixture {
-		igt_skip_on(pipe >= data->display.n_pipes);
+		igt_skip_on((pipe >= data->display.n_pipes) ||
+				!(data->display.pipes[pipe].enabled));
 		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..ce28b37d 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -135,7 +135,8 @@ 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_skip_on((pipe >= display->n_pipes) ||
+			!(display->pipes[pipe].enabled));
 
 	igt_info("Testing connector %s using pipe %s\n", igt_output_name(output),
 		 kmstest_pipe_name(pipe));
@@ -364,7 +365,8 @@ 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_skip_on((pipe >= data->display.n_pipes) ||
+			!(data->display.pipes[pipe].enabled));
 
 	igt_output_set_pipe(output, pipe);
 	mode = igt_output_get_mode(output);
@@ -476,7 +478,8 @@ 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_skip_on((pipe >= data->display.n_pipes) ||
+			!(data->display.pipes[pipe].enabled));
 
 	igt_output_set_pipe(output, pipe);
 
@@ -577,7 +580,8 @@ 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_skip_on((pipe >= display->n_pipes) ||
+			!(display->pipes[pipe].enabled));
 	igt_require(display->has_cursor_plane);
 
 	igt_output_set_pipe(output, pipe);
@@ -705,7 +709,8 @@ 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_skip_on((pipe >= data->display.n_pipes) ||
+			!(data->display.pipes[pipe].enabled));
 
 	igt_output_set_pipe(output, pipe);
 
@@ -750,7 +755,8 @@ 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_skip_on((pipe >= data->display.n_pipes) ||
+			!(data->display.pipes[pipe].enabled));
 
 		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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with
  2020-06-10 19:37 ` [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
  2020-06-16 13:43   ` Petri Latvala
  2020-06-17 17:45   ` [igt-dev] [PATCH i-g-t v2 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-06-17 17:52   ` Mohammed Khajapasha
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
                       ` (5 more replies)
  2 siblings, 6 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:52 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

Add support for display with non-contiguous pipes.

Mohammed Khajapasha (6):
  lib/igt_kms: Add support for display with non-contiguous pipes
  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

 lib/igt_kms.c               | 62 ++++++++++++++++++++++++++++++-------
 lib/igt_kms.h               | 13 +++++---
 tests/kms_color.c           |  3 +-
 tests/kms_color_chamelium.c |  3 +-
 tests/kms_concurrent.c      |  3 +-
 tests/kms_cursor_legacy.c   | 14 ++++++---
 tests/kms_lease.c           |  8 +++--
 tests/kms_pipe_crc_basic.c  |  6 ++--
 tests/kms_plane.c           |  3 +-
 tests/kms_plane_lowres.c    |  3 +-
 tests/kms_plane_multiple.c  |  3 +-
 tests/kms_universal_plane.c | 18 +++++++----
 12 files changed, 102 insertions(+), 37 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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t 1/6] lib/igt_kms: Add support for display with non-contiguous pipes
  2020-06-17 17:52   ` [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-06-17 17:52     ` Mohammed Khajapasha
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 2/6] tests/kms_cursor_legacy: Read crtc id for enable pipes Mohammed Khajapasha
                       ` (4 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:52 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

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.

v2:
    changed upper bound allocation for pipes for i915 device (Petri)
    assigned pipe for a drm plane as per possible crtcs for plane (Petri)
    changed full pipe mask for a output using index of i (Petri)

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

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index afef5939..277d5c37 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1888,13 +1888,14 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 {
 	drmModeRes *resources;
 	drmModePlaneRes *plane_resources;
-	int i;
+	int i, i915_dev;
 
 	memset(display, 0, sizeof(igt_display_t));
 
 	LOG_INDENT(display, "init");
 
 	display->drm_fd = drm_fd;
+	i915_dev = is_i915_device(drm_fd);
 
 	resources = drmModeGetResources(display->drm_fd);
 	if (!resources)
@@ -1921,10 +1922,33 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 	 * We cache the number of pipes, that number is a physical limit of the
 	 * hardware and cannot change of time (for now, at least).
 	 */
-	display->n_pipes = resources->count_crtcs;
+	if (i915_dev)
+		display->n_pipes = IGT_MAX_PIPES;
+	else
+		display->n_pipes = resources->count_crtcs;
+
 	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;
+		struct drm_i915_get_pipe_from_crtc_id get_pipe;
+
+		/* Get right pipe enum from kernel for a 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);
+
+		if (i915_dev)
+			pipe = &display->pipes[get_pipe.pipe];
+		else
+			pipe = &display->pipes[i];
+		pipe->pipe = get_pipe.pipe;
+		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 +1979,33 @@ 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, k = 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 */
+		if (i915_dev) {
+			for(k = 0; k < resources->count_crtcs; k++) {
+				if(pipe->crtc_id == resources->crtcs[k])
+					break;
+			}
+		} else {
+			k = i;
+		}
+
 		/* 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 & (1 << k))
 				n_planes++;
 		}
 
@@ -1987,7 +2019,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 & (1 << k)))
 				continue;
 
 			type = global_plane->type;
@@ -2409,12 +2441,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 32a0e4cc..e91a2094 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -341,6 +341,7 @@ typedef struct igt_plane {
 struct igt_pipe {
 	igt_display_t *display;
 	enum pipe pipe;
+	bool enabled;
 
 	int n_planes;
 	int plane_cursor;
@@ -510,8 +511,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 +532,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 +552,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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t 2/6] tests/kms_cursor_legacy: Read crtc id for enable pipes
  2020-06-17 17:52   ` [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
@ 2020-06-17 17:52     ` Mohammed Khajapasha
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 3/6] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
                       ` (3 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:52 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

Read the crtc ids for enable pipes only in display.

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

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 344442e8..151bd31d 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,8 @@ igt_main
 			errno = 0;
 
 			igt_fixture {
-				igt_skip_on(n >= display.n_pipes);
+				igt_require_f(display.pipes[n].enabled,
+						"Pipe-%s not enabled\n", kmstest_pipe_name(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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t 3/6] tests/kms_lease: Get pipe from crtc for enable pipes
  2020-06-17 17:52   ` [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 2/6] tests/kms_cursor_legacy: Read crtc id for enable pipes Mohammed Khajapasha
@ 2020-06-17 17:52     ` Mohammed Khajapasha
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 4/6] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
                       ` (2 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:52 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

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 927c2315..007ae47f 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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t 4/6] tests/kms_lease: Read crtc id for a valid pipe
  2020-06-17 17:52   ` [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
                       ` (2 preceding siblings ...)
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 3/6] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
@ 2020-06-17 17:52     ` Mohammed Khajapasha
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 5/6] lib/kms: Skip igt test cases for disabled display pipes Mohammed Khajapasha
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 6/6] tests/kms: Skip kms test cases for disabled pipes Mohammed Khajapasha
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:52 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

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 007ae47f..3c92ca78 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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t 5/6] lib/kms: Skip igt test cases for disabled display pipes
  2020-06-17 17:52   ` [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
                       ` (3 preceding siblings ...)
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 4/6] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
@ 2020-06-17 17:52     ` Mohammed Khajapasha
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 6/6] tests/kms: Skip kms test cases for disabled pipes Mohammed Khajapasha
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:52 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

Skip igt test cases for disabled pipes.

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

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 277d5c37..134b54dd 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2162,8 +2162,9 @@ 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_skip_on_f(((pipe >= igt_display_get_n_pipes(display)) ||
+				!(display->pipes[pipe].enabled)),
+			"Pipe %s does not exist or not enabled.\n", kmstest_pipe_name(pipe));
 
 	for_each_valid_output_on_pipe(display, pipe, output)
 		return;
@@ -2518,7 +2519,8 @@ 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->n_pipes) &&
+			display->pipes[pipe].enabled);
 
 	__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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t 6/6] tests/kms: Skip kms test cases for disabled pipes
  2020-06-17 17:52   ` [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
                       ` (4 preceding siblings ...)
  2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 5/6] lib/kms: Skip igt test cases for disabled display pipes Mohammed Khajapasha
@ 2020-06-17 17:52     ` Mohammed Khajapasha
  5 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 17:52 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

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           |  3 ++-
 tests/kms_color_chamelium.c |  3 ++-
 tests/kms_concurrent.c      |  3 ++-
 tests/kms_pipe_crc_basic.c  |  6 ++++--
 tests/kms_plane.c           |  3 ++-
 tests/kms_plane_lowres.c    |  3 ++-
 tests/kms_plane_multiple.c  |  3 ++-
 tests/kms_universal_plane.c | 18 ++++++++++++------
 8 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index 7f2fbd4a..19f0f9b5 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -628,7 +628,8 @@ 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((p < data->display.n_pipes) &&
+				(data->display.pipes[p].enabled));
 
 		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..2d690ca3 100644
--- a/tests/kms_color_chamelium.c
+++ b/tests/kms_color_chamelium.c
@@ -519,7 +519,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 
 	igt_fixture {
 
-		igt_require(p < data->display.n_pipes);
+		igt_require((p < data->display.n_pipes) &&
+				(data->display.pipes[p].enabled));
 
 		pipe = &data->display.pipes[p];
 		igt_require(pipe->n_planes >= 0);
diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index 89016563..1730bb2b 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -320,7 +320,8 @@ 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_skip_on((pipe >= data->display.n_pipes) ||
+				!(data->display.pipes[pipe].enabled));
 		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..ec31e2ca 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -71,7 +71,8 @@ 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_skip_on((pipe >= display->n_pipes) ||
+			!(display->pipes[pipe].enabled));
 	igt_require_f(output, "No connector found for pipe %s\n",
 		      kmstest_pipe_name(pipe));
 
@@ -187,7 +188,8 @@ 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_skip_on((pipe >= data.display.n_pipes) ||
+					!(data.display.pipes[pipe].enabled));
 
 			test_read_crc(&data, pipe, 0);
 
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index c6ead813..85ed4f94 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -940,7 +940,8 @@ static void
 run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
 {
 	igt_fixture {
-		igt_skip_on(pipe >= data->display.n_pipes);
+		igt_skip_on((pipe >= data->display.n_pipes) ||
+				!(data->display.pipes[pipe].enabled));
 		igt_require(data->display.pipes[pipe].n_planes > 0);
 	}
 
diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index 012b25e3..16afe570 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -259,7 +259,8 @@ 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_skip_on((data->pipe >= data->display.n_pipes) ||
+			!(data->display.pipes[data->pipe].enabled));
 	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 6cf060b3..e7b5951c 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -378,7 +378,8 @@ static void
 run_tests_for_pipe(data_t *data, enum pipe pipe)
 {
 	igt_fixture {
-		igt_skip_on(pipe >= data->display.n_pipes);
+		igt_skip_on((pipe >= data->display.n_pipes) ||
+				!(data->display.pipes[pipe].enabled));
 		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..ce28b37d 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -135,7 +135,8 @@ 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_skip_on((pipe >= display->n_pipes) ||
+			!(display->pipes[pipe].enabled));
 
 	igt_info("Testing connector %s using pipe %s\n", igt_output_name(output),
 		 kmstest_pipe_name(pipe));
@@ -364,7 +365,8 @@ 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_skip_on((pipe >= data->display.n_pipes) ||
+			!(data->display.pipes[pipe].enabled));
 
 	igt_output_set_pipe(output, pipe);
 	mode = igt_output_get_mode(output);
@@ -476,7 +478,8 @@ 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_skip_on((pipe >= data->display.n_pipes) ||
+			!(data->display.pipes[pipe].enabled));
 
 	igt_output_set_pipe(output, pipe);
 
@@ -577,7 +580,8 @@ 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_skip_on((pipe >= display->n_pipes) ||
+			!(display->pipes[pipe].enabled));
 	igt_require(display->has_cursor_plane);
 
 	igt_output_set_pipe(output, pipe);
@@ -705,7 +709,8 @@ 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_skip_on((pipe >= data->display.n_pipes) ||
+			!(data->display.pipes[pipe].enabled));
 
 	igt_output_set_pipe(output, pipe);
 
@@ -750,7 +755,8 @@ 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_skip_on((pipe >= data->display.n_pipes) ||
+			!(data->display.pipes[pipe].enabled));
 
 		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] 23+ messages in thread

* [igt-dev] [PATCH i-g-t 4/6] tests/kms_lease: Read crtc id for a valid pipe
  2020-06-17 18:03 [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
@ 2020-06-17 18:03 ` Mohammed Khajapasha
  0 siblings, 0 replies; 23+ messages in thread
From: Mohammed Khajapasha @ 2020-06-17 18:03 UTC (permalink / raw)
  To: suresh.kumar.kurmi, kishore.kunche, petri.latvala,
	mohammed.khajapasha, arkadiusz.hiler, igt-dev

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 007ae47f..3c92ca78 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] 23+ messages in thread

end of thread, other threads:[~2020-06-17 18:05 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10 19:37 [igt-dev] [[RFC] i-g-t 0/1] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-06-10 19:37 ` [igt-dev] [[RFC] i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
2020-06-16 13:43   ` Petri Latvala
2020-06-17 11:20     ` Khajapasha, Mohammed
2020-06-17 11:27       ` Petri Latvala
2020-06-17 12:11         ` Khajapasha, Mohammed
2020-06-17 17:45   ` [igt-dev] [PATCH i-g-t v2 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 1/6] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 2/6] tests/kms_cursor_legacy: Read crtc id for enable pipes Mohammed Khajapasha
2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 3/6] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 4/6] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 5/6] lib/kms: Skip igt test cases for disabled display pipes Mohammed Khajapasha
2020-06-17 17:45     ` [igt-dev] [PATCH i-g-t v2 6/6] tests/kms: Skip kms test cases for disabled pipes Mohammed Khajapasha
2020-06-17 17:52   ` [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 2/6] tests/kms_cursor_legacy: Read crtc id for enable pipes Mohammed Khajapasha
2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 3/6] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 4/6] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 5/6] lib/kms: Skip igt test cases for disabled display pipes Mohammed Khajapasha
2020-06-17 17:52     ` [igt-dev] [PATCH i-g-t 6/6] tests/kms: Skip kms test cases for disabled pipes Mohammed Khajapasha
2020-06-10 20:15 ` [igt-dev] ✓ Fi.CI.BAT: success for i-g-t 1/1] lib/igt_kms: Add support for display with non-contiguous pipes Patchwork
2020-06-11 11:07 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-06-17 18:03 [igt-dev] [PATCH i-g-t 0/6] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-06-17 18:03 ` [igt-dev] [PATCH i-g-t 4/6] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha

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