Skip to contentSkip to conversation

i-g-t: kms_plane_scaling: Enhanced scaling tests

PATCH In review Vidya Srinivas 5 participants 9 messages Nov 22, 2017 – Nov 29, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i-g-t: kms_plane_scaling: Enhanced scaling tests

From: Jyoti Yadav <[email protected]>

Added subtests to cover below gaps.
1. scaler with pixelformat and tiling.
2. scaler with rotation
3. scaler with multiple planes
4. scaler with multi pipe
5. scaler with clipping/clamping scenario

---
 tests/kms_plane_scaling.c | 480 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 476 insertions(+), 4 deletions(-)
tests/kms_plane_scaling.c +476 -4
index 403df47..2be6acc 100644
@@ -43,10 +43,11 @@ typedef struct {
 	struct igt_fb fb1;
 	struct igt_fb fb2;
 	struct igt_fb fb3;
+	struct igt_fb fb4;
 	int fb_id1;
 	int fb_id2;
 	int fb_id3;
-
+	int fb_id4;
 	igt_plane_t *plane1;
 	igt_plane_t *plane2;
 	igt_plane_t *plane3;
@@ -54,6 +55,51 @@ typedef struct {
 } data_t;
 
 #define FILE_NAME   "1080p-left.png"
+#define MIN_SRC_WIDTH 8
+#define MAX_SRC_WIDTH 4096
+static uint32_t check_pixel_format(uint32_t pixel_format)
+{
+	const uint32_t *igt_formats;
+	int num_igt_formats;
+	int i;
+
+
+	igt_get_all_cairo_formats(&igt_formats, &num_igt_formats);
+	for (i = 0; i < num_igt_formats; i++) {
+		if (pixel_format == igt_formats[i])
+			return 0;
+	}
+
+	return -1;
+}
+bool is_igt_output_connected(igt_output_t *output)
+{
+	/* Something went wrong during probe? */
+	if (!output->config.connector)
+		return false;
+
+	if (output->config.connector->connection == DRM_MODE_CONNECTED)
+		return true;
+
+	return false;
+}
+
+static igt_output_t *get_next_valid_output(igt_display_t *data, int i)
+{
+	int j = 0, valid_output = 0;
+	drmModeModeInfo *mode;
+	for (j = 0; j < data->n_outputs; j++) {
+		if (is_igt_output_connected(&data->outputs[j])) {
+			mode = igt_output_get_mode(&data->outputs[j]);
+			if (mode->hdisplay != 0 && mode->vdisplay != 0) {
+				valid_output++;
+				if (valid_output == i)
+					return &data->outputs[j];
+			}
+		}
+	}
+	return NULL;
+}
 
 static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
 			igt_plane_t *plane, drmModeModeInfo *mode, enum igt_commit_style s)
@@ -298,7 +344,418 @@ static void test_plane_scaling(data_t *d)
 	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
 }
 
-igt_simple_main
+uint64_t get_tiling(int i)
+{
+	switch (i) {
+	case 0:
+		return LOCAL_DRM_FORMAT_MOD_NONE;
+		break;
+	case 1:
+		return LOCAL_I915_FORMAT_MOD_X_TILED;
+		break;
+	case 2:
+		return LOCAL_I915_FORMAT_MOD_Y_TILED;
+		break;
+	case 3:
+		return LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		break;
+	default:
+		return -1;
+	}
+}
+
+void loop_plane_scaling(data_t *d, igt_plane_t *plane, uint32_t pixel_format,
+			uint64_t tiling, enum pipe pipe, igt_output_t *output)
+{
+	igt_display_t *display = &d->display;
+	int width, height;
+	/* create buffer in the range of  min and max source side limit.*/
+	for (width = MIN_SRC_WIDTH; width <= MAX_SRC_WIDTH; width = width + 500) {
+		igt_output_set_pipe(output, pipe);
+		height = width + 10;
+		d->fb_id1 = igt_create_pattern_fb(display->drm_fd, width, height,
+						pixel_format, tiling, &d->fb1);
+		igt_assert(d->fb_id1);
+		igt_plane_set_fb(plane, &d->fb1);
+		/* check upscaling */
+		igt_fb_set_position(&d->fb1, plane, 0, 0);
+		igt_fb_set_size(&d->fb1, plane, d->fb1.width, d->fb1.height);
+		igt_plane_set_position(plane, 10, 10);
+		igt_plane_set_size(plane, width*2, height*2);
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		igt_plane_set_fb(plane, NULL);
+		igt_plane_set_position(plane, 0, 0);
+		if (d->fb_id1) {
+			igt_remove_fb(d->drm_fd, &d->fb1);
+			d->fb_id1 = 0;
+		}
+	}
+}
+void test_scaler_with_pixel_format(data_t *d)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	igt_plane_t *plane;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		for_each_plane_on_pipe(display, pipe, plane) {
+			/* check if plane is cursor. */
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+			/* run loop for all pixel formats.*/
+			drmModePlanePtr plane_kms;
+			plane_kms = plane->drm_plane;
+			for (int j = 0; j < plane_kms->count_formats; j++) {
+				/* check plane pixel format is supported in
+				 * cairo pixel formats.
+				 */
+				if (check_pixel_format(plane_kms->formats[j])	== 0) {
+					/* loop for tiling */
+					igt_require_fb_modifiers(d->drm_fd);
+					for (int i = 0; i < 4; i++) {
+						uint64_t tiling = get_tiling(i);
+						loop_plane_scaling(d, plane, plane_kms->formats[j],
+								tiling, pipe, output);
+					}
+				}
+			}
+		}
+	}
+}
+
+static igt_rotation_t get_rotation_angle(int i)
+{
+	switch (i) {
+	case 0:
+		return IGT_ROTATION_0;
+		break;
+	case 1:
+		return IGT_ROTATION_90;
+		break;
+	case 2:
+		return IGT_ROTATION_180;
+		break;
+	case 3:
+		return IGT_ROTATION_270;
+		break;
+	default:
+		return -1;
+	}
+}
+
+void test_scaler_with_rotation(data_t *d)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	igt_plane_t *plane;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		drmModeModeInfo *mode;
+		mode = igt_output_get_mode(output);
+		for_each_plane_on_pipe(display, pipe, plane) {
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+			/* run loop for all pixel formats.*/
+			drmModePlanePtr plane_kms;
+			plane_kms = plane->drm_plane;
+			for (int j = 0; j < plane_kms->count_formats; j++) {
+				/* 90/270 degree rotation is not supported on RGB565 and C8 pixel
+				 * formats
+				 */
+				if (plane_kms->formats[j] == DRM_FORMAT_RGB565 ||
+					plane_kms->formats[j] == DRM_FORMAT_C8) {
+					continue;
+				}
+				if (check_pixel_format(plane_kms->formats[j]) == 0) {
+					igt_output_set_pipe(output, pipe);
+					d->fb_id1 = igt_create_pattern_fb(display->drm_fd,
+									  mode->hdisplay, mode->vdisplay,
+									  plane_kms->formats[j],
+									  LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb1);
+					igt_assert(d->fb_id1);
+					/* check all the supported rotation format*/
+					for (int i = 0; i < 4; i++) {
+						igt_plane_set_fb(plane, &d->fb1);
+						/* check upscaling */
+						igt_fb_set_position(&d->fb1, plane, 0, 0);
+						igt_fb_set_size(&d->fb1, plane, 300, 400);
+						igt_plane_set_position(plane, 0, 0);
+						igt_plane_set_size(plane, mode->hdisplay-200, mode->vdisplay-200);
+						igt_plane_set_rotation(plane, get_rotation_angle(i));
+						igt_display_commit2(display, COMMIT_ATOMIC);
+						/* check downscaling */
+						igt_fb_set_position(&d->fb1, plane, 0, 0);
+						igt_fb_set_size(&d->fb1, plane, 300, 400);
+						igt_plane_set_position(plane, 0, 0);
+						igt_plane_set_size(plane, 350, 250); /* downscale by 50 pixels*/
+						igt_plane_set_rotation(plane, get_rotation_angle(i));
+						igt_display_commit2(display, COMMIT_ATOMIC);
+						/* disable Plane*/
+						igt_plane_set_fb(plane, NULL);
+						igt_plane_set_position(plane, 0, 0);
+					}
+					if (d->fb_id1) {
+						igt_remove_fb(d->drm_fd, &d->fb1);
+						d->fb_id1 = 0;
+					}
+				}
+			}
+		}
+	}
+}
+
+void test_scaler_with_multiple_planes(data_t *d)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		/* For Gen 9, Pipe C supports only 1 scaler*/
+		if (intel_gen(d->devid) == 9 && pipe == PIPE_C)
+			continue;
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		/* Create 2 Framebuffers */
+		d->fb_id2 = igt_create_pattern_fb(d->drm_fd, mode->hdisplay, mode->vdisplay,
+						DRM_FORMAT_XRGB8888,
+						LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
+						&d->fb2);
+		igt_assert(d->fb_id2);
+
+		d->fb_id3 = igt_create_pattern_fb(d->drm_fd,
+						  mode->hdisplay, mode->vdisplay,
+						  DRM_FORMAT_XRGB8888,
+						  LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+						  &d->fb3);
+		igt_assert(d->fb_id3);
+
+		d->plane1 = igt_output_get_plane(output, 0);
+		igt_plane_set_fb(d->plane1, &d->fb2);
+		d->plane2 = igt_output_get_plane(output, 1);
+		igt_plane_set_fb(d->plane2, &d->fb3);
+		/* plane upscaling  on 2 planes*/
+		igt_fb_set_position(&d->fb2, d->plane1, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane1, 300, 300);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_size(d->plane1, 400, 400);
+
+		igt_fb_set_position(&d->fb3, d->plane2, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane2, 400, 400);
+		igt_plane_set_position(d->plane2, 100, 100);
+		igt_plane_set_size(d->plane2, 500, 500);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes*/
+		igt_plane_set_fb(d->plane1, NULL);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_fb(d->plane2, NULL);
+		igt_plane_set_position(d->plane2, 0, 0);
+
+		/* Switch scaler from above 2 planes to next 2 planes*/
+		d->plane3 = igt_output_get_plane(output, 2);
+		igt_plane_set_fb(d->plane3, &d->fb2);
+		d->plane4 = igt_output_get_plane(output, 3);
+		igt_plane_set_fb(d->plane4, &d->fb3);
+
+		igt_fb_set_position(&d->fb2, d->plane3, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane3, 300, 300);
+		igt_plane_set_position(d->plane3, 0, 0);
+		igt_plane_set_size(d->plane3, 600, 600);
+
+		igt_fb_set_position(&d->fb3, d->plane4, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane4, 400, 400);
+		igt_plane_set_position(d->plane4, 100, 100);
+		igt_plane_set_size(d->plane4, 700, 700);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes and remove FB*/
+		igt_plane_set_fb(d->plane3, NULL);
+		igt_plane_set_position(d->plane3, 0, 0);
+		igt_plane_set_fb(d->plane4, NULL);
+		igt_plane_set_position(d->plane4, 0, 0);
+		if (d->fb_id2) {
+			igt_remove_fb(d->drm_fd, &d->fb2);
+			d->fb_id2 = 0;
+		}
+		if (d->fb_id3) {
+			igt_remove_fb(d->drm_fd, &d->fb3);
+			d->fb_id3 = 0;
+		}
+	}
+}
+
+void test_scaler_with_clipping_clamping_scenario(data_t *d)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+
+	for_each_pipe_with_valid_output(display, pipe, output) {
+
+		if (intel_gen(d->devid) == 9 && pipe == PIPE_C)
+			continue;
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		/* allocate fb2 and fb3 */
+		d->fb_id2 = igt_create_pattern_fb(d->drm_fd, mode->hdisplay, mode->vdisplay,
+						DRM_FORMAT_XRGB8888,
+						LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
+						&d->fb2);
+		igt_assert(d->fb_id2);
+
+		d->fb_id3 = igt_create_pattern_fb(d->drm_fd,
+						  mode->hdisplay, mode->vdisplay,
+						  DRM_FORMAT_XRGB8888,
+						  LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+						  &d->fb3);
+		igt_assert(d->fb_id3);
+
+		/* Set up display with plane 1 */
+		d->plane1 = igt_output_get_plane(output, 0);
+		igt_plane_set_fb(d->plane1, &d->fb2);
+		d->plane2 = igt_output_get_plane(output, 1);
+		igt_plane_set_fb(d->plane2, &d->fb3);
+
+		/* plane upscaling  on 2 planes*/
+		igt_fb_set_position(&d->fb2, d->plane1, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane1, 300, 300);
+		igt_plane_set_position(d->plane1, 100, 400);
+		/* scaled window size is outside the modeset area.*/
+		igt_plane_set_size(d->plane1, mode->hdisplay + 200, mode->vdisplay + 200);
+
+		igt_fb_set_position(&d->fb3, d->plane2, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane2, 400, 400);
+		igt_plane_set_position(d->plane2, 100, 100);
+		/* scaled window size is outside the modeset area.*/
+		igt_plane_set_size(d->plane2, mode->hdisplay + 100, mode->vdisplay + 100);
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes*/
+		igt_plane_set_fb(d->plane1, NULL);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_fb(d->plane2, NULL);
+		igt_plane_set_position(d->plane2, 0, 0);
+		if (d->fb_id2) {
+			igt_remove_fb(d->drm_fd, &d->fb2);
+			d->fb_id2 = 0;
+		}
+		if (d->fb_id3) {
+			igt_remove_fb(d->drm_fd, &d->fb3);
+			d->fb_id3 = 0;
+		}
+	}
+}
+
+void test_scaler_with_multi_pipe_plane(data_t *d)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output1, *output2;
+	/*check whether 2 connectors are active .*/
+	igt_skip_on(display->n_outputs < 2);
+	output1 = get_next_valid_output(display, 1);
+	output2 = get_next_valid_output(display, 2);
+	igt_output_set_pipe(output1, 0);
+	igt_output_set_pipe(output2, 1);
+	d->plane1 = igt_output_get_plane_type(output1, DRM_PLANE_TYPE_PRIMARY);
+	d->plane2 = igt_output_get_plane_type(output1, DRM_PLANE_TYPE_OVERLAY);
+	d->plane3 = igt_output_get_plane_type(output2, DRM_PLANE_TYPE_PRIMARY);
+	d->plane4 = igt_output_get_plane_type(output2, DRM_PLANE_TYPE_OVERLAY);
+	drmModeModeInfo *mode1, *mode2;
+	mode1 = igt_output_get_mode(output1);
+	mode2 = igt_output_get_mode(output2);
+	/* allocate fb with mode size */
+	d->fb_id1 = igt_create_pattern_fb(d->drm_fd, mode1->hdisplay, mode1->vdisplay,
+					DRM_FORMAT_XRGB8888, LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
+					&d->fb1);
+	igt_assert(d->fb_id1);
+
+	d->fb_id2 = igt_create_pattern_fb(d->drm_fd,
+					  mode1->hdisplay, mode1->vdisplay,
+					  DRM_FORMAT_XRGB8888,
+					  LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+					  &d->fb2);
+	igt_assert(d->fb_id2);
+	d->fb_id3 = igt_create_pattern_fb(d->drm_fd, mode2->hdisplay, mode2->vdisplay,
+					DRM_FORMAT_XRGB8888,
+					LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+					&d->fb3);
+	igt_assert(d->fb_id3);
+
+	d->fb_id4 = igt_create_pattern_fb(d->drm_fd,
+					  mode2->hdisplay, mode2->vdisplay,
+					  DRM_FORMAT_XRGB8888,
+					  LOCAL_DRM_FORMAT_MOD_NONE, /* tiled */
+					  &d->fb4);
+	igt_assert(d->fb_id4);
+	/* Set up display with plane 1 */
+	igt_plane_set_fb(d->plane1, &d->fb1);
+	igt_plane_set_fb(d->plane2, &d->fb2);
+	igt_plane_set_fb(d->plane3, &d->fb3);
+	igt_plane_set_fb(d->plane4, &d->fb4);
+
+	/* plane upscaling  on 2 planes*/
+	igt_fb_set_position(&d->fb1, d->plane1, 0, 0);
+	igt_fb_set_size(&d->fb1, d->plane1, 300, 300);
+	igt_plane_set_position(d->plane1, 100, 100);
+	igt_plane_set_size(d->plane1, mode1->hdisplay - 100, mode1->vdisplay - 50);
+
+	igt_fb_set_position(&d->fb2, d->plane2, 100, 100);
+	igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width - 100, d->fb2.height - 100);
+	igt_plane_set_position(d->plane2, 100, 100);
+	/* downscale by 50 pixels*/
+	igt_plane_set_size(d->plane2, d->fb2.width - 150, d->fb2.height - 150);
+
+	igt_fb_set_position(&d->fb3, d->plane3, 0, 0);
+	igt_fb_set_size(&d->fb3, d->plane3, 400, 400);
+	igt_plane_set_position(d->plane3, 100, 100);
+	igt_plane_set_size(d->plane3, mode2->hdisplay - 50, mode2->vdisplay - 50);
+
+	igt_fb_set_position(&d->fb4, d->plane4, 100, 100);
+	igt_fb_set_size(&d->fb2, d->plane4, d->fb4.width - 100, d->fb4.height - 100);
+	igt_plane_set_position(d->plane4, 100, 100);
+	/* downscale by 50 pixels*/
+	igt_plane_set_size(d->plane4, d->fb4.width - 150, d->fb4.height - 150);
+
+	igt_display_commit2(display, COMMIT_ATOMIC);
+	/* disbale above 4 planes*/
+	igt_plane_set_fb(d->plane1, NULL);
+	igt_plane_set_position(d->plane1, 0, 0);
+	igt_plane_set_fb(d->plane2, NULL);
+	igt_plane_set_position(d->plane2, 0, 0);
+	igt_plane_set_fb(d->plane3, NULL);
+	igt_plane_set_position(d->plane3, 0, 0);
+	igt_plane_set_fb(d->plane4, NULL);
+	igt_plane_set_position(d->plane4, 0, 0);
+	if (d->fb_id1) {
+		igt_remove_fb(d->drm_fd, &d->fb1);
+		d->fb_id1 = 0;
+	}
+	if (d->fb_id2) {
+		igt_remove_fb(d->drm_fd, &d->fb2);
+		d->fb_id2 = 0;
+	}
+	if (d->fb_id3) {
+		igt_remove_fb(d->drm_fd, &d->fb3);
+		d->fb_id3 = 0;
+	}
+	if (d->fb_id4) {
+		igt_remove_fb(d->drm_fd, &d->fb4);
+		d->fb_id4 = 0;
+	}
+}
+igt_main
 {
 	data_t data = {};
 
@@ -308,11 +765,26 @@ igt_simple_main
 	data.drm_fd = drm_open_driver(DRIVER_INTEL);
 	igt_require_pipe_crc(data.drm_fd);
 	igt_display_init(&data.display, data.drm_fd);
+	igt_require(data.display.is_atomic);
 	data.devid = intel_get_drm_devid(data.drm_fd);
 
 	data.num_scalers = intel_gen(data.devid) >= 9 ? 2 : 0;
 
-	test_plane_scaling(&data);
-
+	//test_plane_scaling(&data);
+	igt_subtest_f("scaler_with_pixel_format") {
+		test_scaler_with_pixel_format(&data);
+	}
+	igt_subtest_f("scaler_with_rotation") {
+		test_scaler_with_rotation(&data);
+	}
+	igt_subtest_f("scaler_with_multiple_planes") {
+		test_scaler_with_multiple_planes(&data);
+	}
+	igt_subtest_f("scaler_with_clipping_clamping") {
+		test_scaler_with_clipping_clamping_scenario(&data);
+	}
+	igt_subtest_f("scaler_with_multi_pipe_plane") {
+		test_scaler_with_multi_pipe_plane(&data);
+	}
 	igt_display_fini(&data.display);
 }
Signature · 6 lines
2.7.4

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

✗ Fi.CI.BAT: failure for i-g-t: kms_plane_scaling: Enhanced scaling tests

== Series Details ==

== Series Details ==

Series: i-g-t: kms_plane_scaling: Enhanced scaling tests
URL : https://patchwork.freedesktop.org/series/34202/
State : failure

== Summary ==

IGT patchset build failed on latest successful build f9dff9b5ae511cd0616a65144b9bf7d299fd87d4 automake: include drm-uapi headers in EXTRA_DIST

Making check in tools
Making check in null_state_gen
make[2]: Nothing to be done for 'check'.
Making check in registers
make[2]: Nothing to be done for 'check'.
make[2]: Nothing to be done for 'check-am'.
Making check in scripts
make[1]: Nothing to be done for 'check'.
Making check in benchmarks
Making check in wsim
make[2]: Nothing to be done for 'check'.
Making check in ezbench.d
make[2]: Nothing to be done for 'check'.
make[2]: Nothing to be done for 'check-am'.
Making check in include
Making check in .
make[2]: Nothing to be done for 'check-am'.
Making check in drm-uapi
make[2]: Nothing to be done for 'check'.
Making check in tests
Making check in intel-ci
make[2]: Nothing to be done for 'check'.
make igt_command_line.sh
make[3]: Nothing to be done for 'igt_command_line.sh'.
make check-TESTS
FAIL: igt_command_line.sh
============================================================================
Testsuite summary for intel-gpu-tools 1.20
============================================================================
# TOTAL: 1
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
Please report to https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=IGT
============================================================================
Makefile:4486: recipe for target 'test-suite.log' failed
make[4]: *** [test-suite.log] Error 1
Makefile:4592: recipe for target 'check-TESTS' failed
make[3]: *** [check-TESTS] Error 2
Makefile:4690: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
Makefile:4379: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
Makefile:531: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1
====================================================
intel-gpu-tools 1.20: lib/tests/test-suite.log
====================================================

# TOTAL: 17
# PASS: 11
# SKIP: 0
# XFAIL: 6
# FAIL: 0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

XFAIL: igt_no_exit
==================

IGT-Version: 1.20-g6d6aaa29 (x86_64) (Linux: 4.10.0-35-generic x86_64)
Subtest A: SUCCESS (0.000s)
igt_no_exit: igt_core.c:596: common_exit_handler: Assertion `sig != 0 || igt_exit_called' failed. XFAIL igt_no_exit (exit status: 134)

XFAIL: igt_no_exit_list_only
============================

igt_no_exit_list_only: igt_core.c:596: common_exit_handler: Assertion `sig != 0 || igt_exit_called' failed. A
XFAIL igt_no_exit_list_only (exit status: 134)

XFAIL: igt_no_subtest
=====================

igt_no_subtest: igt_core.c:1499: igt_exit: Assertion `!test_with_subtests || skipped_one || succeeded_one || failed_one' failed.
IGT-Version: 1.20-g6d6aaa29 (x86_64) (Linux: 4.10.0-35-generic x86_64)
Received signal SIGABRT.
XFAIL igt_no_subtest (exit status: 134)

XFAIL: igt_simple_test_subtests
===============================

igt_simple_test_subtests: igt_core.c:974: __igt_run_subtest: Assertion `test_with_subtests' failed.
IGT-Version: 1.20-g6d6aaa29 (x86_64) (Linux: 4.10.0-35-generic x86_64)
Received signal SIGABRT.
XFAIL igt_simple_test_subtests (exit status: 134)

XFAIL: igt_timeout
==================

Test igt_timeout failed.
**** DEBUG ****
(igt_timeout:21975) igt-core-INFO: IGT-Version: 1.20-g6d6aaa29 (x86_64) (Linux: 4.10.0-35-generic x86_64) (igt_timeout:21975) igt-core-INFO: Timed out: Testcase
**** END ****
IGT-Version: 1.20-g6d6aaa29 (x86_64) (Linux: 4.10.0-35-generic x86_64)
Timed out: Testcase
FAIL (1.000s)
XFAIL igt_timeout (exit status: 99)

XFAIL: igt_invalid_subtest_name
===============================

IGT-Version: 1.20-g6d6aaa29 (x86_64) (Linux: 4.10.0-35-generic x86_64)
(igt_invalid_subtest_name:21985) igt-core-CRITICAL: Invalid subtest name "# invalid name !".
igt_invalid_subtest_name: igt_core.c:1499: igt_exit: Assertion `!test_with_subtests || skipped_one || succeeded_one || failed_one' failed. Received signal SIGABRT.
XFAIL igt_invalid_subtest_name (exit status: 134)

================================================
intel-gpu-tools 1.20: tests/test-suite.log
================================================

# TOTAL: 1
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: igt_command_line.sh
=========================

./core_auth:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_get_client_auth:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_getclient:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_getstats:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_getversion:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_prop_blob:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_setmaster_vs_auth:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./debugfs_test:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_import_export:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_mm:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_read:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_vma_limiter:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_vma_limiter_cached:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_vma_limiter_cpu:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_vma_limiter_gtt:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_getparams_basic:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_hangman:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_missed_irq:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_module_reload:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_selftest:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_suspend:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_bad_reloc:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_basic:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_busy:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_caching:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_close:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_close_race:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_concurrent_blit:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_cpu_reloc:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_create:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_cs_prefetch:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_cs_tlb:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_bad_destroy:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_bad_exec:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_basic:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_create:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_exec:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_param:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_switch:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_thrash:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_double_irq_loop:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_eio:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_evict_alignment:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_evict_everything:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_alignment:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_async:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_await:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_bad_domains:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_basic:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_big:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_blt:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_capture:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_create:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_faulting_reloc:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_fence:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_flush:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_gttfill:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_latency:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_lut_handle:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_nop:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_parallel:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_params:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_parse:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_reloc:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_reuse:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_schedule:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_store:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_suspend:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_whisper:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_fd_exhaustion:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_fence_thrash:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_fence_upload:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_fenced_exec_thrash:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_flink_basic:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_flink_race:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_gpgpu_fill:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_gtt_cpu_tlb:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_gtt_hog:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_gtt_speed:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_hangcheck_forcewake:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_largeobject:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_linear_blits:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_lut_handle:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_madvise:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_media_fill:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_mmap:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_mmap_gtt:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_mmap_offset_exhaustion:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_mmap_wc:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_mocs_settings:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_partial_pwrite_pread:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_persistent_relocs:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_pin:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_pipe_control_store_loop:
Checking invalid option handling...
Checking val

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✗ Fi.CI.BAT: failure for i-g-t: kms_plane_scaling: Enhanced scaling tests

In reply to Vidya Srinivas
== Series Details ==

== Series Details ==

Series: i-g-t: kms_plane_scaling: Enhanced scaling tests
URL : https://patchwork.freedesktop.org/series/34202/
State : failure

== Summary ==

IGT patchset build failed on latest successful build a1e444f4c8178acb590d41c21e921c6447668be4 tests/perf_pmu: Bump measuring duration for semaphores as well

Making check in tools
Making check in null_state_gen
make[2]: Nothing to be done for 'check'.
Making check in registers
make[2]: Nothing to be done for 'check'.
make[2]: Nothing to be done for 'check-am'.
Making check in scripts
make[1]: Nothing to be done for 'check'.
Making check in benchmarks
Making check in wsim
make[2]: Nothing to be done for 'check'.
Making check in ezbench.d
make[2]: Nothing to be done for 'check'.
make[2]: Nothing to be done for 'check-am'.
Making check in include
Making check in .
make[2]: Nothing to be done for 'check-am'.
Making check in drm-uapi
make[2]: Nothing to be done for 'check'.
Making check in tests
Making check in intel-ci
make[2]: Nothing to be done for 'check'.
make igt_command_line.sh
make[3]: Nothing to be done for 'igt_command_line.sh'.
make check-TESTS
FAIL: igt_command_line.sh
============================================================================
Testsuite summary for intel-gpu-tools 1.20
============================================================================
# TOTAL: 1
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
Please report to https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=IGT
============================================================================
Makefile:4486: recipe for target 'test-suite.log' failed
make[4]: *** [test-suite.log] Error 1
Makefile:4592: recipe for target 'check-TESTS' failed
make[3]: *** [check-TESTS] Error 2
Makefile:4690: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
Makefile:4379: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
Makefile:531: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1
====================================================
intel-gpu-tools 1.20: lib/tests/test-suite.log
====================================================

# TOTAL: 17
# PASS: 11
# SKIP: 0
# XFAIL: 6
# FAIL: 0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

XFAIL: igt_no_exit
==================

IGT-Version: 1.20-g7c2bc7f8 (x86_64) (Linux: 4.10.0-35-generic x86_64)
Subtest A: SUCCESS (0.000s)
igt_no_exit: igt_core.c:596: common_exit_handler: Assertion `sig != 0 || igt_exit_called' failed. XFAIL igt_no_exit (exit status: 134)

XFAIL: igt_no_exit_list_only
============================

igt_no_exit_list_only: igt_core.c:596: common_exit_handler: Assertion `sig != 0 || igt_exit_called' failed. A
XFAIL igt_no_exit_list_only (exit status: 134)

XFAIL: igt_no_subtest
=====================

igt_no_subtest: igt_core.c:1509: igt_exit: Assertion `!test_with_subtests || skipped_one || succeeded_one || failed_one' failed.
IGT-Version: 1.20-g7c2bc7f8 (x86_64) (Linux: 4.10.0-35-generic x86_64)
Received signal SIGABRT.
XFAIL igt_no_subtest (exit status: 134)

XFAIL: igt_simple_test_subtests
===============================

igt_simple_test_subtests: igt_core.c:974: __igt_run_subtest: Assertion `test_with_subtests' failed.
IGT-Version: 1.20-g7c2bc7f8 (x86_64) (Linux: 4.10.0-35-generic x86_64)
Received signal SIGABRT.
XFAIL igt_simple_test_subtests (exit status: 134)

XFAIL: igt_timeout
==================

Test igt_timeout failed.
**** DEBUG ****
(igt_timeout:4256) igt-core-INFO: IGT-Version: 1.20-g7c2bc7f8 (x86_64) (Linux: 4.10.0-35-generic x86_64) (igt_timeout:4256) igt-core-INFO: Timed out: Testcase
**** END ****
IGT-Version: 1.20-g7c2bc7f8 (x86_64) (Linux: 4.10.0-35-generic x86_64)
Timed out: Testcase
FAIL (1.000s)
XFAIL igt_timeout (exit status: 99)

XFAIL: igt_invalid_subtest_name
===============================

IGT-Version: 1.20-g7c2bc7f8 (x86_64) (Linux: 4.10.0-35-generic x86_64)
(igt_invalid_subtest_name:4255) igt-core-CRITICAL: Invalid subtest name "# invalid name !".
igt_invalid_subtest_name: igt_core.c:1509: igt_exit: Assertion `!test_with_subtests || skipped_one || succeeded_one || failed_one' failed. Received signal SIGABRT.
XFAIL igt_invalid_subtest_name (exit status: 134)

================================================
intel-gpu-tools 1.20: tests/test-suite.log
================================================

# TOTAL: 1
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: igt_command_line.sh
=========================

./core_auth:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_get_client_auth:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_getclient:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_getstats:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_getversion:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_prop_blob:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./core_setmaster_vs_auth:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./debugfs_test:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_import_export:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_mm:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_read:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_vma_limiter:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_vma_limiter_cached:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_vma_limiter_cpu:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drm_vma_limiter_gtt:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_getparams_basic:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_hangman:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_missed_irq:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_module_reload:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_selftest:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./drv_suspend:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_bad_reloc:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_basic:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_busy:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_caching:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_close:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_close_race:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_concurrent_blit:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_cpu_reloc:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_create:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_cs_prefetch:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_cs_tlb:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_bad_destroy:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_bad_exec:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_basic:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_create:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_exec:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_param:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_switch:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_ctx_thrash:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_double_irq_loop:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_eio:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_evict_alignment:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_evict_everything:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_alignment:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_async:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_await:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_bad_domains:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_basic:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_big:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_blt:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_capture:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_create:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_faulting_reloc:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_fence:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_flush:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_gttfill:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_latency:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_lut_handle:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_nop:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_parallel:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_params:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_parse:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_reloc:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_reuse:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_schedule:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_store:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_suspend:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_exec_whisper:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_fd_exhaustion:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_fence_thrash:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_fence_upload:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_fenced_exec_thrash:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_flink_basic:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_flink_race:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_gpgpu_fill:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_gtt_cpu_tlb:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_gtt_hog:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_gtt_speed:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_hangcheck_forcewake:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_largeobject:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_linear_blits:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_lut_handle:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_madvise:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_media_fill:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_mmap:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_mmap_gtt:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_mmap_offset_exhaustion:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_mmap_wc:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_mocs_settings:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_partial_pwrite_pread:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_persistent_relocs:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_pin:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
Checking invalid subtest handling...
./gem_pipe_control_store_loop:
Checking invalid option handling...
C

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
In reply to Vidya Srinivas
Quoted 43 lines · Vidya Srinivas

From: Jyoti Yadav <[email protected]>

Added subtests to cover below gaps.
1. scaler with pixelformat and tiling.
2. scaler with rotation
3. scaler with multiple planes
4. scaler with multi pipe
5. scaler with clipping/clamping scenario

---
  tests/kms_plane_scaling.c | 480 +++++++++++++++++++++++++++++++++++++++++++++-
  1 file changed, 476 insertions(+), 4 deletions(-)
tests/kms_plane_scaling.c +10 -1
index 403df47..2be6acc 100644
@@ -43,10 +43,11 @@ typedef struct {
  	struct igt_fb fb1;
  	struct igt_fb fb2;
  	struct igt_fb fb3;
+	struct igt_fb fb4;
  	int fb_id1;
  	int fb_id2;
  	int fb_id3;
-
+	int fb_id4;
  	igt_plane_t *plane1;
  	igt_plane_t *plane2;
  	igt_plane_t *plane3;
@@ -54,6 +55,51 @@ typedef struct {
  } data_t;
 
  #define FILE_NAME   "1080p-left.png"
+#define MIN_SRC_WIDTH 8
+#define MAX_SRC_WIDTH 4096
+static uint32_t check_pixel_format(uint32_t pixel_format)
+{
+	const uint32_t *igt_formats;
+	int num_igt_formats;
+	int i;
+

tests/kms_plane_scaling.c typedef struct { · line 75

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+
+	igt_get_all_cairo_formats(&igt_formats, &num_igt_formats);
+	for (i = 0; i < num_igt_formats; i++) {
+		if (pixel_format == igt_formats[i])
+			return 0;
+	}
+
+	return -1;
+}
+bool is_igt_output_connected(igt_output_t *output)

^^ static

Quoted 31 lines
tests/kms_plane_scaling.c +27 -0
+{
+	/* Something went wrong during probe? */
+	if (!output->config.connector)
+		return false;
+
+	if (output->config.connector->connection == DRM_MODE_CONNECTED)
+		return true;
+
+	return false;
+}
+
+static igt_output_t *get_next_valid_output(igt_display_t *data, int i)
+{
+	int j = 0, valid_output = 0;
+	drmModeModeInfo *mode;
+	for (j = 0; j < data->n_outputs; j++) {
+		if (is_igt_output_connected(&data->outputs[j])) {
+			mode = igt_output_get_mode(&data->outputs[j]);
+			if (mode->hdisplay != 0 && mode->vdisplay != 0) {
+				valid_output++;
+				if (valid_output == i)
+					return &data->outputs[j];
+			}
+		}
+	}
+	return NULL;
+}
 
  static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
  			igt_plane_t *plane, drmModeModeInfo *mode, enum igt_commit_style s)

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 347

Quoted 5 lines
tests/kms_plane_scaling.c +1 -1
@@ -298,7 +344,418 @@ static void test_plane_scaling(data_t *d)
  	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
  }
 
-igt_simple_main
+uint64_t get_tiling(int i)

^^ static

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+{
+	switch (i) {
+	case 0:
+		return LOCAL_DRM_FORMAT_MOD_NONE;
+		break;
+	case 1:
+		return LOCAL_I915_FORMAT_MOD_X_TILED;
+		break;
+	case 2:
+		return LOCAL_I915_FORMAT_MOD_Y_TILED;

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 367

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+		break;
+	case 3:
+		return LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		break;
+	default:
+		return -1;
+	}
+}
+
+void loop_plane_scaling(data_t *d, igt_plane_t *plane, uint32_t pixel_format,

^^ static

Quoted 8 lines
tests/kms_plane_scaling.c +8 -0
+			uint64_t tiling, enum pipe pipe, igt_output_t *output)
+{
+	igt_display_t *display = &d->display;
+	int width, height;
+	/* create buffer in the range of  min and max source side limit.*/
+	for (width = MIN_SRC_WIDTH; width <= MAX_SRC_WIDTH; width = width + 500) {
+		igt_output_set_pipe(output, pipe);
+		height = width + 10;

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 385

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+		d->fb_id1 = igt_create_pattern_fb(display->drm_fd, width, height,
+						pixel_format, tiling, &d->fb1);
+		igt_assert(d->fb_id1);
+		igt_plane_set_fb(plane, &d->fb1);
+		/* check upscaling */
+		igt_fb_set_position(&d->fb1, plane, 0, 0);
+		igt_fb_set_size(&d->fb1, plane, d->fb1.width, d->fb1.height);
+		igt_plane_set_position(plane, 10, 10);
+		igt_plane_set_size(plane, width*2, height*2);
+		igt_display_commit2(display, COMMIT_ATOMIC);

When it says 'check' here, should here be used 'igt_display_try_commit2' instead of 'igt_display_commit2'? I was bit confused where the checking is really happening. Same goes for all the tests, I see the setup asserted but for actual 'check' I didn't find asserts about any results.

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 394

Quoted 9 lines
tests/kms_plane_scaling.c +9 -0
+		igt_plane_set_fb(plane, NULL);
+		igt_plane_set_position(plane, 0, 0);
+		if (d->fb_id1) {
+			igt_remove_fb(d->drm_fd, &d->fb1);
+			d->fb_id1 = 0;
+		}
+	}
+}
+void test_scaler_with_pixel_format(data_t *d)

^^ static

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 400

Quoted 6 lines
tests/kms_plane_scaling.c +6 -0
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	igt_plane_t *plane;
+	int valid_tests = 0;

valid_tests seem not to be used anywhere.

Quoted 41 lines
tests/kms_plane_scaling.c +41 -0
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		for_each_plane_on_pipe(display, pipe, plane) {
+			/* check if plane is cursor. */
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+			/* run loop for all pixel formats.*/
+			drmModePlanePtr plane_kms;
+			plane_kms = plane->drm_plane;
+			for (int j = 0; j < plane_kms->count_formats; j++) {
+				/* check plane pixel format is supported in
+				 * cairo pixel formats.
+				 */
+				if (check_pixel_format(plane_kms->formats[j])	== 0) {
+					/* loop for tiling */
+					igt_require_fb_modifiers(d->drm_fd);
+					for (int i = 0; i < 4; i++) {
+						uint64_t tiling = get_tiling(i);
+						loop_plane_scaling(d, plane, plane_kms->formats[j],
+								tiling, pipe, output);
+					}
+				}
+			}
+		}
+	}
+}
+
+static igt_rotation_t get_rotation_angle(int i)
+{
+	switch (i) {
+	case 0:
+		return IGT_ROTATION_0;
+		break;
+	case 1:
+		return IGT_ROTATION_90;
+		break;
+	case 2:
+		return IGT_ROTATION_180;

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 451

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+		break;
+	case 3:
+		return IGT_ROTATION_270;
+		break;
+	default:
+		return -1;
+	}
+}
+
+void test_scaler_with_rotation(data_t *d)

^^ static

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 400

Quoted 6 lines
tests/kms_plane_scaling.c +6 -0
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	igt_plane_t *plane;
+	int valid_tests = 0;

valid_tests seem not to be used anywhere here either.

Quoted 47 lines
tests/kms_plane_scaling.c +47 -0
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		drmModeModeInfo *mode;
+		mode = igt_output_get_mode(output);
+		for_each_plane_on_pipe(display, pipe, plane) {
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+			/* run loop for all pixel formats.*/
+			drmModePlanePtr plane_kms;
+			plane_kms = plane->drm_plane;
+			for (int j = 0; j < plane_kms->count_formats; j++) {
+				/* 90/270 degree rotation is not supported on RGB565 and C8 pixel
+				 * formats
+				 */
+				if (plane_kms->formats[j] == DRM_FORMAT_RGB565 ||
+					plane_kms->formats[j] == DRM_FORMAT_C8) {
+					continue;
+				}
+				if (check_pixel_format(plane_kms->formats[j]) == 0) {
+					igt_output_set_pipe(output, pipe);
+					d->fb_id1 = igt_create_pattern_fb(display->drm_fd,
+									  mode->hdisplay, mode->vdisplay,
+									  plane_kms->formats[j],
+									  LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb1);
+					igt_assert(d->fb_id1);
+					/* check all the supported rotation format*/
+					for (int i = 0; i < 4; i++) {
+						igt_plane_set_fb(plane, &d->fb1);
+						/* check upscaling */
+						igt_fb_set_position(&d->fb1, plane, 0, 0);
+						igt_fb_set_size(&d->fb1, plane, 300, 400);
+						igt_plane_set_position(plane, 0, 0);
+						igt_plane_set_size(plane, mode->hdisplay-200, mode->vdisplay-200);
+						igt_plane_set_rotation(plane, get_rotation_angle(i));
+						igt_display_commit2(display, COMMIT_ATOMIC);
+						/* check downscaling */
+						igt_fb_set_position(&d->fb1, plane, 0, 0);
+						igt_fb_set_size(&d->fb1, plane, 300, 400);
+						igt_plane_set_position(plane, 0, 0);
+						igt_plane_set_size(plane, 350, 250); /* downscale by 50 pixels*/
+						igt_plane_set_rotation(plane, get_rotation_angle(i));
+						igt_display_commit2(display, COMMIT_ATOMIC);
+						/* disable Plane*/
+						igt_plane_set_fb(plane, NULL);
+						igt_plane_set_position(plane, 0, 0);
+					}
+					if (d->fb_id1) {

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 514

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+						igt_remove_fb(d->drm_fd, &d->fb1);
+						d->fb_id1 = 0;
+					}
+				}
+			}
+		}
+	}
+}
+
+void test_scaler_with_multiple_planes(data_t *d)

^^ static

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 400

Quoted 5 lines
tests/kms_plane_scaling.c +5 -0
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	int valid_tests = 0;

valid_tests seem not to be used anywhere here too.

Quoted 68 lines
tests/kms_plane_scaling.c +68 -0
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		/* For Gen 9, Pipe C supports only 1 scaler*/
+		if (intel_gen(d->devid) == 9 && pipe == PIPE_C)
+			continue;
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		/* Create 2 Framebuffers */
+		d->fb_id2 = igt_create_pattern_fb(d->drm_fd, mode->hdisplay, mode->vdisplay,
+						DRM_FORMAT_XRGB8888,
+						LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
+						&d->fb2);
+		igt_assert(d->fb_id2);
+
+		d->fb_id3 = igt_create_pattern_fb(d->drm_fd,
+						  mode->hdisplay, mode->vdisplay,
+						  DRM_FORMAT_XRGB8888,
+						  LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+						  &d->fb3);
+		igt_assert(d->fb_id3);
+
+		d->plane1 = igt_output_get_plane(output, 0);
+		igt_plane_set_fb(d->plane1, &d->fb2);
+		d->plane2 = igt_output_get_plane(output, 1);
+		igt_plane_set_fb(d->plane2, &d->fb3);
+		/* plane upscaling  on 2 planes*/
+		igt_fb_set_position(&d->fb2, d->plane1, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane1, 300, 300);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_size(d->plane1, 400, 400);
+
+		igt_fb_set_position(&d->fb3, d->plane2, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane2, 400, 400);
+		igt_plane_set_position(d->plane2, 100, 100);
+		igt_plane_set_size(d->plane2, 500, 500);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes*/
+		igt_plane_set_fb(d->plane1, NULL);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_fb(d->plane2, NULL);
+		igt_plane_set_position(d->plane2, 0, 0);
+
+		/* Switch scaler from above 2 planes to next 2 planes*/
+		d->plane3 = igt_output_get_plane(output, 2);
+		igt_plane_set_fb(d->plane3, &d->fb2);
+		d->plane4 = igt_output_get_plane(output, 3);
+		igt_plane_set_fb(d->plane4, &d->fb3);
+
+		igt_fb_set_position(&d->fb2, d->plane3, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane3, 300, 300);
+		igt_plane_set_position(d->plane3, 0, 0);
+		igt_plane_set_size(d->plane3, 600, 600);
+
+		igt_fb_set_position(&d->fb3, d->plane4, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane4, 400, 400);
+		igt_plane_set_position(d->plane4, 100, 100);
+		igt_plane_set_size(d->plane4, 700, 700);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes and remove FB*/
+		igt_plane_set_fb(d->plane3, NULL);
+		igt_plane_set_position(d->plane3, 0, 0);
+		igt_plane_set_fb(d->plane4, NULL);
+		igt_plane_set_position(d->plane4, 0, 0);
+		if (d->fb_id2) {
+			igt_remove_fb(d->drm_fd, &d->fb2);

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 597

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+			d->fb_id2 = 0;
+		}
+		if (d->fb_id3) {
+			igt_remove_fb(d->drm_fd, &d->fb3);
+			d->fb_id3 = 0;
+		}
+	}
+}
+
+void test_scaler_with_clipping_clamping_scenario(data_t *d)

^^ static

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 400

Quoted 5 lines
tests/kms_plane_scaling.c +5 -0
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	int valid_tests = 0;

valid_tests here too..

Quoted 49 lines
tests/kms_plane_scaling.c +49 -0
+	igt_require(d->num_scalers);
+
+	for_each_pipe_with_valid_output(display, pipe, output) {
+
+		if (intel_gen(d->devid) == 9 && pipe == PIPE_C)
+			continue;
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		/* allocate fb2 and fb3 */
+		d->fb_id2 = igt_create_pattern_fb(d->drm_fd, mode->hdisplay, mode->vdisplay,
+						DRM_FORMAT_XRGB8888,
+						LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
+						&d->fb2);
+		igt_assert(d->fb_id2);
+
+		d->fb_id3 = igt_create_pattern_fb(d->drm_fd,
+						  mode->hdisplay, mode->vdisplay,
+						  DRM_FORMAT_XRGB8888,
+						  LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+						  &d->fb3);
+		igt_assert(d->fb_id3);
+
+		/* Set up display with plane 1 */
+		d->plane1 = igt_output_get_plane(output, 0);
+		igt_plane_set_fb(d->plane1, &d->fb2);
+		d->plane2 = igt_output_get_plane(output, 1);
+		igt_plane_set_fb(d->plane2, &d->fb3);
+
+		/* plane upscaling  on 2 planes*/
+		igt_fb_set_position(&d->fb2, d->plane1, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane1, 300, 300);
+		igt_plane_set_position(d->plane1, 100, 400);
+		/* scaled window size is outside the modeset area.*/
+		igt_plane_set_size(d->plane1, mode->hdisplay + 200, mode->vdisplay + 200);
+
+		igt_fb_set_position(&d->fb3, d->plane2, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane2, 400, 400);
+		igt_plane_set_position(d->plane2, 100, 100);
+		/* scaled window size is outside the modeset area.*/
+		igt_plane_set_size(d->plane2, mode->hdisplay + 100, mode->vdisplay + 100);
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes*/
+		igt_plane_set_fb(d->plane1, NULL);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_fb(d->plane2, NULL);
+		igt_plane_set_position(d->plane2, 0, 0);
+		if (d->fb_id2) {
+			igt_remove_fb(d->drm_fd, &d->fb2);

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 661

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+			d->fb_id2 = 0;
+		}
+		if (d->fb_id3) {
+			igt_remove_fb(d->drm_fd, &d->fb3);
+			d->fb_id3 = 0;
+		}
+	}
+}
+
+void test_scaler_with_multi_pipe_plane(data_t *d)

^^ static

Quoted 102 lines
tests/kms_plane_scaling.c +97 -0
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output1, *output2;
+	/*check whether 2 connectors are active .*/
+	igt_skip_on(display->n_outputs < 2);
+	output1 = get_next_valid_output(display, 1);
+	output2 = get_next_valid_output(display, 2);
+	igt_output_set_pipe(output1, 0);
+	igt_output_set_pipe(output2, 1);
+	d->plane1 = igt_output_get_plane_type(output1, DRM_PLANE_TYPE_PRIMARY);
+	d->plane2 = igt_output_get_plane_type(output1, DRM_PLANE_TYPE_OVERLAY);
+	d->plane3 = igt_output_get_plane_type(output2, DRM_PLANE_TYPE_PRIMARY);
+	d->plane4 = igt_output_get_plane_type(output2, DRM_PLANE_TYPE_OVERLAY);
+	drmModeModeInfo *mode1, *mode2;
+	mode1 = igt_output_get_mode(output1);
+	mode2 = igt_output_get_mode(output2);
+	/* allocate fb with mode size */
+	d->fb_id1 = igt_create_pattern_fb(d->drm_fd, mode1->hdisplay, mode1->vdisplay,
+					DRM_FORMAT_XRGB8888, LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
+					&d->fb1);
+	igt_assert(d->fb_id1);
+
+	d->fb_id2 = igt_create_pattern_fb(d->drm_fd,
+					  mode1->hdisplay, mode1->vdisplay,
+					  DRM_FORMAT_XRGB8888,
+					  LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+					  &d->fb2);
+	igt_assert(d->fb_id2);
+	d->fb_id3 = igt_create_pattern_fb(d->drm_fd, mode2->hdisplay, mode2->vdisplay,
+					DRM_FORMAT_XRGB8888,
+					LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+					&d->fb3);
+	igt_assert(d->fb_id3);
+
+	d->fb_id4 = igt_create_pattern_fb(d->drm_fd,
+					  mode2->hdisplay, mode2->vdisplay,
+					  DRM_FORMAT_XRGB8888,
+					  LOCAL_DRM_FORMAT_MOD_NONE, /* tiled */
+					  &d->fb4);
+	igt_assert(d->fb_id4);
+	/* Set up display with plane 1 */
+	igt_plane_set_fb(d->plane1, &d->fb1);
+	igt_plane_set_fb(d->plane2, &d->fb2);
+	igt_plane_set_fb(d->plane3, &d->fb3);
+	igt_plane_set_fb(d->plane4, &d->fb4);
+
+	/* plane upscaling  on 2 planes*/
+	igt_fb_set_position(&d->fb1, d->plane1, 0, 0);
+	igt_fb_set_size(&d->fb1, d->plane1, 300, 300);
+	igt_plane_set_position(d->plane1, 100, 100);
+	igt_plane_set_size(d->plane1, mode1->hdisplay - 100, mode1->vdisplay - 50);
+
+	igt_fb_set_position(&d->fb2, d->plane2, 100, 100);
+	igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width - 100, d->fb2.height - 100);
+	igt_plane_set_position(d->plane2, 100, 100);
+	/* downscale by 50 pixels*/
+	igt_plane_set_size(d->plane2, d->fb2.width - 150, d->fb2.height - 150);
+
+	igt_fb_set_position(&d->fb3, d->plane3, 0, 0);
+	igt_fb_set_size(&d->fb3, d->plane3, 400, 400);
+	igt_plane_set_position(d->plane3, 100, 100);
+	igt_plane_set_size(d->plane3, mode2->hdisplay - 50, mode2->vdisplay - 50);
+
+	igt_fb_set_position(&d->fb4, d->plane4, 100, 100);
+	igt_fb_set_size(&d->fb2, d->plane4, d->fb4.width - 100, d->fb4.height - 100);
+	igt_plane_set_position(d->plane4, 100, 100);
+	/* downscale by 50 pixels*/
+	igt_plane_set_size(d->plane4, d->fb4.width - 150, d->fb4.height - 150);
+
+	igt_display_commit2(display, COMMIT_ATOMIC);
+	/* disbale above 4 planes*/
+	igt_plane_set_fb(d->plane1, NULL);
+	igt_plane_set_position(d->plane1, 0, 0);
+	igt_plane_set_fb(d->plane2, NULL);
+	igt_plane_set_position(d->plane2, 0, 0);
+	igt_plane_set_fb(d->plane3, NULL);
+	igt_plane_set_position(d->plane3, 0, 0);
+	igt_plane_set_fb(d->plane4, NULL);
+	igt_plane_set_position(d->plane4, 0, 0);
+	if (d->fb_id1) {
+		igt_remove_fb(d->drm_fd, &d->fb1);
+		d->fb_id1 = 0;
+	}
+	if (d->fb_id2) {
+		igt_remove_fb(d->drm_fd, &d->fb2);
+		d->fb_id2 = 0;
+	}
+	if (d->fb_id3) {
+		igt_remove_fb(d->drm_fd, &d->fb3);
+		d->fb_id3 = 0;
+	}
+	if (d->fb_id4) {
+		igt_remove_fb(d->drm_fd, &d->fb4);
+		d->fb_id4 = 0;
+	}
+}
+igt_main
  {
  	data_t data = {};
 
@@ -308,11 +765,26 @@ igt_simple_main
  	data.drm_fd = drm_open_driver(DRIVER_INTEL);

tests/kms_plane_scaling.c igt_simple_main · line 773

Quoted 10 lines
tests/kms_plane_scaling.c +2 -2
  	igt_require_pipe_crc(data.drm_fd);
  	igt_display_init(&data.display, data.drm_fd);
+	igt_require(data.display.is_atomic);
  	data.devid = intel_get_drm_devid(data.drm_fd);
 
  	data.num_scalers = intel_gen(data.devid) >= 9 ? 2 : 0;
 
-	test_plane_scaling(&data);
-
+	//test_plane_scaling(&data);

^^ this comment probably is not needed.

Quoted 8 lines
tests/kms_plane_scaling.c +7 -0
+	igt_subtest_f("scaler_with_pixel_format") {
+		test_scaler_with_pixel_format(&data);
+	}
+	igt_subtest_f("scaler_with_rotation") {
+		test_scaler_with_rotation(&data);
+	}
+	igt_subtest_f("scaler_with_multiple_planes") {

tests/kms_plane_scaling.c igt_simple_main · line 790

Quoted 10 lines
tests/kms_plane_scaling.c +8 -0
+		test_scaler_with_multiple_planes(&data);
+	}
+	igt_subtest_f("scaler_with_clipping_clamping") {
+		test_scaler_with_clipping_clamping_scenario(&data);
+	}
+	igt_subtest_f("scaler_with_multi_pipe_plane") {
+		test_scaler_with_multi_pipe_plane(&data);
+	}
  	igt_display_fini(&data.display);
  }

I think this test need to add checks if commits succeeded in the first place. For testing of scalers I did not spot anything that would test validity, I mean did the scaler actually produce expected scaled image.

/Juha-Pekka
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
In reply to Vidya Srinivas
Quoted 504 lines · Vidya Srinivas

From: Jyoti Yadav <[email protected]>

Added subtests to cover below gaps.
1. scaler with pixelformat and tiling.
2. scaler with rotation
3. scaler with multiple planes
4. scaler with multi pipe
5. scaler with clipping/clamping scenario

---
 tests/kms_plane_scaling.c | 480 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 476 insertions(+), 4 deletions(-)
tests/kms_plane_scaling.c +459 -2
index 403df47..2be6acc 100644
@@ -43,10 +43,11 @@ typedef struct {
 	struct igt_fb fb1;
 	struct igt_fb fb2;
 	struct igt_fb fb3;
+	struct igt_fb fb4;
 	int fb_id1;
 	int fb_id2;
 	int fb_id3;
-
+	int fb_id4;
 	igt_plane_t *plane1;
 	igt_plane_t *plane2;
 	igt_plane_t *plane3;
@@ -54,6 +55,51 @@ typedef struct {
 } data_t;
 
 #define FILE_NAME   "1080p-left.png"
+#define MIN_SRC_WIDTH 8
+#define MAX_SRC_WIDTH 4096
+static uint32_t check_pixel_format(uint32_t pixel_format)
+{
+	const uint32_t *igt_formats;
+	int num_igt_formats;
+	int i;
+
+
+	igt_get_all_cairo_formats(&igt_formats, &num_igt_formats);
+	for (i = 0; i < num_igt_formats; i++) {
+		if (pixel_format == igt_formats[i])
+			return 0;
+	}
+
+	return -1;
+}
+bool is_igt_output_connected(igt_output_t *output)
+{
+	/* Something went wrong during probe? */
+	if (!output->config.connector)
+		return false;
+
+	if (output->config.connector->connection == DRM_MODE_CONNECTED)
+		return true;
+
+	return false;
+}
+
+static igt_output_t *get_next_valid_output(igt_display_t *data, int i)
+{
+	int j = 0, valid_output = 0;
+	drmModeModeInfo *mode;
+	for (j = 0; j < data->n_outputs; j++) {
+		if (is_igt_output_connected(&data->outputs[j])) {
+			mode = igt_output_get_mode(&data->outputs[j]);
+			if (mode->hdisplay != 0 && mode->vdisplay != 0) {
+				valid_output++;
+				if (valid_output == i)
+					return &data->outputs[j];
+			}
+		}
+	}
+	return NULL;
+}
 
 static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
 			igt_plane_t *plane, drmModeModeInfo *mode, enum igt_commit_style s)
@@ -298,7 +344,418 @@ static void test_plane_scaling(data_t *d)
 	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
 }
 
-igt_simple_main
+uint64_t get_tiling(int i)
+{
+	switch (i) {
+	case 0:
+		return LOCAL_DRM_FORMAT_MOD_NONE;
+		break;
+	case 1:
+		return LOCAL_I915_FORMAT_MOD_X_TILED;
+		break;
+	case 2:
+		return LOCAL_I915_FORMAT_MOD_Y_TILED;
+		break;
+	case 3:
+		return LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		break;
+	default:
+		return -1;
+	}
+}
+
+void loop_plane_scaling(data_t *d, igt_plane_t *plane, uint32_t pixel_format,
+			uint64_t tiling, enum pipe pipe, igt_output_t *output)
+{
+	igt_display_t *display = &d->display;
+	int width, height;
+	/* create buffer in the range of  min and max source side limit.*/
+	for (width = MIN_SRC_WIDTH; width <= MAX_SRC_WIDTH; width = width + 500) {
+		igt_output_set_pipe(output, pipe);
+		height = width + 10;
+		d->fb_id1 = igt_create_pattern_fb(display->drm_fd, width, height,
+						pixel_format, tiling, &d->fb1);
+		igt_assert(d->fb_id1);
+		igt_plane_set_fb(plane, &d->fb1);
+		/* check upscaling */
+		igt_fb_set_position(&d->fb1, plane, 0, 0);
+		igt_fb_set_size(&d->fb1, plane, d->fb1.width, d->fb1.height);
+		igt_plane_set_position(plane, 10, 10);
+		igt_plane_set_size(plane, width*2, height*2);
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		igt_plane_set_fb(plane, NULL);
+		igt_plane_set_position(plane, 0, 0);
+		if (d->fb_id1) {
+			igt_remove_fb(d->drm_fd, &d->fb1);
+			d->fb_id1 = 0;
+		}
+	}
+}
+void test_scaler_with_pixel_format(data_t *d)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	igt_plane_t *plane;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		for_each_plane_on_pipe(display, pipe, plane) {
+			/* check if plane is cursor. */
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+			/* run loop for all pixel formats.*/
+			drmModePlanePtr plane_kms;
+			plane_kms = plane->drm_plane;
+			for (int j = 0; j < plane_kms->count_formats; j++) {
+				/* check plane pixel format is supported in
+				 * cairo pixel formats.
+				 */
+				if (check_pixel_format(plane_kms->formats[j])	== 0) {
+					/* loop for tiling */
+					igt_require_fb_modifiers(d->drm_fd);
+					for (int i = 0; i < 4; i++) {
+						uint64_t tiling = get_tiling(i);
+						loop_plane_scaling(d, plane, plane_kms->formats[j],
+								tiling, pipe, output);
+					}
+				}
+			}
+		}
+	}
+}
+
+static igt_rotation_t get_rotation_angle(int i)
+{
+	switch (i) {
+	case 0:
+		return IGT_ROTATION_0;
+		break;
+	case 1:
+		return IGT_ROTATION_90;
+		break;
+	case 2:
+		return IGT_ROTATION_180;
+		break;
+	case 3:
+		return IGT_ROTATION_270;
+		break;
+	default:
+		return -1;
+	}
+}
+
+void test_scaler_with_rotation(data_t *d)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	igt_plane_t *plane;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		drmModeModeInfo *mode;
+		mode = igt_output_get_mode(output);
+		for_each_plane_on_pipe(display, pipe, plane) {
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+			/* run loop for all pixel formats.*/
+			drmModePlanePtr plane_kms;
+			plane_kms = plane->drm_plane;
+			for (int j = 0; j < plane_kms->count_formats; j++) {
+				/* 90/270 degree rotation is not supported on RGB565 and C8 pixel
+				 * formats
+				 */
+				if (plane_kms->formats[j] == DRM_FORMAT_RGB565 ||
+					plane_kms->formats[j] == DRM_FORMAT_C8) {
+					continue;
+				}
+				if (check_pixel_format(plane_kms->formats[j]) == 0) {
+					igt_output_set_pipe(output, pipe);
+					d->fb_id1 = igt_create_pattern_fb(display->drm_fd,
+									  mode->hdisplay, mode->vdisplay,
+									  plane_kms->formats[j],
+									  LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb1);
+					igt_assert(d->fb_id1);
+					/* check all the supported rotation format*/
+					for (int i = 0; i < 4; i++) {
+						igt_plane_set_fb(plane, &d->fb1);
+						/* check upscaling */
+						igt_fb_set_position(&d->fb1, plane, 0, 0);
+						igt_fb_set_size(&d->fb1, plane, 300, 400);
+						igt_plane_set_position(plane, 0, 0);
+						igt_plane_set_size(plane, mode->hdisplay-200, mode->vdisplay-200);
+						igt_plane_set_rotation(plane, get_rotation_angle(i));
+						igt_display_commit2(display, COMMIT_ATOMIC);
+						/* check downscaling */
+						igt_fb_set_position(&d->fb1, plane, 0, 0);
+						igt_fb_set_size(&d->fb1, plane, 300, 400);
+						igt_plane_set_position(plane, 0, 0);
+						igt_plane_set_size(plane, 350, 250); /* downscale by 50 pixels*/
+						igt_plane_set_rotation(plane, get_rotation_angle(i));
+						igt_display_commit2(display, COMMIT_ATOMIC);
+						/* disable Plane*/
+						igt_plane_set_fb(plane, NULL);
+						igt_plane_set_position(plane, 0, 0);
+					}
+					if (d->fb_id1) {
+						igt_remove_fb(d->drm_fd, &d->fb1);
+						d->fb_id1 = 0;
+					}
+				}
+			}
+		}
+	}
+}
+
+void test_scaler_with_multiple_planes(data_t *d)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		/* For Gen 9, Pipe C supports only 1 scaler*/
+		if (intel_gen(d->devid) == 9 && pipe == PIPE_C)
+			continue;
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		/* Create 2 Framebuffers */
+		d->fb_id2 = igt_create_pattern_fb(d->drm_fd, mode->hdisplay, mode->vdisplay,
+						DRM_FORMAT_XRGB8888,
+						LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
+						&d->fb2);
+		igt_assert(d->fb_id2);
+
+		d->fb_id3 = igt_create_pattern_fb(d->drm_fd,
+						  mode->hdisplay, mode->vdisplay,
+						  DRM_FORMAT_XRGB8888,
+						  LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+						  &d->fb3);
+		igt_assert(d->fb_id3);
+
+		d->plane1 = igt_output_get_plane(output, 0);
+		igt_plane_set_fb(d->plane1, &d->fb2);
+		d->plane2 = igt_output_get_plane(output, 1);
+		igt_plane_set_fb(d->plane2, &d->fb3);
+		/* plane upscaling  on 2 planes*/
+		igt_fb_set_position(&d->fb2, d->plane1, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane1, 300, 300);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_size(d->plane1, 400, 400);
+
+		igt_fb_set_position(&d->fb3, d->plane2, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane2, 400, 400);
+		igt_plane_set_position(d->plane2, 100, 100);
+		igt_plane_set_size(d->plane2, 500, 500);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes*/
+		igt_plane_set_fb(d->plane1, NULL);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_fb(d->plane2, NULL);
+		igt_plane_set_position(d->plane2, 0, 0);
+
+		/* Switch scaler from above 2 planes to next 2 planes*/
+		d->plane3 = igt_output_get_plane(output, 2);
+		igt_plane_set_fb(d->plane3, &d->fb2);
+		d->plane4 = igt_output_get_plane(output, 3);
+		igt_plane_set_fb(d->plane4, &d->fb3);
+
+		igt_fb_set_position(&d->fb2, d->plane3, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane3, 300, 300);
+		igt_plane_set_position(d->plane3, 0, 0);
+		igt_plane_set_size(d->plane3, 600, 600);
+
+		igt_fb_set_position(&d->fb3, d->plane4, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane4, 400, 400);
+		igt_plane_set_position(d->plane4, 100, 100);
+		igt_plane_set_size(d->plane4, 700, 700);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes and remove FB*/
+		igt_plane_set_fb(d->plane3, NULL);
+		igt_plane_set_position(d->plane3, 0, 0);
+		igt_plane_set_fb(d->plane4, NULL);
+		igt_plane_set_position(d->plane4, 0, 0);
+		if (d->fb_id2) {
+			igt_remove_fb(d->drm_fd, &d->fb2);
+			d->fb_id2 = 0;
+		}
+		if (d->fb_id3) {
+			igt_remove_fb(d->drm_fd, &d->fb3);
+			d->fb_id3 = 0;
+		}
+	}
+}
+
+void test_scaler_with_clipping_clamping_scenario(data_t *d)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+
+	for_each_pipe_with_valid_output(display, pipe, output) {
+
+		if (intel_gen(d->devid) == 9 && pipe == PIPE_C)
+			continue;
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		/* allocate fb2 and fb3 */
+		d->fb_id2 = igt_create_pattern_fb(d->drm_fd, mode->hdisplay, mode->vdisplay,
+						DRM_FORMAT_XRGB8888,
+						LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
+						&d->fb2);
+		igt_assert(d->fb_id2);
+
+		d->fb_id3 = igt_create_pattern_fb(d->drm_fd,
+						  mode->hdisplay, mode->vdisplay,
+						  DRM_FORMAT_XRGB8888,
+						  LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+						  &d->fb3);
+		igt_assert(d->fb_id3);
+
+		/* Set up display with plane 1 */
+		d->plane1 = igt_output_get_plane(output, 0);
+		igt_plane_set_fb(d->plane1, &d->fb2);
+		d->plane2 = igt_output_get_plane(output, 1);
+		igt_plane_set_fb(d->plane2, &d->fb3);
+
+		/* plane upscaling  on 2 planes*/
+		igt_fb_set_position(&d->fb2, d->plane1, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane1, 300, 300);
+		igt_plane_set_position(d->plane1, 100, 400);
+		/* scaled window size is outside the modeset area.*/
+		igt_plane_set_size(d->plane1, mode->hdisplay + 200, mode->vdisplay + 200);
+
+		igt_fb_set_position(&d->fb3, d->plane2, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane2, 400, 400);
+		igt_plane_set_position(d->plane2, 100, 100);
+		/* scaled window size is outside the modeset area.*/
+		igt_plane_set_size(d->plane2, mode->hdisplay + 100, mode->vdisplay + 100);
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes*/
+		igt_plane_set_fb(d->plane1, NULL);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_fb(d->plane2, NULL);
+		igt_plane_set_position(d->plane2, 0, 0);
+		if (d->fb_id2) {
+			igt_remove_fb(d->drm_fd, &d->fb2);
+			d->fb_id2 = 0;
+		}
+		if (d->fb_id3) {
+			igt_remove_fb(d->drm_fd, &d->fb3);
+			d->fb_id3 = 0;
+		}
+	}
+}
+
+void test_scaler_with_multi_pipe_plane(data_t *d)
+{
+	igt_display_t *display = &d->display;
+	igt_output_t *output1, *output2;
+	/*check whether 2 connectors are active .*/
+	igt_skip_on(display->n_outputs < 2);
+	output1 = get_next_valid_output(display, 1);
+	output2 = get_next_valid_output(display, 2);
+	igt_output_set_pipe(output1, 0);
+	igt_output_set_pipe(output2, 1);
+	d->plane1 = igt_output_get_plane_type(output1, DRM_PLANE_TYPE_PRIMARY);
+	d->plane2 = igt_output_get_plane_type(output1, DRM_PLANE_TYPE_OVERLAY);
+	d->plane3 = igt_output_get_plane_type(output2, DRM_PLANE_TYPE_PRIMARY);
+	d->plane4 = igt_output_get_plane_type(output2, DRM_PLANE_TYPE_OVERLAY);
+	drmModeModeInfo *mode1, *mode2;
+	mode1 = igt_output_get_mode(output1);
+	mode2 = igt_output_get_mode(output2);
+	/* allocate fb with mode size */
+	d->fb_id1 = igt_create_pattern_fb(d->drm_fd, mode1->hdisplay, mode1->vdisplay,
+					DRM_FORMAT_XRGB8888, LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
+					&d->fb1);
+	igt_assert(d->fb_id1);
+
+	d->fb_id2 = igt_create_pattern_fb(d->drm_fd,
+					  mode1->hdisplay, mode1->vdisplay,
+					  DRM_FORMAT_XRGB8888,
+					  LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+					  &d->fb2);
+	igt_assert(d->fb_id2);
+	d->fb_id3 = igt_create_pattern_fb(d->drm_fd, mode2->hdisplay, mode2->vdisplay,
+					DRM_FORMAT_XRGB8888,
+					LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */
+					&d->fb3);
+	igt_assert(d->fb_id3);
+
+	d->fb_id4 = igt_create_pattern_fb(d->drm_fd,
+					  mode2->hdisplay, mode2->vdisplay,
+					  DRM_FORMAT_XRGB8888,
+					  LOCAL_DRM_FORMAT_MOD_NONE, /* tiled */
+					  &d->fb4);
+	igt_assert(d->fb_id4);
+	/* Set up display with plane 1 */
+	igt_plane_set_fb(d->plane1, &d->fb1);
+	igt_plane_set_fb(d->plane2, &d->fb2);
+	igt_plane_set_fb(d->plane3, &d->fb3);
+	igt_plane_set_fb(d->plane4, &d->fb4);
+
+	/* plane upscaling  on 2 planes*/
+	igt_fb_set_position(&d->fb1, d->plane1, 0, 0);
+	igt_fb_set_size(&d->fb1, d->plane1, 300, 300);
+	igt_plane_set_position(d->plane1, 100, 100);
+	igt_plane_set_size(d->plane1, mode1->hdisplay - 100, mode1->vdisplay - 50);
+
+	igt_fb_set_position(&d->fb2, d->plane2, 100, 100);
+	igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width - 100, d->fb2.height - 100);
+	igt_plane_set_position(d->plane2, 100, 100);
+	/* downscale by 50 pixels*/
+	igt_plane_set_size(d->plane2, d->fb2.width - 150, d->fb2.height - 150);
+
+	igt_fb_set_position(&d->fb3, d->plane3, 0, 0);
+	igt_fb_set_size(&d->fb3, d->plane3, 400, 400);
+	igt_plane_set_position(d->plane3, 100, 100);
+	igt_plane_set_size(d->plane3, mode2->hdisplay - 50, mode2->vdisplay - 50);
+
+	igt_fb_set_position(&d->fb4, d->plane4, 100, 100);
+	igt_fb_set_size(&d->fb2, d->plane4, d->fb4.width - 100, d->fb4.height - 100);
+	igt_plane_set_position(d->plane4, 100, 100);
+	/* downscale by 50 pixels*/
+	igt_plane_set_size(d->plane4, d->fb4.width - 150, d->fb4.height - 150);
+
+	igt_display_commit2(display, COMMIT_ATOMIC);
+	/* disbale above 4 planes*/
+	igt_plane_set_fb(d->plane1, NULL);
+	igt_plane_set_position(d->plane1, 0, 0);
+	igt_plane_set_fb(d->plane2, NULL);
+	igt_plane_set_position(d->plane2, 0, 0);
+	igt_plane_set_fb(d->plane3, NULL);
+	igt_plane_set_position(d->plane3, 0, 0);
+	igt_plane_set_fb(d->plane4, NULL);
+	igt_plane_set_position(d->plane4, 0, 0);
+	if (d->fb_id1) {
+		igt_remove_fb(d->drm_fd, &d->fb1);
+		d->fb_id1 = 0;
+	}
+	if (d->fb_id2) {
+		igt_remove_fb(d->drm_fd, &d->fb2);
+		d->fb_id2 = 0;
+	}
+	if (d->fb_id3) {
+		igt_remove_fb(d->drm_fd, &d->fb3);
+		d->fb_id3 = 0;
+	}
+	if (d->fb_id4) {
+		igt_remove_fb(d->drm_fd, &d->fb4);
+		d->fb_id4 = 0;
+	}
+}
+igt_main
 {
 	data_t data = {};
 

tests/kms_plane_scaling.c igt_simple_main · line 770

Quoted 6 lines
tests/kms_plane_scaling.c +1 -0
@@ -308,11 +765,26 @@ igt_simple_main
 	data.drm_fd = drm_open_driver(DRIVER_INTEL);
 	igt_require_pipe_crc(data.drm_fd);
 	igt_display_init(&data.display, data.drm_fd);
+	igt_require(data.display.is_atomic);
 	data.devid = intel_get_drm_devid(data.drm_fd);
 

The CI results are cut off before the important parts that state what's wrong here. The test that fails is igt_command_line.sh. You can run the script directly yourself to see the output.

You're changing a test-without-subtests to one with subtests, and that means you need to do stuff like drm_open_driver() inside an igt_fixture.

Signature · 1 line
Petri Latvala
Quoted 29 lines
tests/kms_plane_scaling.c +16 -2
 	data.num_scalers = intel_gen(data.devid) >= 9 ? 2 : 0;
 
-	test_plane_scaling(&data);
-
+	//test_plane_scaling(&data);
+	igt_subtest_f("scaler_with_pixel_format") {
+		test_scaler_with_pixel_format(&data);
+	}
+	igt_subtest_f("scaler_with_rotation") {
+		test_scaler_with_rotation(&data);
+	}
+	igt_subtest_f("scaler_with_multiple_planes") {
+		test_scaler_with_multiple_planes(&data);
+	}
+	igt_subtest_f("scaler_with_clipping_clamping") {
+		test_scaler_with_clipping_clamping_scenario(&data);
+	}
+	igt_subtest_f("scaler_with_multi_pipe_plane") {
+		test_scaler_with_multi_pipe_plane(&data);
+	}
 	igt_display_fini(&data.display);
 }
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw
Quoted 586 lines

-----Original Message-----
From: Latvala, Petri
Sent: Friday, November 24, 2017 2:58 PM
To: Srinivas, Vidya <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH i-g-t] i-g-t: kms_plane_scaling: Enhanced scaling tests

Quoted 48 lines · Vidya Srinivas

From: Jyoti Yadav <[email protected]>

Added subtests to cover below gaps.
1. scaler with pixelformat and tiling.
2. scaler with rotation
3. scaler with multiple planes
4. scaler with multi pipe
5. scaler with clipping/clamping scenario

---
 tests/kms_plane_scaling.c | 480
+++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 476 insertions(+), 4 deletions(-)
tests/kms_plane_scaling.c +14 -1
index 403df47..2be6acc 100644
@@ -43,10 +43,11 @@ typedef struct {
 	struct igt_fb fb1;
 	struct igt_fb fb2;
 	struct igt_fb fb3;
+	struct igt_fb fb4;
 	int fb_id1;
 	int fb_id2;
 	int fb_id3;
-
+	int fb_id4;
 	igt_plane_t *plane1;
 	igt_plane_t *plane2;
 	igt_plane_t *plane3;
@@ -54,6 +55,51 @@ typedef struct {
 } data_t;
 
 #define FILE_NAME   "1080p-left.png"
+#define MIN_SRC_WIDTH 8
+#define MAX_SRC_WIDTH 4096
+static uint32_t check_pixel_format(uint32_t pixel_format) {
+	const uint32_t *igt_formats;
+	int num_igt_formats;
+	int i;
+
+
+	igt_get_all_cairo_formats(&igt_formats, &num_igt_formats);
+	for (i = 0; i < num_igt_formats; i++) {
+		if (pixel_format == igt_formats[i])
+			return 0;

tests/kms_plane_scaling.c typedef struct { · line 79

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+	}
+
+	return -1;
+}
+bool is_igt_output_connected(igt_output_t *output) {
+	/* Something went wrong during probe? */
+	if (!output->config.connector)
+		return false;
+
+	if (output->config.connector->connection ==

DRM_MODE_CONNECTED)

Quoted 13 lines
tests/kms_plane_scaling.c +13 -0
+		return true;
+
+	return false;
+}
+
+static igt_output_t *get_next_valid_output(igt_display_t *data, int
+i) {
+	int j = 0, valid_output = 0;
+	drmModeModeInfo *mode;
+	for (j = 0; j < data->n_outputs; j++) {
+		if (is_igt_output_connected(&data->outputs[j])) {
+			mode = igt_output_get_mode(&data->outputs[j]);
+			if (mode->hdisplay != 0 && mode->vdisplay != 0) {

tests/kms_plane_scaling.c typedef struct {

Quoted 10 lines
tests/kms_plane_scaling.c +8 -0
+				valid_output++;
+				if (valid_output == i)
+					return &data->outputs[j];
+			}
+		}
+	}
+	return NULL;
+}
 
 static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe

pipe,

tests/kms_plane_scaling.c typedef struct { · line 103

Quoted 1 line
tests/kms_plane_scaling.c +0 -0
 			igt_plane_t *plane, drmModeModeInfo *mode,

enum igt_commit_style

Quoted 16 lines

s) @@ -298,7 +344,418 @@ static void test_plane_scaling(data_t *d) igt_require_f(valid_tests, "no valid crtc/connector combinations
found\n"); }

tests/kms_plane_scaling.c +11 -1
-igt_simple_main
+uint64_t get_tiling(int i)
+{
+	switch (i) {
+	case 0:
+		return LOCAL_DRM_FORMAT_MOD_NONE;
+		break;
+	case 1:
+		return LOCAL_I915_FORMAT_MOD_X_TILED;
+		break;
+	case 2:
+		return LOCAL_I915_FORMAT_MOD_Y_TILED;

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d)

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+		break;
+	case 3:
+		return LOCAL_I915_FORMAT_MOD_Yf_TILED;
+		break;
+	default:
+		return -1;
+	}
+}
+
+void loop_plane_scaling(data_t *d, igt_plane_t *plane, uint32_t

pixel_format,

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+			uint64_t tiling, enum pipe pipe, igt_output_t

*output) {

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d)

Quoted 4 lines
tests/kms_plane_scaling.c +4 -0
+	igt_display_t *display = &d->display;
+	int width, height;
+	/* create buffer in the range of  min and max source side limit.*/
+	for (width = MIN_SRC_WIDTH; width <= MAX_SRC_WIDTH; width =

width + 500) {

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d)

Quoted 3 lines
tests/kms_plane_scaling.c +3 -0
+		igt_output_set_pipe(output, pipe);
+		height = width + 10;
+		d->fb_id1 = igt_create_pattern_fb(display->drm_fd, width,

height,

Quoted 46 lines
tests/kms_plane_scaling.c +1 -0
+						pixel_format, tiling, &d-

fb1);

tests/kms_plane_scaling.c +5 -0
+		igt_assert(d->fb_id1);
+		igt_plane_set_fb(plane, &d->fb1);
+		/* check upscaling */
+		igt_fb_set_position(&d->fb1, plane, 0, 0);
+		igt_fb_set_size(&d->fb1, plane, d->fb1.width, d-

fb1.height);

tests/kms_plane_scaling.c +34 -0
+		igt_plane_set_position(plane, 10, 10);
+		igt_plane_set_size(plane, width*2, height*2);
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		igt_plane_set_fb(plane, NULL);
+		igt_plane_set_position(plane, 0, 0);
+		if (d->fb_id1) {
+			igt_remove_fb(d->drm_fd, &d->fb1);
+			d->fb_id1 = 0;
+		}
+	}
+}
+void test_scaler_with_pixel_format(data_t *d) {
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	igt_plane_t *plane;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		for_each_plane_on_pipe(display, pipe, plane) {
+			/* check if plane is cursor. */
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+			/* run loop for all pixel formats.*/
+			drmModePlanePtr plane_kms;
+			plane_kms = plane->drm_plane;
+			for (int j = 0; j < plane_kms->count_formats; j++) {
+				/* check plane pixel format is supported in
+				 * cairo pixel formats.
+				 */
+				if (check_pixel_format(plane_kms-

formats[j]) == 0) {

tests/kms_plane_scaling.c +2 -0
+					/* loop for tiling */
+					igt_require_fb_modifiers(d-

drm_fd);

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d)

Quoted 3 lines
tests/kms_plane_scaling.c +3 -0
+					for (int i = 0; i < 4; i++) {
+						uint64_t tiling = get_tiling(i);
+						loop_plane_scaling(d, plane,

plane_kms->formats[j],

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+								tiling, pipe,

output);

Quoted 34 lines
tests/kms_plane_scaling.c +34 -0
+					}
+				}
+			}
+		}
+	}
+}
+
+static igt_rotation_t get_rotation_angle(int i) {
+	switch (i) {
+	case 0:
+		return IGT_ROTATION_0;
+		break;
+	case 1:
+		return IGT_ROTATION_90;
+		break;
+	case 2:
+		return IGT_ROTATION_180;
+		break;
+	case 3:
+		return IGT_ROTATION_270;
+		break;
+	default:
+		return -1;
+	}
+}
+
+void test_scaler_with_rotation(data_t *d) {
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	igt_plane_t *plane;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d)

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+		drmModeModeInfo *mode;
+		mode = igt_output_get_mode(output);
+		for_each_plane_on_pipe(display, pipe, plane) {
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+			/* run loop for all pixel formats.*/
+			drmModePlanePtr plane_kms;
+			plane_kms = plane->drm_plane;
+			for (int j = 0; j < plane_kms->count_formats; j++) {
+				/* 90/270 degree rotation is not supported

on RGB565 and C8 pixel

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d)

Quoted 3 lines
tests/kms_plane_scaling.c +3 -0
+				 * formats
+				 */
+				if (plane_kms->formats[j] ==

DRM_FORMAT_RGB565 ||

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+					plane_kms->formats[j] ==

DRM_FORMAT_C8) {

tests/kms_plane_scaling.c

Quoted 6 lines
tests/kms_plane_scaling.c +3 -0
+					continue;
+				}
+				if (check_pixel_format(plane_kms-

formats[j]) == 0) {

tests/kms_plane_scaling.c +2 -0
+					igt_output_set_pipe(output, pipe);
+					d->fb_id1 =

igt_create_pattern_fb(display->drm_fd,

Quoted 1 line

+

mode->hdisplay, mode->vdisplay,

Quoted 1 line

+

plane_kms->formats[j],

Quoted 1 line

+

LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb1);

tests/kms_plane_scaling.c

Quoted 2 lines
tests/kms_plane_scaling.c +2 -0
+					igt_assert(d->fb_id1);
+					/* check all the supported rotation

format*/

tests/kms_plane_scaling.c

Quoted 5 lines
tests/kms_plane_scaling.c +2 -0
+					for (int i = 0; i < 4; i++) {
+						igt_plane_set_fb(plane, &d-

fb1);

tests/kms_plane_scaling.c +2 -0
+						/* check upscaling */
+						igt_fb_set_position(&d->fb1,

plane, 0, 0);

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+						igt_fb_set_size(&d->fb1,

plane, 300, 400);

Quoted 1 line

+

	igt_plane_set_position(plane, 0, 0);

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+						igt_plane_set_size(plane,

mode->hdisplay-200, mode->vdisplay-200);

Quoted 1 line

+

	igt_plane_set_rotation(plane, get_rotation_angle(i));
Quoted 1 line

+

	igt_display_commit2(display, COMMIT_ATOMIC);

tests/kms_plane_scaling.c

Quoted 2 lines
tests/kms_plane_scaling.c +2 -0
+						/* check downscaling */
+						igt_fb_set_position(&d->fb1,

plane, 0, 0);

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+						igt_fb_set_size(&d->fb1,

plane, 300, 400);

Quoted 1 line

+

	igt_plane_set_position(plane, 0, 0);

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+						igt_plane_set_size(plane,

350, 250); /* downscale by 50 pixels*/

Quoted 1 line

+

	igt_plane_set_rotation(plane, get_rotation_angle(i));
Quoted 1 line

+

	igt_display_commit2(display, COMMIT_ATOMIC);

tests/kms_plane_scaling.c

Quoted 2 lines
tests/kms_plane_scaling.c +2 -0
+						/* disable Plane*/
+						igt_plane_set_fb(plane,

NULL);

Quoted 1 line

+

	igt_plane_set_position(plane, 0, 0);

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d)

Quoted 3 lines
tests/kms_plane_scaling.c +3 -0
+					}
+					if (d->fb_id1) {
+						igt_remove_fb(d->drm_fd,

&d->fb1);

Quoted 24 lines
tests/kms_plane_scaling.c +23 -0
+						d->fb_id1 = 0;
+					}
+				}
+			}
+		}
+	}
+}
+
+void test_scaler_with_multiple_planes(data_t *d) {
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		/* For Gen 9, Pipe C supports only 1 scaler*/
+		if (intel_gen(d->devid) == 9 && pipe == PIPE_C)
+			continue;
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		/* Create 2 Framebuffers */
+		d->fb_id2 = igt_create_pattern_fb(d->drm_fd, mode-

hdisplay, mode->vdisplay,

tests/kms_plane_scaling.c

Quoted 2 lines
tests/kms_plane_scaling.c +2 -0
+						DRM_FORMAT_XRGB8888,
+
	LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */

tests/kms_plane_scaling.c

Quoted 8 lines
tests/kms_plane_scaling.c +5 -0
+						&d->fb2);
+		igt_assert(d->fb_id2);
+
+		d->fb_id3 = igt_create_pattern_fb(d->drm_fd,
+						  mode->hdisplay, mode-

vdisplay,

tests/kms_plane_scaling.c +2 -0
+						  DRM_FORMAT_XRGB8888,
+

LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */

Quoted 75 lines
tests/kms_plane_scaling.c +74 -0
+						  &d->fb3);
+		igt_assert(d->fb_id3);
+
+		d->plane1 = igt_output_get_plane(output, 0);
+		igt_plane_set_fb(d->plane1, &d->fb2);
+		d->plane2 = igt_output_get_plane(output, 1);
+		igt_plane_set_fb(d->plane2, &d->fb3);
+		/* plane upscaling  on 2 planes*/
+		igt_fb_set_position(&d->fb2, d->plane1, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane1, 300, 300);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_size(d->plane1, 400, 400);
+
+		igt_fb_set_position(&d->fb3, d->plane2, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane2, 400, 400);
+		igt_plane_set_position(d->plane2, 100, 100);
+		igt_plane_set_size(d->plane2, 500, 500);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes*/
+		igt_plane_set_fb(d->plane1, NULL);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_fb(d->plane2, NULL);
+		igt_plane_set_position(d->plane2, 0, 0);
+
+		/* Switch scaler from above 2 planes to next 2 planes*/
+		d->plane3 = igt_output_get_plane(output, 2);
+		igt_plane_set_fb(d->plane3, &d->fb2);
+		d->plane4 = igt_output_get_plane(output, 3);
+		igt_plane_set_fb(d->plane4, &d->fb3);
+
+		igt_fb_set_position(&d->fb2, d->plane3, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane3, 300, 300);
+		igt_plane_set_position(d->plane3, 0, 0);
+		igt_plane_set_size(d->plane3, 600, 600);
+
+		igt_fb_set_position(&d->fb3, d->plane4, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane4, 400, 400);
+		igt_plane_set_position(d->plane4, 100, 100);
+		igt_plane_set_size(d->plane4, 700, 700);
+
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes and remove FB*/
+		igt_plane_set_fb(d->plane3, NULL);
+		igt_plane_set_position(d->plane3, 0, 0);
+		igt_plane_set_fb(d->plane4, NULL);
+		igt_plane_set_position(d->plane4, 0, 0);
+		if (d->fb_id2) {
+			igt_remove_fb(d->drm_fd, &d->fb2);
+			d->fb_id2 = 0;
+		}
+		if (d->fb_id3) {
+			igt_remove_fb(d->drm_fd, &d->fb3);
+			d->fb_id3 = 0;
+		}
+	}
+}
+
+void test_scaler_with_clipping_clamping_scenario(data_t *d) {
+	igt_display_t *display = &d->display;
+	igt_output_t *output;
+	enum pipe pipe;
+	int valid_tests = 0;
+	igt_require(d->num_scalers);
+
+	for_each_pipe_with_valid_output(display, pipe, output) {
+
+		if (intel_gen(d->devid) == 9 && pipe == PIPE_C)
+			continue;
+		drmModeModeInfo *mode;
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+		/* allocate fb2 and fb3 */
+		d->fb_id2 = igt_create_pattern_fb(d->drm_fd, mode-

hdisplay, mode->vdisplay,

tests/kms_plane_scaling.c

Quoted 2 lines
tests/kms_plane_scaling.c +2 -0
+						DRM_FORMAT_XRGB8888,
+
	LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */

tests/kms_plane_scaling.c

Quoted 8 lines
tests/kms_plane_scaling.c +5 -0
+						&d->fb2);
+		igt_assert(d->fb_id2);
+
+		d->fb_id3 = igt_create_pattern_fb(d->drm_fd,
+						  mode->hdisplay, mode-

vdisplay,

tests/kms_plane_scaling.c +2 -0
+						  DRM_FORMAT_XRGB8888,
+

LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */

Quoted 41 lines
tests/kms_plane_scaling.c +15 -0
+						  &d->fb3);
+		igt_assert(d->fb_id3);
+
+		/* Set up display with plane 1 */
+		d->plane1 = igt_output_get_plane(output, 0);
+		igt_plane_set_fb(d->plane1, &d->fb2);
+		d->plane2 = igt_output_get_plane(output, 1);
+		igt_plane_set_fb(d->plane2, &d->fb3);
+
+		/* plane upscaling  on 2 planes*/
+		igt_fb_set_position(&d->fb2, d->plane1, 0, 0);
+		igt_fb_set_size(&d->fb2, d->plane1, 300, 300);
+		igt_plane_set_position(d->plane1, 100, 400);
+		/* scaled window size is outside the modeset area.*/
+		igt_plane_set_size(d->plane1, mode->hdisplay + 200, mode-

vdisplay
++ 200);

tests/kms_plane_scaling.c +6 -0
+
+		igt_fb_set_position(&d->fb3, d->plane2, 0, 0);
+		igt_fb_set_size(&d->fb3, d->plane2, 400, 400);
+		igt_plane_set_position(d->plane2, 100, 100);
+		/* scaled window size is outside the modeset area.*/
+		igt_plane_set_size(d->plane2, mode->hdisplay + 100, mode-

vdisplay + 100);

tests/kms_plane_scaling.c +17 -0
+		igt_display_commit2(display, COMMIT_ATOMIC);
+		/* disbale above 2planes*/
+		igt_plane_set_fb(d->plane1, NULL);
+		igt_plane_set_position(d->plane1, 0, 0);
+		igt_plane_set_fb(d->plane2, NULL);
+		igt_plane_set_position(d->plane2, 0, 0);
+		if (d->fb_id2) {
+			igt_remove_fb(d->drm_fd, &d->fb2);
+			d->fb_id2 = 0;
+		}
+		if (d->fb_id3) {
+			igt_remove_fb(d->drm_fd, &d->fb3);
+			d->fb_id3 = 0;
+		}
+	}
+}
+

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d)

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+void test_scaler_with_multi_pipe_plane(data_t *d) {
+	igt_display_t *display = &d->display;
+	igt_output_t *output1, *output2;
+	/*check whether 2 connectors are active .*/
+	igt_skip_on(display->n_outputs < 2);
+	output1 = get_next_valid_output(display, 1);
+	output2 = get_next_valid_output(display, 2);
+	igt_output_set_pipe(output1, 0);
+	igt_output_set_pipe(output2, 1);
+	d->plane1 = igt_output_get_plane_type(output1,

DRM_PLANE_TYPE_PRIMARY);

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+	d->plane2 = igt_output_get_plane_type(output1,

DRM_PLANE_TYPE_OVERLAY);

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+	d->plane3 = igt_output_get_plane_type(output2,

DRM_PLANE_TYPE_PRIMARY);

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+	d->plane4 = igt_output_get_plane_type(output2,

DRM_PLANE_TYPE_OVERLAY);

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d)

Quoted 5 lines
tests/kms_plane_scaling.c +5 -0
+	drmModeModeInfo *mode1, *mode2;
+	mode1 = igt_output_get_mode(output1);
+	mode2 = igt_output_get_mode(output2);
+	/* allocate fb with mode size */
+	d->fb_id1 = igt_create_pattern_fb(d->drm_fd, mode1->hdisplay,

mode1->vdisplay,

tests/kms_plane_scaling.c

Quoted 1 line
tests/kms_plane_scaling.c +1 -0
+					DRM_FORMAT_XRGB8888,

LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 695

Quoted 7 lines
tests/kms_plane_scaling.c +7 -0
+					&d->fb1);
+	igt_assert(d->fb_id1);
+
+	d->fb_id2 = igt_create_pattern_fb(d->drm_fd,
+					  mode1->hdisplay, mode1->vdisplay,
+					  DRM_FORMAT_XRGB8888,
+

LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d)

Quoted 3 lines
tests/kms_plane_scaling.c +3 -0
+					  &d->fb2);
+	igt_assert(d->fb_id2);
+	d->fb_id3 = igt_create_pattern_fb(d->drm_fd, mode2->hdisplay,

mode2->vdisplay,

tests/kms_plane_scaling.c

Quoted 2 lines
tests/kms_plane_scaling.c +2 -0
+					DRM_FORMAT_XRGB8888,
+
	LOCAL_I915_FORMAT_MOD_Y_TILED, /* tiled */

tests/kms_plane_scaling.c static void test_plane_scaling(data_t *d) · line 707

Quoted 7 lines
tests/kms_plane_scaling.c +7 -0
+					&d->fb3);
+	igt_assert(d->fb_id3);
+
+	d->fb_id4 = igt_create_pattern_fb(d->drm_fd,
+					  mode2->hdisplay, mode2->vdisplay,
+					  DRM_FORMAT_XRGB8888,
+

LOCAL_DRM_FORMAT_MOD_NONE, /* tiled */

Quoted 71 lines
tests/kms_plane_scaling.c +13 -0
+					  &d->fb4);
+	igt_assert(d->fb_id4);
+	/* Set up display with plane 1 */
+	igt_plane_set_fb(d->plane1, &d->fb1);
+	igt_plane_set_fb(d->plane2, &d->fb2);
+	igt_plane_set_fb(d->plane3, &d->fb3);
+	igt_plane_set_fb(d->plane4, &d->fb4);
+
+	/* plane upscaling  on 2 planes*/
+	igt_fb_set_position(&d->fb1, d->plane1, 0, 0);
+	igt_fb_set_size(&d->fb1, d->plane1, 300, 300);
+	igt_plane_set_position(d->plane1, 100, 100);
+	igt_plane_set_size(d->plane1, mode1->hdisplay - 100, mode1-

vdisplay
+- 50);

tests/kms_plane_scaling.c +3 -0
+
+	igt_fb_set_position(&d->fb2, d->plane2, 100, 100);
+	igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width - 100, d-

fb2.height - 100);

tests/kms_plane_scaling.c +9 -0
+	igt_plane_set_position(d->plane2, 100, 100);
+	/* downscale by 50 pixels*/
+	igt_plane_set_size(d->plane2, d->fb2.width - 150, d->fb2.height -
+150);
+
+	igt_fb_set_position(&d->fb3, d->plane3, 0, 0);
+	igt_fb_set_size(&d->fb3, d->plane3, 400, 400);
+	igt_plane_set_position(d->plane3, 100, 100);
+	igt_plane_set_size(d->plane3, mode2->hdisplay - 50, mode2-

vdisplay
+- 50);

tests/kms_plane_scaling.c +3 -0
+
+	igt_fb_set_position(&d->fb4, d->plane4, 100, 100);
+	igt_fb_set_size(&d->fb2, d->plane4, d->fb4.width - 100, d-

fb4.height - 100);

tests/kms_plane_scaling.c +33 -0
+	igt_plane_set_position(d->plane4, 100, 100);
+	/* downscale by 50 pixels*/
+	igt_plane_set_size(d->plane4, d->fb4.width - 150, d->fb4.height -
+150);
+
+	igt_display_commit2(display, COMMIT_ATOMIC);
+	/* disbale above 4 planes*/
+	igt_plane_set_fb(d->plane1, NULL);
+	igt_plane_set_position(d->plane1, 0, 0);
+	igt_plane_set_fb(d->plane2, NULL);
+	igt_plane_set_position(d->plane2, 0, 0);
+	igt_plane_set_fb(d->plane3, NULL);
+	igt_plane_set_position(d->plane3, 0, 0);
+	igt_plane_set_fb(d->plane4, NULL);
+	igt_plane_set_position(d->plane4, 0, 0);
+	if (d->fb_id1) {
+		igt_remove_fb(d->drm_fd, &d->fb1);
+		d->fb_id1 = 0;
+	}
+	if (d->fb_id2) {
+		igt_remove_fb(d->drm_fd, &d->fb2);
+		d->fb_id2 = 0;
+	}
+	if (d->fb_id3) {
+		igt_remove_fb(d->drm_fd, &d->fb3);
+		d->fb_id3 = 0;
+	}
+	if (d->fb_id4) {
+		igt_remove_fb(d->drm_fd, &d->fb4);
+		d->fb_id4 = 0;
+	}
+}
+igt_main
 {
 	data_t data = {};

tests/kms_plane_scaling.c igt_simple_main · line 770

Quoted 6 lines
tests/kms_plane_scaling.c +1 -0
@@ -308,11 +765,26 @@ igt_simple_main
 	data.drm_fd = drm_open_driver(DRIVER_INTEL);
 	igt_require_pipe_crc(data.drm_fd);
 	igt_display_init(&data.display, data.drm_fd);
+	igt_require(data.display.is_atomic);
 	data.devid = intel_get_drm_devid(data.drm_fd);
 

The CI results are cut off before the important parts that state what's wrong here. The test that fails is igt_command_line.sh. You can run the script directly yourself to see the output.

Quoted 4 lines

You're changing a test-without-subtests to one with subtests, and that means you need to do stuff like drm_open_driver() inside an igt_fixture.

Thank you very much. I will include things you mentioned to see if it runs clearly.

Regards
Vidya

Quoted 30 lines

--
Petri Latvala

Quoted 25 lines
tests/kms_plane_scaling.c +16 -3
 	data.num_scalers = intel_gen(data.devid) >= 9 ? 2 : 0;
 
-	test_plane_scaling(&data);
-
+	//test_plane_scaling(&data);
+	igt_subtest_f("scaler_with_pixel_format") {
+		test_scaler_with_pixel_format(&data);
+	}
+	igt_subtest_f("scaler_with_rotation") {
+		test_scaler_with_rotation(&data);
+	}
+	igt_subtest_f("scaler_with_multiple_planes") {
+		test_scaler_with_multiple_planes(&data);
+	}
+	igt_subtest_f("scaler_with_clipping_clamping") {
+		test_scaler_with_clipping_clamping_scenario(&data);
+	}
+	igt_subtest_f("scaler_with_multi_pipe_plane") {
+		test_scaler_with_multi_pipe_plane(&data);
+	}
 	igt_display_fini(&data.display);
 }
--

2.7.4

Quoted 4 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw
In reply to Vidya Srinivas

Somehow I forgot to send out my irc feedback to the m-l.

Quoted 21 lines · Vidya Srinivas
tests/kms_plane_scaling.c +8 -2
+igt_main
 {
        data_t data = {};
@@ -308,11 +765,26 @@ igt_simple_main
        data.drm_fd = drm_open_driver(DRIVER_INTEL);
        igt_require_pipe_crc(data.drm_fd);
        igt_display_init(&data.display, data.drm_fd);
+       igt_require(data.display.is_atomic);
        data.devid = intel_get_drm_devid(data.drm_fd);
 
        data.num_scalers = intel_gen(data.devid) >= 9 ? 2 : 0;
 
-       test_plane_scaling(&data);
-
+       //test_plane_scaling(&data);
+       igt_subtest_f("scaler_with_pixel_format") {
+               test_scaler_with_pixel_format(&data);
+       }
+       igt_subtest_f("scaler_with_rotation") {
+               test_scaler_with_rotation(&data);

tests/kms_plane_scaling.c igt_simple_main · line 788

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+       }
+       igt_subtest_f("scaler_with_multiple_planes") {
+               test_scaler_with_multiple_planes(&data);
+       }
+       igt_subtest_f("scaler_with_clipping_clamping") {
+               test_scaler_with_clipping_clamping_scenario(&data);
+       }
+       igt_subtest_f("scaler_with_multi_pipe_plane") {
+               test_scaler_with_multi_pipe_plane(&data);
+       }

Commenting out the existing testcase and replacing it with new ones entirely, without explaining what's wrong with the old one, or removing it (we have git for source control, not comments), and how new tests are better isn't how we do things. Presumably the existing tests once worked, so the first step should be to fix that up first and explain why the changes are necessary. When this code was typed 2 years ago someone put some thought into it, throwing all that work away isn't good.

And _then_ (in follow-up patches) fix the gaps in test coverage.

Thanks, Daniel

Quoted 9 lines
tests/kms_plane_scaling.c +0 -1
        igt_display_fini(&data.display);
 }
--

2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw
Quoted 55 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Vetter
Sent: Monday, November 27, 2017 2:47 PM
To: Srinivas, Vidya <[email protected]>
Cc: intel-gfx <[email protected]>
Subject: Re: [Intel-gfx] [PATCH i-g-t] i-g-t: kms_plane_scaling: Enhanced scaling tests

Somehow I forgot to send out my irc feedback to the m-l.

Quoted 21 lines · Vidya Srinivas
tests/kms_plane_scaling.c +8 -2
+igt_main
 {
        data_t data = {};
@@ -308,11 +765,26 @@ igt_simple_main
        data.drm_fd = drm_open_driver(DRIVER_INTEL);
        igt_require_pipe_crc(data.drm_fd);
        igt_display_init(&data.display, data.drm_fd);
+       igt_require(data.display.is_atomic);
        data.devid = intel_get_drm_devid(data.drm_fd);
 
        data.num_scalers = intel_gen(data.devid) >= 9 ? 2 : 0;
 
-       test_plane_scaling(&data);
-
+       //test_plane_scaling(&data);
+       igt_subtest_f("scaler_with_pixel_format") {
+               test_scaler_with_pixel_format(&data);
+       }
+       igt_subtest_f("scaler_with_rotation") {
+               test_scaler_with_rotation(&data);

tests/kms_plane_scaling.c igt_simple_main · line 788

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+       }
+       igt_subtest_f("scaler_with_multiple_planes") {
+               test_scaler_with_multiple_planes(&data);
+       }
+       igt_subtest_f("scaler_with_clipping_clamping") {
+               test_scaler_with_clipping_clamping_scenario(&data);
+       }
+       igt_subtest_f("scaler_with_multi_pipe_plane") {
+               test_scaler_with_multi_pipe_plane(&data);
+       }

Commenting out the existing testcase and replacing it with new ones entirely, without explaining what's wrong with the old one, or removing it (we have git for source control, not comments), and how new tests are better isn't how we do things. Presumably the existing tests once worked, so the first step should be to fix that up first and explain why the changes are necessary. When this code was typed 2 years ago someone put some thought into it, throwing all that work away isn't good.

Quoted 3 lines

And _then_ (in follow-up patches) fix the gaps in test coverage.

Thanks, Daniel

Thank you. I think the explanation was missing. This test with format will enhance the existing cases. I will work on these and re-submit the same.

Regards
Vidya

Quoted 12 lines
Quoted 9 lines
(quoted diff) +0 -1
        igt_display_fini(&data.display);  }
--

2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Quoted 4 lines

--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw
Quoted 26 lines · Vidya
Quoted 26 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Vetter
Sent: Monday, November 27, 2017 2:47 PM
To: Srinivas, Vidya <[email protected]>
Cc: intel-gfx <[email protected]>
Subject: Re: [Intel-gfx] [PATCH i-g-t] i-g-t: kms_plane_scaling: Enhanced scaling tests

Somehow I forgot to send out my irc feedback to the m-l.

Quoted 11 lines · Vidya Srinivas
tests/kms_plane_scaling.c +2 -0
+igt_main
 {
        data_t data = {};
@@ -308,11 +765,26 @@ igt_simple_main
        data.drm_fd = drm_open_driver(DRIVER_INTEL);
        igt_require_pipe_crc(data.drm_fd);
        igt_display_init(&data.display, data.drm_fd);
+       igt_require(data.display.is_atomic);
        data.devid = intel_get_drm_devid(data.drm_fd);
 
Quoted 5 lines
Quoted 5 lines

tests/kms_plane_scaling.c igt_simple_main · line 773

Quoted 5 lines
tests/kms_plane_scaling.c +1 -2
        data.num_scalers = intel_gen(data.devid) >= 9 ? 2 : 0;
 
-       test_plane_scaling(&data);
-
+       //test_plane_scaling(&data);

You're commenting out the existing testcase ...

Quoted 24 lines
Quoted 24 lines
Quoted 5 lines
tests/kms_plane_scaling.c +5 -0
+       igt_subtest_f("scaler_with_pixel_format") {
+               test_scaler_with_pixel_format(&data);
+       }
+       igt_subtest_f("scaler_with_rotation") {
+               test_scaler_with_rotation(&data);

tests/kms_plane_scaling.c igt_simple_main · line 788

Quoted 10 lines
tests/kms_plane_scaling.c +10 -0
+       }
+       igt_subtest_f("scaler_with_multiple_planes") {
+               test_scaler_with_multiple_planes(&data);
+       }
+       igt_subtest_f("scaler_with_clipping_clamping") {
+               test_scaler_with_clipping_clamping_scenario(&data);
+       }
+       igt_subtest_f("scaler_with_multi_pipe_plane") {
+               test_scaler_with_multi_pipe_plane(&data);
+       }

Commenting out the existing testcase and replacing it with new ones entirely, without explaining what's wrong with the old one, or removing it (we have git for source control, not comments), and how new tests are better isn't how we do things. Presumably the existing tests once worked, so the first step should be to fix that up first and explain why the changes are necessary. When this code was typed 2 years ago someone put some thought into it, throwing all that work away isn't good.

Quoted 6 lines
Quoted 3 lines

And _then_ (in follow-up patches) fix the gaps in test coverage.

Thanks, Daniel

Thank you. I think the explanation was missing. This test with format will enhance the existing cases. I will work on these and re-submit the same.

Which means it's not enhancing it, it's outright remove it and replacing with something new. Either you need to show that the existing testcase is totally broken (with a patch that removes it and explain why it's unfixable).

Or (and that's really the preferred thing), patch 1 in this series fixes up the existing test as the first step.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx