From patchwork Wed Jan 3 09:19:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 10141891 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CFE99601A1 for ; Wed, 3 Jan 2018 09:19:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B521B28F49 for ; Wed, 3 Jan 2018 09:19:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9A3B28F70; Wed, 3 Jan 2018 09:19:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B12E228F49 for ; Wed, 3 Jan 2018 09:19:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5835D89DB4; Wed, 3 Jan 2018 09:19:20 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mblankhorst.nl (mblankhorst.nl [141.105.120.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD0E689DB4 for ; Wed, 3 Jan 2018 09:19:18 +0000 (UTC) From: Maarten Lankhorst To: intel-gfx@lists.freedesktop.org Date: Wed, 3 Jan 2018 10:19:14 +0100 Message-Id: <20180103091914.63440-1-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.15.1 Subject: [Intel-gfx] [PATCH i-g-t] kms_atomic_transition: Remove skip_on_unsupported_nonblocking_modeset. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This weas a workaround to gracefully skip on i915 before nonblocking modeset support was added, but this is no longer needed. Remove the code, since it's safe to always assume such support is enabled. Signed-off-by: Maarten Lankhorst Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104471 Reviewed-by: Marta Lofstedt --- tests/kms_atomic_transition.c | 47 ------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c index 54581ed7cd96..798639393421 100644 --- a/tests/kms_atomic_transition.c +++ b/tests/kms_atomic_transition.c @@ -148,33 +148,6 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe, } } -static bool skip_on_unsupported_nonblocking_modeset(igt_display_t *display) -{ - enum pipe pipe; - int ret; - - /* - * Make sure we only skip when the suggested configuration is - * unsupported by committing it first with TEST_ONLY, if it's - * unsupported -EINVAL is returned. If the second commit returns - * -EINVAL, it's from not being able to support nonblocking modeset. - */ - igt_display_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL); - - ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET | DRM_MODE_ATOMIC_NONBLOCK, NULL); - - if (ret == -EINVAL) - return true; - - igt_assert_eq(ret, 0); - - /* Force the next state to update all crtc's, to synchronize with the nonblocking modeset. */ - for_each_pipe(display, pipe) - igt_pipe_refresh(display, pipe, false); - - return false; -} - static void ev_page_flip(int fd, unsigned seq, unsigned tv_sec, unsigned tv_usec, void *user_data) { igt_debug("Retrieved vblank seq: %u on unk\n", seq); @@ -421,7 +394,6 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output igt_pipe_t *pipe_obj = &display->pipes[pipe]; uint32_t iter_max = 1 << pipe_obj->n_planes, i; struct plane_parms parms[pipe_obj->n_planes]; - bool skip_test = false; unsigned flags = 0; int ret; @@ -448,10 +420,6 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output wm_setup_plane(display, pipe, 0, NULL, false); if (flags & DRM_MODE_ATOMIC_ALLOW_MODESET) { - skip_test = nonblocking && skip_on_unsupported_nonblocking_modeset(display); - if (skip_test) - goto cleanup; - igt_output_set_pipe(output, PIPE_NONE); igt_display_commit2(display, COMMIT_ATOMIC); @@ -594,8 +562,6 @@ cleanup: igt_remove_fb(display->drm_fd, &fb); igt_remove_fb(display->drm_fd, &argb_fb); igt_remove_fb(display->drm_fd, &sprite_fb); - if (skip_test) - igt_skip("Atomic nonblocking modesets are not supported.\n"); } static void commit_display(igt_display_t *display, unsigned event_mask, bool nonblocking) @@ -719,7 +685,6 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 }; igt_output_t *output; unsigned width = 0, height = 0; - bool skip_test = false; for_each_connected_output(display, output) { drmModeModeInfo *mode = igt_output_get_mode(output); @@ -763,13 +728,6 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock igt_plane_set_fb(plane, NULL); } - /* - * When i915 supports nonblocking modeset, this if branch can be removed. - * It's only purpose is to ensure nonblocking modeset works. - */ - if (nonblocking && (skip_test = skip_on_unsupported_nonblocking_modeset(display))) - goto cleanup; - igt_display_commit2(display, COMMIT_ATOMIC); for (i = 0; i < iter_max; i++) { @@ -832,7 +790,6 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock } } -cleanup: set_combinations(display, 0, NULL); igt_display_commit2(display, COMMIT_ATOMIC); @@ -842,10 +799,6 @@ cleanup: igt_remove_fb(display->drm_fd, &fbs[1]); igt_remove_fb(display->drm_fd, &fbs[0]); - - if (skip_test) - igt_skip("Atomic nonblocking modesets are not supported.\n"); - } static void run_modeset_transition(igt_display_t *display, int requested_outputs, bool nonblocking, bool fencing)