[PATCH i-g-t 2/8] tests/intel/kms_pipe_b_c_ivb: Test cleanup

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue Jun 11 04:53:42 UTC 2024


From: Kunal Joshi <kunal1.joshi at intel.com>

Make sure the below points in IGT cleanup:

 - Sanitize the state before starting the subtest.
 - Clear the states before exiting the subtest.
 - Update existing libdrm APIs with IGT kms APIs.
 - Other misc (Ex: update deprecated APIs/macros/enums, FB leaks etc..)

v2:
- Corrected commit subject. (Swati)
- Removed comments (Swati)

v3: (Bhanu)
- Rebase

CC: Jeevan B <jeevan.b at intel.com>
Cc: Swati Sharma <swati2.sharma at intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
Reviewed-by: Jeevan B <jeevan.b at intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/intel/kms_pipe_b_c_ivb.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/intel/kms_pipe_b_c_ivb.c b/tests/intel/kms_pipe_b_c_ivb.c
index 71699e792..73083408a 100644
--- a/tests/intel/kms_pipe_b_c_ivb.c
+++ b/tests/intel/kms_pipe_b_c_ivb.c
@@ -164,7 +164,7 @@ find_outputs(data_t *data, igt_output_t **output1, igt_output_t **output2)
 		if (pipe == PIPE_C && output != *output1 && !*output2)
 			*output2 = output;
 
-		igt_output_set_pipe(output, PIPE_ANY);
+		igt_output_set_pipe(output, PIPE_NONE);
 	}
 
 	igt_skip_on_f(!*output1 || !*output2, "Not enough connected outputs\n");
@@ -176,6 +176,7 @@ test_dpms(data_t *data)
 	igt_output_t *output1, *output2;
 	int ret;
 
+	igt_display_reset(&data->display);
 	find_outputs(data, &output1, &output2);
 
 	igt_info("Pipe %s will use connector %s\n",
@@ -198,6 +199,8 @@ test_lane_reduction(data_t *data)
 	igt_output_t *output1, *output2;
 	int ret;
 
+	igt_display_reset(&data->display);
+
 	find_outputs(data, &output1, &output2);
 
 	igt_info("Pipe %s will use connector %s\n",
@@ -221,6 +224,7 @@ test_disable_pipe_B(data_t *data)
 	igt_output_t *output1, *output2;
 	int ret;
 
+	igt_display_reset(&data->display);
 	find_outputs(data, &output1, &output2);
 
 	igt_info("Pipe %s will use connector %s\n",
@@ -247,6 +251,7 @@ test_from_C_to_B_with_3_lanes(data_t *data)
 	igt_output_t *output1, *output2;
 	int ret;
 
+	igt_display_reset(&data->display);
 	find_outputs(data, &output1, &output2);
 
 	igt_info("Pipe %s will use connector %s\n",
@@ -270,6 +275,7 @@ test_fail_enable_pipe_C_while_B_has_3_lanes(data_t *data)
 	igt_output_t *output1, *output2;
 	int ret;
 
+	igt_display_reset(&data->display);
 	find_outputs(data, &output1, &output2);
 
 	igt_info("Pipe %s will use connector %s\n",
@@ -296,6 +302,7 @@ igt_main
 
 		kmstest_set_vt_graphics_mode();
 		igt_display_require(&data.display, data.drm_fd);
+		igt_display_require_output(&data.display);
 	}
 
 	igt_describe("Tests pipe-B and pipe-C interactions in IVB by enabling pipe-B with mode "
-- 
2.43.2



More information about the igt-dev mailing list