Skip to contentSkip to conversation

tests/kms_nv12: Add nv12 specific tests.

PATCH In review Maarten Lankhorst 3 participants 6 messages Apr 18, 2018 – Apr 19, 2018 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/kms_nv12: Add nv12 specific tests.

Add tests excercising switching between various scaled/unscaled transitions to and from NV12, since some of the workarounds mention this may fail.

We also add NV12 specific clipping/scaling tests, to make sure that NV12 src coordinates are always programmed as a multiple of 4 correctly, and verify scaling/clipping works with CRC tests.

---
 tests/Makefile.sources    |   1 +
 tests/kms_nv12.c          | 404 ++++++++++++++++++++++++++++++++++++++
 tests/kms_plane_scaling.c |  13 +-
 tests/meson.build         |   1 +
 4 files changed, 411 insertions(+), 8 deletions(-)
 create mode 100644 tests/kms_nv12.c
tests/Makefile.sources +1 -0
index 791e4f83d648..ddcc18f2ebb2 100644
@@ -195,6 +195,7 @@ TESTS_progs = \
 	kms_legacy_colorkey \
 	kms_mmap_write_crc \
 	kms_mmio_vs_cs_flip \
+	kms_nv12 \
 	kms_panel_fitting \
 	kms_pipe_b_c_ivb \
 	kms_pipe_crc_basic \
tests/kms_nv12.c new file +404 -0

404 lines not on this page · raw message

tests/kms_plane_scaling.c +5 -8
index a8454205dbd8..56299bf6bb96 100644
@@ -546,23 +546,20 @@ igt_main
 			igt_display_require_output_on_pipe(&data.display, pipe);
 
 			igt_require(get_num_scalers(data.devid, pipe) > 0);
+			output = igt_get_single_output_for_pipe(&data.display, pipe);
 		}
 
 		igt_subtest_f("pipe-%s-plane-scaling", kmstest_pipe_name(pipe))
-			for_each_valid_output_on_pipe(&data.display, pipe, output)
-				test_plane_scaling_on_pipe(&data, pipe, output);
+			test_plane_scaling_on_pipe(&data, pipe, output);
 
 		igt_subtest_f("pipe-%s-scaler-with-pixel-format", kmstest_pipe_name(pipe))
-			for_each_valid_output_on_pipe(&data.display, pipe, output)
-				test_scaler_with_pixel_format_pipe(&data, pipe, output);
+			test_scaler_with_pixel_format_pipe(&data, pipe, output);
 
 		igt_subtest_f("pipe-%s-scaler-with-rotation", kmstest_pipe_name(pipe))
-			for_each_valid_output_on_pipe(&data.display, pipe, output)
-				test_scaler_with_rotation_pipe(&data, pipe, output);
+			test_scaler_with_rotation_pipe(&data, pipe, output);
 
 		igt_subtest_f("pipe-%s-scaler-with-clipping-clamping", kmstest_pipe_name(pipe))
-			for_each_valid_output_on_pipe(&data.display, pipe, output)
-				test_scaler_with_clipping_clamping_scenario(&data, pipe, output);
+			test_scaler_with_clipping_clamping_scenario(&data, pipe, output);
 	}
 
 	igt_subtest_f("2x-scaler-multi-pipe")
tests/meson.build +1 -0
index 4720dfe21a66..656cc12ebb10 100644
@@ -171,6 +171,7 @@ test_progs = [
 	'kms_legacy_colorkey',
 	'kms_mmap_write_crc',
 	'kms_mmio_vs_cs_flip',
+	'kms_nv12',
 	'kms_panel_fitting',
 	'kms_pipe_b_c_ivb',
 	'kms_pipe_crc_basic',
Signature · 6 lines
2.17.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

Thank you so much for the test patch.

Two subtests PASS with this nv12-rgb-switch and valid-width
Under subtest nv12-rgb-scaled-switch it tries to use more than 2 scalers. That fails on APL Kernel Message: intel_atomic_setup_scalers: Too many scaling requests 3 > 2

Regards
Vidya

Quoted 555 lines

-----Original Message-----
From: Maarten Lankhorst [mailto:[email protected]]
Sent: Wednesday, April 18, 2018 3:02 PM
To: [email protected]
Cc: Maarten Lankhorst <[email protected]>; Srinivas, Vidya <[email protected]>
Subject: [PATCH i-g-t] tests/kms_nv12: Add nv12 specific tests.

Add tests excercising switching between various scaled/unscaled transitions to and from NV12, since some of the workarounds mention this may fail.

We also add NV12 specific clipping/scaling tests, to make sure that NV12 src coordinates are always programmed as a multiple of 4 correctly, and verify scaling/clipping works with CRC tests.

---
 tests/Makefile.sources    |   1 +
 tests/kms_nv12.c          | 404 ++++++++++++++++++++++++++++++++++++++
 tests/kms_plane_scaling.c |  13 +-
 tests/meson.build         |   1 +
 4 files changed, 411 insertions(+), 8 deletions(-)  create mode 100644

tests/kms_nv12.c

tests/Makefile.sources index renamed from tests/Makefile.sources +0 -0

791e4f83d648..ddcc18f2ebb2 100644

tests/Makefile.sources +1 -0
@@ -195,6 +195,7 @@ TESTS_progs = \
 	kms_legacy_colorkey \
 	kms_mmap_write_crc \
 	kms_mmio_vs_cs_flip \
+	kms_nv12 \
 	kms_panel_fitting \
 	kms_pipe_b_c_ivb \
 	kms_pipe_crc_basic \
tests/kms_nv12.c new file +18 -0
index 000000000000..aa57eaec5a37
@@ -0,0 +1,404 @@
+/*
+ * Permission is hereby granted, free of charge, to any person
+obtaining a
+ * copy of this software and associated documentation files (the
+"Software"),
+ * to deal in the Software without restriction, including without
+limitation
+ * the rights to use, copy, modify, merge, publish, distribute,
+sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom
+the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY

KIND,

tests/kms_nv12.c new file +4 -0
+EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO

EVENT
+SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER

tests/kms_nv12.c new file +91 -0
+DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ *    Maarten Lankhorst <[email protected]>
+ */
+#include "config.h"
+
+#include "igt.h"
+#include <cairo.h>
+#include <errno.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <sys/time.h>
+
+typedef struct {
+	igt_display_t display;
+
+	igt_pipe_crc_t *pipe_crc;
+	struct igt_fb fb[4];
+} data_t;
+
+static bool plane_supports_format(igt_plane_t *plane, uint32_t format)
+{
+	int i;
+
+	if (!igt_fb_supported_format(format))
+		return false;
+
+	for (i = 0; i < plane->drm_plane->count_formats; i++)
+		if (plane->drm_plane->formats[i] == format)
+			return true;
+
+	return false;
+}
+
+static bool pipe_supports_format(igt_display_t *display, enum pipe
+pipe, uint32_t format) {
+	igt_plane_t *plane;
+
+	for_each_plane_on_pipe(display, pipe, plane)
+		if (plane_supports_format(plane, format))
+			return true;
+
+	return false;
+}
+
+static void remove_fbs(data_t *data)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(data->fb); i++)
+		igt_remove_fb(data->display.drm_fd, &data->fb[i]); }
+
+static void prepare_crtc(data_t *data, enum pipe pipe, igt_output_t
+*output) {
+	igt_display_t *display = &data->display;
+
+	remove_fbs(data);
+	igt_display_reset(display);
+	igt_output_set_pipe(output, pipe);
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
+	igt_pipe_crc_free(data->pipe_crc);
+	data->pipe_crc = igt_pipe_crc_new(display->drm_fd, pipe,
+INTEL_PIPE_CRC_SOURCE_AUTO); }
+
+static void set_fb(igt_plane_t *plane, struct igt_fb *fb, bool scaled)
+{
+	igt_plane_set_fb(plane, fb);
+
+	if (scaled && fb)
+		igt_fb_set_size(fb, plane, fb->width, 16);
+
+	if (fb && fb->tiling == LOCAL_I915_FORMAT_MOD_Y_TILED) {
+		igt_plane_set_rotation(plane, IGT_ROTATION_90);
+		igt_plane_set_size(plane, fb->height, fb->width);
+	} else
+		igt_plane_set_rotation(plane, IGT_ROTATION_0); }
+
+static void nv12_rgb_switch(data_t *data, enum pipe pipe, igt_output_t
+*output, bool scaled, unsigned format) {
+	drmModeModeInfo *mode = igt_output_get_mode(output);
+	igt_display_t *display = &data->display;
+	igt_plane_t *plane;
+	int i;
+	igt_crc_t ref_crc[4], crc;
+
+	prepare_crtc(data, pipe, output);
+
+	igt_create_pattern_fb(display->drm_fd, mode->hdisplay, mode-
Quoted 1 line

vdisplay,

tests/kms_nv12.c new file +4 -0
+			      format, LOCAL_I915_FORMAT_MOD_X_TILED,
+			      &data->fb[0]);
+
+	igt_create_pattern_fb(display->drm_fd, mode->vdisplay, mode-
Quoted 1 line

hdisplay,

tests/kms_nv12.c new file +4 -0
+			      format, LOCAL_I915_FORMAT_MOD_Y_TILED,
+			      &data->fb[1]);
+
+	igt_create_pattern_fb(display->drm_fd, mode->hdisplay, mode-
Quoted 1 line

vdisplay,

tests/kms_nv12.c new file +1 -0
+			      DRM_FORMAT_XRGB8888,

LOCAL_I915_FORMAT_MOD_X_TILED,

tests/kms_nv12.c new file +3 -0
+			      &data->fb[2]);
+
+	igt_create_pattern_fb(display->drm_fd, mode->vdisplay, mode-
Quoted 1 line

hdisplay,

tests/kms_nv12.c new file +1 -0
+			      DRM_FORMAT_XRGB8888,

LOCAL_I915_FORMAT_MOD_Y_TILED,

tests/kms_nv12.c new file +4 -0
+			      &data->fb[3]);
+
+	for_each_plane_on_pipe(display, pipe, plane) {
+		if (!plane_supports_format(plane,

DRM_FORMAT_XRGB8888))

tests/kms_nv12.c new file +20 -0
+			continue;
+
+		if (plane->type != DRM_PLANE_TYPE_CURSOR)
+			set_fb(plane, &data->fb[3], scaled);
+	}
+
+	for_each_plane_on_pipe(display, pipe, plane) {
+		const int seq[] = {
+			2, 0, 2, 1, 3, 1, 3
+		};
+
+		if (!plane_supports_format(plane, format))
+			continue;
+
+		/* Collect reference crc with toggle in between. */
+		for (i = 0; i < ARRAY_SIZE(ref_crc); i++) {
+			set_fb(plane, &data->fb[i], scaled);
+			igt_display_commit2(display, COMMIT_ATOMIC);
+
+			igt_pipe_crc_collect_crc(data->pipe_crc,

&ref_crc[i]);

tests/kms_nv12.c new file +29 -0
+
+			set_fb(plane, NULL, scaled);
+			igt_display_commit2(display, COMMIT_ATOMIC);
+		}
+
+		for (i = 0; i < ARRAY_SIZE(seq); i++) {
+			int j = seq[i];
+
+			set_fb(plane, &data->fb[j], scaled);
+			igt_display_commit2(display, COMMIT_ATOMIC);
+
+			igt_pipe_crc_collect_crc(data->pipe_crc, &crc);
+			igt_assert_crc_equal(&ref_crc[j], &crc);
+		}
+	}
+}
+
+#define assert_collected_crc_equal(pipe_crc, crc, ref_crc) \
+	do { \
+		igt_pipe_crc_drain(pipe_crc);		\
+		igt_pipe_crc_get_single(pipe_crc, crc);	\
+		igt_assert_crc_equal(ref_crc, crc);	\
+	} while (0)
+
+static void set_src_coords(igt_plane_t *plane, struct igt_fb *fb,
+			   igt_rotation_t rot, int vis, int hidden) {
+	switch (rot) {
+	case IGT_ROTATION_0:
+		igt_fb_set_position(fb, plane, fb->width / 2 - vis, fb->height

/ 2 - vis);

tests/kms_nv12.c new file +3 -0
+		break;
+	case IGT_ROTATION_90:
+		igt_fb_set_position(fb, plane, fb->width / 2 - hidden, fb-
Quoted 1 line

height / 2 - vis);

tests/kms_nv12.c new file +3 -0
+		break;
+	case IGT_ROTATION_180:
+		igt_fb_set_position(fb, plane, fb->width / 2 - hidden, fb-
Quoted 1 line

height / 2 - hidden);

tests/kms_nv12.c new file +3 -0
+		break;
+	case IGT_ROTATION_270:
+		igt_fb_set_position(fb, plane, fb->width / 2 - vis, fb->height

/ 2 - hidden);

tests/kms_nv12.c new file +6 -0
+		break;
+	default: igt_assert(0);
+	}
+	igt_fb_set_size(fb, plane, vis + hidden, vis + hidden); }
+
+static void nv12_valid_width_plane(data_t *data, drmModeModeInfo

*mode,

tests/kms_nv12.c new file +18 -0
+				   igt_plane_t *plane, struct igt_fb *fb,
+				   igt_rotation_t rot, igt_crc_t *ref_crc) {
+	igt_display_t *display = &data->display;
+	igt_crc_t crc;
+	struct igt_fb *clip_fb = &data->fb[2];
+	int i;
+
+	igt_plane_set_fb(plane, fb);
+	igt_plane_set_rotation(plane, rot);
+	if (rot & (IGT_ROTATION_90 | IGT_ROTATION_270))
+		igt_plane_set_size(plane, fb->height, fb->width);
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
+	/* Just clipping.. */
+	igt_plane_set_fb(plane, clip_fb);
+	if (rot & (IGT_ROTATION_90 | IGT_ROTATION_270))
+		igt_plane_set_size(plane, clip_fb->height, clip_fb->width);
+	igt_plane_set_position(plane, mode->hdisplay - clip_fb->width / 2,

mode->vdisplay - clip_fb->height / 2);

tests/kms_nv12.c new file +5 -0
+	igt_display_commit2(display, COMMIT_ATOMIC);
+	assert_collected_crc_equal(data->pipe_crc, &crc, ref_crc);
+
+	/* Clipping and scaling. */
+	igt_fb_set_position(clip_fb, plane, clip_fb->width / 2 - 16, clip_fb-
Quoted 1 line

height / 2 - 16);

tests/kms_nv12.c new file +35 -0
+	igt_fb_set_size(clip_fb, plane, 32, 32);
+	igt_display_commit2(display, COMMIT_ATOMIC);
+	assert_collected_crc_equal(data->pipe_crc, &crc, ref_crc);
+
+	/* Invalid < 16 src visible. */
+	set_src_coords(plane, clip_fb, rot, 8, 8);
+	igt_assert_eq(igt_display_try_commit2(display, COMMIT_ATOMIC),
+-EINVAL);
+
+	/* Do we round down if it's closer? */
+	set_src_coords(plane, clip_fb, rot, 16, 16);
+	if (rot & (IGT_ROTATION_90 | IGT_ROTATION_270))
+		igt_plane_set_size(plane, clip_fb->height / 32 * 34 - 1,
+				   clip_fb->width / 32 * 34 - 1);
+	else
+		igt_plane_set_size(plane, (clip_fb->width / 32) * 34 - 1,
+				   clip_fb->height / 32 * 34 - 1);
+
+	igt_display_commit2(display, COMMIT_ATOMIC);
+	assert_collected_crc_equal(data->pipe_crc, &crc, ref_crc);
+
+	/* And round up if it's closer? */
+	if (rot & (IGT_ROTATION_90 | IGT_ROTATION_270))
+		igt_plane_set_size(plane, clip_fb->height / 32 * 30 + 1,
+				   clip_fb->width / 32 * 34 - 1);
+	else
+		igt_plane_set_size(plane, (clip_fb->width / 32) * 30 + 1,
+				   clip_fb->height / 32 * 34 - 1);
+
+	igt_display_commit2(display, COMMIT_ATOMIC);
+	assert_collected_crc_equal(data->pipe_crc, &crc, ref_crc);
+
+	/*
+	 * As a final test, try with 16 src visible, and various invisible
+	 * components to check clipping doesn't drop the visible src below

16.

tests/kms_nv12.c new file +5 -0
+	 */
+	for (i = 0; i < 16; i += 4) {
+		set_src_coords(plane, clip_fb, rot, 16, i);
+		if (rot & (IGT_ROTATION_90 | IGT_ROTATION_270))
+			igt_plane_set_size(plane, (clip_fb->height / 32) *

(16 + i),

tests/kms_nv12.c new file +21 -0
+					   (clip_fb->width / 32) * (16 + i));
+		else
+			igt_plane_set_size(plane, (clip_fb->width / 32) * (16
+ i),
+					   (clip_fb->height / 32) * (16 + i));
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		assert_collected_crc_equal(data->pipe_crc, &crc, ref_crc);
+	}
+}
+
+static void nv12_valid_width(data_t *data, enum pipe pipe, igt_output_t
+*output, unsigned format) {
+	drmModeModeInfo *mode = igt_output_get_mode(output);
+	igt_display_t *display = &data->display;
+	igt_plane_t *plane;
+	struct igt_fb *clip_fb = &data->fb[2];
+	struct igt_fb *ref_fb = &data->fb[3];
+
+	prepare_crtc(data, pipe, output);
+
+	igt_create_pattern_fb(display->drm_fd, mode->hdisplay, mode-
Quoted 1 line

vdisplay,

tests/kms_nv12.c new file +4 -0
+			      format, LOCAL_I915_FORMAT_MOD_X_TILED,
+			      &data->fb[0]);
+
+	igt_create_pattern_fb(display->drm_fd, mode->vdisplay, mode-
Quoted 1 line

hdisplay,

tests/kms_nv12.c new file +29 -0
+			      format, LOCAL_I915_FORMAT_MOD_Y_TILED,
+			      &data->fb[1]);
+
+	igt_create_fb(display->drm_fd, 64, 64, format,
+		      LOCAL_I915_FORMAT_MOD_Y_TILED, ref_fb);
+
+	igt_create_fb(display->drm_fd, 2 * ref_fb->width,
+		      2 * ref_fb->height, format,
+		      LOCAL_I915_FORMAT_MOD_Y_TILED, clip_fb);
+
+	igt_pipe_crc_start(data->pipe_crc);
+
+	for_each_plane_on_pipe(display, pipe, plane) {
+		igt_crc_t ref_crc[4];
+		cairo_t *cr;
+		static const double colors[4][3] = {
+			{ 1., 0., 0. },
+			{ 0., 1., 0. },
+			{ 0., 0., 1. },
+			{ 1., 1., 1. }
+		};
+		int i;
+
+		if (!plane_supports_format(plane, format))
+			continue;
+
+		/* Draw the FB that will be used for clipping tests. */
+		cr = igt_get_cairo_ctx(display->drm_fd, clip_fb);
+		igt_paint_color(cr, 0, 0, clip_fb->width / 2, clip_fb->height /

2,

tests/kms_nv12.c new file +20 -0
+				colors[0][0], colors[0][1], colors[0][2]);
+
+		igt_paint_color(cr, clip_fb->width / 2, 0,
+				clip_fb->width / 2, clip_fb->height / 2,
+				colors[1][0], colors[1][1], colors[1][2]);
+
+		igt_paint_color(cr, clip_fb->width / 2, clip_fb->height / 2,
+				clip_fb->width / 2, clip_fb->height / 2,
+				colors[2][0], colors[2][1], colors[2][2]);
+
+		igt_paint_color(cr, 0, clip_fb->height / 2,
+				clip_fb->width / 2, clip_fb->height / 2,
+				colors[3][0], colors[3][1], colors[3][2]);
+
+		igt_put_cairo_ctx(display->drm_fd, clip_fb, cr);
+
+		/* Draw all reference FB's to collect the CRC. */
+		for (i = 0; i < 4; i++) {
+			cr = igt_get_cairo_ctx(display->drm_fd, ref_fb);
+			igt_paint_color(cr, 0, 0, ref_fb->width, ref_fb-
Quoted 1 line

height,

tests/kms_nv12.c new file +2 -0
+					colors[i][0], colors[i][1], colors[i][2]);
+			igt_put_cairo_ctx(display->drm_fd, &data->fb[3],

cr);

tests/kms_nv12.c new file +4 -0
+
+			if (!i) {
+				igt_plane_set_fb(plane, ref_fb);
+				igt_plane_set_position(plane, mode-
Quoted 1 line

hdisplay - ref_fb->width, mode->vdisplay - ref_fb->height);

tests/kms_nv12.c new file +1 -0
+				igt_display_commit2(display,

COMMIT_ATOMIC);

tests/kms_nv12.c new file +13 -0
+			} else {
+				igt_dirty_fb(display->drm_fd, ref_fb);
+				igt_wait_for_vblank(display->drm_fd, pipe);
+			}
+
+			igt_pipe_crc_drain(data->pipe_crc);
+			igt_pipe_crc_get_single(data->pipe_crc, &ref_crc[i]);
+		}
+
+		igt_plane_set_fb(plane, NULL);
+		igt_plane_set_position(plane, 0, 0);
+
+		nv12_valid_width_plane(data, mode, plane, &data->fb[0],

IGT_ROTATION_0, &ref_crc[0]);

tests/kms_nv12.c new file +1 -0
+		nv12_valid_width_plane(data, mode, plane, &data->fb[1],

IGT_ROTATION_90, &ref_crc[1]);

tests/kms_nv12.c new file +1 -0
+		nv12_valid_width_plane(data, mode, plane, &data->fb[0],

IGT_ROTATION_180, &ref_crc[2]);

tests/kms_nv12.c new file +14 -0
+		nv12_valid_width_plane(data, mode, plane, &data->fb[1],
+IGT_ROTATION_270, &ref_crc[3]);
+
+		igt_plane_set_fb(plane, NULL);
+	}
+}
+
+static void run_tests_for_pipe(data_t *data, enum pipe pipe) {
+	igt_output_t *output;
+	igt_display_t *display = &data->display;
+
+	igt_fixture {
+		igt_display_require_output_on_pipe(display, pipe);
+		igt_require(pipe_supports_format(display, pipe,

DRM_FORMAT_NV12));

tests/kms_nv12.c new file +3 -0
+	}
+
+	igt_subtest_f("pipe-%s-nv12-rgb-switch",

kmstest_pipe_name(pipe))

tests/kms_nv12.c new file +2 -0
+		for_each_valid_output_on_pipe(display, pipe, output)
+			nv12_rgb_switch(data, pipe, output, false,

DRM_FORMAT_NV12);

tests/kms_nv12.c new file +2 -0
+
+	igt_subtest_f("pipe-%s-nv12-rgb-scaled-switch",

kmstest_pipe_name(pipe))

tests/kms_nv12.c new file +2 -0
+		for_each_valid_output_on_pipe(display, pipe, output)
+			nv12_rgb_switch(data, pipe, output, true,

DRM_FORMAT_NV12);

tests/kms_nv12.c new file +4 -0
+
+	igt_subtest_f("pipe-%s-valid-width", kmstest_pipe_name(pipe))
+		for_each_valid_output_on_pipe(display, pipe, output)
+			nv12_valid_width(data, pipe, output,

DRM_FORMAT_NV12); }

tests/kms_nv12.c new file +10 -0
+
+igt_main
+{
+	data_t data = {};
+	enum pipe pipe;
+
+	igt_skip_on_simulation();
+
+	igt_fixture {
+		data.display.drm_fd =

drm_open_driver_master(DRIVER_ANY);

tests/kms_nv12.c new file +16 -0
+
+		kmstest_set_vt_graphics_mode();
+		igt_display_init(&data.display, data.display.drm_fd);
+		igt_require(data.display.is_atomic);
+		igt_require_pipe_crc(data.display.drm_fd);
+	}
+
+	for_each_pipe_static(pipe)
+		igt_subtest_group
+			run_tests_for_pipe(&data, pipe);
+
+	igt_fixture {
+		igt_display_fini(&data.display);
+		close(data.display.drm_fd);
+	}
+}
tests/kms_plane_scaling.c index renamed from tests/kms_plane_scaling.c +0 -0

a8454205dbd8..56299bf6bb96 100644

tests/kms_plane_scaling.c +3 -4
@@ -546,23 +546,20 @@ igt_main
 			igt_display_require_output_on_pipe(&data.display,
 pipe);
 
 			igt_require(get_num_scalers(data.devid, pipe) > 0);
+			output =
 igt_get_single_output_for_pipe(&data.display, pipe);
 		}
 
 		igt_subtest_f("pipe-%s-plane-scaling",
 kmstest_pipe_name(pipe))
-			for_each_valid_output_on_pipe(&data.display, pipe,
 output)
-				test_plane_scaling_on_pipe(&data, pipe,
 output);
+			test_plane_scaling_on_pipe(&data, pipe, output);
 
 		igt_subtest_f("pipe-%s-scaler-with-pixel-format",
 kmstest_pipe_name(pipe))
-			for_each_valid_output_on_pipe(&data.display, pipe,
 output)
-				test_scaler_with_pixel_format_pipe(&data,
 pipe, output);
+			test_scaler_with_pixel_format_pipe(&data, pipe,
 output);
 
 		igt_subtest_f("pipe-%s-scaler-with-rotation",

kmstest_pipe_name(pipe))

tests/kms_plane_scaling.c +0 -1
-			for_each_valid_output_on_pipe(&data.display, pipe,

output)

tests/kms_plane_scaling.c +0 -1
-				test_scaler_with_rotation_pipe(&data, pipe,

output);

tests/kms_plane_scaling.c +1 -0
+			test_scaler_with_rotation_pipe(&data, pipe, output);
 
 		igt_subtest_f("pipe-%s-scaler-with-clipping-clamping",

kmstest_pipe_name(pipe))

tests/kms_plane_scaling.c +0 -1
-			for_each_valid_output_on_pipe(&data.display, pipe,

output)
-

	test_scaler_with_clipping_clamping_scenario(&data, pipe, output);
+
	test_scaler_with_clipping_clamping_scenario(&data, pipe, output);
tests/kms_plane_scaling.c +0 -0
 	}
 
 	igt_subtest_f("2x-scaler-multi-pipe")
tests/meson.build index renamed from tests/meson.build +0 -0

4720dfe21a66..656cc12ebb10 100644

tests/meson.build +1 -1
@@ -171,6 +171,7 @@ test_progs = [
 	'kms_legacy_colorkey',
 	'kms_mmap_write_crc',
 	'kms_mmio_vs_cs_flip',
+	'kms_nv12',
 	'kms_panel_fitting',
 	'kms_pipe_b_c_ivb',
 	'kms_pipe_crc_basic',
--
Quoted 1 line

2.17.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

Hey,

Op 18-04-18 om 11:52 schreef Srinivas, Vidya:

Quoted 5 lines

Thank you so much for the test patch.

Two subtests PASS with this nv12-rgb-switch and valid-width
Under subtest nv12-rgb-scaled-switch it tries to use more than 2 scalers. That fails on APL Kernel Message: intel_atomic_setup_scalers: Too many scaling requests 3 > 2

Does NV12 support for BXT also needs to be disabled, because of workaround 0826? :)

~Maarten
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw
Quoted 12 lines

-----Original Message-----
From: Maarten Lankhorst [mailto:[email protected]]
Sent: Thursday, April 19, 2018 2:24 PM
To: Srinivas, Vidya <[email protected]>; [email protected]
Cc: Kamath, Sunil <[email protected]>
Subject: Re: [PATCH i-g-t] tests/kms_nv12: Add nv12 specific tests.

Hey,

Op 18-04-18 om 11:52 schreef Srinivas, Vidya:

Quoted 8 lines
Quoted 6 lines

Thank you so much for the test patch.

Two subtests PASS with this nv12-rgb-switch and valid-width Under subtest nv12-rgb-scaled-switch it tries to use more than 2 scalers. That fails on APL Kernel Message: intel_atomic_setup_scalers: Too many scaling requests 3 > 2

Does NV12 support for BXT also needs to be disabled, because of workaround 0826? :)

:) Thank you. As per recommendation from you and Sunil, have posted new series with BROXTON removed. Kindly have a check.

Regards
Vidya

Quoted 2 lines

~Maarten

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_nv12: Add nv12 specific tests.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: tests/kms_nv12: Add nv12 specific tests.
URL : https://patchwork.freedesktop.org/series/41882/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4069 -> IGTPW_1285 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/41882/revisions/1/mbox/

== Known issues ==

Here are the changes found in IGTPW_1285 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s3:
      fi-ivb-3520m:       PASS -> DMESG-WARN (fdo#106084)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-glk-1:           PASS -> INCOMPLETE (k.org#198133, fdo#103359)

    igt@prime_vgem@basic-fence-read:
      fi-elk-e7500:       PASS -> INCOMPLETE (fdo#103989)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-cnl-y3:          DMESG-WARN (fdo#104951) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-ivb-3520m:       DMESG-WARN (fdo#106084) -> PASS

fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

== Participating hosts (35 -> 32) ==

Missing (3): fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq

== Build changes ==

* IGT: IGT_4441 -> IGTPW_1285

CI_DRM_4069: 8136363fe770a1a51688172d5ba46a5017f76677 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1285: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1285/
IGT_4441: 83ba5b7d3bde48b383df41792fc9c955a5a23bdb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4441: e60d247eb359f044caf0c09904da14e39d7adca1 @ git://anongit.freedesktop.org/piglit

== Testlist changes ==

+igt@kms_nv12@pipe-a-nv12-rgb-scaled-switch
+igt@kms_nv12@pipe-a-nv12-rgb-switch
+igt@kms_nv12@pipe-a-valid-width
+igt@kms_nv12@pipe-b-nv12-rgb-scaled-switch
+igt@kms_nv12@pipe-b-nv12-rgb-switch
+igt@kms_nv12@pipe-b-valid-width
+igt@kms_nv12@pipe-c-nv12-rgb-scaled-switch
+igt@kms_nv12@pipe-c-nv12-rgb-switch
+igt@kms_nv12@pipe-c-valid-width
+igt@kms_nv12@pipe-d-nv12-rgb-scaled-switch
+igt@kms_nv12@pipe-d-nv12-rgb-switch
+igt@kms_nv12@pipe-d-valid-width
+igt@kms_nv12@pipe-e-nv12-rgb-scaled-switch
+igt@kms_nv12@pipe-e-nv12-rgb-switch
+igt@kms_nv12@pipe-e-valid-width
+igt@kms_nv12@pipe-f-nv12-rgb-scaled-switch
+igt@kms_nv12@pipe-f-nv12-rgb-switch
+igt@kms_nv12@pipe-f-valid-width

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1285/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for tests/kms_nv12: Add nv12 specific tests.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: tests/kms_nv12: Add nv12 specific tests.
URL : https://patchwork.freedesktop.org/series/41882/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4441_full -> IGTPW_1285_full =

== Summary - WARNING ==

Minor unknown changes coming with IGTPW_1285_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_1285_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/41882/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in IGTPW_1285_full:

=== IGT changes ===

    ==== Warnings ====

    igt@gem_mocs_settings@mocs-rc6-vebox:
      shard-kbl:          PASS -> SKIP

    igt@kms_atomic_transition@2x-modeset-transitions-fencing:
      shard-hsw:          PASS -> SKIP

    igt@perf_pmu@rc6:
      shard-kbl:          SKIP -> PASS +1

== Known issues ==

Here are the changes found in IGTPW_1285_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_ctx_isolation@rcs0-s3:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#102887)

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-snb:          PASS -> FAIL (fdo#103166)

    igt@kms_setmode@basic:
      shard-kbl:          PASS -> FAIL (fdo#99912)

    
    ==== Possible fixes ====

    igt@drv_suspend@forcewake:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@kms_flip@2x-dpms-vs-vblank-race:
      shard-hsw:          FAIL (fdo#103060) -> PASS

    igt@kms_rotation_crc@primary-rotation-180:
      shard-hsw:          FAIL (fdo#103925) -> PASS

    igt@perf_pmu@interrupts-sync:
      shard-apl:          FAIL (fdo#104485) -> PASS

fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#104485 https://bugs.freedesktop.org/show_bug.cgi?id=104485
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

== Participating hosts (5 -> 4) ==

Missing (1): shard-glkb

== Build changes ==

* IGT: IGT_4441 -> IGTPW_1285
* Linux: CI_DRM_4059 -> CI_DRM_4069

CI_DRM_4059: c1645edc253f2b52a8c94565a75b479a6782e75f @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4069: 8136363fe770a1a51688172d5ba46a5017f76677 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1285: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1285/
IGT_4441: 83ba5b7d3bde48b383df41792fc9c955a5a23bdb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4441: e60d247eb359f044caf0c09904da14e39d7adca1 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1285/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev