[PATCH i-g-t v6 2/5] tests/kms_plane_scaling: Update the multi plane scaling function arguments
Naladala Ramanaidu
ramanaidu.naladala at intel.com
Thu Jul 18 11:08:48 UTC 2024
Update the helper test_planes_scaling_combo to use a scaling_factor
for plane1 and plane2 instead of explicit width and height parameters.
This change simplifies the function interfaces and allows for testing
scenarios, where we need to recalculate the width and height based on
the display mode. Adjusted all function calls to match new argument
order.
v2: Update the function arguments (Ankit)
Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
---
tests/kms_plane_scaling.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index bd38513ab..8a69aacfd 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -913,19 +913,27 @@ 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,
+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);
igt_output_set_pipe(output, pipe);
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);
+
n_planes = display->pipes[pipe].n_planes;
igt_require(n_planes >= 2);
@@ -1458,14 +1466,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);
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