Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Karthik B S <karthik.b.s@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
	<igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [i-g-t V2 2/2] tests/kms_atomic_transition: Test cleanup
Date: Fri, 10 Feb 2023 12:04:01 +0530	[thread overview]
Message-ID: <f0975ed8-2212-b0a2-71e0-2a5317ab453a@intel.com> (raw)
In-Reply-To: <20230210044904.1766729-1-bhanuprakash.modem@intel.com>


On 2/10/2023 10:19 AM, Bhanuprakash Modem wrote:
> As we are using same function for cleanup, no need to do other
> stuff, just return after unsetting the output to pipe.
>
> V2: - New helper to unset output to pipe (Karthik)
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> ---
>   tests/kms_atomic_transition.c | 23 ++++++++++++-----------
>   1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index e1b74ac2c..64e7e7091 100644
> --- a/tests/kms_atomic_transition.c
> +++ b/tests/kms_atomic_transition.c
> @@ -704,15 +704,21 @@ static void commit_display(data_t *data, unsigned event_mask, bool nonblocking)
>   	igt_reset_timeout();
>   }
>   
> +static void unset_output_pipe(igt_display_t *display)
> +{
> +	int i;
> +
> +	for (i = 0; i < display->n_outputs; i++)
> +		igt_output_set_pipe(&display->outputs[i], PIPE_NONE);
> +}
> +
>   static unsigned set_combinations(data_t *data, unsigned mask, struct igt_fb *fb)
>   {
>   	igt_output_t *output;
>   	enum pipe pipe;
>   	unsigned event_mask = 0;
> -	int i;
>   
> -	for (i = 0; i < data->display.n_outputs; i++)
> -		igt_output_set_pipe(&data->display.outputs[i], PIPE_NONE);
> +	unset_output_pipe(&data->display);
>   
>   	for_each_pipe(&data->display, pipe) {
>   		igt_plane_t *plane = igt_pipe_get_plane_type(&data->display.pipes[pipe],
> @@ -806,10 +812,9 @@ static void run_modeset_tests(data_t *data, int howmany, bool nonblocking, bool
>   	igt_output_t *output;
>   	uint16_t width = 0, height = 0;
>   
> -	for (i = 0; i < data->display.n_outputs; i++)
> -		igt_output_set_pipe(&data->display.outputs[i], PIPE_NONE);
> -
>   retry:
> +	unset_output_pipe(&data->display);
> +
>   	j = 0;
>   	for_each_connected_output(&data->display, output) {
>   		drmModeModeInfo *mode = igt_output_get_mode(output);
> @@ -865,13 +870,9 @@ retry:
>   				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);
> @@ -971,7 +972,7 @@ static void run_modeset_transition(data_t *data, int requested_outputs, bool non
>   		run_modeset_tests(data, requested_outputs, nonblocking, fencing);
>   
>   	/* Cleanup */
> -	set_combinations(data, 0, NULL);
> +	unset_output_pipe(&data->display);
>   	igt_display_commit2(&data->display, COMMIT_ATOMIC);
>   
>   	if (is_i915_device(data->drm_fd)) {

  reply	other threads:[~2023-02-10  6:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09  6:23 [igt-dev] [i-g-t 1/2] tests/kms_atomic_transition: Reduce the execution time on simulation Bhanuprakash Modem
2023-02-09  6:23 ` [igt-dev] [i-g-t 2/2] tests/kms_atomic_transition: Test cleanup Bhanuprakash Modem
2023-02-10  4:49   ` [igt-dev] [i-g-t V2 " Bhanuprakash Modem
2023-02-10  6:34     ` Karthik B S [this message]
2023-02-09  6:35 ` [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [i-g-t,1/2] tests/kms_atomic_transition: Reduce the execution time on simulation Patchwork
2023-02-09  6:56 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-02-10  3:20 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-02-10  4:47 ` [igt-dev] [i-g-t 1/2] " Karthik B S
2023-02-10 15:24 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_atomic_transition: Reduce the execution time on simulation (rev2) Patchwork
2023-02-10 22:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2022-09-05  4:06 [igt-dev] [i-g-t 2/2] tests/kms_atomic_transition: Test Cleanup Bhanuprakash Modem
2022-09-06 14:12 ` [igt-dev] [i-g-t V2 " Bhanuprakash Modem

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=f0975ed8-2212-b0a2-71e0-2a5317ab453a@intel.com \
    --to=karthik.b.s@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