Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [v6 i-g-t 07/14] tests/kms_atomic_transition: Fix mode selection for 2x tests
Date: Wed, 12 May 2021 16:09:56 +0530	[thread overview]
Message-ID: <d776a886-e707-3c8a-a579-e703160c110b@intel.com> (raw)
In-Reply-To: <20210512170536.4778-8-bhanuprakash.modem@intel.com>

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

  reply	other threads:[~2021-05-12 10:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d776a886-e707-3c8a-a579-e703160c110b@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox