[PATCH i-g-t 3/4] tests/kms_plane_scaling: Update the multi plane scaling function arguments

Naladala Ramanaidu ramanaidu.naladala at intel.com
Fri Jul 12 06:50:02 UTC 2024


This patch remove the unused function arguments for multi plane subtests.
It will not impact any functionality.

v2:Update the function arguments (Ankit)

Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
---
 tests/kms_plane_scaling.c | 48 ++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 23 deletions(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index c6d7ee832..733dc24b8 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -210,8 +210,6 @@ typedef struct {
 	igt_display_t display;
 	struct igt_fb fb[4];
 	bool extended;
-	double sf_plane1;
-	double sf_plane2;
 	bool flag;
 } data_t;
 
@@ -851,23 +849,25 @@ find_connected_pipe(igt_display_t *display, bool second, igt_output_t **output)
 }
 
 static void
-__test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
-			    enum pipe pipe, igt_output_t *output,
-			    igt_plane_t *p1, igt_plane_t *p2,
-			    struct igt_fb *fb1, struct igt_fb *fb2,
-			    enum scaler_combo_test_type test_type)
+__test_planes_scaling_combo(data_t *d,
+		double sf_plane1, double sf_plane2,
+		enum pipe pipe, igt_output_t *output,
+		igt_plane_t *p1, igt_plane_t *p2,
+		struct igt_fb *fb1, struct igt_fb *fb2,
+		enum scaler_combo_test_type test_type)
 {
 	igt_display_t *display = &d->display;
 	drmModeModeInfo *mode;
 	int ret;
 	bool mode_support = false;
+	int w1, h1, w2, h2;
 
 	for_each_connector_mode(output) {
 		mode = &output->config.connector->modes[j__];
-		w1 = get_width(mode, d->sf_plane1);
-		h1 = get_height(mode, d->sf_plane1);
-		w2 = get_width(mode, d->sf_plane2);
-		h2 = get_height(mode, d->sf_plane2);
+		w1 = get_width(mode, sf_plane1);
+		h1 = get_height(mode, sf_plane1);
+		w2 = get_width(mode, sf_plane2);
+		h2 = get_height(mode, sf_plane2);
 
 		igt_output_override_mode(output, mode);
 		igt_plane_set_fb(p1, fb1);
@@ -917,16 +917,22 @@ static void setup_fb(int fd, int width, int height, struct igt_fb *fb)
 }
 
 static void
-test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
-			  enum pipe pipe, igt_output_t *output,
-			  enum scaler_combo_test_type test_type)
+test_planes_scaling_combo(data_t *d,
+		double sf_plane1, double sf_plane2,
+		enum pipe pipe, igt_output_t *output,
+		enum scaler_combo_test_type test_type)
 {
 	igt_display_t *display = &d->display;
 	drmModeModeInfo *mode;
 	int n_planes;
+	int w1, h1, w2, h2;
 
 	cleanup_crtc(d);
 	mode = igt_output_get_mode(output);
+	w1 = get_width(mode, sf_plane1);
+	h1 = get_height(mode, sf_plane1);
+	w2 = get_width(mode, sf_plane2);
+	h2 = get_height(mode, sf_plane2);
 
 	igt_output_set_pipe(output, pipe);
 
@@ -965,7 +971,7 @@ test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
 		if (p1->type == DRM_PLANE_TYPE_CURSOR || p2->type == DRM_PLANE_TYPE_CURSOR)
 				continue;
 
-		__test_planes_scaling_combo(d, w1, h1, w2, h2,
+		__test_planes_scaling_combo(d, sf_plane1, sf_plane2,
 					    pipe, output, p1, p2,
 					    &d->fb[1], &d->fb[2],
 					    test_type);
@@ -1453,16 +1459,12 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 						continue;
 
 					igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
-						drmModeModeInfo *mode = igt_output_get_mode(output);
-						data.sf_plane1 = scaler_with_2_planes_tests[index].sf_plane1;
-						data.sf_plane2 = scaler_with_2_planes_tests[index].sf_plane2;
 
 						test_planes_scaling_combo(&data,
-							get_width(mode, scaler_with_2_planes_tests[index].sf_plane1),
-							get_height(mode, scaler_with_2_planes_tests[index].sf_plane1),
-							get_width(mode, scaler_with_2_planes_tests[index].sf_plane2),
-							get_height(mode, scaler_with_2_planes_tests[index].sf_plane2),
-							pipe, output, scaler_with_2_planes_tests[index].test_type);
+								scaler_with_2_planes_tests[index].sf_plane1,
+								scaler_with_2_planes_tests[index].sf_plane2,
+								pipe, output,
+								scaler_with_2_planes_tests[index].test_type);
 					}
 					break;
 				}
-- 
2.43.0



More information about the igt-dev mailing list