[PATCH i-g-t 2/4] tests/kms_content_protection: Move try commit call

B, Jeevan jeevan.b at intel.com
Mon Aug 19 05:04:41 UTC 2024


> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Suraj
> Kandpal
> Sent: Tuesday, August 13, 2024 9:50 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Samala, Pranay <pranay.samala at intel.com>; Nautiyal, Ankit K
> <ankit.k.nautiyal at intel.com>; Kandpal, Suraj <suraj.kandpal at intel.com>
> Subject: [PATCH i-g-t 2/4] tests/kms_content_protection: Move try commit call
> 
> Currently we are calling try commit twice once in if condition and again right
> after that. The correct sequence should be we call try commit again only if the
> first one fails.
> 
> Signed-off-by: Suraj Kandpal <suraj.kandpal at intel.com>
> ---
>  tests/kms_content_protection.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index 6bd744351..db6dc17b1 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -679,10 +679,10 @@ test_content_protection_mst(int content_type)
> 
>  		for (count = 0; count < valid_outputs; count++)
> 
> 	prepare_modeset_on_mst_output(hdcp_mst_output[count]);
> -	}
> 
> -	ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
> -	igt_require_f(ret == 0, "Commit failure during MST modeset\n");
Sequence change doesn't looks correct please reverify. 
> +		ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
> +		igt_require_f(ret == 0, "Commit failure during MST modeset\n");
> +	}
> 
>  	for (count = 0; count < valid_outputs; count++) {
>  		igt_output_set_prop_value(hdcp_mst_output[count],
> IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
> --
> 2.43.2



More information about the igt-dev mailing list