diff mbox

[i-g-t] Adding tests using COMMIT_ATOMIC path

Message ID 1457346303-29154-1-git-send-email-pratik.vishwakarma@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Pratik Vishwakarma March 7, 2016, 10:25 a.m. UTC
From: pvishwak <pratik.vishwakarma@intel.com>

Depends on:
	https://patchwork.freedesktop.org/patch/76040/

Signed-off-by: Pratik Vishwakarma <pratik.vishwakarma@intel.com>
---
 tests/kms_rotation_crc.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Marius Vlad April 1, 2016, 2:06 p.m. UTC | #1
Library support has landed, please use a proper commit message so we can
add this (i.e., tests/kms_rotation_crc: ....)

On Mon, Mar 07, 2016 at 03:55:03PM +0530, Pratik Vishwakarma wrote:
> From: pvishwak <pratik.vishwakarma@intel.com>
> 
> Depends on:
> 	https://patchwork.freedesktop.org/patch/76040/
> 
> Signed-off-by: Pratik Vishwakarma <pratik.vishwakarma@intel.com>
> ---
>  tests/kms_rotation_crc.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index f94f8f1..be484d3 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -111,6 +111,9 @@ static void commit_crtc(data_t *data, igt_output_t *output, igt_plane_t *plane)
>  		commit = COMMIT_UNIVERSAL;
>  	}
>  
> +	if (data->display.is_atomic)
> +		commit = COMMIT_ATOMIC;
> +
>  	igt_display_commit2(display, commit);
>  }
>  
> @@ -250,6 +253,9 @@ static void test_plane_rotation(data_t *data, enum igt_plane plane_type)
>  		commit = COMMIT_UNIVERSAL;
>  	}
>  
> +	if (data->display.is_atomic)
> +		commit = COMMIT_ATOMIC;
> +
>  	for_each_connected_output(display, output) {
>  		for_each_pipe(display, pipe) {
>  			igt_plane_t *plane;
> @@ -340,6 +346,9 @@ static void test_plane_rotation_ytiled_obj(data_t *data, enum igt_plane plane_ty
>  		commit = COMMIT_UNIVERSAL;
>  	}
>  
> +	if (data->display.is_atomic)
> +		commit = COMMIT_ATOMIC;
> +
>  	mode = igt_output_get_mode(output);
>  	w = mode->hdisplay;
>  	h = mode->vdisplay;
> @@ -404,6 +413,9 @@ static void test_plane_rotation_exhaust_fences(data_t *data, enum igt_plane plan
>  		commit = COMMIT_UNIVERSAL;
>  	}
>  
> +	if (data->display.is_atomic)
> +		commit = COMMIT_ATOMIC;
> +
>  	mode = igt_output_get_mode(output);
>  	w = mode->hdisplay;
>  	h = mode->vdisplay;
> @@ -579,6 +591,12 @@ igt_main
>  		test_plane_rotation_exhaust_fences(&data, IGT_PLANE_PRIMARY);
>  	}
>  
> +	igt_subtest_f("atomic-primary-rotation-180") {
> +		igt_require(data.display.is_atomic);
> +		data.rotation = IGT_ROTATION_180;
> +		test_plane_rotation(&data, IGT_PLANE_PRIMARY);
> +	}
> +
>  	igt_fixture {
>  		igt_display_fini(&data.display);
>  	}
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index f94f8f1..be484d3 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -111,6 +111,9 @@  static void commit_crtc(data_t *data, igt_output_t *output, igt_plane_t *plane)
 		commit = COMMIT_UNIVERSAL;
 	}
 
+	if (data->display.is_atomic)
+		commit = COMMIT_ATOMIC;
+
 	igt_display_commit2(display, commit);
 }
 
@@ -250,6 +253,9 @@  static void test_plane_rotation(data_t *data, enum igt_plane plane_type)
 		commit = COMMIT_UNIVERSAL;
 	}
 
+	if (data->display.is_atomic)
+		commit = COMMIT_ATOMIC;
+
 	for_each_connected_output(display, output) {
 		for_each_pipe(display, pipe) {
 			igt_plane_t *plane;
@@ -340,6 +346,9 @@  static void test_plane_rotation_ytiled_obj(data_t *data, enum igt_plane plane_ty
 		commit = COMMIT_UNIVERSAL;
 	}
 
+	if (data->display.is_atomic)
+		commit = COMMIT_ATOMIC;
+
 	mode = igt_output_get_mode(output);
 	w = mode->hdisplay;
 	h = mode->vdisplay;
@@ -404,6 +413,9 @@  static void test_plane_rotation_exhaust_fences(data_t *data, enum igt_plane plan
 		commit = COMMIT_UNIVERSAL;
 	}
 
+	if (data->display.is_atomic)
+		commit = COMMIT_ATOMIC;
+
 	mode = igt_output_get_mode(output);
 	w = mode->hdisplay;
 	h = mode->vdisplay;
@@ -579,6 +591,12 @@  igt_main
 		test_plane_rotation_exhaust_fences(&data, IGT_PLANE_PRIMARY);
 	}
 
+	igt_subtest_f("atomic-primary-rotation-180") {
+		igt_require(data.display.is_atomic);
+		data.rotation = IGT_ROTATION_180;
+		test_plane_rotation(&data, IGT_PLANE_PRIMARY);
+	}
+
 	igt_fixture {
 		igt_display_fini(&data.display);
 	}