All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Karthik B S <karthik.b.s@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] Revert "tests/kms_async_flips: Make the crc test faster"
Date: Fri, 18 Mar 2022 15:58:02 +0200	[thread overview]
Message-ID: <YjSP6ry3yj+QkgXf@intel.com> (raw)
In-Reply-To: <20220318081741.14772-1-karthik.b.s@intel.com>

On Fri, Mar 18, 2022 at 01:47:41PM +0530, Karthik B S wrote:
> This reverts commit 9cb64a757d2ff1e180b1648e611439d94afd697d.
> 
> This patch was added to speed up the test and get better results with
> shard-skls. But even with this we're still seeing failure on shard-skl.

Please mention the dg2 woes in the commit message so we
understand why the revert was necessary.

With that
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
> ---
>  tests/kms_async_flips.c | 22 ++++++----------------
>  1 file changed, 6 insertions(+), 16 deletions(-)
> 
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index c658630c..5e11cd43 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -472,28 +472,19 @@ static unsigned int clock_ms(void)
>  	return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
>  }
>  
> -static void paint_fb(int fd, struct igt_fb *fb, uint32_t color, int height)
> +static void paint_fb(int fd, struct igt_fb *fb, uint32_t color)
>  {
>  	igt_draw_rect_fb(fd, NULL, 0, fb,
>  			 gem_has_mappable_ggtt(fd) ?
>  			 IGT_DRAW_MMAP_GTT : IGT_DRAW_MMAP_WC,
> -			 0, 0, 1, height, color);
> +			 0, 0, 1, fb->height, color);
>  }
>  
>  static void test_crc(data_t *data)
>  {
>  	unsigned int frame = 0;
>  	unsigned int start;
> -	int ret, height;
> -	drmModeModeInfoPtr mode;
> -
> -	/* make things faster by using a smallish mode */
> -	mode = &data->connector->modes[0];
> -	if (mode->hdisplay > 1024 && mode->vdisplay > 786)
> -		mode = igt_std_1024_mode_get(data->refresh_rate);
> -	else
> -		mode = igt_memdup(mode, sizeof(*mode));
> -	height = mode->vdisplay;
> +	int ret;
>  
>  	data->flip_count = 0;
>  	data->frame_count = 0;
> @@ -503,8 +494,7 @@ static void test_crc(data_t *data)
>  	igt_draw_fill_fb(data->drm_fd, &data->bufs[!frame], 0xff0000ff);
>  
>  	ret = drmModeSetCrtc(data->drm_fd, data->crtc_id, data->bufs[frame].fb_id, 0, 0,
> -			     &data->connector->connector_id, 1, mode);
> -	free(mode);
> +			     &data->connector->connector_id, 1, &data->connector->modes[0]);
>  	igt_assert_eq(ret, 0);
>  
>  	data->pipe_crc = igt_pipe_crc_new(data->drm_fd,
> @@ -520,7 +510,7 @@ static void test_crc(data_t *data)
>  
>  	while (clock_ms() - start < 2000) {
>  		/* fill the next fb with the expected color */
> -		paint_fb(data->drm_fd, &data->bufs[frame], 0xff0000ff, height);
> +		paint_fb(data->drm_fd, &data->bufs[frame], 0xff0000ff);
>  
>  		data->flip_pending = true;
>  		ret = drmModePageFlip(data->drm_fd, data->crtc_id, data->bufs[frame].fb_id,
> @@ -531,7 +521,7 @@ static void test_crc(data_t *data)
>  
>  		/* clobber the previous fb which should no longer be scanned out */
>  		frame = !frame;
> -		paint_fb(data->drm_fd, &data->bufs[frame], rand(), height);
> +		paint_fb(data->drm_fd, &data->bufs[frame], rand());
>  	}
>  
>  	igt_pipe_crc_stop(data->pipe_crc);
> -- 
> 2.22.0

-- 
Ville Syrjälä
Intel

  parent reply	other threads:[~2022-03-18 13:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18  8:17 [igt-dev] [PATCH i-g-t] Revert "tests/kms_async_flips: Make the crc test faster" Karthik B S
2022-03-18 10:08 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-03-18 11:39 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-03-18 13:58 ` Ville Syrjälä [this message]
2022-03-24  4:38   ` [igt-dev] [PATCH i-g-t] " Karthik B S

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=YjSP6ry3yj+QkgXf@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.