From patchwork Mon Mar 4 15:29:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837951 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4A8713B5 for ; Mon, 4 Mar 2019 15:29:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9908298A7 for ; Mon, 4 Mar 2019 15:29:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A946B2A1E5; Mon, 4 Mar 2019 15:29:06 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,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 449A0298A7 for ; Mon, 4 Mar 2019 15:29:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F56C89CFA; Mon, 4 Mar 2019 15:29:05 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4831D89CF2; Mon, 4 Mar 2019 15:29:04 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id p25so5533602qtb.3; Mon, 04 Mar 2019 07:29:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=BaWk+bCnol7WOJ9uLkogdNZoDRwUOOQ+535Lh7OOKnc=; b=gXAaAy2t1LrXzq7+ulQU7uv9bbOWvyicpatgoiVE5VzsBi7ayIHKWLnoeEcMtr4j1q 9mZH1tRL7Oof+XXBuCBCHovBS3dOppnDhrOC/WpXbEvMNQVeEmREdcY8bf6oM1psgT60 aNSA8s/UrOcg8PxR4LHsaWb41b0GTsMSOloTrNGwJn7Hc6vzfiX5UOWG7D/tcExtrbzd +G78e81HHT+nwC5kxK0/ESi6otGLzsdmHw5gsGNSAEPE6hd/wuQEASKZQjsRPpKZImkj +a5X2XJVdeG+B5j00gEvStx46JCDqUGhzostFL4OcK6usfd6jn93I1lRi0vOFg/7B7ZO IahA== X-Gm-Message-State: APjAAAUEHa3gSybp/h++ggCNEIA/IncwC7MYX7ZqPegxGDekJv/ejWAo B4Y7jYJlFFk87dPmMr+jEXQ= X-Google-Smtp-Source: APXvYqxv7juNh5XO8yySqVIoo9fRiKOM6m/yla1xWMgFsSX/fqAjCphpRyGLa9iqid562E3627ayOg== X-Received: by 2002:a0c:e7cc:: with SMTP id c12mr14537875qvo.169.1551713343420; Mon, 04 Mar 2019 07:29:03 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id s49sm4022039qtk.7.2019.03.04.07.29.01 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:29:02 -0800 (PST) Date: Mon, 4 Mar 2019 12:29:00 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: MIME-Version: 1.0 User-Agent: NeoMutt/20180716 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=BaWk+bCnol7WOJ9uLkogdNZoDRwUOOQ+535Lh7OOKnc=; b=qw7r+0k6Xv9uzhv8LCp2ZdhDvo2HSgp2CMAdiIlFTeHcQemmIMScx4NWPHDr524fZM 5djRZJtHPFBRMiRm36Wcq9IWMcZi2gh7D52o0tD0rp02uHpkdmDjLhWJgguQG9sIvQ+J lL2kGsk6jcT7bgzWkM5gm13hQvtXSZuJ2/fiys/bCJh3zjgUajHDifEzaGOUhwexmDSE t573A1y0OwugcCpv7ifdp+7bZJ/iXHxhvwV/JFj7mOQfEUae/WOEc1pvEi82eMXzgpql 0/CXdOJ0hv+0i/D68M1itJGE5aNkRlnZZoLu4RzHSFQUjxkBwsgfvhRw/h37mGhyegc4 jJTQ== Subject: [Intel-gfx] [PATCH i-g-t 0/7] kms_flip: cleanups X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP The last few weeks, I have been dive into the page flip and vblank with the goal to learn how the user space interact with DRM; because of this, I am studying the kms_flip code. As a result, I noticed a bunch of cleanups that could be useful for improving the overall quality of kms_flip. This patchset can be seen in two parts: 1. Eliminates unreachable tests 2. Basic cleanups with the goal to improve the code readability In particular, the patch number three enables kms_flip to work without any issue in any non-intel drivers. Rodrigo Siqueira (7): kms_flip: Removes unreachable code related to TEST_RPM kms_flip: Removes unreachable code related to TEST_TS_CONT kms_flip: Fix warning related to i915 gem dependence kms_flip: Remove unreachable condition in wait_for_events kms_flip: remove magic constant in run_test_on_crtc_set() kms_flip: Rework set_mode() kms_flip: Standardize return value for fb_is_bound tests/kms_flip.c | 88 +++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 57 deletions(-)