diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2019-04-02 16:08:37 +0300 |
---|---|---|
committer | José Roberto de Souza <jose.souza@intel.com> | 2019-04-02 17:26:13 -0700 |
commit | 6285eec4f3b8f21833d9d2d852883569d6551822 (patch) | |
tree | fa9d48ba9e358310e97d006d8ec04330c0a1b1f9 | |
parent | e941e4a29438c7130554492e4daf52afbc99ffdf (diff) |
tests/kms_concurrent: Allow the test to proceed with fewer planes
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.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
-rw-r--r-- | tests/kms_concurrent.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c index 117016dc..d82ca040 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; |