All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [igt-dev] [v6 i-g-t 07/14] tests/kms_atomic_transition: Fix mode selection for 2x tests
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 07/14] tests/kms_atomic_transition: " Bhanuprakash Modem
@ 2021-05-12 10:39   ` Nautiyal, Ankit K
  0 siblings, 0 replies; 28+ messages in thread
From: Nautiyal, Ankit K @ 2021-05-12 10:39 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev

LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 5/12/2021 10:35 PM, Bhanuprakash Modem wrote:
> This patch will find the connector/mode combination that fits
> into the bandwidth when more than one monitor is connected.
>
> Example:
>    When two monitors connected through MST, the second monitor
>    also tries to use the same mode. So two such modes may not
>    fit into the link bandwidth. So, iterate through connected
>    outputs & modes and find a combination of modes those fit
>    into the link BW.
>
> V2:
> * Fix commit message (Ankit)
>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/kms_atomic_transition.c | 18 +++++++++++++++++-
>   1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index be60940d7..d8085ef3b 100644
> --- a/tests/kms_atomic_transition.c
> +++ b/tests/kms_atomic_transition.c
> @@ -100,6 +100,7 @@ run_primary_test(data_t *data, enum pipe pipe, igt_output_t *output)
>   	igt_plane_set_fb(primary, NULL);
>   	igt_output_set_pipe(output, PIPE_NONE);
>   	igt_remove_fb(data->drm_fd, &fb);
> +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
>   }
>   
>   static void *fence_inc_thread(void *arg)
> @@ -784,7 +785,7 @@ static void collect_crcs_mask(igt_pipe_crc_t **pipe_crcs, unsigned mask, igt_crc
>   static void run_modeset_tests(data_t *data, int howmany, bool nonblocking, bool fencing)
>   {
>   	struct igt_fb fbs[2];
> -	int i, j = 0;
> +	int i, j;
>   	unsigned iter_max;
>   	igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
>   	igt_output_t *output;
> @@ -793,6 +794,8 @@ static void run_modeset_tests(data_t *data, int howmany, bool nonblocking, bool
>   	for (i = 0; i < data->display.n_outputs; i++)
>   		igt_output_set_pipe(&data->display.outputs[i], PIPE_NONE);
>   
> +retry:
> +	j = 0;
>   	for_each_connected_output(&data->display, output) {
>   		drmModeModeInfo *mode = igt_output_get_mode(output);
>   
> @@ -839,6 +842,19 @@ static void run_modeset_tests(data_t *data, int howmany, bool nonblocking, bool
>   
>   	iter_max = 1 << j;
>   
> +	if (igt_display_try_commit_atomic(&data->display,
> +				DRM_MODE_ATOMIC_TEST_ONLY |
> +				DRM_MODE_ATOMIC_ALLOW_MODESET,
> +				NULL) != 0) {
> +		igt_output_t *out;
> +		bool found = igt_override_all_active_output_modes_to_fit_bw(&data->display);
> +		igt_require_f(found, "No valid mode combo found.\n");
> +
> +		for_each_connected_output(&data->display, out)
> +			igt_output_set_pipe(out, PIPE_NONE);
> +
> +		goto retry;
> +	}
>   	igt_display_commit2(&data->display, COMMIT_ATOMIC);
>   
>   	for (i = 0; i < iter_max; i++) {
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.BAT: failure for Fix mode selection for 2x tests (rev6)
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
@ 2021-05-12 12:11 ` Patchwork
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 01/14] lib/igt_kms: helper to override the mode on all connectors Bhanuprakash Modem
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Patchwork @ 2021-05-12 12:11 UTC (permalink / raw)
  To: Bhanuprakash Modem; +Cc: igt-dev


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

== Series Details ==

Series: Fix mode selection for 2x tests (rev6)
URL   : https://patchwork.freedesktop.org/series/88902/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10073 -> IGTPW_5806
====================================================

Summary
-------

  **FAILURE**

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

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
    - fi-ilk-650:         [PASS][1] -> [FAIL][2] +6 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-ilk-650/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-ilk-650/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence.html
    - fi-elk-e7500:       [PASS][3] -> [FAIL][4] +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-elk-e7500/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-elk-e7500/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence.html

  
#### Warnings ####

  * igt@gem_exec_gttfill@basic:
    - fi-pnv-d510:        [FAIL][5] ([i915#3457]) -> [FAIL][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-pnv-d510/igt@gem_exec_gttfill@basic.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-pnv-d510/igt@gem_exec_gttfill@basic.html

  
#### Suppressed ####

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

  * igt@runner@aborted:
    - {fi-rkl-11500t}:    NOTRUN -> [FAIL][7]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-rkl-11500t/igt@runner@aborted.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fence@basic-await@bcs0:
    - fi-bsw-n3050:       [PASS][8] -> [FAIL][9] ([i915#3457])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-bsw-n3050/igt@gem_exec_fence@basic-await@bcs0.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-bsw-n3050/igt@gem_exec_fence@basic-await@bcs0.html
    - fi-bsw-nick:        [PASS][10] -> [FAIL][11] ([i915#3457])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-bsw-nick/igt@gem_exec_fence@basic-await@bcs0.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-bsw-nick/igt@gem_exec_fence@basic-await@bcs0.html

  * igt@gem_exec_fence@nb-await@rcs0:
    - fi-pnv-d510:        [PASS][12] -> [FAIL][13] ([i915#3457])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-pnv-d510/igt@gem_exec_fence@nb-await@rcs0.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-pnv-d510/igt@gem_exec_fence@nb-await@rcs0.html

  * igt@gem_exec_fence@nb-await@vecs0:
    - fi-bsw-kefka:       [PASS][14] -> [FAIL][15] ([i915#3457]) +2 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-bsw-kefka/igt@gem_exec_fence@nb-await@vecs0.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-bsw-kefka/igt@gem_exec_fence@nb-await@vecs0.html

  * igt@gem_wait@busy@all:
    - fi-bsw-kefka:       [PASS][16] -> [FAIL][17] ([i915#3177] / [i915#3457])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-bsw-kefka/igt@gem_wait@busy@all.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-bsw-kefka/igt@gem_wait@busy@all.html

  * igt@gem_wait@wait@all:
    - fi-bwr-2160:        [PASS][18] -> [FAIL][19] ([i915#3457]) +1 similar issue
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-bwr-2160/igt@gem_wait@wait@all.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-bwr-2160/igt@gem_wait@wait@all.html

  * igt@i915_pm_rpm@module-reload:
    - fi-kbl-guc:         [PASS][20] -> [FAIL][21] ([i915#2203] / [i915#579])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-kbl-guc/igt@i915_pm_rpm@module-reload.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-kbl-guc/igt@i915_pm_rpm@module-reload.html

  
#### Possible fixes ####

  * igt@gem_busy@busy@all:
    - fi-bsw-kefka:       [FAIL][22] ([i915#3457]) -> [PASS][23]
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-bsw-kefka/igt@gem_busy@busy@all.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-bsw-kefka/igt@gem_busy@busy@all.html

  * igt@gem_exec_fence@basic-await@vcs0:
    - fi-glk-dsi:         [FAIL][24] ([i915#3457]) -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-glk-dsi/igt@gem_exec_fence@basic-await@vcs0.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-glk-dsi/igt@gem_exec_fence@basic-await@vcs0.html

  * igt@gem_exec_fence@nb-await@vecs0:
    - fi-bsw-n3050:       [FAIL][26] ([i915#3457]) -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-bsw-n3050/igt@gem_exec_fence@nb-await@vecs0.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-bsw-n3050/igt@gem_exec_fence@nb-await@vecs0.html

  * igt@gem_wait@busy@all:
    - fi-apl-guc:         [FAIL][28] ([i915#3457]) -> [PASS][29]
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-apl-guc/igt@gem_wait@busy@all.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-apl-guc/igt@gem_wait@busy@all.html

  * igt@gem_wait@wait@all:
    - fi-bsw-nick:        [FAIL][30] ([i915#3457]) -> [PASS][31] +2 similar issues
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-bsw-nick/igt@gem_wait@wait@all.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-bsw-nick/igt@gem_wait@wait@all.html

  * igt@kms_busy@basic@modeset:
    - fi-ilk-650:         [INCOMPLETE][32] ([i915#3457]) -> [PASS][33]
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-ilk-650/igt@kms_busy@basic@modeset.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-ilk-650/igt@kms_busy@basic@modeset.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-tgl-u2:          [FAIL][34] ([i915#2416]) -> [PASS][35]
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-tgl-u2/igt@kms_frontbuffer_tracking@basic.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-tgl-u2/igt@kms_frontbuffer_tracking@basic.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a:
    - fi-elk-e7500:       [FAIL][36] -> [PASS][37] +1 similar issue
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-elk-e7500/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-elk-e7500/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a.html

  
#### Warnings ####

  * igt@gem_exec_gttfill@basic:
    - fi-ilk-650:         [FAIL][38] -> [FAIL][39] ([i915#3457])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-ilk-650/igt@gem_exec_gttfill@basic.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-ilk-650/igt@gem_exec_gttfill@basic.html

  * igt@gem_wait@busy@all:
    - fi-bsw-nick:        [FAIL][40] ([i915#3457]) -> [FAIL][41] ([i915#3177] / [i915#3457])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-bsw-nick/igt@gem_wait@busy@all.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-bsw-nick/igt@gem_wait@busy@all.html

  * igt@i915_module_load@reload:
    - fi-ilk-650:         [DMESG-FAIL][42] ([i915#3457]) -> [DMESG-WARN][43] ([i915#3457])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-ilk-650/igt@i915_module_load@reload.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-ilk-650/igt@i915_module_load@reload.html
    - fi-elk-e7500:       [DMESG-FAIL][44] ([i915#3457]) -> [DMESG-WARN][45] ([i915#3457])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-elk-e7500/igt@i915_module_load@reload.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-elk-e7500/igt@i915_module_load@reload.html
    - fi-bsw-kefka:       [DMESG-WARN][46] ([i915#1982] / [i915#3457]) -> [DMESG-FAIL][47] ([i915#1982] / [i915#3457])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-bsw-kefka/igt@i915_module_load@reload.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-bsw-kefka/igt@i915_module_load@reload.html

  * igt@i915_selftest@live@execlists:
    - fi-tgl-u2:          [INCOMPLETE][48] ([i915#3462]) -> [DMESG-FAIL][49] ([i915#3462])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-tgl-u2/igt@i915_selftest@live@execlists.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-tgl-u2/igt@i915_selftest@live@execlists.html

  * igt@runner@aborted:
    - fi-cfl-8700k:       [FAIL][50] ([i915#2426] / [i915#3363]) -> [FAIL][51] ([i915#3363])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-cfl-8700k/igt@runner@aborted.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-cfl-8700k/igt@runner@aborted.html
    - fi-glk-dsi:         [FAIL][52] ([i915#2426] / [i915#3363] / [k.org#202321]) -> [FAIL][53] ([i915#3363] / [k.org#202321])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-glk-dsi/igt@runner@aborted.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-glk-dsi/igt@runner@aborted.html
    - fi-cml-u2:          [FAIL][54] ([i915#3363]) -> [FAIL][55] ([i915#2082] / [i915#2426] / [i915#3363])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-cml-u2/igt@runner@aborted.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-cml-u2/igt@runner@aborted.html
    - fi-cfl-guc:         [FAIL][56] ([i915#2426] / [i915#3363]) -> [FAIL][57] ([i915#3363])
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-cfl-guc/igt@runner@aborted.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-cfl-guc/igt@runner@aborted.html
    - fi-kbl-7567u:       [FAIL][58] ([i915#1436] / [i915#2426] / [i915#3363]) -> [FAIL][59] ([i915#1436] / [i915#3363])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-kbl-7567u/igt@runner@aborted.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-kbl-7567u/igt@runner@aborted.html
    - fi-skl-6700k2:      [FAIL][60] ([i915#1436] / [i915#2426] / [i915#3363]) -> [FAIL][61] ([i915#1436] / [i915#3363])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10073/fi-skl-6700k2/igt@runner@aborted.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/fi-skl-6700k2/igt@runner@aborted.html

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

  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2082]: https://gitlab.freedesktop.org/drm/intel/issues/2082
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2203]: https://gitlab.freedesktop.org/drm/intel/issues/2203
  [i915#2416]: https://gitlab.freedesktop.org/drm/intel/issues/2416
  [i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
  [i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
  [i915#3177]: https://gitlab.freedesktop.org/drm/intel/issues/3177
  [i915#3276]: https://gitlab.freedesktop.org/drm/intel/issues/3276
  [i915#3277]: https://gitlab.freedesktop.org/drm/intel/issues/3277
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3283]: https://gitlab.freedesktop.org/drm/intel/issues/3283
  [i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
  [i915#3457]: https://gitlab.freedesktop.org/drm/intel/issues/3457
  [i915#3462]: https://gitlab.freedesktop.org/drm/intel/issues/3462
  [i915#3468]: https://gitlab.freedesktop.org/drm/intel/issues/3468
  [i915#579]: https://gitlab.freedesktop.org/drm/intel/issues/579
  [k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321


Participating hosts (45 -> 41)
------------------------------

  Additional (1): fi-rkl-11500t 
  Missing    (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-dg1-1 fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_6083 -> IGTPW_5806

  CI-20190529: 20190529
  CI_DRM_10073: 66e056be09be2e0345f434775f75a3aa6ac2120f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5806: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5806/index.html
  IGT_6083: d28aee5c5f528aa6c352c3339f20aaed4d698ffa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

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

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

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

* [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests
@ 2021-05-12 17:05 Bhanuprakash Modem
  2021-05-12 12:11 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fix mode selection for 2x tests (rev6) Patchwork
                   ` (16 more replies)
  0 siblings, 17 replies; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

When two monitors connected through MST, the second monitor also
tries to use the same mode. So two such modes may not fit into the
link bandwidth.

This series will find a combination of modes that fit into the BW.

IGT core helper would override the mode on all connectors that will
be modeset by the next igt_display_commit() call in the test. These
are all the connectors in igt_display_t that have a pending_pipe set
by the test up to the point of calling this helper.

For 1x tests, cleanup the state before exiting the test.

Follow-up:
As modeset will happen one by one, we can't apply this approach on
tests/kms_flip.c & tests/kms_setmode.c

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

Bhanuprakash Modem (14):
  lib/igt_kms: helper to override the mode on all connectors
  tests/kms_frontbuffer_tracking: Fix mode selection for 2x tests
  tests/kms_cursor_legacy: Fix mode selection for 2x tests
  tests/debugfs_test: Fix mode selection for 2x tests
  tests/kms_content_protection: Fix mode selection for 2x tests
  tests/kms_plane_scaling: Fix mode selection for 2x tests
  tests/kms_atomic_transition: Fix mode selection for 2x tests
  tests/kms_plane: Reset the state before exiting the test
  tests/kms_plane_alpha_blend: Reset the state before exiting the test
  tests/kms_cursor_edge_walk: Reset the state before exiting the test
  tests/kms_plane_lowres: Reset the state before exiting the test
  tests/kms_plane_cursor: Reset the state before exiting the test
  tests/kms_flip_scaled_crc: Reset the state before exiting the test
  tests/kms_vblank: Reset the state before exiting the test

 lib/igt_kms.c                    | 79 ++++++++++++++++++++++++++++++++
 lib/igt_kms.h                    |  1 +
 tests/debugfs_test.c             | 21 +++++++++
 tests/kms_atomic_transition.c    | 18 +++++++-
 tests/kms_content_protection.c   | 41 +++++++----------
 tests/kms_cursor_edge_walk.c     |  3 ++
 tests/kms_cursor_legacy.c        | 50 ++++++++++++++++++--
 tests/kms_flip_scaled_crc.c      |  5 ++
 tests/kms_frontbuffer_tracking.c | 40 ++++++++++++++++
 tests/kms_plane.c                | 15 ++++--
 tests/kms_plane_alpha_blend.c    |  5 +-
 tests/kms_plane_cursor.c         |  4 ++
 tests/kms_plane_lowres.c         |  9 ++--
 tests/kms_plane_scaling.c        | 15 ++++--
 tests/kms_vblank.c               |  2 +
 15 files changed, 264 insertions(+), 44 deletions(-)

--
2.20.1

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

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

* [igt-dev] [v6 i-g-t 01/14] lib/igt_kms: helper to override the mode on all connectors
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
  2021-05-12 12:11 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fix mode selection for 2x tests (rev6) Patchwork
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 02/14] tests/kms_frontbuffer_tracking: Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

This helper will iterate through all connectors those have a
pending_pipe != PIPE_NONE set by the test upto the point of
calling this helper. And find the combination by using
ATOMIC_TEST_ONLY then return to the test.

This helper would override the mode on all connectors that will
be modeset by the next igt_display_commit() call in the test.

V2:
* Remove MST specific logic (Daniel)
V3:
* Sort connector modes in descending order
V4:
* Fine tune the logic to reduce #of iterations (Ankit)
* Update the documentation (Ankit)
V5:
* Fix function name to make it generic (Ankit)
* Add support for legacy commit (Ankit)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 lib/igt_kms.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_kms.h |  1 +
 2 files changed, 80 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 47b829b0c..28fb9c094 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -4048,6 +4048,85 @@ void igt_output_set_pipe(igt_output_t *output, enum pipe pipe)
 	}
 }
 
+#define for_each_connector_mode(output)		\
+	for (int i__ = 0;  i__ < output->config.connector->count_modes; i__++)
+
+static int sort_drm_modes(const void *a, const void *b)
+{
+	const drmModeModeInfo *mode1 = a, *mode2 = b;
+
+	return (mode1->clock < mode2->clock) - (mode2->clock < mode1->clock);
+}
+
+static
+bool __override_all_active_output_modes_to_fit_bw(igt_display_t *display,
+						  igt_output_t *outputs[IGT_MAX_PIPES],
+						  const int n_outputs,
+						  int base)
+{
+	igt_output_t *output = NULL;
+
+	if (base >= n_outputs)
+		return false;
+
+	output = outputs[base];
+
+	for_each_connector_mode(output) {
+		int ret;
+
+		igt_output_override_mode(output, &output->config.connector->modes[i__]);
+
+		if (__override_all_active_output_modes_to_fit_bw(display, outputs, n_outputs, base + 1))
+			return true;
+
+		if (display->is_atomic)
+			ret = igt_display_try_commit_atomic(display,
+					DRM_MODE_ATOMIC_TEST_ONLY |
+					DRM_MODE_ATOMIC_ALLOW_MODESET,
+					NULL);
+		else
+			ret = igt_display_try_commit2(display, COMMIT_LEGACY);
+
+		if (!ret)
+			return true;
+	}
+
+	return false;
+}
+
+/**
+ * igt_override_all_active_output_modes_to_fit_bw:
+ * @display: a pointer to an #igt_display_t structure
+ *
+ * Override the mode on all active outputs (i.e. pending_pipe != PIPE_NONE)
+ * on basis of bandwidth.
+ *
+ * Returns: true if a valid connector mode combo found, else false
+ */
+bool igt_override_all_active_output_modes_to_fit_bw(igt_display_t *display)
+{
+	int i, n_outputs = 0;
+	igt_output_t *outputs[IGT_MAX_PIPES];
+
+	for (i = 0 ; i < display->n_outputs; i++) {
+		igt_output_t *output = &display->outputs[i];
+
+		if (output->pending_pipe == PIPE_NONE)
+			continue;
+
+		/* Sort the modes in descending order by clock freq. */
+		qsort(output->config.connector->modes,
+		      output->config.connector->count_modes,
+		      sizeof(drmModeModeInfo),
+		      sort_drm_modes);
+
+		outputs[n_outputs++] = output;
+	}
+	igt_require_f(n_outputs, "No active outputs found.\n");
+
+	return __override_all_active_output_modes_to_fit_bw(display, outputs, n_outputs, 0);
+}
+
 /*
  * igt_pipe_refresh:
  * @display: a pointer to an #igt_display_t structure
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 85f0769c9..8cde24b79 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -915,5 +915,6 @@ void igt_require_pipe(igt_display_t *display,
 
 void igt_dump_connectors_fd(int drmfd);
 void igt_dump_crtcs_fd(int drmfd);
+bool igt_override_all_active_output_modes_to_fit_bw(igt_display_t *display);
 
 #endif /* __IGT_KMS_H__ */
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 02/14] tests/kms_frontbuffer_tracking: Fix mode selection for 2x tests
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
  2021-05-12 12:11 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fix mode selection for 2x tests (rev6) Patchwork
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 01/14] lib/igt_kms: helper to override the mode on all connectors Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 03/14] tests/kms_cursor_legacy: " Bhanuprakash Modem
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

This patch will find the connector/mode combination that fits
into the bandwidth when more than one monitor is connected.

Example:
  When two monitors connected through MST, the second monitor
  also tries to use the same mode. So two such modes may not
  fit into the link bandwidth. So, iterate through connected
  outputs & modes and find a combination of modes those fit
  into the link BW.

V2:
* Remove MST specific logic (Daniel)
V3:
* Add support for legacy commit (Ankit)
V4:
* Fix commit message (Ankit)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 tests/kms_frontbuffer_tracking.c | 40 ++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 2e74bec6f..65c2ddb5c 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1683,14 +1683,54 @@ static void enable_prim_screen_and_wait(const struct test_mode *t)
 	do_assertions(ASSERT_NO_ACTION_CHANGE);
 }
 
+static void update_modeset_cached_params(void)
+{
+	bool found = false;
+
+	igt_output_set_pipe(prim_mode_params.output, prim_mode_params.pipe);
+	igt_output_set_pipe(scnd_mode_params.output, scnd_mode_params.pipe);
+
+	found = igt_override_all_active_output_modes_to_fit_bw(&drm.display);
+	igt_require_f(found, "No valid mode combo found.\n");
+
+	prim_mode_params.mode_copy = *igt_output_get_mode(prim_mode_params.output);
+	prim_mode_params.mode = &prim_mode_params.mode_copy;
+	prim_mode_params.primary.w = prim_mode_params.mode->hdisplay;
+	prim_mode_params.primary.h = prim_mode_params.mode->vdisplay;
+
+	scnd_mode_params.mode_copy = *igt_output_get_mode(scnd_mode_params.output);
+	scnd_mode_params.mode = &scnd_mode_params.mode_copy;
+	scnd_mode_params.primary.w = scnd_mode_params.mode->hdisplay;
+	scnd_mode_params.primary.h = scnd_mode_params.mode->vdisplay;
+
+	fill_fb_region(&prim_mode_params.primary, COLOR_PRIM_BG);
+	fill_fb_region(&scnd_mode_params.primary, COLOR_SCND_BG);
+
+	__set_mode_for_params(&prim_mode_params);
+	__set_mode_for_params(&scnd_mode_params);
+}
+
 static void enable_both_screens_and_wait(const struct test_mode *t)
 {
+	int ret;
+
 	fill_fb_region(&prim_mode_params.primary, COLOR_PRIM_BG);
 	fill_fb_region(&scnd_mode_params.primary, COLOR_SCND_BG);
 
 	__set_mode_for_params(&prim_mode_params);
 	__set_mode_for_params(&scnd_mode_params);
 
+	if (drm.display.is_atomic)
+		ret = igt_display_try_commit_atomic(&drm.display,
+				DRM_MODE_ATOMIC_TEST_ONLY |
+				DRM_MODE_ATOMIC_ALLOW_MODESET,
+				NULL);
+	else
+		ret = igt_display_try_commit2(&drm.display, COMMIT_LEGACY);
+
+	if (ret)
+		update_modeset_cached_params();
+
 	igt_display_commit2(&drm.display, drm.display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 
 	wanted_crc = &blue_crcs[t->format].crc;
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 03/14] tests/kms_cursor_legacy: Fix mode selection for 2x tests
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (2 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 02/14] tests/kms_frontbuffer_tracking: Fix mode selection for 2x tests Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 04/14] tests/debugfs_test: " Bhanuprakash Modem
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

This patch will find the connector/mode combination that fits
into the bandwidth when more than one monitor is connected.

Example:
  When two monitors connected through MST, the second monitor
  also tries to use the same mode. So two such modes may not
  fit into the link bandwidth. So, iterate through connected
  outputs & modes and find a combination of modes those fit
  into the link BW.

V2:
* Remove MST specific logic (Daniel)
V3:
* Add support for legacy commit (Ankit)
V4:
* Fix commit message (Ankit)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 tests/kms_cursor_legacy.c | 50 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 47 insertions(+), 3 deletions(-)

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 4723e1ff9..571ea59cf 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -50,6 +50,27 @@ IGT_TEST_DESCRIPTION("Stress legacy cursor ioctl");
 
 igt_pipe_crc_t *pipe_crc;
 
+static int try_commit(igt_display_t *display)
+{
+	return (display->is_atomic) ?
+			igt_display_try_commit_atomic(display,
+					DRM_MODE_ATOMIC_TEST_ONLY |
+					DRM_MODE_ATOMIC_ALLOW_MODESET,
+					NULL) :
+			igt_display_try_commit2(display, COMMIT_LEGACY);
+}
+
+static void override_output_modes(igt_display_t *display,
+				  igt_output_t *output1,
+				  igt_output_t *output2)
+{
+	bool found = igt_override_all_active_output_modes_to_fit_bw(display);
+	igt_require_f(found, "No valid mode combo found.\n");
+
+	igt_output_set_pipe(output1, PIPE_NONE);
+	igt_output_set_pipe(output2, PIPE_NONE);
+}
+
 static void stress(igt_display_t *display,
 		   enum pipe pipe, int num_children, unsigned mode,
 		   int timeout)
@@ -393,6 +414,7 @@ static void flip(igt_display_t *display,
 	struct drm_mode_cursor arg[2];
 	uint64_t *results;
 	struct igt_fb fb_info, fb_info2, argb_fb, cursor_fb, cursor_fb2;
+	igt_output_t *output, *output2;
 
 	results = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
 	igt_assert(results != MAP_FAILED);
@@ -406,9 +428,17 @@ static void flip(igt_display_t *display,
 	if (mode >= flip_test_atomic)
 		igt_require(display->is_atomic);
 
-	igt_require(set_fb_on_crtc(display, flip_pipe, &fb_info));
-	if (flip_pipe != cursor_pipe)
-		igt_require(set_fb_on_crtc(display, cursor_pipe, &fb_info2));
+	igt_require((output = set_fb_on_crtc(display, flip_pipe, &fb_info)));
+	if (flip_pipe != cursor_pipe) {
+		igt_require((output2 = set_fb_on_crtc(display, cursor_pipe, &fb_info2)));
+
+		if (try_commit(display)) {
+			override_output_modes(display, output, output2);
+
+			igt_require((output = set_fb_on_crtc(display, flip_pipe, &fb_info)));
+			igt_require((output2 = set_fb_on_crtc(display, cursor_pipe, &fb_info2)));
+		}
+	}
 
 	igt_create_color_fb(display->drm_fd, fb_info.width, fb_info.height, DRM_FORMAT_ARGB8888, 0, .5, .5, .5, &cursor_fb);
 
@@ -879,6 +909,13 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
 	igt_require((output = set_fb_on_crtc(display, pipe, &fb_info)));
 	igt_require((output2 = set_fb_on_crtc(display, pipe2, &fb2_info)));
 
+	if (try_commit(display)) {
+		override_output_modes(display, output, output2);
+
+		igt_require((output = set_fb_on_crtc(display, pipe, &fb_info)));
+		igt_require((output2 = set_fb_on_crtc(display, pipe2, &fb2_info)));
+	}
+
 	igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888, 0, 1., 1., 1., &cursor_fb);
 	set_cursor_on_pipe(display, pipe, &cursor_fb);
 	populate_cursor_args(display, pipe, arg1, &cursor_fb);
@@ -1129,6 +1166,13 @@ static void two_screens_cursor_vs_flip(igt_display_t *display, int nloops, bool
 	igt_require((outputs[0] = set_fb_on_crtc(display, pipe[0], &fb_info[0])));
 	igt_require((outputs[1] = set_fb_on_crtc(display, pipe[1], &fb_info[1])));
 
+	if (try_commit(display)) {
+		override_output_modes(display, outputs[0], outputs[1]);
+
+		igt_require((outputs[0] = set_fb_on_crtc(display, pipe[0], &fb_info[0])));
+		igt_require((outputs[1] = set_fb_on_crtc(display, pipe[1], &fb_info[1])));
+	}
+
 	igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888, 0, 1., 1., 1., &cursor_fb);
 
 	set_cursor_on_pipe(display, pipe[0], &cursor_fb);
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 04/14] tests/debugfs_test: Fix mode selection for 2x tests
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (3 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 03/14] tests/kms_cursor_legacy: " Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 05/14] tests/kms_content_protection: " Bhanuprakash Modem
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

This patch will find the connector/mode combination that fits
into the bandwidth when more than one monitor is connected.

Example:
  When two monitors connected through MST, the second monitor
  also tries to use the same mode. So two such modes may not
  fit into the link bandwidth. So, iterate through connected
  outputs & modes and find a combination of modes those fit
  into the link BW.

V2:
* Add support for legacy commit (Ankit)
V3:
* Fix commit message (Ankit)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 tests/debugfs_test.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
index 46ba0a8be..e50f213ae 100644
--- a/tests/debugfs_test.c
+++ b/tests/debugfs_test.c
@@ -98,12 +98,14 @@ static void kms_tests(int fd, int debugfs)
 	igt_display_t display;
 	struct igt_fb fb[IGT_MAX_PIPES];
 	enum pipe pipe;
+	int ret;
 
 	igt_fixture
 		igt_display_require(&display, fd);
 
 	igt_subtest("read_all_entries_display_on") {
 		/* try to light all pipes */
+retry:
 		for_each_pipe(&display, pipe) {
 			igt_output_t *output;
 
@@ -128,6 +130,25 @@ static void kms_tests(int fd, int debugfs)
 			}
 		}
 
+		if (display.is_atomic)
+			ret = igt_display_try_commit_atomic(&display,
+					DRM_MODE_ATOMIC_TEST_ONLY |
+					DRM_MODE_ATOMIC_ALLOW_MODESET,
+					NULL);
+		else
+			ret = igt_display_try_commit2(&display, COMMIT_LEGACY);
+
+		if (ret) {
+			igt_output_t *output;
+			bool found = igt_override_all_active_output_modes_to_fit_bw(&display);
+			igt_require_f(found, "No valid mode combo found.\n");
+
+			for_each_connected_output(&display, output)
+				igt_output_set_pipe(output, PIPE_NONE);
+
+			goto retry;
+		}
+
 		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 
 		read_and_discard_sysfs_entries(debugfs, 0);
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 05/14] tests/kms_content_protection: Fix mode selection for 2x tests
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (4 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 04/14] tests/debugfs_test: " Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 06/14] tests/kms_plane_scaling: " Bhanuprakash Modem
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

This patch will find the connector/mode combination that fits
into the bandwidth when more than one monitor is connected.

Example:
  When two monitors connected through MST, the second monitor
  also tries to use the same mode. So two such modes may not
  fit into the link bandwidth. So, iterate through connected
  outputs & modes and find a combination of modes those fit
  into the link BW.

V2:
* Fix commit message (Ankit)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 tests/kms_content_protection.c | 41 +++++++++++++---------------------
 1 file changed, 16 insertions(+), 25 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 5a75b871c..1d1a439a9 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -452,39 +452,18 @@ static bool sink_hdcp2_capable(igt_output_t *output)
 	return strstr(buf, "HDCP2.2");
 }
 
-static void prepare_modeset_on_mst_output(igt_output_t *output, enum pipe pipe)
+static void prepare_modeset_on_mst_output(igt_output_t *output)
 {
-	drmModeConnectorPtr c = output->config.connector;
 	drmModeModeInfo *mode;
 	igt_plane_t *primary;
-	int i, width, height;
+	int width, height;
+	enum pipe pipe = output->pending_pipe;
 
 	mode = igt_output_get_mode(output);
 
-	/*
-	 * TODO: Add logic to use the highest possible modes on each output.
-	 * Currently using 2k modes by default on all the outputs.
-	 */
-	igt_debug("Before mode override: Output %s Mode hdisplay %d Mode vdisplay %d\n",
-		   output->name, mode->hdisplay, mode->vdisplay);
-
-	if (mode->hdisplay > 1920 && mode->vdisplay > 1080) {
-		for (i = 0; i < c->count_modes; i++) {
-			if (c->modes[i].hdisplay <= 1920 && c->modes[i].vdisplay <= 1080) {
-				mode = &c->modes[i];
-				igt_output_override_mode(output, mode);
-				break;
-			}
-		}
-	}
-
-	igt_debug("After mode overide: Output %s Mode hdisplay %d Mode vdisplay %d\n",
-		   output->name, mode->hdisplay, mode->vdisplay);
-
 	width = mode->hdisplay;
 	height = mode->vdisplay;
 
-	igt_output_set_pipe(output, pipe);
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 	igt_plane_set_fb(primary, NULL);
 	igt_plane_set_fb(primary, pipe % 2 ? &data.red : &data.green);
@@ -624,7 +603,8 @@ test_content_protection_mst(int content_type)
 
 		igt_assert_f(igt_pipe_connector_valid(pipe, output), "Output-pipe combination invalid\n");
 
-		prepare_modeset_on_mst_output(output, pipe);
+		igt_output_set_pipe(output, pipe);
+		prepare_modeset_on_mst_output(output);
 		mst_output[dp_mst_outputs++] = output;
 
 		pipe++;
@@ -635,6 +615,17 @@ test_content_protection_mst(int content_type)
 
 	igt_require_f(dp_mst_outputs > 1, "No DP MST set up with >= 2 outputs found in a single topology\n");
 
+	if (igt_display_try_commit_atomic(display,
+				DRM_MODE_ATOMIC_TEST_ONLY |
+				DRM_MODE_ATOMIC_ALLOW_MODESET,
+				NULL) != 0) {
+		bool found = igt_override_all_active_output_modes_to_fit_bw(display);
+		igt_require_f(found, "No valid mode combo found for MST modeset\n");
+
+		for (count = 0; count < dp_mst_outputs; count++)
+			prepare_modeset_on_mst_output(mst_output[count]);
+	}
+
 	ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
 	igt_require_f(ret == 0, "Commit failure during MST modeset\n");
 
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 06/14] tests/kms_plane_scaling: Fix mode selection for 2x tests
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (5 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 05/14] tests/kms_content_protection: " Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 07/14] tests/kms_atomic_transition: " Bhanuprakash Modem
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

This patch will find the connector/mode combination that fits
into the bandwidth when more than one monitor is connected.

Example:
  When two monitors connected through MST, the second monitor
  also tries to use the same mode. So two such modes may not
  fit into the link bandwidth. So, iterate through connected
  outputs & modes and find a combination of modes those fit
  into the link BW.

V2:
* Fix commit message (Ankit)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 tests/kms_plane_scaling.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 34efc588e..7464b5bdf 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -630,9 +630,6 @@ static void test_scaler_with_multi_pipe_plane(data_t *d)
 	d->plane3 = igt_output_get_plane(output2, 0);
 	d->plane4 = get_num_scalers(d, pipe2) >= 2 ? igt_output_get_plane(output2, 1) : NULL;
 
-	mode1 = igt_output_get_mode(output1);
-	mode2 = igt_output_get_mode(output2);
-
 	igt_skip_on(!igt_display_has_format_mod(display, DRM_FORMAT_XRGB8888,
 						tiling));
 
@@ -658,8 +655,20 @@ static void test_scaler_with_multi_pipe_plane(data_t *d)
 	igt_plane_set_fb(d->plane3, &d->fb[2]);
 	if (d->plane4)
 		igt_plane_set_fb(d->plane4, &d->fb[3]);
+
+	if (igt_display_try_commit_atomic(display,
+				DRM_MODE_ATOMIC_TEST_ONLY |
+				DRM_MODE_ATOMIC_ALLOW_MODESET,
+				NULL) != 0) {
+		bool found = igt_override_all_active_output_modes_to_fit_bw(display);
+		igt_require_f(found, "No valid mode combo found.\n");
+	}
+
 	igt_display_commit2(display, COMMIT_ATOMIC);
 
+	mode1 = igt_output_get_mode(output1);
+	mode2 = igt_output_get_mode(output2);
+
 	/* Upscaling Primary */
 	igt_plane_set_size(d->plane1, mode1->hdisplay, mode1->vdisplay);
 	igt_plane_set_size(d->plane3, mode2->hdisplay, mode2->vdisplay);
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 07/14] tests/kms_atomic_transition: Fix mode selection for 2x tests
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (6 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 06/14] tests/kms_plane_scaling: " Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-12 10:39   ` Nautiyal, Ankit K
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 08/14] tests/kms_plane: Reset the state before exiting the test Bhanuprakash Modem
                   ` (8 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

This patch will find the connector/mode combination that fits
into the bandwidth when more than one monitor is connected.

Example:
  When two monitors connected through MST, the second monitor
  also tries to use the same mode. So two such modes may not
  fit into the link bandwidth. So, iterate through connected
  outputs & modes and find a combination of modes those fit
  into the link BW.

V2:
* Fix commit message (Ankit)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_atomic_transition.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index be60940d7..d8085ef3b 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -100,6 +100,7 @@ run_primary_test(data_t *data, enum pipe pipe, igt_output_t *output)
 	igt_plane_set_fb(primary, NULL);
 	igt_output_set_pipe(output, PIPE_NONE);
 	igt_remove_fb(data->drm_fd, &fb);
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
 }
 
 static void *fence_inc_thread(void *arg)
@@ -784,7 +785,7 @@ static void collect_crcs_mask(igt_pipe_crc_t **pipe_crcs, unsigned mask, igt_crc
 static void run_modeset_tests(data_t *data, int howmany, bool nonblocking, bool fencing)
 {
 	struct igt_fb fbs[2];
-	int i, j = 0;
+	int i, j;
 	unsigned iter_max;
 	igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
 	igt_output_t *output;
@@ -793,6 +794,8 @@ static void run_modeset_tests(data_t *data, int howmany, bool nonblocking, bool
 	for (i = 0; i < data->display.n_outputs; i++)
 		igt_output_set_pipe(&data->display.outputs[i], PIPE_NONE);
 
+retry:
+	j = 0;
 	for_each_connected_output(&data->display, output) {
 		drmModeModeInfo *mode = igt_output_get_mode(output);
 
@@ -839,6 +842,19 @@ static void run_modeset_tests(data_t *data, int howmany, bool nonblocking, bool
 
 	iter_max = 1 << j;
 
+	if (igt_display_try_commit_atomic(&data->display,
+				DRM_MODE_ATOMIC_TEST_ONLY |
+				DRM_MODE_ATOMIC_ALLOW_MODESET,
+				NULL) != 0) {
+		igt_output_t *out;
+		bool found = igt_override_all_active_output_modes_to_fit_bw(&data->display);
+		igt_require_f(found, "No valid mode combo found.\n");
+
+		for_each_connected_output(&data->display, out)
+			igt_output_set_pipe(out, PIPE_NONE);
+
+		goto retry;
+	}
 	igt_display_commit2(&data->display, COMMIT_ATOMIC);
 
 	for (i = 0; i < iter_max; i++) {
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 08/14] tests/kms_plane: Reset the state before exiting the test
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (7 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 07/14] tests/kms_atomic_transition: " Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-19  5:40   ` Nautiyal, Ankit K
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 09/14] tests/kms_plane_alpha_blend: " Bhanuprakash Modem
                   ` (7 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

Before starting the next subtest, clean up the states to default
values, those are assumed by other tests. This patch will also fix
few typos & depricated macros.

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_plane.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 9fe253a8c..8ed168647 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -251,7 +251,11 @@ test_plane_position_with_output(data_t *data,
 	igt_plane_set_fb(sprite, NULL);
 
 	/* reset the constraint on the pipe */
-	igt_output_set_pipe(output, PIPE_ANY);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	igt_remove_fb(data->drm_fd, &primary_fb);
+	igt_remove_fb(data->drm_fd, &sprite_fb);
 }
 
 static void
@@ -288,7 +292,7 @@ test_plane_position(data_t *data, enum pipe pipe, unsigned int flags)
  *     (vdisplay, hdisplay) we do get the same CRC than the full blue fb.
  */
 static void
-create_fb_for_mode__panning(data_t *data, drmModeModeInfo *mode,
+create_fb_for_mode_panning(data_t *data, drmModeModeInfo *mode,
 			    struct igt_fb *fb /* out */)
 {
 	unsigned int fb_id;
@@ -334,7 +338,7 @@ test_plane_panning_with_output(data_t *data,
 	mode = igt_output_get_mode(output);
 	primary = igt_output_get_plane(output, 0);
 
-	create_fb_for_mode__panning(data, mode, &primary_fb);
+	create_fb_for_mode_panning(data, mode, &primary_fb);
 	igt_plane_set_fb(primary, &primary_fb);
 
 	if (flags & TEST_PANNING_TOP_LEFT)
@@ -355,8 +359,11 @@ test_plane_panning_with_output(data_t *data,
 	igt_plane_set_fb(primary, NULL);
 
 	/* reset states to neutral values, assumed by other tests */
-	igt_output_set_pipe(output, PIPE_ANY);
+	igt_output_set_pipe(output, PIPE_NONE);
 	igt_fb_set_position(&primary_fb, primary, 0, 0);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	igt_remove_fb(data->drm_fd, &primary_fb);
 }
 
 static void
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 09/14] tests/kms_plane_alpha_blend: Reset the state before exiting the test
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (8 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 08/14] tests/kms_plane: Reset the state before exiting the test Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-19  6:50   ` Nautiyal, Ankit K
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 10/14] tests/kms_cursor_edge_walk: " Bhanuprakash Modem
                   ` (6 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

Before starting the next subtest, clean up the states to default
values, those are assumed by other tests. This patch will also fix
few redundant checks.

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_plane_alpha_blend.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 5e80ae36e..a37cb27c7 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -237,8 +237,6 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe)
 	}
 
 	igt_plane_set_fb(primary, &data->black_fb);
-	/* reset alpha property to default */
-	reset_alpha(display, pipe);
 }
 
 static void basic_alpha(data_t *data, enum pipe pipe, igt_plane_t *plane)
@@ -507,6 +505,9 @@ static void run_test_on_pipe_planes(data_t *data, enum pipe pipe, bool blend,
 		igt_plane_set_fb(plane, NULL);
 	}
 
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
 	igt_require_f(found, "No planes with %s property found\n",
 		      blend ? "pixel blending mode" : "alpha");
 	igt_require_f(multiply, "Multiplied (plane x pixel) alpha not available\n");
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 10/14] tests/kms_cursor_edge_walk: Reset the state before exiting the test
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (9 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 09/14] tests/kms_plane_alpha_blend: " Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-19  5:50   ` Nautiyal, Ankit K
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 11/14] tests/kms_plane_lowres: " Bhanuprakash Modem
                   ` (5 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

Before starting the next subtest, clean up the states to default
values, those are assumed by other tests.

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_cursor_edge_walk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/kms_cursor_edge_walk.c b/tests/kms_cursor_edge_walk.c
index 69662afec..d1d8a9143 100644
--- a/tests/kms_cursor_edge_walk.c
+++ b/tests/kms_cursor_edge_walk.c
@@ -225,6 +225,7 @@ static void cleanup_crtc(data_t *data)
 
 	igt_remove_fb(data->drm_fd, &data->primary_fb);
 	igt_remove_fb(data->drm_fd, &data->fb);
+	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 }
 
 static void prepare_crtc(data_t *data)
@@ -268,6 +269,8 @@ static void test_crtc(data_t *data, unsigned int edges)
 	create_cursor_fb(data, data->curw, data->curh);
 
 	test_edges(data, edges);
+
+	cleanup_crtc(data);
 }
 
 static int opt_handler(int opt, int opt_index, void *_data)
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 11/14] tests/kms_plane_lowres: Reset the state before exiting the test
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (10 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 10/14] tests/kms_cursor_edge_walk: " Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-19  7:01   ` Nautiyal, Ankit K
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 12/14] tests/kms_plane_cursor: " Bhanuprakash Modem
                   ` (4 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

Before starting the next subtest, clean up the states to default
values, those are assumed by other tests. This patch will also fix
few redundant checks.

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_plane_lowres.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index 5cfe53c8b..95346e289 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -270,16 +270,13 @@ test_planes_on_pipe(data_t *data, uint64_t modifier)
 	igt_info("Testing connector %s using pipe %s\n",
 		 igt_output_name(data->output), kmstest_pipe_name(data->pipe));
 
-	for_each_plane_on_pipe(&data->display, data->pipe, plane) {
-		data->output = igt_get_single_output_for_pipe(&data->display, data->pipe);
-		igt_require(data->output);
-
+	for_each_plane_on_pipe(&data->display, data->pipe, plane)
 		tested += test_planes_on_pipe_with_output(data, plane, modifier);
-	}
 
-	igt_assert(tested > 0);
 	igt_output_set_pipe(data->output, PIPE_NONE);
 	igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
+	igt_assert(tested > 0);
 }
 
 igt_main
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 12/14] tests/kms_plane_cursor: Reset the state before exiting the test
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (11 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 11/14] tests/kms_plane_lowres: " Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-19  6:44   ` Nautiyal, Ankit K
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 13/14] tests/kms_flip_scaled_crc: " Bhanuprakash Modem
                   ` (3 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

Before starting the next subtest, clean up the states to default
values, those are assumed by other tests.

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_plane_cursor.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/kms_plane_cursor.c b/tests/kms_plane_cursor.c
index bc9d42940..9bda47466 100644
--- a/tests/kms_plane_cursor.c
+++ b/tests/kms_plane_cursor.c
@@ -93,6 +93,10 @@ static void test_fini(data_t *data)
 {
 	igt_pipe_crc_free(data->pipe_crc);
 	igt_display_reset(&data->display);
+	igt_plane_set_fb(data->primary, NULL);
+	igt_plane_set_fb(data->overlay, NULL);
+	igt_plane_set_fb(data->cursor, NULL);
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
 }
 
 /* Fills a FB with the solid color given. */
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 13/14] tests/kms_flip_scaled_crc: Reset the state before exiting the test
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (12 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 12/14] tests/kms_plane_cursor: " Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-19  6:42   ` Nautiyal, Ankit K
  2021-05-19 15:30   ` [igt-dev] [v7 i-g-t 6/7] " Bhanuprakash Modem
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 14/14] tests/kms_vblank: " Bhanuprakash Modem
                   ` (2 subsequent siblings)
  16 siblings, 2 replies; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

Before starting the next subtest, clean up the states to default
values, those are assumed by other tests.

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_flip_scaled_crc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/kms_flip_scaled_crc.c b/tests/kms_flip_scaled_crc.c
index 4923f1235..671ba7367 100644
--- a/tests/kms_flip_scaled_crc.c
+++ b/tests/kms_flip_scaled_crc.c
@@ -156,6 +156,7 @@ static void test_flip_to_scaled(data_t *data, uint32_t index, enum pipe pipe,
 	int ret;
 
 	igt_display_reset(&data->display);
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
 
 	igt_debug("running on output %s pipe %s\n", output->name,
 		  kmstest_pipe_name(pipe));
@@ -246,6 +247,10 @@ static void test_flip_to_scaled(data_t *data, uint32_t index, enum pipe pipe,
 	data->pipe_crc = NULL;
 
 	clear_lut(data, pipe);
+
+	igt_output_set_pipe(output, pipe);
+	igt_plane_set_fb(primary, NULL);
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
 }
 
 igt_main
-- 
2.20.1

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

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

* [igt-dev] [v6 i-g-t 14/14] tests/kms_vblank: Reset the state before exiting the test
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (13 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 13/14] tests/kms_flip_scaled_crc: " Bhanuprakash Modem
@ 2021-05-12 17:05 ` Bhanuprakash Modem
  2021-05-19  6:24   ` Nautiyal, Ankit K
  2021-05-19  9:56 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fix mode selection for 2x tests (rev8) Patchwork
  2021-05-19  9:56 ` Patchwork
  16 siblings, 1 reply; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-12 17:05 UTC (permalink / raw)
  To: igt-dev

Before starting the next subtest, clean up the states to default
values, those are assumed by other tests.

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_vblank.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index e561e41d7..93b01eba0 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -96,6 +96,8 @@ static void prepare_crtc(data_t *data, int fd, igt_output_t *output)
 
 static void cleanup_crtc(data_t *data, int fd, igt_output_t *output)
 {
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit(&data->display);
 	igt_remove_fb(fd, &data->primary_fb);
 }
 
-- 
2.20.1

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

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

* Re: [igt-dev] [v6 i-g-t 08/14] tests/kms_plane: Reset the state before exiting the test
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 08/14] tests/kms_plane: Reset the state before exiting the test Bhanuprakash Modem
@ 2021-05-19  5:40   ` Nautiyal, Ankit K
  0 siblings, 0 replies; 28+ messages in thread
From: Nautiyal, Ankit K @ 2021-05-19  5:40 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev

These changes for resetting states make sense and are in line with other 
subtests of this IGT.

Looks good to me.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 5/12/2021 10:35 PM, Bhanuprakash Modem wrote:
> Before starting the next subtest, clean up the states to default
> values, those are assumed by other tests. This patch will also fix
> few typos & depricated macros.
>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/kms_plane.c | 15 +++++++++++----
>   1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 9fe253a8c..8ed168647 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -251,7 +251,11 @@ test_plane_position_with_output(data_t *data,
>   	igt_plane_set_fb(sprite, NULL);
>   
>   	/* reset the constraint on the pipe */
> -	igt_output_set_pipe(output, PIPE_ANY);
> +	igt_output_set_pipe(output, PIPE_NONE);
> +	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
> +
> +	igt_remove_fb(data->drm_fd, &primary_fb);
> +	igt_remove_fb(data->drm_fd, &sprite_fb);
>   }
>   
>   static void
> @@ -288,7 +292,7 @@ test_plane_position(data_t *data, enum pipe pipe, unsigned int flags)
>    *     (vdisplay, hdisplay) we do get the same CRC than the full blue fb.
>    */
>   static void
> -create_fb_for_mode__panning(data_t *data, drmModeModeInfo *mode,
> +create_fb_for_mode_panning(data_t *data, drmModeModeInfo *mode,
>   			    struct igt_fb *fb /* out */)
>   {
>   	unsigned int fb_id;
> @@ -334,7 +338,7 @@ test_plane_panning_with_output(data_t *data,
>   	mode = igt_output_get_mode(output);
>   	primary = igt_output_get_plane(output, 0);
>   
> -	create_fb_for_mode__panning(data, mode, &primary_fb);
> +	create_fb_for_mode_panning(data, mode, &primary_fb);
>   	igt_plane_set_fb(primary, &primary_fb);
>   
>   	if (flags & TEST_PANNING_TOP_LEFT)
> @@ -355,8 +359,11 @@ test_plane_panning_with_output(data_t *data,
>   	igt_plane_set_fb(primary, NULL);
>   
>   	/* reset states to neutral values, assumed by other tests */
> -	igt_output_set_pipe(output, PIPE_ANY);
> +	igt_output_set_pipe(output, PIPE_NONE);
>   	igt_fb_set_position(&primary_fb, primary, 0, 0);
> +	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
> +
> +	igt_remove_fb(data->drm_fd, &primary_fb);
>   }
>   
>   static void
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [v6 i-g-t 10/14] tests/kms_cursor_edge_walk: Reset the state before exiting the test
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 10/14] tests/kms_cursor_edge_walk: " Bhanuprakash Modem
@ 2021-05-19  5:50   ` Nautiyal, Ankit K
  0 siblings, 0 replies; 28+ messages in thread
From: Nautiyal, Ankit K @ 2021-05-19  5:50 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev

LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 5/12/2021 10:35 PM, Bhanuprakash Modem wrote:
> Before starting the next subtest, clean up the states to default
> values, those are assumed by other tests.
>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/kms_cursor_edge_walk.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/tests/kms_cursor_edge_walk.c b/tests/kms_cursor_edge_walk.c
> index 69662afec..d1d8a9143 100644
> --- a/tests/kms_cursor_edge_walk.c
> +++ b/tests/kms_cursor_edge_walk.c
> @@ -225,6 +225,7 @@ static void cleanup_crtc(data_t *data)
>   
>   	igt_remove_fb(data->drm_fd, &data->primary_fb);
>   	igt_remove_fb(data->drm_fd, &data->fb);
> +	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
>   }
>   
>   static void prepare_crtc(data_t *data)
> @@ -268,6 +269,8 @@ static void test_crtc(data_t *data, unsigned int edges)
>   	create_cursor_fb(data, data->curw, data->curh);
>   
>   	test_edges(data, edges);
> +
> +	cleanup_crtc(data);
>   }
>   
>   static int opt_handler(int opt, int opt_index, void *_data)
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [v6 i-g-t 14/14] tests/kms_vblank: Reset the state before exiting the test
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 14/14] tests/kms_vblank: " Bhanuprakash Modem
@ 2021-05-19  6:24   ` Nautiyal, Ankit K
  0 siblings, 0 replies; 28+ messages in thread
From: Nautiyal, Ankit K @ 2021-05-19  6:24 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev

LGTM

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 5/12/2021 10:35 PM, Bhanuprakash Modem wrote:
> Before starting the next subtest, clean up the states to default
> values, those are assumed by other tests.
>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/kms_vblank.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
> index e561e41d7..93b01eba0 100644
> --- a/tests/kms_vblank.c
> +++ b/tests/kms_vblank.c
> @@ -96,6 +96,8 @@ static void prepare_crtc(data_t *data, int fd, igt_output_t *output)
>   
>   static void cleanup_crtc(data_t *data, int fd, igt_output_t *output)
>   {
> +	igt_output_set_pipe(output, PIPE_NONE);
> +	igt_display_commit(&data->display);
>   	igt_remove_fb(fd, &data->primary_fb);
>   }
>   
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [v6 i-g-t 13/14] tests/kms_flip_scaled_crc: Reset the state before exiting the test
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 13/14] tests/kms_flip_scaled_crc: " Bhanuprakash Modem
@ 2021-05-19  6:42   ` Nautiyal, Ankit K
  2021-05-19 15:30   ` [igt-dev] [v7 i-g-t 6/7] " Bhanuprakash Modem
  1 sibling, 0 replies; 28+ messages in thread
From: Nautiyal, Ankit K @ 2021-05-19  6:42 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev


On 5/12/2021 10:35 PM, Bhanuprakash Modem wrote:
> Before starting the next subtest, clean up the states to default
> values, those are assumed by other tests.
>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/kms_flip_scaled_crc.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/tests/kms_flip_scaled_crc.c b/tests/kms_flip_scaled_crc.c
> index 4923f1235..671ba7367 100644
> --- a/tests/kms_flip_scaled_crc.c
> +++ b/tests/kms_flip_scaled_crc.c
> @@ -156,6 +156,7 @@ static void test_flip_to_scaled(data_t *data, uint32_t index, enum pipe pipe,
>   	int ret;
>   
>   	igt_display_reset(&data->display);
> +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
>   
>   	igt_debug("running on output %s pipe %s\n", output->name,
>   		  kmstest_pipe_name(pipe));
> @@ -246,6 +247,10 @@ static void test_flip_to_scaled(data_t *data, uint32_t index, enum pipe pipe,
>   	data->pipe_crc = NULL;
>   
>   	clear_lut(data, pipe);
> +
> +	igt_output_set_pipe(output, pipe);

Shouldn't it be PIPE_NONE instead of pipe in the args?

Otherwise:

LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

> +	igt_plane_set_fb(primary, NULL);
> +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
>   }
>   
>   igt_main
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [v6 i-g-t 12/14] tests/kms_plane_cursor: Reset the state before exiting the test
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 12/14] tests/kms_plane_cursor: " Bhanuprakash Modem
@ 2021-05-19  6:44   ` Nautiyal, Ankit K
  0 siblings, 0 replies; 28+ messages in thread
From: Nautiyal, Ankit K @ 2021-05-19  6:44 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev

LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 5/12/2021 10:35 PM, Bhanuprakash Modem wrote:
> Before starting the next subtest, clean up the states to default
> values, those are assumed by other tests.
>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/kms_plane_cursor.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/tests/kms_plane_cursor.c b/tests/kms_plane_cursor.c
> index bc9d42940..9bda47466 100644
> --- a/tests/kms_plane_cursor.c
> +++ b/tests/kms_plane_cursor.c
> @@ -93,6 +93,10 @@ static void test_fini(data_t *data)
>   {
>   	igt_pipe_crc_free(data->pipe_crc);
>   	igt_display_reset(&data->display);
> +	igt_plane_set_fb(data->primary, NULL);
> +	igt_plane_set_fb(data->overlay, NULL);
> +	igt_plane_set_fb(data->cursor, NULL);
> +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
>   }
>   
>   /* Fills a FB with the solid color given. */
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [v6 i-g-t 09/14] tests/kms_plane_alpha_blend: Reset the state before exiting the test
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 09/14] tests/kms_plane_alpha_blend: " Bhanuprakash Modem
@ 2021-05-19  6:50   ` Nautiyal, Ankit K
  0 siblings, 0 replies; 28+ messages in thread
From: Nautiyal, Ankit K @ 2021-05-19  6:50 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev


On 5/12/2021 10:35 PM, Bhanuprakash Modem wrote:
> Before starting the next subtest, clean up the states to default
> values, those are assumed by other tests. This patch will also fix
> few redundant checks.
>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/kms_plane_alpha_blend.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
> index 5e80ae36e..a37cb27c7 100644
> --- a/tests/kms_plane_alpha_blend.c
> +++ b/tests/kms_plane_alpha_blend.c
> @@ -237,8 +237,6 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe)
>   	}
>   
>   	igt_plane_set_fb(primary, &data->black_fb);
> -	/* reset alpha property to default */
> -	reset_alpha(display, pipe);

This is indeed redundant.

LGTM

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

>   }
>   
>   static void basic_alpha(data_t *data, enum pipe pipe, igt_plane_t *plane)
> @@ -507,6 +505,9 @@ static void run_test_on_pipe_planes(data_t *data, enum pipe pipe, bool blend,
>   		igt_plane_set_fb(plane, NULL);
>   	}
>   
> +	igt_output_set_pipe(output, PIPE_NONE);
> +	igt_display_commit2(display, COMMIT_ATOMIC);
> +
>   	igt_require_f(found, "No planes with %s property found\n",
>   		      blend ? "pixel blending mode" : "alpha");
>   	igt_require_f(multiply, "Multiplied (plane x pixel) alpha not available\n");
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [v6 i-g-t 11/14] tests/kms_plane_lowres: Reset the state before exiting the test
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 11/14] tests/kms_plane_lowres: " Bhanuprakash Modem
@ 2021-05-19  7:01   ` Nautiyal, Ankit K
  0 siblings, 0 replies; 28+ messages in thread
From: Nautiyal, Ankit K @ 2021-05-19  7:01 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev

LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 5/12/2021 10:35 PM, Bhanuprakash Modem wrote:
> Before starting the next subtest, clean up the states to default
> values, those are assumed by other tests. This patch will also fix
> few redundant checks.
>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>   tests/kms_plane_lowres.c | 9 +++------
>   1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
> index 5cfe53c8b..95346e289 100644
> --- a/tests/kms_plane_lowres.c
> +++ b/tests/kms_plane_lowres.c
> @@ -270,16 +270,13 @@ test_planes_on_pipe(data_t *data, uint64_t modifier)
>   	igt_info("Testing connector %s using pipe %s\n",
>   		 igt_output_name(data->output), kmstest_pipe_name(data->pipe));
>   
> -	for_each_plane_on_pipe(&data->display, data->pipe, plane) {
> -		data->output = igt_get_single_output_for_pipe(&data->display, data->pipe);
> -		igt_require(data->output);
> -
> +	for_each_plane_on_pipe(&data->display, data->pipe, plane)
>   		tested += test_planes_on_pipe_with_output(data, plane, modifier);
> -	}
>   
> -	igt_assert(tested > 0);
>   	igt_output_set_pipe(data->output, PIPE_NONE);
>   	igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +
> +	igt_assert(tested > 0);
>   }
>   
>   igt_main
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.BAT: failure for Fix mode selection for 2x tests (rev8)
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (14 preceding siblings ...)
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 14/14] tests/kms_vblank: " Bhanuprakash Modem
@ 2021-05-19  9:56 ` Patchwork
  2021-05-19  9:56 ` Patchwork
  16 siblings, 0 replies; 28+ messages in thread
From: Patchwork @ 2021-05-19  9:56 UTC (permalink / raw)
  To: Bhanuprakash Modem; +Cc: igt-dev


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

== Series Details ==

Series: Fix mode selection for 2x tests (rev8)
URL   : https://patchwork.freedesktop.org/series/88902/
State : failure

== Summary ==

Series 88902 revision 8 was fully merged or fully failed: no git log



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

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

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

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

* [igt-dev] ✗ Fi.CI.BAT: failure for Fix mode selection for 2x tests (rev8)
  2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
                   ` (15 preceding siblings ...)
  2021-05-19  9:56 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fix mode selection for 2x tests (rev8) Patchwork
@ 2021-05-19  9:56 ` Patchwork
  16 siblings, 0 replies; 28+ messages in thread
From: Patchwork @ 2021-05-19  9:56 UTC (permalink / raw)
  To: Bhanuprakash Modem; +Cc: igt-dev


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

== Series Details ==

Series: Fix mode selection for 2x tests (rev8)
URL   : https://patchwork.freedesktop.org/series/88902/
State : failure

== Summary ==

Series 88902 revision 8 was fully merged or fully failed: no git log



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

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

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

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

* [igt-dev] [v7 i-g-t 6/7] tests/kms_flip_scaled_crc: Reset the state before exiting the test
  2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 13/14] tests/kms_flip_scaled_crc: " Bhanuprakash Modem
  2021-05-19  6:42   ` Nautiyal, Ankit K
@ 2021-05-19 15:30   ` Bhanuprakash Modem
  2021-05-19 15:36     ` [igt-dev] [v8 i-g-t 13/14] " Bhanuprakash Modem
  1 sibling, 1 reply; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-19 15:30 UTC (permalink / raw)
  To: igt-dev

Before starting the next subtest, clean up the states to default
values, those are assumed by other tests.

V2:
* Fix pipe enum in reset (Ankit)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 tests/kms_flip_scaled_crc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/kms_flip_scaled_crc.c b/tests/kms_flip_scaled_crc.c
index 4923f1235..bb796cafb 100644
--- a/tests/kms_flip_scaled_crc.c
+++ b/tests/kms_flip_scaled_crc.c
@@ -156,6 +156,7 @@ static void test_flip_to_scaled(data_t *data, uint32_t index, enum pipe pipe,
 	int ret;
 
 	igt_display_reset(&data->display);
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
 
 	igt_debug("running on output %s pipe %s\n", output->name,
 		  kmstest_pipe_name(pipe));
@@ -246,6 +247,10 @@ static void test_flip_to_scaled(data_t *data, uint32_t index, enum pipe pipe,
 	data->pipe_crc = NULL;
 
 	clear_lut(data, pipe);
+
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_plane_set_fb(primary, NULL);
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
 }
 
 igt_main
-- 
2.20.1

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

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

* [igt-dev] [v8 i-g-t 13/14] tests/kms_flip_scaled_crc: Reset the state before exiting the test
  2021-05-19 15:30   ` [igt-dev] [v7 i-g-t 6/7] " Bhanuprakash Modem
@ 2021-05-19 15:36     ` Bhanuprakash Modem
  0 siblings, 0 replies; 28+ messages in thread
From: Bhanuprakash Modem @ 2021-05-19 15:36 UTC (permalink / raw)
  To: igt-dev

Before starting the next subtest, clean up the states to default
values, those are assumed by other tests.

V2:
* Fix pipe enum in reset (Ankit)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 tests/kms_flip_scaled_crc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/kms_flip_scaled_crc.c b/tests/kms_flip_scaled_crc.c
index 4923f1235..bb796cafb 100644
--- a/tests/kms_flip_scaled_crc.c
+++ b/tests/kms_flip_scaled_crc.c
@@ -156,6 +156,7 @@ static void test_flip_to_scaled(data_t *data, uint32_t index, enum pipe pipe,
 	int ret;

 	igt_display_reset(&data->display);
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);

 	igt_debug("running on output %s pipe %s\n", output->name,
 		  kmstest_pipe_name(pipe));
@@ -246,6 +247,10 @@ static void test_flip_to_scaled(data_t *data, uint32_t index, enum pipe pipe,
 	data->pipe_crc = NULL;

 	clear_lut(data, pipe);
+
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_plane_set_fb(primary, NULL);
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
 }

 igt_main
--
2.20.1

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

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

end of thread, other threads:[~2021-05-19  9:56 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 17:05 [igt-dev] [v6 i-g-t 00/14] Fix mode selection for 2x tests Bhanuprakash Modem
2021-05-12 12:11 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fix mode selection for 2x tests (rev6) Patchwork
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 01/14] lib/igt_kms: helper to override the mode on all connectors Bhanuprakash Modem
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 02/14] tests/kms_frontbuffer_tracking: Fix mode selection for 2x tests Bhanuprakash Modem
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 03/14] tests/kms_cursor_legacy: " Bhanuprakash Modem
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 04/14] tests/debugfs_test: " Bhanuprakash Modem
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 05/14] tests/kms_content_protection: " Bhanuprakash Modem
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 06/14] tests/kms_plane_scaling: " Bhanuprakash Modem
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 07/14] tests/kms_atomic_transition: " Bhanuprakash Modem
2021-05-12 10:39   ` Nautiyal, Ankit K
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 08/14] tests/kms_plane: Reset the state before exiting the test Bhanuprakash Modem
2021-05-19  5:40   ` Nautiyal, Ankit K
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 09/14] tests/kms_plane_alpha_blend: " Bhanuprakash Modem
2021-05-19  6:50   ` Nautiyal, Ankit K
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 10/14] tests/kms_cursor_edge_walk: " Bhanuprakash Modem
2021-05-19  5:50   ` Nautiyal, Ankit K
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 11/14] tests/kms_plane_lowres: " Bhanuprakash Modem
2021-05-19  7:01   ` Nautiyal, Ankit K
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 12/14] tests/kms_plane_cursor: " Bhanuprakash Modem
2021-05-19  6:44   ` Nautiyal, Ankit K
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 13/14] tests/kms_flip_scaled_crc: " Bhanuprakash Modem
2021-05-19  6:42   ` Nautiyal, Ankit K
2021-05-19 15:30   ` [igt-dev] [v7 i-g-t 6/7] " Bhanuprakash Modem
2021-05-19 15:36     ` [igt-dev] [v8 i-g-t 13/14] " Bhanuprakash Modem
2021-05-12 17:05 ` [igt-dev] [v6 i-g-t 14/14] tests/kms_vblank: " Bhanuprakash Modem
2021-05-19  6:24   ` Nautiyal, Ankit K
2021-05-19  9:56 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fix mode selection for 2x tests (rev8) Patchwork
2021-05-19  9:56 ` Patchwork

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