[Intel-gfx] [PATCH i-g-t] igt/kms_rotation_crc : Fix flip tests for sprite plane

Lofstedt, Marta marta.lofstedt at intel.com
Thu Sep 21 11:21:22 UTC 2017


Thanks Maarten,

Tested-by: Marta Lofstedt <marta.lofstedt at intel.com>
Acked-by: Marta Lofstedt <marta.lofstedt at intel.com>

> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Maarten Lankhorst
> Sent: Thursday, September 21, 2017 9:38 AM
> To: intel-gfx at lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH i-g-t] igt/kms_rotation_crc : Fix flip tests for sprite
> plane
> 
> This test was flipping the primary plane instead of the sprite plane.
> Flip the correct plane to make the test pass properly.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102691
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
> Resend for CI.
> 
>  tests/kms_rotation_crc.c | 23 +++++++++++++++++------
>  1 file changed, 17 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index
> 21e264addc09..69301252bda1 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -332,6 +332,9 @@ static void test_plane_rotation(data_t *data, int
> plane_type)
>  	enum igt_commit_style commit = COMMIT_LEGACY;
>  	int ret;
> 
> +	if (data->flips && plane_type != DRM_PLANE_TYPE_PRIMARY)
> +		igt_require(data->display.is_atomic);
> +
>  	if (plane_type == DRM_PLANE_TYPE_PRIMARY || plane_type
> == DRM_PLANE_TYPE_CURSOR)
>  		commit = COMMIT_UNIVERSAL;
> 
> @@ -390,12 +393,20 @@ static void test_plane_rotation(data_t *data, int
> plane_type)
>  			 * check CRC against that one as
> well.
>  			 */
>  			if (data->flips) {
> -				ret =
> drmModePageFlip(data->gfx_fd,
> -
> 	      output->config.crtc->crtc_id,
> -
> 	      data->fb_flip.fb_id,
> -
> 	      DRM_MODE_PAGE_FLIP_EVENT,
> -
> 	      NULL);
> -				igt_assert_eq(ret,
> 0);
> +
> 	igt_plane_set_fb(plane, &data->fb_flip);
> +				if (data->rotation
> == IGT_ROTATION_90 || data->rotation == IGT_ROTATION_270)
> +
> 	igt_plane_set_size(plane, data->fb.height, data->fb.width);
> +
> +				if (plane_type !=
> DRM_PLANE_TYPE_PRIMARY) {
> +
> 	igt_display_commit_atomic(display,
> DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_NONBLOCK,
> NULL);
> +				} else {
> +					ret =
> drmModePageFlip(data->gfx_fd,
> +
> 		output->config.crtc->crtc_id,
> +
> 		data->fb_flip.fb_id,
> +
> 		DRM_MODE_PAGE_FLIP_EVENT,
> +
> 		NULL);
> +
> 	igt_assert_eq(ret, 0);
> +				}
> 
> 	wait_for_pageflip(data->gfx_fd);
> 
> 	igt_pipe_crc_collect_crc(data->pipe_crc,
> 
> 		 &crc_output);
> --
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list