Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Naladala Ramanaidu <ramanaidu.naladala@intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v1 3/5] tests/kms_plane_scaling: Return error code in test_planes_scaling_combo
Date: Tue, 10 Sep 2024 13:39:21 +0530	[thread overview]
Message-ID: <54893d8f-5b9d-467e-9043-32a7951f0d98@intel.com> (raw)
In-Reply-To: <20240905145038.1569226-4-ramanaidu.naladala@intel.com>

LGTM

Reviewed-by: Swati Sharma <swati2.sharma@intel.com>

On 05-Sep-24 8:20 PM, Naladala Ramanaidu wrote:
> Change the return type of test_planes_scaling_combo from void to
> uint32_t to return error codes. Modify the loop in
> scaler_with_2_planes_tests to break on successful
> test_planes_scaling_combo execution.
> 
> v1: fix crash issues. (swati)
> 
> Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com>
> ---
>   tests/kms_plane_scaling.c | 37 ++++++++++++++++++++-----------------
>   1 file changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index f03a73a5e..5d69eabf4 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -933,7 +933,7 @@ static void setup_fb(int fd, int width, int height, struct igt_fb *fb)
>   		      fb);
>   }
>   
> -static void
> +static uint32_t
>   test_planes_scaling_combo(data_t *d, double sf_plane1,
>   			  double sf_plane2,
>   			  enum pipe pipe,
> @@ -997,13 +997,14 @@ test_planes_scaling_combo(data_t *d, double sf_plane1,
>   							  pipe, output, p1, p2,
>   							  &d->fb[1], &d->fb[2],
>   							  test_type);
> -			if (ret != 0)
> -				break;
> +			if (ret != 0) {
> +				cleanup_fbs(d);
> +				return ret;
> +			}
>   		}
>   		cleanup_fbs(d);
>   	}
> -	igt_skip_on_f(ret == -EINVAL || ret == -ERANGE, "Unsupported scaling operation in driver with return value %s\n",
> -		      (ret == -EINVAL) ? "-EINVAL" : "-ERANGE");
> +	return ret;
>   }
>   
>   static void
> @@ -1524,25 +1525,27 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>   		for (int index = 0; index < ARRAY_SIZE(scaler_with_2_planes_tests); index++) {
>   			igt_describe(scaler_with_2_planes_tests[index].describe);
>   			igt_subtest_with_dynamic(scaler_with_2_planes_tests[index].name) {
> -			for_each_pipe(&data.display, pipe) {
> -				for_each_valid_output_on_pipe(&data.display, pipe, output) {
> -					if (!pipe_output_combo_valid(&data.display, pipe, output))
> -						continue;
> -					if (get_num_scalers(&data.display, pipe) < 2)
> -						continue;
> -
> -					igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> -
> -						test_planes_scaling_combo(&data,
> +				for_each_pipe(&data.display, pipe) {
> +					igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe)) {
> +						for_each_valid_output_on_pipe(&data.display, pipe, output) {
> +							if (!pipe_output_combo_valid(&data.display, pipe, output))
> +								continue;
> +							if (get_num_scalers(&data.display, pipe) < 2)
> +								continue;
> +							ret = test_planes_scaling_combo(&data,
>   								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);
> +							if (ret == 0)
> +								break;
> +						}
> +						igt_skip_on_f(ret == -ERANGE || ret == -EINVAL,
> +							      "Unsupported scaling operation in driver with return value %s\n",
> +							      (ret == -EINVAL) ? "-EINVAL" : "-ERANGE");
>   					}
> -					break;
>   				}
>   			}
> -			}
>   		}
>   
>   		for (int index = 0; index < ARRAY_SIZE(intel_paramtests); index++) {

  reply	other threads:[~2024-09-10  8:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 14:50 [PATCH i-g-t v1 0/5] tests/kms_plane_scaling: Update scaling functions to retry on valid outputs Naladala Ramanaidu
2024-09-05 14:50 ` [PATCH i-g-t v1 1/5] tests/kms_plane_scaling: Update scaling functions to return error codes Naladala Ramanaidu
2024-09-10  7:06   ` Sharma, Swati2
2024-09-05 14:50 ` [PATCH i-g-t v1 2/5] tests/kms_plane_scaling: Add informative logs for single plane scaling operations Naladala Ramanaidu
2024-09-10  7:42   ` Sharma, Swati2
2024-09-05 14:50 ` [PATCH i-g-t v1 3/5] tests/kms_plane_scaling: Return error code in test_planes_scaling_combo Naladala Ramanaidu
2024-09-10  8:09   ` Sharma, Swati2 [this message]
2024-09-05 14:50 ` [PATCH i-g-t v1 4/5] tests/kms_plane_scaling: Add debug logs for output scaling attempts Naladala Ramanaidu
2024-09-10  8:12   ` Sharma, Swati2
2024-09-05 14:50 ` [PATCH i-g-t v1 5/5] HAX patch do not merge Naladala Ramanaidu
2024-09-05 23:37 ` ✗ CI.xeBAT: failure for tests/kms_plane_scaling: Update scaling functions to retry on valid outputs (rev2) Patchwork
2024-09-08  3:33 ` ✗ CI.xeFULL: " Patchwork
2024-09-10 10:57 ` ✗ CI.xeBAT: " Patchwork
2024-09-10 12:02 ` ✗ CI.xeFULL: " Patchwork
2024-09-10 23:03 ` ✗ CI.xeBAT: failure for tests/kms_plane_scaling: Update scaling functions to retry on valid outputs (rev3) Patchwork
2024-09-11  1:04 ` ✓ Fi.CI.IGT: success for tests/kms_plane_scaling: Update scaling functions to retry on valid outputs (rev2) Patchwork
2024-09-11  1:18 ` ✗ CI.xeFULL: failure for tests/kms_plane_scaling: Update scaling functions to retry on valid outputs (rev3) Patchwork

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=54893d8f-5b9d-467e-9043-32a7951f0d98@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --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