diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index bb6652e..eda4430 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -237,6 +237,7 @@ TESTS_progs = \
 	tools_test \
 	vgem_basic \
 	vgem_slow \
+	test_nv12 \
 	$(NULL)
 
 TESTS_progs_X = \
diff --git a/tests/NV12_Image0.png b/tests/NV12_Image0.png
new file mode 100644
index 0000000000000000000000000000000000000000..d9735659005dcb434488818a4227449c082d4973
GIT binary patch
diff --git a/tests/NV12_Image1.png b/tests/NV12_Image1.png
new file mode 100644
index 0000000000000000000000000000000000000000..3e6aab30a01116ac02ff4e0917ebf2af595f9480
GIT binary patch
diff --git a/tests/NV12_Image2.png b/tests/NV12_Image2.png
new file mode 100644
index 0000000000000000000000000000000000000000..32012a26a54571b62a963d2849fef043485d88db
GIT binary patch
diff --git a/tests/test_nv12.c b/tests/test_nv12.c
new file mode 100644
index 0000000..b0a5050
--- /dev/null
+++ b/tests/test_nv12.c
@@ -0,0 +1,621 @@
+#include <stdbool.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <errno.h>
+#include <xf86drmMode.h>
+#include <cairo.h>
+#include "drm.h"
+#include "ioctl_wrappers.h"
+#include "drmtest.h"
+#include "igt.h"
+#include "igt_aux.h"
+#include "sw_sync.h"
+
+
+IGT_TEST_DESCRIPTION("Test flips, rotation and tiling scenarios NV12");
+
+uint32_t devid;
+
+typedef struct {
+	int drm_fd;
+	igt_display_t display;
+	int num_planes;
+	struct igt_fb fb1_nv12_p1, fb2_nv12_p1, fb1_nv12_p2, fb2_nv12_p2;
+	struct igt_fb fb1_p1, fb2_p1, fb3_p1;
+	struct igt_fb fb1_p2, fb2_p2, fb3_p2;
+	igt_plane_t *plane1_p1;
+	igt_plane_t *plane2_p1;
+	igt_plane_t *plane3_p1;
+	igt_plane_t *plane1_p2;
+	igt_plane_t *plane2_p2;
+	igt_plane_t *plane3_p2;
+	uint64_t tiled;
+	int rotation;
+} data_t;
+
+#define IMG_FILE_A_P0 "NV12_Image0.png"
+#define IMG_FILE_A_P1 "NV12_Image1.png"
+#define IMG_FILE_A_P2 "NV12_Image2.png"
+#define IMG_FILE_B_P0 "NV12_Image0.png"
+#define IMG_FILE_B_P1 "NV12_Image1.png"
+#define IMG_FILE_B_P2 "NV12_Image2.png"
+
+static void
+paint_image_file(data_t *d, struct igt_fb *fb, uint16_t w,
+	uint16_t h, const char *img_filename)
+{
+	cairo_t *cr;
+	cr = igt_get_cairo_ctx(d->drm_fd, fb);
+	igt_paint_image(cr, img_filename, 0, 0, w, h);
+	igt_info("Painted image %s\n", img_filename);
+	cairo_destroy(cr);
+}
+
+/* Test for RGB & Rotation & Sprite combination */
+static void test_rgb(data_t *d, bool test_sprite)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	int valid_tests = 0, img_p1_w1, img_p1_h1, img_p1_w2, img_p1_h2;
+
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		igt_output_set_pipe(output, pipe);
+
+		d->plane1_p1 = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+		igt_plane_set_rotation(d->plane1_p1, d->rotation);
+		igt_get_image_size(IMG_FILE_A_P0, &img_p1_w1, &img_p1_h1);
+		igt_create_fb(d->drm_fd, img_p1_w1, img_p1_h1,
+			DRM_FORMAT_XRGB8888, d->tiled, &d->fb1_p1);
+		paint_image_file(d, &d->fb1_p1, img_p1_w1, img_p1_h1, IMG_FILE_A_P0);
+
+		if (test_sprite) {
+			d->plane2_p1 = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
+			igt_plane_set_rotation(d->plane2_p1, d->rotation);
+			igt_get_image_size(IMG_FILE_A_P1, &img_p1_w2, &img_p1_h2);
+			igt_create_fb(d->drm_fd, img_p1_w2, img_p1_h2,
+				DRM_FORMAT_XRGB8888, d->tiled, &d->fb2_p1);
+			paint_image_file(d, &d->fb2_p1, img_p1_w2, img_p1_h2, IMG_FILE_A_P1);
+		}
+
+		igt_plane_set_fb(d->plane1_p1, &d->fb1_p1);
+		igt_fb_set_position(&d->fb1_p1, d->plane1_p1, 0, 0);
+		igt_fb_set_size(&d->fb1_p1, d->plane1_p1, d->fb1_p1.width, d->fb1_p1.height);
+		igt_plane_set_position(d->plane1_p1, 0, 0);
+		if (d->rotation == IGT_ROTATION_90 || d->rotation == IGT_ROTATION_270)
+			igt_plane_set_size(d->plane1_p1, d->fb1_p1.height, d->fb1_p1.width);
+		else
+			igt_plane_set_size(d->plane1_p1, d->fb1_p1.width, d->fb1_p1.height);
+
+		if (test_sprite) {
+			igt_plane_set_fb(d->plane2_p1, &d->fb2_p1);
+			igt_fb_set_position(&d->fb2_p1, d->plane2_p1, 0, 0);
+			igt_fb_set_size(&d->fb2_p1, d->plane2_p1, d->fb2_p1.width, d->fb2_p1.height);
+			igt_plane_set_position(d->plane2_p1, 0, 0);
+			if (d->rotation == IGT_ROTATION_90 || d->rotation == IGT_ROTATION_270)
+				igt_plane_set_size(d->plane2_p1, d->fb2_p1.height, d->fb2_p1.width);
+			else
+				igt_plane_set_size(d->plane2_p1, d->fb2_p1.width, d->fb2_p1.height);
+		}
+
+		igt_display_commit2(display, COMMIT_UNIVERSAL);
+
+		valid_tests++;
+		while (getchar() != '\n');
+	}
+	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
+}
+
+/* Test NV12 & Rotation & Sprite combination */
+static void test_nv12(data_t *d, bool test_sprite)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	int valid_tests = 0, img_p1_w1, img_p1_h1, img_p1_w2, img_p1_h2;
+
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		igt_output_set_pipe(output, pipe);
+
+		d->plane1_p1 = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+		igt_plane_set_rotation(d->plane1_p1, d->rotation);
+		igt_get_image_size(IMG_FILE_A_P0, &img_p1_w1, &img_p1_h1);
+		igt_create_fb(d->drm_fd, img_p1_w1, img_p1_h1,
+			DRM_FORMAT_XRGB8888, d->tiled, &d->fb1_p1);
+		igt_create_fb(d->drm_fd, img_p1_w1, img_p1_h1,
+				DRM_FORMAT_NV12, d->tiled, &d->fb1_nv12_p1);
+		paint_image_file(d, &d->fb1_p1, img_p1_w1, img_p1_h1, IMG_FILE_A_P0);
+		igt_fb_csc_xrgb_to_nv12(d->drm_fd, &d->fb1_nv12_p1, &d->fb1_p1);
+
+		if (test_sprite) {
+			d->plane2_p1 = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
+			igt_plane_set_rotation(d->plane2_p1, d->rotation);
+			igt_get_image_size(IMG_FILE_A_P1, &img_p1_w2, &img_p1_h2);
+			igt_create_fb(d->drm_fd, img_p1_w2, img_p1_h2,
+				DRM_FORMAT_XRGB8888, d->tiled, &d->fb2_p1);
+			igt_create_fb(d->drm_fd, img_p1_w2, img_p1_h2,
+				DRM_FORMAT_NV12, d->tiled, &d->fb2_nv12_p1);
+			paint_image_file(d, &d->fb2_p1, img_p1_w2, img_p1_h2, IMG_FILE_A_P1);
+			igt_fb_csc_xrgb_to_nv12(d->drm_fd, &d->fb2_nv12_p1, &d->fb2_p1);
+		}
+
+		igt_plane_set_fb(d->plane1_p1, &d->fb1_nv12_p1);
+		igt_fb_set_position(&d->fb1_nv12_p1, d->plane1_p1, 0, 0);
+		igt_fb_set_size(&d->fb1_nv12_p1, d->plane1_p1,
+			d->fb1_nv12_p1.width, d->fb1_nv12_p1.height);
+		igt_plane_set_position(d->plane1_p1, 0, 0);
+		if (d->rotation == IGT_ROTATION_90  || d->rotation == IGT_ROTATION_270)
+			igt_plane_set_size(d->plane1_p1, d->fb1_nv12_p1.height, d->fb1_nv12_p1.width);
+		else
+			igt_plane_set_size(d->plane1_p1, d->fb1_nv12_p1.width, d->fb1_nv12_p1.height);
+
+		if (test_sprite) {
+			igt_plane_set_rotation(d->plane2_p1, d->rotation);
+			igt_plane_set_fb(d->plane2_p1, &d->fb2_nv12_p1);
+			igt_fb_set_position(&d->fb2_nv12_p1, d->plane2_p1, 0, 0);
+			igt_fb_set_size(&d->fb2_nv12_p1, d->plane2_p1,
+				d->fb2_nv12_p1.width, d->fb2_nv12_p1.height);
+			igt_plane_set_position(d->plane2_p1, 0, 0);
+			if (d->rotation == IGT_ROTATION_90 || d->rotation == IGT_ROTATION_270)
+				igt_plane_set_size(d->plane2_p1, d->fb2_nv12_p1.height, d->fb2_nv12_p1.width);
+			else
+				igt_plane_set_size(d->plane2_p1, d->fb2_nv12_p1.width, d->fb2_nv12_p1.height);
+		}
+
+		igt_display_commit2(display, COMMIT_UNIVERSAL);
+
+		valid_tests++;
+		while (getchar() != '\n');
+	}
+	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
+}
+
+static void test_multi_pipe_plane(data_t *d, bool test_nv12)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output1, *output2;
+	int img_p1_w1, img_p1_w2, img_p1_w3,
+		img_p1_h1, img_p1_h2, img_p1_h3,
+		img_p2_w1, img_p2_w2, img_p2_w3,
+		img_p2_h1, img_p2_h2, img_p2_h3;
+
+	if (display->n_outputs < 2) {
+		igt_info("Two connector required for this test\n");
+		return;
+	}
+
+	output1 = &(display)->outputs[0];
+	output2 = &(display)->outputs[1];
+
+	igt_output_set_pipe(output1, 0);
+	igt_output_set_pipe(output2, 1);
+
+	d->plane1_p1 = igt_output_get_plane_type_with_id(output1, DRM_PLANE_TYPE_PRIMARY, 0);
+	d->plane2_p1 = igt_output_get_plane_type_with_id(output1, DRM_PLANE_TYPE_OVERLAY, 0);
+	d->plane3_p1 = igt_output_get_plane_type_with_id(output1, DRM_PLANE_TYPE_OVERLAY, 1);
+	d->plane1_p2 = igt_output_get_plane_type_with_id(output2, DRM_PLANE_TYPE_PRIMARY, 0);
+	d->plane2_p2 = igt_output_get_plane_type_with_id(output2, DRM_PLANE_TYPE_OVERLAY, 0);
+	d->plane3_p2 = igt_output_get_plane_type_with_id(output2, DRM_PLANE_TYPE_OVERLAY, 1);
+
+	igt_get_image_size(IMG_FILE_A_P0, &img_p1_w1, &img_p1_h1);
+	igt_get_image_size(IMG_FILE_A_P1, &img_p1_w2, &img_p1_h2);
+	igt_get_image_size(IMG_FILE_A_P2, &img_p1_w3, &img_p1_h3);
+	igt_get_image_size(IMG_FILE_B_P0, &img_p2_w1, &img_p2_h1);
+	igt_get_image_size(IMG_FILE_B_P1, &img_p2_w2, &img_p2_h2);
+	igt_get_image_size(IMG_FILE_B_P2, &img_p2_w3, &img_p2_h3);
+
+	igt_create_fb(d->drm_fd, img_p1_w1, img_p1_h1,
+			 DRM_FORMAT_XRGB8888, d->tiled, &d->fb1_p1);
+	igt_create_fb(d->drm_fd, img_p1_w2, img_p1_h2,
+			 DRM_FORMAT_XRGB8888, d->tiled, &d->fb2_p1);
+	igt_create_fb(d->drm_fd, img_p1_w3, img_p1_h3,
+			 DRM_FORMAT_XRGB8888, d->tiled, &d->fb3_p1);
+	igt_create_fb(d->drm_fd, img_p2_w1, img_p2_h1,
+			 DRM_FORMAT_XRGB8888, d->tiled, &d->fb1_p2);
+	igt_create_fb(d->drm_fd, img_p2_w2, img_p2_h2,
+			 DRM_FORMAT_XRGB8888, d->tiled, &d->fb2_p2);
+	igt_create_fb(d->drm_fd, img_p2_w3, img_p2_h3,
+			 DRM_FORMAT_XRGB8888, d->tiled, &d->fb3_p2);
+
+	if (test_nv12) {
+		/* Lets display NV12 on primary, NV12 on sprite 0, RGB on sprite 1 */
+		igt_create_fb(d->drm_fd, img_p1_w1, img_p1_h1,
+				DRM_FORMAT_NV12, d->tiled, &d->fb1_nv12_p1);
+		igt_create_fb(d->drm_fd, img_p1_w2, img_p1_h2,
+				DRM_FORMAT_NV12, d->tiled, &d->fb2_nv12_p1);
+		igt_create_fb(d->drm_fd, img_p2_w1, img_p2_h1,
+				DRM_FORMAT_NV12, d->tiled, &d->fb1_nv12_p2);
+		igt_create_fb(d->drm_fd, img_p2_w2, img_p2_h2,
+				DRM_FORMAT_NV12, d->tiled, &d->fb2_nv12_p2);
+	}
+
+	paint_image_file(d, &d->fb1_p1, img_p1_w1, img_p1_h1, IMG_FILE_A_P0);
+	paint_image_file(d, &d->fb2_p1, img_p1_w2, img_p1_h2, IMG_FILE_A_P1);
+	paint_image_file(d, &d->fb3_p1, img_p1_w3, img_p1_h3, IMG_FILE_A_P2);
+	paint_image_file(d, &d->fb1_p2, img_p2_w1, img_p2_h1, IMG_FILE_B_P0);
+	paint_image_file(d, &d->fb2_p2, img_p2_w2, img_p2_h2, IMG_FILE_B_P1);
+	paint_image_file(d, &d->fb3_p2, img_p2_w3, img_p2_h3, IMG_FILE_B_P2);
+
+	if (test_nv12) {
+		igt_fb_csc_xrgb_to_nv12(d->drm_fd, &d->fb1_nv12_p1, &d->fb1_p1);
+		igt_fb_csc_xrgb_to_nv12(d->drm_fd, &d->fb2_nv12_p1, &d->fb2_p1);
+		igt_fb_csc_xrgb_to_nv12(d->drm_fd, &d->fb1_nv12_p2, &d->fb1_p2);
+		igt_fb_csc_xrgb_to_nv12(d->drm_fd, &d->fb2_nv12_p2, &d->fb2_p2);
+	}
+
+	if (test_nv12) {
+		/* NV12 on Primary - Pipe 1 */
+		igt_plane_set_fb(d->plane1_p1, &d->fb1_nv12_p1);
+		igt_fb_set_position(&d->fb1_nv12_p1, d->plane1_p1, 0, 0);
+		igt_fb_set_size(&d->fb1_nv12_p1, d->plane1_p1, d->fb1_nv12_p1.width, d->fb1_nv12_p1.height);
+		igt_plane_set_position(d->plane1_p1, 0, 0);
+		igt_plane_set_size(d->plane1_p1, d->fb1_nv12_p1.width, d->fb1_nv12_p1.height);
+
+		/* NV12 on Sprite 0 - Pipe 1 */
+		igt_plane_set_fb(d->plane2_p1, &d->fb2_nv12_p1);
+		igt_fb_set_position(&d->fb2_nv12_p1, d->plane2_p1, 0, 0);
+		igt_fb_set_size(&d->fb2_nv12_p1, d->plane2_p1, d->fb2_nv12_p1.width, d->fb2_nv12_p1.height);
+		igt_plane_set_position(d->plane2_p1, 0, 0);
+		igt_plane_set_size(d->plane2_p1, d->fb2_nv12_p1.width, d->fb2_nv12_p1.height);
+
+		/* NV12 on Primary - Pipe 2 */
+		igt_plane_set_fb(d->plane1_p2, &d->fb1_nv12_p2);
+		igt_fb_set_position(&d->fb1_nv12_p2, d->plane1_p2, 0, 0);
+		igt_fb_set_size(&d->fb1_nv12_p2, d->plane1_p2, d->fb1_nv12_p2.width, d->fb1_nv12_p2.height);
+		igt_plane_set_position(d->plane1_p2, 0, 0);
+		igt_plane_set_size(d->plane1_p2, d->fb1_nv12_p2.width, d->fb1_nv12_p2.height);
+
+		/* NV12 on Sprite 0 - Pipe 2 */
+		igt_plane_set_fb(d->plane2_p2, &d->fb2_nv12_p2);
+		igt_fb_set_position(&d->fb2_nv12_p2, d->plane2_p2, 0, 0);
+		igt_fb_set_size(&d->fb2_nv12_p2, d->plane2_p2, d->fb2_nv12_p2.width, d->fb2_nv12_p2.height);
+		igt_plane_set_position(d->plane2_p2, 0, 0);
+		igt_plane_set_size(d->plane2_p2, d->fb2_nv12_p2.width, d->fb2_nv12_p2.height);
+	} else {
+		/* RGB on Primary Pipe 1, Sprite 0 Pipe 1, Primary Pipe 2, Sprite Pipe 2 */
+		igt_plane_set_fb(d->plane1_p1, &d->fb1_p1);
+		igt_fb_set_position(&d->fb1_p1, d->plane1_p1, 0, 0);
+		igt_fb_set_size(&d->fb1_p1, d->plane1_p1, d->fb1_p1.width, d->fb1_p1.height);
+		igt_plane_set_position(d->plane1_p1, 0, 0);
+		igt_plane_set_size(d->plane1_p1, d->fb1_p1.width, d->fb1_p1.height);
+
+		igt_plane_set_fb(d->plane2_p1, &d->fb2_p1);
+		igt_fb_set_position(&d->fb2_p1, d->plane2_p1, 0, 0);
+		igt_fb_set_size(&d->fb2_p1, d->plane2_p1, d->fb2_p1.width, d->fb2_p1.height);
+		igt_plane_set_position(d->plane2_p1, 0, 0);
+		igt_plane_set_size(d->plane2_p1, d->fb2_p1.width, d->fb2_p1.height);
+
+		igt_plane_set_fb(d->plane1_p2, &d->fb1_p1);
+		igt_fb_set_position(&d->fb1_p2, d->plane1_p2, 0, 0);
+		igt_fb_set_size(&d->fb1_p2, d->plane1_p2, d->fb1_p2.width, d->fb1_p2.height);
+		igt_plane_set_position(d->plane1_p2, 0, 0);
+		igt_plane_set_size(d->plane1_p2, d->fb1_p2.width, d->fb1_p2.height);
+
+		igt_plane_set_fb(d->plane2_p2, &d->fb2_p2);
+		igt_fb_set_position(&d->fb2_p2, d->plane2_p2, 0, 0);
+		igt_fb_set_size(&d->fb2_p2, d->plane2_p2, d->fb2_p2.width, d->fb2_p2.height);
+		igt_plane_set_position(d->plane2_p2, 0, 0);
+		igt_plane_set_size(d->plane2_p2, d->fb2_p2.width, d->fb2_p2.height);
+	}
+
+	/* RGB on Sprite 1 - Pipe 1 */
+	igt_plane_set_fb(d->plane3_p1, &d->fb3_p1);
+	igt_fb_set_position(&d->fb3_p1, d->plane3_p1, 0, 0);
+	igt_fb_set_size(&d->fb3_p1, d->plane3_p1, d->fb3_p1.width, d->fb3_p1.height);
+	igt_plane_set_position(d->plane3_p1, 0, 0);
+	igt_plane_set_size(d->plane3_p1, d->fb3_p1.width, d->fb3_p1.height);
+
+	/* RGB on Sprite 1 - Pipe 2 */
+	igt_plane_set_fb(d->plane3_p2, &d->fb3_p2);
+	igt_fb_set_position(&d->fb3_p2, d->plane3_p2, 0, 0);
+	igt_fb_set_size(&d->fb3_p2, d->plane3_p2, d->fb3_p2.width, d->fb3_p2.height);
+	igt_plane_set_position(d->plane3_p2, 0, 0);
+	igt_plane_set_size(d->plane3_p2, d->fb3_p2.width, d->fb3_p2.height);
+
+	igt_display_commit2(display, COMMIT_UNIVERSAL);
+
+	while (getchar() != '\n');
+}
+
+igt_main
+{
+	data_t data = {};
+	igt_skip_on_simulation();
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver(DRIVER_INTEL);
+		kmstest_set_vt_graphics_mode();
+		igt_display_init(&data.display, data.drm_fd);
+		igt_require_gem(data.drm_fd);
+
+		devid = intel_get_drm_devid(data.drm_fd);
+		data.num_planes = 2;
+		igt_assert(intel_gen(devid) >= 9);
+	}
+
+	/* Rotation 0 RGB & Tiling */
+	data.rotation = IGT_ROTATION_0;
+	igt_subtest_f("rgb-plane-tile-linear") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_DRM_FORMAT_MOD_NONE;
+		test_rgb(&data, 0);
+	}
+	igt_subtest_f("rgb-plane-tile-x") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_X_TILED;
+		test_rgb(&data, 0);
+	}
+	igt_subtest_f("rgb-plane-tile-y") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_rgb(&data, 0);
+	}
+	igt_subtest_f("rgb-plane-tile-yf") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_rgb(&data, 0);
+	}
+
+	/* Rotation 90 RGB & Tiling - Y and Yf */
+	data.rotation = IGT_ROTATION_90;
+	igt_subtest_f("rgb-plane-tile-y_rot90") {
+		data.rotation = IGT_ROTATION_90;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_rgb(&data, 0);
+	}
+	igt_subtest_f("rgb-plane-tile-yf_rot90") {
+		data.rotation = IGT_ROTATION_90;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_rgb(&data, 0);
+	}
+
+	/* Rotation 180 RGB & Tiling */
+	igt_subtest_f("rgb-plane-tile-linear_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_DRM_FORMAT_MOD_NONE;
+		test_rgb(&data, 0);
+	}
+	igt_subtest_f("rgb-plane-tile-x_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_X_TILED;
+		test_rgb(&data, 0);
+	}
+	igt_subtest_f("rgb-plane-tile-y_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_rgb(&data, 0);
+	}
+	igt_subtest_f("rgb-plane-tile-yf_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_rgb(&data, 0);
+	}
+
+	/* Rotation 270 RGB & Tiling - Y and Yf */
+	data.rotation = IGT_ROTATION_270;
+	igt_subtest_f("rgb-plane-tile-y_rot270") {
+		data.rotation = IGT_ROTATION_270;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_rgb(&data, 0);
+	}
+	igt_subtest_f("rgb-plane-tile-yf_rot270") {
+		data.rotation = IGT_ROTATION_270;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_rgb(&data, 0);
+	}
+
+	/* Rotation 0 NV12 & Tiling */
+	igt_subtest_f("nv12-plane-tile-linear") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_DRM_FORMAT_MOD_NONE;
+		test_nv12(&data, 0);
+	}
+	igt_subtest_f("nv12-plane-tile-x") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_X_TILED;
+		test_nv12(&data, 0);
+	}
+	igt_subtest_f("nv12-plane-tile-y") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_nv12(&data, 0);
+	}
+	igt_subtest_f("nv12-plane-tile-yf") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_nv12(&data, 0);
+	}
+
+	/* Rotation 90 NV12 & Tiling - Y and Yf */
+	igt_subtest_f("nv12-plane-tile-y_rot90") {
+		data.rotation = IGT_ROTATION_90;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_nv12(&data, 0);
+	}
+	igt_subtest_f("nv12-plane-tile-yf_rot90") {
+		data.rotation = IGT_ROTATION_90;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_nv12(&data, 0);
+	}
+
+	/* Rotation 180 NV12 & Tiling */
+	igt_subtest_f("nv12-plane-tile-linear_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_DRM_FORMAT_MOD_NONE;
+		test_nv12(&data, 0);
+	}
+	igt_subtest_f("nv12-plane-tile-x_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_X_TILED;
+		test_nv12(&data, 0);
+	}
+	igt_subtest_f("nv12-plane-tile-y_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_nv12(&data, 0);
+	}
+	igt_subtest_f("nv12-plane-tile-yf_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_nv12(&data, 0);
+	}
+
+	/* Rotation 270 NV12 & Tiling - Y and Yf */
+	igt_subtest_f("nv12-plane-tile-y_rot270") {
+		data.rotation = IGT_ROTATION_270;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_nv12(&data, 0);
+	}
+	igt_subtest_f("nv12-plane-tile-yf_rot270") {
+		data.rotation = IGT_ROTATION_270;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_nv12(&data, 0);
+	}
+
+	/* Test Sprite/Overlay for NV12 with Tiling */
+	igt_subtest_f("sprite_nv12-plane-tile-linear") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_DRM_FORMAT_MOD_NONE;
+		test_nv12(&data, 1);
+	}
+	igt_subtest_f("sprite_nv12-plane-tile-x") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_X_TILED;
+		test_nv12(&data, 1);
+	}
+	igt_subtest_f("sprite_nv12-plane-tile-y") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_nv12(&data, 1);
+	}
+	igt_subtest_f("sprite_nv12-plane-tile-yf") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_nv12(&data, 1);
+	}
+
+	/* Test Sprite/Overlay for NV12 with Rotation */
+	igt_subtest_f("sprite_nv12-plane-tile-y_rot270") {
+		data.rotation = IGT_ROTATION_270;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_nv12(&data, 1);
+	}
+	igt_subtest_f("sprite_nv12-plane-tile-yf_rot270") {
+		data.rotation = IGT_ROTATION_270;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_nv12(&data, 1);
+	}
+	igt_subtest_f("sprite_nv12-plane-tile-y_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_nv12(&data, 1);
+	}
+	igt_subtest_f("sprite_nv12-plane-tile-yf_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_nv12(&data, 1);
+	}
+	igt_subtest_f("sprite_nv12-plane-tile-x_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_X_TILED;
+		test_nv12(&data, 1);
+	}
+	igt_subtest_f("sprite_nv12-plane-tile-linear_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_DRM_FORMAT_MOD_NONE;
+		test_nv12(&data, 1);
+	}
+	igt_subtest_f("sprite_nv12-plane-tile-y_rot90") {
+		data.rotation = IGT_ROTATION_90;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_nv12(&data, 1);
+	}
+	igt_subtest_f("sprite_nv12-plane-tile-yf_rot90") {
+		data.rotation = IGT_ROTATION_90;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_nv12(&data, 1);
+	}
+
+	/* Test Sprite/Overlay for RGB with Rotation */
+	igt_subtest_f("sprite_rgb-plane-tile-linear") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_DRM_FORMAT_MOD_NONE;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-x") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_X_TILED;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-y") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-yf") {
+		data.rotation = IGT_ROTATION_0;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-y_rot90") {
+		data.rotation = IGT_ROTATION_90;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-yf_rot90") {
+		data.rotation = IGT_ROTATION_90;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-y_rot270") {
+		data.rotation = IGT_ROTATION_270;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-yf_rot270") {
+		data.rotation = IGT_ROTATION_270;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-y_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Y_TILED;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-yf_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-x_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_I915_FORMAT_MOD_X_TILED;
+		test_rgb(&data, 1);
+	}
+	igt_subtest_f("sprite_rgb-plane-tile-linear_rot180") {
+		data.rotation = IGT_ROTATION_180;
+		data.tiled = LOCAL_DRM_FORMAT_MOD_NONE;
+		test_rgb(&data, 1);
+	}
+
+	/* Test two pipes and two sprites for RGB */
+	igt_subtest_f("multi_pipe_sprite_rgb") {
+		data.tiled = LOCAL_DRM_FORMAT_MOD_NONE;
+		data.rotation = IGT_ROTATION_0;
+		test_multi_pipe_plane(&data, 0);
+	}
+
+	/* Test two pipes and two sprites combining RGB and NV12 */
+	igt_subtest_f("multi_pipe_sprite_nv12") {
+		data.tiled = LOCAL_DRM_FORMAT_MOD_NONE;
+		data.rotation = IGT_ROTATION_0;
+		test_multi_pipe_plane(&data, 1);
+	}
+
+	igt_fixture {
+		igt_display_fini(&data.display);
+	}
+}
