Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 2/5] tests/kms_plane_scaling: Update the multi plane scaling function arguments
Date: Tue, 16 Jul 2024 09:49:38 +0530	[thread overview]
Message-ID: <26377db6-562b-4db2-8e29-8eac4db4ed67@intel.com> (raw)
In-Reply-To: <20240715154628.583682-3-ramanaidu.naladala@intel.com>



On 7/15/2024 9:16 PM, Naladala Ramanaidu wrote:
> 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.
>
> Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com>

In couple of functions, arguments need to align with the open parenthesis.

With the above styling issue fixed, this is:

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

> ---
>   tests/kms_plane_scaling.c | 43 +++++++++++++++++++++++----------------
>   1 file changed, 26 insertions(+), 17 deletions(-)
>
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index f5efd13ef..0048e6e51 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -853,17 +853,23 @@ 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;
> +	int w1, h1, w2, h2;
>   
>   	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_plane_set_fb(p1, fb1);
>   	igt_plane_set_fb(p2, fb2);
> @@ -908,18 +914,24 @@ 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);
>   
>   	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);
> @@ -956,10 +968,10 @@ 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,
> -					    pipe, output, p1, p2,
> -					    &d->fb[1], &d->fb[2],
> -					    test_type);
> +		__test_planes_scaling_combo(d, sf_plane1, sf_plane2,
> +				pipe, output, p1, p2,
> +				&d->fb[1], &d->fb[2],
> +				test_type);
>   	}
>   
>   	cleanup_fbs(d);
> @@ -1450,13 +1462,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_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),
> +							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;

  reply	other threads:[~2024-07-16  4:19 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
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 [this message]
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 2/5] tests/kms_plane_scaling: Update the multi 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=26377db6-562b-4db2-8e29-8eac4db4ed67@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