[PATCH i-g-t 2/4] tests/kms_plane_scaling: Update the single plane scaling function arguments
Naladala Ramanaidu
ramanaidu.naladala at intel.com
Fri Jul 12 06:50:01 UTC 2024
This patch remove the unused function arguments for plane1
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 | 65 +++++++++++++++------------------------
1 file changed, 24 insertions(+), 41 deletions(-)
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 546869912..c6d7ee832 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -572,7 +572,7 @@ static void cleanup_crtc(data_t *data)
static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane,
uint32_t pixel_format,
uint64_t modifier,
- int width, int height,
+ double sf_plane1,
bool is_upscale,
enum pipe pipe,
igt_output_t *output,
@@ -582,20 +582,21 @@ static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane,
drmModeModeInfo *mode;
int commit_ret;
int w, h;
+ int width, height;
bool mode_support = false;
for_each_connector_mode(output) {
mode = &output->config.connector->modes[j__];
if (is_upscale) {
- w = width;
- h = height;
+ w = get_width(mode, sf_plane1);
+ h = get_height(mode, sf_plane1);
} else {
if (d->flag == true) {
width = mode->hdisplay + 100;
height = mode->vdisplay + 100;
} else {
- width = get_width(mode, d->sf_plane1);
- height = get_height(mode, d->sf_plane1);
+ width = get_width(mode, sf_plane1);
+ height = get_height(mode, sf_plane1);
}
w = mode->hdisplay;
h = mode->vdisplay;
@@ -705,7 +706,7 @@ static const uint64_t modifiers[] = {
};
static void test_scaler_with_modifier_pipe(data_t *d,
- int width, int height,
+ double sf_plane1,
bool is_upscale,
enum pipe pipe,
igt_output_t *output)
@@ -728,7 +729,7 @@ static void test_scaler_with_modifier_pipe(data_t *d,
if (igt_plane_has_format_mod(plane, format, modifier))
check_scaling_pipe_plane_rot(d, plane,
format, modifier,
- width, height,
+ sf_plane1,
is_upscale,
pipe, output,
IGT_ROTATION_0);
@@ -737,7 +738,7 @@ static void test_scaler_with_modifier_pipe(data_t *d,
}
static void test_scaler_with_rotation_pipe(data_t *d,
- int width, int height,
+ double sf_plane1,
bool is_upscale,
enum pipe pipe,
igt_output_t *output)
@@ -761,7 +762,7 @@ static void test_scaler_with_rotation_pipe(data_t *d,
if (igt_plane_has_rotation(plane, rot))
check_scaling_pipe_plane_rot(d, plane,
format, modifier,
- width, height,
+ sf_plane1,
is_upscale,
pipe, output,
rot);
@@ -769,7 +770,7 @@ static void test_scaler_with_rotation_pipe(data_t *d,
}
}
-static void test_scaler_with_pixel_format_pipe(data_t *d, int width, int height, bool is_upscale,
+static void test_scaler_with_pixel_format_pipe(data_t *d, double sf_plane1, bool is_upscale,
enum pipe pipe, igt_output_t *output)
{
igt_display_t *display = &d->display;
@@ -799,7 +800,7 @@ static void test_scaler_with_pixel_format_pipe(data_t *d, int width, int height,
can_scale(d, format))
check_scaling_pipe_plane_rot(d, plane,
format, modifier,
- width, height,
+ sf_plane1,
is_upscale,
pipe, output, IGT_ROTATION_0);
}
@@ -1330,14 +1331,10 @@ 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_pixel_format_tests[index].sf;
-
test_scaler_with_pixel_format_pipe(&data,
- get_width(mode, scaler_with_pixel_format_tests[index].sf),
- get_height(mode, scaler_with_pixel_format_tests[index].sf),
- scaler_with_pixel_format_tests[index].is_upscale,
- pipe, output);
+ scaler_with_pixel_format_tests[index].sf,
+ scaler_with_pixel_format_tests[index].is_upscale,
+ pipe, output);
}
break;
}
@@ -1356,14 +1353,10 @@ 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_rotation_tests[index].sf;
-
test_scaler_with_rotation_pipe(&data,
- get_width(mode, scaler_with_rotation_tests[index].sf),
- get_height(mode, scaler_with_rotation_tests[index].sf),
- scaler_with_rotation_tests[index].is_upscale,
- pipe, output);
+ scaler_with_rotation_tests[index].sf,
+ scaler_with_rotation_tests[index].is_upscale,
+ pipe, output);
}
break;
}
@@ -1382,14 +1375,10 @@ 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_modifiers_tests[index].sf;
-
test_scaler_with_modifier_pipe(&data,
- get_width(mode, scaler_with_modifiers_tests[index].sf),
- get_height(mode, scaler_with_modifiers_tests[index].sf),
- scaler_with_modifiers_tests[index].is_upscale,
- pipe, output);
+ scaler_with_modifiers_tests[index].sf,
+ scaler_with_modifiers_tests[index].is_upscale,
+ pipe, output);
}
break;
}
@@ -1407,11 +1396,9 @@ 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.flag = true;
- test_scaler_with_pixel_format_pipe(&data, mode->hdisplay + 100,
- mode->vdisplay + 100, false, pipe, output);
+ test_scaler_with_pixel_format_pipe(&data, 0.0, false, pipe, output);
}
break;
}
@@ -1428,11 +1415,9 @@ 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.flag = true;
- test_scaler_with_rotation_pipe(&data, mode->hdisplay + 100,
- mode->vdisplay + 100, false, pipe, output);
+ test_scaler_with_rotation_pipe(&data, 0.0, false, pipe, output);
}
break;
}
@@ -1449,10 +1434,8 @@ 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.flag = true;
- test_scaler_with_modifier_pipe(&data, mode->hdisplay + 100,
- mode->vdisplay + 100, false, pipe, output);
+ test_scaler_with_modifier_pipe(&data, 0.0, false, pipe, output);
}
break;
}
--
2.43.0
More information about the igt-dev
mailing list