From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Naladala Ramanaidu <ramanaidu.naladala@intel.com>,
<igt-dev@lists.freedesktop.org>
Cc: <kunal1.joshi@intel.com>
Subject: Re: [PATCH i-g-t 1/5] tests/kms_plane_scaling: Update the single plane scaling function arguments
Date: Tue, 16 Jul 2024 09:41:43 +0530 [thread overview]
Message-ID: <cf5945ea-8794-4dc8-8e9b-1eeffb9833af@intel.com> (raw)
In-Reply-To: <20240715154628.583682-2-ramanaidu.naladala@intel.com>
On 7/15/2024 9:16 PM, Naladala Ramanaidu wrote:
> Update the helper test_scaler_with_modifier_pipe to use a scaling_factor
> and is_clip_clamp flag 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.
>
> Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com>
> ---
> tests/kms_plane_scaling.c | 61 ++++++++++++++++++++++-----------------
> 1 file changed, 35 insertions(+), 26 deletions(-)
>
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index 3f63d3cf4..f5efd13ef 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -569,7 +569,8 @@ 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_clip_clamp,
> bool is_upscale,
> enum pipe pipe,
> igt_output_t *output,
> @@ -579,9 +580,18 @@ 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;
>
> mode = igt_output_get_mode(output);
>
> + if (is_clip_clamp == true) {
> + width = mode->hdisplay + 100;
> + height = mode->vdisplay + 100;
> + } else {
> + width = get_width(mode, sf_plane1);
> + height = get_height(mode, sf_plane1);
> + }
> +
> if (is_upscale) {
> w = width;
> h = height;
> @@ -693,7 +703,8 @@ static const uint64_t modifiers[] = {
> };
>
> static void test_scaler_with_modifier_pipe(data_t *d,
> - int width, int height,
> + double sf_plane1,
> + bool is_clip_clamp,
> bool is_upscale,
> enum pipe pipe,
> igt_output_t *output)
> @@ -716,7 +727,8 @@ 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_clip_clamp,
> is_upscale,
> pipe, output,
> IGT_ROTATION_0);
> @@ -725,7 +737,8 @@ 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_clip_clamp,
> bool is_upscale,
> enum pipe pipe,
> igt_output_t *output)
> @@ -749,7 +762,8 @@ 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_clip_clamp,
> is_upscale,
> pipe, output,
> rot);
> @@ -757,8 +771,9 @@ 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,
> - enum pipe pipe, igt_output_t *output)
> +static void test_scaler_with_pixel_format_pipe(data_t *d, double sf_plane1,
> + bool is_clip_clamp, bool is_upscale, enum pipe pipe,
> + igt_output_t *output)
Align with parenthesis.
Otherwise looks good to me.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> {
> igt_display_t *display = &d->display;
> uint64_t modifier = DRM_FORMAT_MOD_LINEAR;
> @@ -787,7 +802,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_clip_clamp,
> is_upscale,
> pipe, output, IGT_ROTATION_0);
> }
> @@ -1307,11 +1322,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);
>
> 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].sf,
> + false,
> scaler_with_pixel_format_tests[index].is_upscale,
> pipe, output);
> }
> @@ -1332,11 +1346,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);
>
> 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].sf,
> + false,
> scaler_with_rotation_tests[index].is_upscale,
> pipe, output);
> }
> @@ -1357,11 +1370,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);
>
> 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].sf,
> + false,
> scaler_with_modifiers_tests[index].is_upscale,
> pipe, output);
> }
> @@ -1381,10 +1393,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);
>
> - 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, true,
> + false, pipe, output);
> }
> break;
> }
> @@ -1401,10 +1412,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);
>
> - test_scaler_with_rotation_pipe(&data, mode->hdisplay + 100,
> - mode->vdisplay + 100, false, pipe, output);
> + test_scaler_with_rotation_pipe(&data, 0.0, true,
> + false, pipe, output);
> }
> break;
> }
> @@ -1421,9 +1431,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);
> - test_scaler_with_modifier_pipe(&data, mode->hdisplay + 100,
> - mode->vdisplay + 100, false, pipe, output);
> + test_scaler_with_modifier_pipe(&data, 0.0, true,
> + false, pipe, output);
> }
> break;
> }
next prev parent reply other threads:[~2024-07-16 4:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 15:46 [PATCH i-g-t 0/5] tests/kms_plane_scaling: Improvise the scaling BW issues Naladala Ramanaidu
2024-07-15 15:46 ` [PATCH i-g-t 1/5] tests/kms_plane_scaling: Update the single plane scaling function arguments Naladala Ramanaidu
2024-07-16 4:11 ` Nautiyal, Ankit K [this message]
2024-07-15 15:46 ` [PATCH i-g-t 2/5] tests/kms_plane_scaling: Update the multi " Naladala Ramanaidu
2024-07-16 4:19 ` Nautiyal, Ankit K
2024-07-15 15:46 ` [PATCH i-g-t 3/5] tests/kms_plane_scaling: Improvise the planes scaling BW issues Naladala Ramanaidu
2024-07-16 4:32 ` Nautiyal, Ankit K
2024-07-17 14:53 ` Kamil Konieczny
2024-07-15 15:46 ` [PATCH i-g-t 4/5] tests/kms_plane_scaling: Improvise the plane " Naladala Ramanaidu
2024-07-16 4:39 ` Nautiyal, Ankit K
2024-07-17 15:00 ` Kamil Konieczny
2024-07-15 15:46 ` [PATCH i-g-t 5/5] HAX patch do not merge Naladala Ramanaidu
2024-07-15 16:12 ` ✗ CI.xeBAT: failure for tests/kms_plane_scaling: Improvise the scaling BW issues. (rev4) Patchwork
2024-07-15 16:18 ` ✗ Fi.CI.BAT: " Patchwork
2024-07-15 17:03 ` ✗ CI.xeFULL: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-07-17 15:03 [PATCH i-g-t 0/5] tests/kms_plane_scaling: Improvise the scaling BW issues Naladala Ramanaidu
2024-07-17 15:03 ` [PATCH i-g-t 1/5] tests/kms_plane_scaling: Update the single plane scaling function arguments Naladala Ramanaidu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf5945ea-8794-4dc8-8e9b-1eeffb9833af@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kunal1.joshi@intel.com \
--cc=ramanaidu.naladala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox