[PATCH i-g-t 2/5] tests/kms_content_protection: Move try commit call
B, Jeevan
jeevan.b at intel.com
Wed Aug 21 14:37:31 UTC 2024
> -----Original Message-----
> From: Kandpal, Suraj <suraj.kandpal at intel.com>
> Sent: Tuesday, August 20, 2024 1:42 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Samala, Pranay <pranay.samala at intel.com>; Nautiyal, Ankit K
> <ankit.k.nautiyal at intel.com>; B, Jeevan <jeevan.b at intel.com>; Kandpal, Suraj
> <suraj.kandpal at intel.com>
> Subject: [PATCH i-g-t 2/5] 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>
LGTM.
Reviewed-by: Jeevan B <jeevan.b 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");
> + 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