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

Suraj Kandpal suraj.kandpal at intel.com
Tue Aug 27 06:19:01 UTC 2024


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>
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