Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: Swati Sharma <swati2.sharma@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: enable and optimize test for sim
Date: Mon, 29 May 2023 10:55:41 +0300	[thread overview]
Message-ID: <8750acbd-7a00-4477-adf3-c3bbefbc8e45@gmail.com> (raw)
In-Reply-To: <20230525114729.298274-1-swati2.sharma@intel.com>

On 25.5.2023 14.47, Swati Sharma wrote:
> Added 2 checks. First, if rotation is supported by plane or not
> before creating fb. This is generic change to optimize test.
> Second check, is to reduce execution time in simulation
> by dropping RGB565 and PO10 formats (coverage is not
> compromised, we do have NV12 and RGB888 formats being validated).
> 
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
>   tests/kms_rotation_crc.c | 19 ++++++++++++++++++-
>   1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index 28b4fd27..07040e31 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -847,9 +847,17 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
>   			p[0].fbinfo = &planeconfigs[i];
>   			pointlocation(data, p, mode, 0);
>   
> +			if (!igt_plane_has_rotation(p[0].plane, planeconfigs[i].rotation))
> +				continue;
> +
>   			for (k = 0; k < ARRAY_SIZE(multiplaneformatlist); k++) {
>   				p[0].formatindex = k;
>   
> +				if (igt_run_in_simulation() &&
> +				   (multiplaneformatlist[k] == DRM_FORMAT_P010 ||
> +				    multiplaneformatlist[k] == DRM_FORMAT_RGB565))
> +					continue;
> +
>   				for (j = 0; j < ARRAY_SIZE(planeconfigs); j++) {
>   					p[1].fbinfo = &planeconfigs[j];
>   					pointlocation(data, p, mode, 1);
> @@ -857,6 +865,14 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
>   					for (l = 0; l < ARRAY_SIZE(multiplaneformatlist); l++) {
>   						p[1].formatindex = l;
>   
> +						if (!igt_plane_has_rotation(p[1].plane, planeconfigs[k].rotation))
> +							continue;
> +
> +						if (igt_run_in_simulation() &&
> +						   (multiplaneformatlist[k] == DRM_FORMAT_P010 ||
> +						    multiplaneformatlist[k] == DRM_FORMAT_RGB565))
> +							continue;
> +
>   						if (!multiplaneskiproundcheck(data, p))

Looking at those new rules for skipping round I think they could all be 
put inside this multiplaneskiproundcheck(..) so the main loop would be 
less cluttered.

>   							continue;
>   
> @@ -872,7 +888,8 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
>   
>   							retcrc_sw = crclog[logindex];
>   							have_crc = true;
> -						} else if(reusecrcfromlastround(p, lastroundjformat,
> +						} else if(!igt_run_in_simulation() &&
> +							  reusecrcfromlastround(p, lastroundjformat,
>   										lastroundirotation,
>   										lastroundjrotation)) {

Here also simulation check could go into reusecrcfromlastround(..). 
Otherwise thing look ok to me.

/Juha-Pekka

>   							/*

      parent reply	other threads:[~2023-05-29  7:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25 11:47 [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: enable and optimize test for sim Swati Sharma
2023-05-25 19:23 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-05-26  6:32 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-05-29  7:55 ` Juha-Pekka Heikkila [this message]

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=8750acbd-7a00-4477-adf3-c3bbefbc8e45@gmail.com \
    --to=juhapekka.heikkila@gmail.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=swati2.sharma@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