Re: [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Run the tests with fewer steps.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 08, 2016 at 01:25:32PM +0200, Maarten Lankhorst wrote:
> This reduces the runtime of the tests from ~200s on my 30 fps 4k panel
> to 10s.

Does it still find the problem reliably on CHV pipe C (if you remove the
kernel w/a)?

> 
> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> ---
>  tests/kms_chv_cursor_fail.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
> index 11d01f54e511..8f878cbffe96 100644
> --- a/tests/kms_chv_cursor_fail.c
> +++ b/tests/kms_chv_cursor_fail.c
> @@ -109,24 +109,26 @@ static void cursor_move(data_t *data, int x, int y, int i)
>  }
>  
>  #define XSTEP 8
> -#define YSTEP 32
> -#define XOFF 0
> +#define YSTEP 8
>  #define NCRC 128
>  
>  static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
>  {
>  	igt_crc_t *crc = NULL;
> -	int i, n, x, xdir;
> +	int i, n, x, xdir, dx;
>  
>  	if (sx > ex)
>  		xdir = -1;
>  	else
>  		xdir = 1;
>  
> +	dx = (ex - sx)/XSTEP;
> +
>  	igt_pipe_crc_start(data->pipe_crc);
>  
>  	i = 0;
> -	for (x = sx + XOFF; xdir * (x - ex - XOFF) <= 0; x += xdir * XSTEP) {
> +
> +	for (x = sx; xdir * (x - ex) <= 0; x += dx) {
>  		int xx, yy;
>  
>  		if (swap_axis) {
> @@ -168,21 +170,23 @@ static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
>  static void test_edge(data_t *data, int sy, int ey, int sx, int ex, bool swap_axis)
>  {
>  	int crtc_id = data->output->config.crtc->crtc_id;
> -	int y, ydir;
> +	int y, ydir, dy;
>  
>  	if (sy > ey)
>  		ydir = -1;
>  	else
>  		ydir = 1;
>  
> +	dy = (ey - sy) / YSTEP;
> +
>  	igt_assert_eq(drmModeMoveCursor(data->drm_fd, crtc_id, -data->curw, -data->curh), 0);
>  	igt_assert_eq(drmModeSetCursor(data->drm_fd, crtc_id, data->fb.gem_handle, data->curw, data->curh), 0);
>  
>  	for (y = sy; ydir * (y - ey) <= 0; ) {
>  		test_edge_pos(data, sx, ex, y, swap_axis);
> -		y += ydir * YSTEP;
> +		y += dy;
>  		test_edge_pos(data, ex, sx, y, swap_axis);
> -		y += ydir * YSTEP;
> +		y += dy;
>  	}
>  
>  	igt_assert_eq(drmModeMoveCursor(data->drm_fd, crtc_id, -data->curw, -data->curh), 0);
> -- 
> 2.5.5

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux