public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_concurrent: Allow the test to proceed with fewer planes
@ 2019-04-02 13:08 Ville Syrjala
  2019-04-02 14:01 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Ville Syrjala @ 2019-04-02 13:08 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We may not be able to enable all the planes simultaneously. In that
case just keep going with fewer planes. The test already requires
atomic so let's use TEST_ONLY unconditionally.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/kms_concurrent.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index 117016dc44e8..d82ca0404839 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -184,6 +184,7 @@ prepare_planes(data_t *data, enum pipe pipe, int max_planes,
 	y[primary->index] = 0;
 	for (i = 0; i < max_planes; i++) {
 		igt_plane_t *plane = igt_output_get_plane(output, i);
+		int ret;
 
 		if (plane->type == DRM_PLANE_TYPE_PRIMARY)
 			continue;
@@ -206,7 +207,18 @@ prepare_planes(data_t *data, enum pipe pipe, int max_planes,
 
 		igt_plane_set_position(data->plane[i], x[i], y[i]);
 		igt_plane_set_fb(data->plane[i], &data->fb[i]);
+
+		ret = igt_display_try_commit_atomic(&data->display, DRM_MODE_ATOMIC_TEST_ONLY, NULL);
+		if (ret) {
+			igt_plane_set_fb(data->plane[i], NULL);
+			igt_remove_fb(data->drm_fd, &data->fb[i]);
+			data->plane[i] = NULL;
+			break;
+		}
 	}
+	max_planes = i;
+
+	igt_assert_lt(0, max_planes);
 
 	/* primary plane */
 	data->plane[primary->index] = primary;
-- 
2.19.2

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

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

end of thread, other threads:[~2019-04-03  8:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-02 13:08 [igt-dev] [PATCH i-g-t] tests/kms_concurrent: Allow the test to proceed with fewer planes Ville Syrjala
2019-04-02 14:01 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-04-02 17:49 ` [igt-dev] [PATCH i-g-t] " Souza, Jose
2019-04-02 21:21 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
2019-04-03  0:28   ` Souza, Jose
2019-04-03  8:36     ` Daniel Vetter
2019-04-03  8:48       ` Daniel Vetter
2019-04-03  8:35 ` [igt-dev] [PATCH i-g-t] " Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox