[igt-dev] [PATCH i-g-t] Revert "tests/kms_async_flips: Make the crc test faster"

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Mar 18 13:58:02 UTC 2022


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 at linux.intel.com>

> 
> Signed-off-by: Karthik B S <karthik.b.s at 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


More information about the igt-dev mailing list