From 6de9736394242f207a43e828a8236e4f63c16e03 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 24 Jun 2013 12:03:54 +0100 Subject: [PATCH] tests/kms_flip: Suppress failure from setting mode We may fail to set a mode if it fails some hidden constraints, such as bandwidth on the third pipe. This is expected, so skip testing such modes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66111 Signed-off-by: Chris Wilson --- tests/kms_flip.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index aeeaacef..8e49f050 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1016,10 +1016,15 @@ static void run_test_on_crtc(struct test_output *o, int crtc_idx, int duration) kmstest_dump_mode(&o->mode); if (drmModeSetCrtc(drm_fd, o->crtc, o->fb_ids[0], 0, 0, &o->id, 1, &o->mode)) { - fprintf(stderr, "failed to set mode (%dx%d@%dHz): %s\n", - o->fb_width, o->fb_height, o->mode.vrefresh, - strerror(errno)); - exit(3); + /* We may fail to apply the mode if there are hidden + * constraints, such as bandwidth on the third pipe. + */ + if (0) { + fprintf(stderr, "failed to set mode (%dx%d@%dHz): %s\n", + o->fb_width, o->fb_height, o->mode.vrefresh, + strerror(errno)); + } + goto out; } assert(fb_is_bound(o, o->fb_ids[0])); @@ -1050,6 +1055,7 @@ static void run_test_on_crtc(struct test_output *o, int crtc_idx, int duration) fprintf(stdout, "\n%s on crtc %d, connector %d: PASSED\n\n", o->test_name, o->crtc, o->id); +out: kmstest_remove_fb(drm_fd, &o->fb_info[2]); kmstest_remove_fb(drm_fd, &o->fb_info[1]); kmstest_remove_fb(drm_fd, &o->fb_info[0]);