All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_atomic_transition: Do not timeout when number of sprites is huge, v2.
@ 2018-11-01 16:29 Maarten Lankhorst
  2018-11-01 17:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Maarten Lankhorst @ 2018-11-01 16:29 UTC (permalink / raw)
  To: igt-dev

We mostly care about the plane type, because sometimes the driver may
do silly things when only a cursor is enabled for example, so we reduce
the number of tests. This puts an upper bound on the number of plane
combinations being tested, which is nice for gen11.

Changes since v1:
- Make 2 groups for overlay planes, and randomly put planes in either group.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 tests/kms_atomic_transition.c | 43 +++++++++++++++++++++++++++++------
 1 file changed, 36 insertions(+), 7 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 65ff75493990..ae9899df791e 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -41,7 +41,7 @@
 
 struct plane_parms {
 	struct igt_fb *fb;
-	uint32_t width, height;
+	uint32_t width, height, mask;
 };
 
 /* globals for fence support */
@@ -131,7 +131,7 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe,
 	for_each_plane_on_pipe(display, pipe, plane) {
 		int i = plane->index;
 
-		if (!((1 << plane->index) & mask)) {
+		if (mask && (parms[i].mask & mask)) {
 			if (plane->values[IGT_PLANE_FB_ID])
 				igt_plane_set_fb(plane, NULL);
 			continue;
@@ -192,13 +192,16 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
 			struct igt_fb *primary_fb,
 			struct igt_fb *argb_fb,
 			struct igt_fb *sprite_fb,
-			struct plane_parms *parms)
+			struct plane_parms *parms,
+			unsigned *iter_max)
 {
 	uint64_t cursor_width, cursor_height;
 	unsigned sprite_width, sprite_height, prev_w, prev_h;
 	bool max_sprite_width, max_sprite_height, alpha = true;
 	uint32_t n_planes = display->pipes[pipe].n_planes;
+	uint32_t n_overlays = 0, overlays[n_planes];
 	igt_plane_t *plane;
+	uint32_t iter_mask = 3;
 
 	do_or_die(drmGetCap(display->drm_fd, DRM_CAP_CURSOR_WIDTH, &cursor_width));
 	if (cursor_width >= mode->hdisplay)
@@ -215,12 +218,37 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
 			parms[i].fb = primary_fb;
 			parms[i].width = mode->hdisplay;
 			parms[i].height = mode->vdisplay;
+			parms[i].mask = 1 << 0;
 		} else if (plane->type == DRM_PLANE_TYPE_CURSOR) {
 			parms[i].fb = argb_fb;
 			parms[i].width = cursor_width;
 			parms[i].height = cursor_height;
-		} else
+			parms[i].mask = 1 << 1;
+		} else {
 			parms[i].fb = sprite_fb;
+			parms[i].mask = 1 << 2;
+
+			iter_mask |= 1 << 2;
+
+			overlays[n_overlays++] = i;
+		}
+	}
+
+	if (n_overlays >= 2) {
+		uint32_t i;
+
+		/*
+		 * Create 2 groups for overlays, make sure 1 plane is put
+		 * in each then spread the rest out.
+		 */
+		iter_mask |= 1 << 3;
+		parms[overlays[n_overlays - 1]].mask = 1 << 3;
+
+		for (i = 1; i < n_overlays - 1; i++) {
+			int val = hars_petruska_f54_1_random_unsafe_max(2);
+
+			parms[overlays[i]].mask = 1 << (2 + val);
+		}
 	}
 
 	igt_create_fb(display->drm_fd, cursor_width, cursor_height,
@@ -229,7 +257,8 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
 	igt_create_fb(display->drm_fd, cursor_width, cursor_height,
 		      DRM_FORMAT_ARGB8888, LOCAL_DRM_FORMAT_MOD_NONE, sprite_fb);
 
-	if (n_planes < 3)
+	*iter_max = iter_mask + 1;
+	if (!n_overlays)
 		return;
 
 	/*
@@ -390,7 +419,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
 	drmModeModeInfo *mode, override_mode;
 	igt_plane_t *plane;
 	igt_pipe_t *pipe_obj = &display->pipes[pipe];
-	uint32_t iter_max = 1 << pipe_obj->n_planes, i;
+	uint32_t iter_max, i;
 	struct plane_parms parms[pipe_obj->n_planes];
 	unsigned flags = 0;
 	int ret;
@@ -428,7 +457,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
 
 	igt_display_commit2(display, COMMIT_ATOMIC);
 
-	setup_parms(display, pipe, mode, &fb, &argb_fb, &sprite_fb, parms);
+	setup_parms(display, pipe, mode, &fb, &argb_fb, &sprite_fb, parms, &iter_max);
 
 	/*
 	 * In some configurations the tests may not run to completion with all
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_atomic_transition: Do not timeout when number of sprites is huge, v2.
  2018-11-01 16:29 [igt-dev] [PATCH i-g-t] tests/kms_atomic_transition: Do not timeout when number of sprites is huge, v2 Maarten Lankhorst
@ 2018-11-01 17:28 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2018-11-01 17:28 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: igt-dev

== Series Details ==

Series: tests/kms_atomic_transition: Do not timeout when number of sprites is huge, v2.
URL   : https://patchwork.freedesktop.org/series/51887/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
ace031dcb1e8bf2b32b4b0d54a55eb30e8f41d6f lib: Help static analyzers figure out the execution flow

ninja: Entering directory `build'
[1/342] Generating version.h with a custom command.
[2/248] Linking target tests/kms_atomic_transition.
FAILED: tests/kms_atomic_transition 
ccache cc  -o tests/kms_atomic_transition 'tests/kms_atomic_transition@exe/kms_atomic_transition.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group lib/libigt.so -pthread -lcairo -lglib-2.0 -L/opt/igt/lib -ldrm -lkmod -lprocps -ludev -ldw -lelf -lpciaccess -lm -lrt -lssl -lcrypto -lpixman-1 -L/opt/igt/lib -ldrm_intel -ldrm -lunwind -lgsl -lgslcblas -lm -L/usr/lib/x86_64-linux-gnu -lxmlrpc_client -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lcurl -Wl,--end-group -ldrm_nouveau -L/usr/lib/x86_64-linux-gnu -lxmlrpc_client -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lcurl '-Wl,-rpath,$ORIGIN/../lib:XXXXXXXXXXXXXXXXXXXX' -Wl,-rpath-link,/home/cidrm/igt-gpu-tools/build/lib  
tests/kms_atomic_transition@exe/kms_atomic_transition.c.o: In function `setup_parms':
/home/cidrm/igt-gpu-tools/build/../tests/kms_atomic_transition.c:248: undefined reference to `hars_petruska_f54_1_random_unsafe_max'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-01 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-01 16:29 [igt-dev] [PATCH i-g-t] tests/kms_atomic_transition: Do not timeout when number of sprites is huge, v2 Maarten Lankhorst
2018-11-01 17:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.