[igt-dev] [v6 i-g-t 09/14] tests/kms_plane_alpha_blend: Reset the state before exiting the test

Nautiyal, Ankit K ankit.k.nautiyal at intel.com
Wed May 19 06:50:06 UTC 2021


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 at intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at 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 at 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");


More information about the igt-dev mailing list