diff mbox

[i-g-t,1/2] tests/kms_plane_multiple: Relax atomic commit time requirement

Message ID 1484572153-28840-2-git-send-email-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kahola Jan. 16, 2017, 1:09 p.m. UTC
Relax required time to atomic commits from 1 vblank to 2 vblanks.

Reference: Issues seen on BYT CI tests

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_plane_multiple.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Maarten Lankhorst Jan. 16, 2017, 1:26 p.m. UTC | #1
Op 16-01-17 om 14:09 schreef Mika Kahola:
> Relax required time to atomic commits from 1 vblank to 2 vblanks.
>
> Reference: Issues seen on BYT CI tests
>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
>  tests/kms_plane_multiple.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
> index 792f530..6257a8b 100644
> --- a/tests/kms_plane_multiple.c
> +++ b/tests/kms_plane_multiple.c
> @@ -235,7 +235,7 @@ test_atomic_plane_position_with_output(data_t *data, enum pipe pipe,
>  	test_position_t test = { .data = data };
>  	color_t blue  = { 0.0f, 0.0f, 1.0f };
>  	igt_crc_t *crc = NULL;
> -	unsigned int vblank_start;
> +	unsigned int vblank_start, vblank_stop;
>  	int i, n, ret;
>  	int iterations = opt.iterations < 1 ? 1 : opt.iterations;
>  	bool loop_forever;
> @@ -274,13 +274,14 @@ test_atomic_plane_position_with_output(data_t *data, enum pipe pipe,
>  		ret = read(data->display.drm_fd, buf, sizeof(buf));
>  		igt_assert(ret >= 0);
>  
> -		igt_assert_eq(get_vblank(data->display.drm_fd, pipe, 0), vblank_start + 1);
> +		vblank_stop = get_vblank(data->display.drm_fd, pipe, 0);
>  		igt_assert_eq(e->type, DRM_EVENT_FLIP_COMPLETE);
>  		igt_reset_timeout();
>  
> -		n = igt_pipe_crc_get_crcs(data->pipe_crc, MAX_CRCS, &crc);
> +		n = igt_pipe_crc_get_crcs(data->pipe_crc, vblank_stop - vblank_start, &crc);
>  
> -		igt_assert_eq(n, MAX_CRCS);
> +		igt_assert(vblank_stop - vblank_start <= MAX_CRCS);
> +		igt_assert_eq(n, vblank_stop - vblank_start);
>  
Isn't MAX_CRCS 1? I don't see how this would relax anything then.

~Maarten
Mika Kahola Jan. 16, 2017, 1:31 p.m. UTC | #2
On Mon, 2017-01-16 at 14:26 +0100, Maarten Lankhorst wrote:
> Op 16-01-17 om 14:09 schreef Mika Kahola:
> > 
> > Relax required time to atomic commits from 1 vblank to 2 vblanks.
> > 
> > Reference: Issues seen on BYT CI tests
> > 
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > 
> > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> > ---
> >  tests/kms_plane_multiple.c | 9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tests/kms_plane_multiple.c
> > b/tests/kms_plane_multiple.c
> > index 792f530..6257a8b 100644
> > --- a/tests/kms_plane_multiple.c
> > +++ b/tests/kms_plane_multiple.c
> > @@ -235,7 +235,7 @@ test_atomic_plane_position_with_output(data_t
> > *data, enum pipe pipe,
> >  	test_position_t test = { .data = data };
> >  	color_t blue  = { 0.0f, 0.0f, 1.0f };
> >  	igt_crc_t *crc = NULL;
> > -	unsigned int vblank_start;
> > +	unsigned int vblank_start, vblank_stop;
> >  	int i, n, ret;
> >  	int iterations = opt.iterations < 1 ? 1 : opt.iterations;
> >  	bool loop_forever;
> > @@ -274,13 +274,14 @@ test_atomic_plane_position_with_output(data_t
> > *data, enum pipe pipe,
> >  		ret = read(data->display.drm_fd, buf,
> > sizeof(buf));
> >  		igt_assert(ret >= 0);
> >  
> > -		igt_assert_eq(get_vblank(data->display.drm_fd,
> > pipe, 0), vblank_start + 1);
> > +		vblank_stop = get_vblank(data->display.drm_fd,
> > pipe, 0);
> >  		igt_assert_eq(e->type, DRM_EVENT_FLIP_COMPLETE);
> >  		igt_reset_timeout();
> >  
> > -		n = igt_pipe_crc_get_crcs(data->pipe_crc,
> > MAX_CRCS, &crc);
> > +		n = igt_pipe_crc_get_crcs(data->pipe_crc,
> > vblank_stop - vblank_start, &crc);
> >  
> > -		igt_assert_eq(n, MAX_CRCS);
> > +		igt_assert(vblank_stop - vblank_start <=
> > MAX_CRCS);
> > +		igt_assert_eq(n, vblank_stop - vblank_start);
> >  
> Isn't MAX_CRCS 1? I don't see how this would relax anything then.
True. I missed to increase MAX_CRCS. Update follows..

> 
> ~Maarten
diff mbox

Patch

diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 792f530..6257a8b 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -235,7 +235,7 @@  test_atomic_plane_position_with_output(data_t *data, enum pipe pipe,
 	test_position_t test = { .data = data };
 	color_t blue  = { 0.0f, 0.0f, 1.0f };
 	igt_crc_t *crc = NULL;
-	unsigned int vblank_start;
+	unsigned int vblank_start, vblank_stop;
 	int i, n, ret;
 	int iterations = opt.iterations < 1 ? 1 : opt.iterations;
 	bool loop_forever;
@@ -274,13 +274,14 @@  test_atomic_plane_position_with_output(data_t *data, enum pipe pipe,
 		ret = read(data->display.drm_fd, buf, sizeof(buf));
 		igt_assert(ret >= 0);
 
-		igt_assert_eq(get_vblank(data->display.drm_fd, pipe, 0), vblank_start + 1);
+		vblank_stop = get_vblank(data->display.drm_fd, pipe, 0);
 		igt_assert_eq(e->type, DRM_EVENT_FLIP_COMPLETE);
 		igt_reset_timeout();
 
-		n = igt_pipe_crc_get_crcs(data->pipe_crc, MAX_CRCS, &crc);
+		n = igt_pipe_crc_get_crcs(data->pipe_crc, vblank_stop - vblank_start, &crc);
 
-		igt_assert_eq(n, MAX_CRCS);
+		igt_assert(vblank_stop - vblank_start <= MAX_CRCS);
+		igt_assert_eq(n, vblank_stop - vblank_start);
 
 		igt_assert_crc_equal(&test.reference_crc, crc);