diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2019-03-27 21:53:09 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2019-03-29 22:22:29 +0200 |
commit | 1ac3264e0370134d06e2cff211c0da4aa5c7d83b (patch) | |
tree | 220411609ecd36aa33ee9be1f040bf65652e64e9 /tests/kms_rmfb.c | |
parent | 368a073932559c451d78a16075de9c4b7080d9cf (diff) |
tests/kms_rmfb: Ignore plane configuration errors
We may not be able to turn on all the planes (eg. due to memory
bandwidth limitations). Let's accept that fact and simply turn
on as many planes as we can.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/kms_rmfb.c')
-rw-r--r-- | tests/kms_rmfb.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/kms_rmfb.c b/tests/kms_rmfb.c index b1c81cb8..a7fcab87 100644 --- a/tests/kms_rmfb.c +++ b/tests/kms_rmfb.c @@ -58,6 +58,7 @@ test_rmfb(struct rmfb_data *data, igt_output_t *output, enum pipe pipe, bool reo igt_plane_t *plane; drmModeCrtc *crtc; uint64_t cursor_width, cursor_height; + int num_active_planes = 0; igt_output_set_pipe(output, pipe); @@ -85,8 +86,25 @@ test_rmfb(struct rmfb_data *data, igt_output_t *output, enum pipe pipe, bool reo } else { igt_plane_set_fb(plane, &fb); } + + if (igt_display_try_commit2(&data->display, data->display.is_atomic ? + COMMIT_ATOMIC : COMMIT_LEGACY)) { + /* + * Disable any plane that fails (presumably + * due to exceeding some hardware limit). + */ + igt_plane_set_fb(plane, NULL); + } else { + num_active_planes++; + } } + /* + * Make sure we were able to enable at least one + * plane so that we actually test something. + */ + igt_assert_lt(0, num_active_planes); + igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY); crtc = drmModeGetCrtc(data->drm_fd, output->config.crtc->crtc_id); |