From patchwork Mon Mar 4 15:29:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837955 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 B596E13B5 for ; Mon, 4 Mar 2019 15:29:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A02672A563 for ; Mon, 4 Mar 2019 15:29:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 918E02A569; Mon, 4 Mar 2019 15:29:32 +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 15B122A563 for ; Mon, 4 Mar 2019 15:29:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C07789D39; Mon, 4 Mar 2019 15:29:31 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by gabe.freedesktop.org (Postfix) with ESMTPS id BFC9A89D30; Mon, 4 Mar 2019 15:29:30 +0000 (UTC) Received: by mail-qk1-x742.google.com with SMTP id x9so2997195qkf.0; Mon, 04 Mar 2019 07:29:30 -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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=er7v9h0f88sjdEl8aBU/QQvAFBwpbZhoaNHNPlBMCMc=; b=E3t3dPHHeZwvIax3rvXyjww9V30V2ii0xwBy7SLgvU4yM6sP4fMZgrooDKfwWtw9Nk 1ocDeORKFVUN2ASVh0SwIP4sudee6vUiF5AC1FU7X+VHFGIW/DTfRICx2MgGuH+CFDVk VWehlWe8MoKpg2cZYhejchuu6SM5OI/VmN14nYPUpnnYXoqLF9ct/V53iaJSBdP7x417 mai9LhO7V3mHK47h3eMvn3TWr+fWehuVJFTnj3XApPcc+7nRKdowIi8jRsmtkk5cUphr 5cFyVC3FUFE7xwnobs2vBdf2dJNDhx/GUAjb1U0pU2ncIcexlHKKHBs1ImVZpLQNTm1Q lDQg== X-Gm-Message-State: APjAAAUKgSaFMKRN2h/BAxR4GQYNrhlDhX9oMtcAf0vsQa5+o/sRiQ3V GvWguL4v3h9phr1O5Nu37v0= X-Google-Smtp-Source: APXvYqxZ/cd+Yy7RdRT+x9ivDDpB1lFW9WlSWY6i/+EUaP1ZYe1IO38NwST8sbEJB8ivS6gTn7VqFA== X-Received: by 2002:a37:83c6:: with SMTP id f189mr13753883qkd.196.1551713369888; Mon, 04 Mar 2019 07:29:29 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id k37sm4151735qtc.91.2019.03.04.07.29.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:29:29 -0800 (PST) Date: Mon, 4 Mar 2019 12:29:27 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: <69730596ecfc3dc7e7ad1e2b8f28e59ca8c72e8e.1551712108.git.rodrigosiqueiramelo@gmail.com> References: MIME-Version: 1.0 In-Reply-To: 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=er7v9h0f88sjdEl8aBU/QQvAFBwpbZhoaNHNPlBMCMc=; b=MiOvZh0MIKLn2pFRBuznM9M7q6lXgeAGYKidnyJhEGgyjvnG5BST9ep8+8fSm0qtRz 2aLYvsvIEmBYkkBXlCS42obOseLUYyMZaA4bpIc6ffQmUcxGtQsRCzEuN2rFnqAfdwqd +kVOrIFA2K5GCiZHzN5MpAEIHmzUQzSdvbDdy+xTL5WETUkLW/Di8bJ0+gw/U4rRpUTg 8w2hmka5SL+7qht5qD8V7dMm6Z9PobF0GCNhREx0l2xQTh7Fs1IqD3M/E+ezKo+sLBTS rsDWY/QGcRFeYmxWMnHbVLLT6oZIXrUqMIuDITPJ7f7WUEbhDazbUGU/SEXp93WD48CV Vjwg== Subject: [Intel-gfx] [PATCH i-g-t 1/7] kms_flip: Removes unreachable code related to TEST_RPM 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 This commit removes the code related to TEST_RPM test because the kms_flip never sets this flags, i.e., TEST_RPM is not used. Take a look at commit 07a3fccf to see why this flag is never set. Signed-off-by: Rodrigo Siqueira --- tests/kms_flip.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 798fc4e8..f769d30e 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -68,7 +68,6 @@ #define TEST_ENOENT (1 << 22) #define TEST_FENCE_STRESS (1 << 23) #define TEST_VBLANK_RACE (1 << 24) -#define TEST_RPM (1 << 25) #define TEST_SUSPEND (1 << 26) #define TEST_TS_CONT (1 << 27) #define TEST_BO_TOOBIG (1 << 28) @@ -809,9 +808,6 @@ static unsigned int run_test_step(struct test_output *o) "failed to disable output: %s\n", strerror(errno)); - if (o->flags & TEST_RPM) - igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED)); - if (o->flags & TEST_SUSPEND) igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE); @@ -1321,9 +1317,6 @@ static int run_test(int duration, int flags) igt_require((flags & TEST_HANG) == 0 || !is_wedged(drm_fd)); - if (flags & TEST_RPM) - igt_require(igt_setup_runtime_pm()); - resources = drmModeGetResources(drm_fd); igt_require(resources); @@ -1570,10 +1563,6 @@ int main(int argc, char **argv) if (tests[i].flags & TEST_NO_2X_OUTPUT) continue; - /* code doesn't disable all crtcs, so skip rpm tests */ - if (tests[i].flags & TEST_RPM) - continue; - igt_subtest_f( "2x-%s", tests[i].name) run_pair(tests[i].duration, tests[i].flags); } @@ -1592,10 +1581,6 @@ int main(int argc, char **argv) if (tests[i].flags & TEST_NO_2X_OUTPUT) continue; - /* code doesn't disable all crtcs, so skip rpm tests */ - if (tests[i].flags & TEST_RPM) - continue; - igt_subtest_f( "2x-%s-interruptible", tests[i].name) run_pair(tests[i].duration, tests[i].flags); } From patchwork Mon Mar 4 15:30:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837957 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 7C7B114DE for ; Mon, 4 Mar 2019 15:30:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 680A12A665 for ; Mon, 4 Mar 2019 15:30:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 665EB2A5EE; Mon, 4 Mar 2019 15:30:07 +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 1FA0A2A66D for ; Mon, 4 Mar 2019 15:30:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8349E89CF2; Mon, 4 Mar 2019 15:30:06 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id D7BC489CF2; Mon, 4 Mar 2019 15:30:04 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id p48so5542741qtk.2; Mon, 04 Mar 2019 07:30: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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HQaC9i3D7rFNagcLTlxsUi8OWHbVxHPTWi0pt5IjTeU=; b=pcEIWZLSmKsvLxuPR6UnJQ0NR8fEELp/Q+kx0Zy2aI+GUrlb7dOguRQchcpQ1QFJgc Vpk26DboREJKZe+eF0CVBdJjtLwIvyMEI/NcuOfl3Pbtvb6O+Ye591CgXAgLGKLp9p/9 8Ncfv8qhk4mHmi5ZH2q2st2O4vQCMU52rg/5D//yZpw0mXx0/ScR+xa0I1VQXc+XNK79 IhizpOgOSSm23IAJ2CzYlz9ZXq4ECqy9i+MZxKitJe4cx5iIAxpEdqUhfYwtpp3NxGmv sv7rN1BC3sGTFfzuYVsjWApSljhyyizShyrYlJ+G8lGVg2JEtyIDRviqyZyvbB0oPLNI IimA== X-Gm-Message-State: APjAAAWa+psxFcCL7FMPshYIQshEOdvu5vukB/yk7wJt/b97HCsYymcs BdySJ1Cqcy/A7ea/DRboVlM= X-Google-Smtp-Source: APXvYqwxCXtw9cEG2DP0RqGeq5/O8YqCPVmWdyl4BW3x6vz3XpRYwQXQemhccZI+xqpkQPrN1lDtqA== X-Received: by 2002:ac8:1c0e:: with SMTP id a14mr14685780qtk.259.1551713403949; Mon, 04 Mar 2019 07:30:03 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id u18sm3635128qka.25.2019.03.04.07.30.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:30:03 -0800 (PST) Date: Mon, 4 Mar 2019 12:30:01 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: <3656fa026ef33f6ce2ddffe9de64b88372df0642.1551712108.git.rodrigosiqueiramelo@gmail.com> References: MIME-Version: 1.0 In-Reply-To: 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HQaC9i3D7rFNagcLTlxsUi8OWHbVxHPTWi0pt5IjTeU=; b=K5tGetj3QIRo4cGSM+EN5SudzroDLezomTfFNWG1HhMIXSJV/OnhPtA4DuABITJ6Jb SbuzbIZlWBmidgRK291zxPaaSJQKeZCe7gHTO6FJy7Zb29h4cYBFdftH4ckxofCvsQcF buFDxHHS6dJMxvQ0iudPkUZyym+h8sNVzbv7qrM2adbOpSx6RhZEAroSfi/FUsI/GJNS Ua9QP+qEw3EFCTHFgpwLrsxC+QskDxNPqrAKvFzTwYa5ZxjiVXzG8gkLWsJxT7bfnBDF b62pcbEx4SyrbPikbmnliFJJKRa/Ym80tpZvuD1dLRBG2uR2QXTatEeOQyxzxIUoOB7H j+gA== Subject: [Intel-gfx] [PATCH i-g-t 2/7] kms_flip: Removes unreachable code related to TEST_TS_CONT 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 This commit removes the code related to TEST_TS_CONT test because the kms_flip never sets this flags, i.e., TEST_TS_CONT is not used. Take a look at commit 07a3fccf to see why this flag is never set. Signed-off-by: Rodrigo Siqueira --- tests/kms_flip.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index f769d30e..0d261b77 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -69,7 +69,6 @@ #define TEST_FENCE_STRESS (1 << 23) #define TEST_VBLANK_RACE (1 << 24) #define TEST_SUSPEND (1 << 26) -#define TEST_TS_CONT (1 << 27) #define TEST_BO_TOOBIG (1 << 28) #define TEST_BASIC (1 << 30) @@ -497,21 +496,6 @@ static void check_state(const struct test_output *o, const struct event_state *e "unexpected %s seq %u, should be >= %u\n", es->name, es->current_seq, es->last_seq + o->seq_step); - /* Check that the vblank frame didn't wrap unexpectedly. */ - if (o->flags & TEST_TS_CONT) { - /* Ignore seq_step here since vblank waits time out immediately - * when we kill the crtc. */ - igt_assert_f(es->current_seq - es->last_seq >= 0, - "unexpected %s seq %u, should be >= %u\n", - es->name, es->current_seq, es->last_seq); - igt_assert_f(es->current_seq - es->last_seq <= 150, - "unexpected %s seq %u, should be < %u\n", - es->name, es->current_seq, es->last_seq + 150); - - igt_debug("testing ts continuity: Current frame %u, old frame %u\n", - es->current_seq, es->last_seq); - } - if (o->flags & TEST_CHECK_TS) { double elapsed, expected; From patchwork Mon Mar 4 15:30:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837961 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 7B0DE14DE for ; Mon, 4 Mar 2019 15:30:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 679532A615 for ; Mon, 4 Mar 2019 15:30:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C2B92A813; Mon, 4 Mar 2019 15:30:36 +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 121672A7BC for ; Mon, 4 Mar 2019 15:30:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F254089D40; Mon, 4 Mar 2019 15:30:34 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id 73AC489D39; Mon, 4 Mar 2019 15:30:33 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id v10so5526656qtp.8; Mon, 04 Mar 2019 07:30:33 -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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=j7Kapi49btjujIG11+00U0SUMjezA3PkQP5wjJqqpCI=; b=gpZ6HF9Zej1VS4XbkbNdgLuMWK4AcGSuxB5d3CZqaA5MonFb0D+EqiMJ2dqk12mTVJ +T34IzIeRsBK/m4jSBAQZJADqnJV3gJyZh7Nm7n89o1hcensIVIN41by2YHm/cBX8osQ /JSJstKKk67FdLsMTU1muRA3L07M7/SUvy4Iimz2rJw/pjtvqMoShE3JN6k5fSNauEru 3JMEeRZ1tbk8as0Ru4sdgC7mDC7Bh6NeTkJJzUkm6sSAbSNZXEfn76M3MP0hFQtSBkfV H6va3BREjDd2bo0qyvLEsiJVkmLjhnQP7IGTsrpX7ACttQjSJOTTnVwGuVoSQyKlBnK/ JFJg== X-Gm-Message-State: APjAAAXGk6nPQtproCuW48GBsELro52wWUGsyUF9xtu7D1SkmjXZFqwB 9dWlKSEXFjef7tuFLI49vGM= X-Google-Smtp-Source: APXvYqzP9/zSzbJxGaNbGpzJBeJZDCIiFQLTUfCW2+aYxue2QL2UcMIyzKGhEYFdzLGLqGpnWrvimA== X-Received: by 2002:a0c:d24a:: with SMTP id o10mr14917814qvh.170.1551713432575; Mon, 04 Mar 2019 07:30:32 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id r22sm3859633qki.43.2019.03.04.07.30.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:30:32 -0800 (PST) Date: Mon, 4 Mar 2019 12:30:30 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: <127b743d899c62b62921dffa629cfcd469390adf.1551712108.git.rodrigosiqueiramelo@gmail.com> References: MIME-Version: 1.0 In-Reply-To: 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=j7Kapi49btjujIG11+00U0SUMjezA3PkQP5wjJqqpCI=; b=tve3dkPOdxQRxcHGRaC7B3AXedAVLJh/O7qKnqGF+gaXFff7BxJoDtNPYQX20SZuJp wC7hx9LHnTPKeh9y3oGsqrb6NfbpbROfb7JvQ+fXjTEgYvwZxs6KgA3AS9KnecA3LCJp GH1xD2TRAdavBckMdRIkSekZnhxpyAtmkbJbcWdlgDSdEiY16EwB8Hu0cwujPbM3GTHm mXClctt1lgK5gurHevrSViQFeIM/2iAbaYbaUg2E8NCHSl69y0ex6HBn0d31pS1Bko+T vDXMna7VaMFrY3tBRgfENtlGnKtbpoPoLDXj9r6As9mv+IH3/SCt+dJNKW1mQS6VqDUi QGXQ== Subject: [Intel-gfx] [PATCH i-g-t 3/7] kms_flip: Fix warning related to i915 gem dependence 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 In the kms_flip tests has an igt_fixture that allocates memory for i915 driver with “drm_intel_bufmgr_gem_init()”, which produces the following warning: IGT-Version: 1.23-g8d81c2c2 (x86_64) (Linux: 5.0.0-rc7-VKMS-RULES+ x86_64) Using monotonic timestamps DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument Assuming 131072kB available aperture size. May lead to reduced performance or incorrect rendering. get chip id failed: -1 [22] This commit handles this specific dependence with the i915 driver which make the kms_flip logs better. Signed-off-by: Rodrigo Siqueira --- tests/kms_flip.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 0d261b77..57138ec1 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1528,10 +1528,12 @@ int main(int argc, char **argv) igt_install_exit_handler(kms_flip_exit_handler); get_timestamp_format(); - bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096); - if (bufmgr) { - devid = intel_get_drm_devid(drm_fd); - batch = intel_batchbuffer_alloc(bufmgr, devid); + if (is_i915_device(drm_fd)) { + bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096); + if (bufmgr) { + devid = intel_get_drm_devid(drm_fd); + batch = intel_batchbuffer_alloc(bufmgr, devid); + } } } From patchwork Mon Mar 4 15:30:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837963 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 6FB3A1515 for ; Mon, 4 Mar 2019 15:31:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B2CE2A829 for ; Mon, 4 Mar 2019 15:31:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 598C62A7E8; Mon, 4 Mar 2019 15:31:02 +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 E9C102A7E8 for ; Mon, 4 Mar 2019 15:31:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1128689D39; Mon, 4 Mar 2019 15:31:01 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id 65CE589CF2; Mon, 4 Mar 2019 15:30:59 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id z39so5549418qtz.0; Mon, 04 Mar 2019 07:30:59 -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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZkdpnZVYNfAgQAMKHbRqhoBfLwsCLPyfS6cPCpX/1KM=; b=trxJM3EawocjKaC5qXDuV3wwM8HPccjbt0Fi1Cvd9FnAb7aUhUIDUPkUe5PrQDb6Bl L5M9DfX7/qyA/tsgOHElfrIEOylErsLsjjRY0cgM8mbBq2fdUwTjxN4jLJcvbxR5X/hK uENnhcWrbeTP5DuSPX8rhzlT7ekHUudo4tbN3XFw49CwWWSaHHazIoIJP+qGJv1iCMKA l9cNHdTCnrFxK2mb+6q3GFI25Stqi8LzIyjNwrh2WuOoTjsuXipFE0G8sizmUNMTFuwd +q1tSQswT7HETtPFHAwhk3P7C4lBTdIcpiVbDQy9CSmeodm74ftIDcypudx74bvNFgpN 7U9A== X-Gm-Message-State: APjAAAWR01Nstnhk/28VI2RvvtfjiKNaHhrX0RwlB8/gdDr9pJpGVnDG 3qe0c5o7Su4RRvuME/UX4Kr2Y1yE X-Google-Smtp-Source: APXvYqz82/AJJ2yfiYi2HzThyaoADeeRrx+S+wisHyZF9zt+KNAYni1DZQbHjaq28zhT4Yn8aACTlw== X-Received: by 2002:a0c:b48a:: with SMTP id c10mr14247005qve.232.1551713458540; Mon, 04 Mar 2019 07:30:58 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id d63sm6270854qka.22.2019.03.04.07.30.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:30:58 -0800 (PST) Date: Mon, 4 Mar 2019 12:30:55 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: <55bbf175b5fc0bee6927cb8de2853be2b4a9cd18.1551712108.git.rodrigosiqueiramelo@gmail.com> References: MIME-Version: 1.0 In-Reply-To: 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZkdpnZVYNfAgQAMKHbRqhoBfLwsCLPyfS6cPCpX/1KM=; b=V53t1fBtyKV9MpmdEOmWrJGM/MRLnLS7+41oQ4jEIFzfEDfnF2Sp3KuVpfXAJfOuWo czOVY/ze5doE2g4dv4tEkbxnvYYZO0VvzkZOQn+v5VI15/eBvNRHC2LZlJdQfE1DvULQ c6LFYRS2IdZTwZbMdAVbJj9irntk6n0nBCmLUInRjHQsjcHCaQ8Pnz4Ypg6iW2OiBtPZ clWYE47gUBP8nNRKzDmG9T99XfB5rIIdECU59yFAZ5MIEpJB/p8TS3T5chd5lzsLHV4I J1OTIyuMzcSCSPViHxf5JtarKvI77a9t171aInrKNKbPCh4mltFwffa9HuAP7ZSMd+AM FNoA== Subject: [Intel-gfx] [PATCH i-g-t 4/7] kms_flip: Remove unreachable condition in wait_for_events 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 In the function wait_for_events() has a double check in the select() function return as described below: igt_assert_f(ret >= 0, "select error (errno %i)\n", errno); igt_assert_f(ret > 0, "select timed out or error (ret %d)\n", ret); Note that the second assert condition will not be reached because of the first assertion. This commit removes the code duplication and update the error message. Signed-off-by: Rodrigo Siqueira --- tests/kms_flip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 57138ec1..9ef77de9 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1014,9 +1014,7 @@ static unsigned int wait_for_events(struct test_output *o) } while (ret < 0 && errno == EINTR); igt_assert_f(ret >= 0, - "select error (errno %i)\n", errno); - igt_assert_f(ret > 0, - "select timed out or error (ret %d)\n", ret); + "select error: %s (%d))\n", strerror(errno), ret); igt_assert_f(!FD_ISSET(0, &fds), "no fds active, breaking\n"); From patchwork Mon Mar 4 15:31:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837965 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 AB49F14DE for ; Mon, 4 Mar 2019 15:31:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 973042A833 for ; Mon, 4 Mar 2019 15:31:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 935AC2A842; Mon, 4 Mar 2019 15:31:26 +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 2FFDE2A833 for ; Mon, 4 Mar 2019 15:31:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FEE889D40; Mon, 4 Mar 2019 15:31:25 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9FFCF89CF2; Mon, 4 Mar 2019 15:31:23 +0000 (UTC) Received: by mail-qk1-x744.google.com with SMTP id a15so2996422qkc.1; Mon, 04 Mar 2019 07:31:23 -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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IOoRQhXw067ys5/u35L6S2JFPR9EliiCKY3XXqxBqvA=; b=azPRyWSQIFpNUkSJBnSI7X8z9c7ASauDcn+gPajP+G6Wo3a7+mJ/SLg9YcVfMdnb+6 MFyVzWQIE2S/QY9Duo2/LE44zQncf25rknXFcZSP4AxaNgHVriKU8hrRs33Mfb5ftf0s lIw4tEBHJMWi9d08YVL9v8hdTAbNRMbyJEwu7N9PrEav9cvP/bL8YLlWW6TwQvgei5t7 1QZj1yXqIXZaEN39HlzfvZ7ls9GX6KNP6pswiCkm5mI1VSdElHeltp3zIMaYPZ8Z3Cmj LCu22FpfBOCKNEFt6ckYgjdw93DqdyI18WytoJO8gUIrF6HS/imxLXSbD54ctZK0JG/n rk4Q== X-Gm-Message-State: APjAAAUqujk2O0axC5TL/e67tvZeCcdoAboYbNrPpbqzS4BE4FI4R6nz 3OzTBBBsy2uK8KVHCcCBcphXl/MQ X-Google-Smtp-Source: APXvYqx1ItoLnA/YrjZC7iBSCTwAFm+pAAd1NwM6J0IP6oQPiR1jF1w+8+H9WpWtAZKUmMQwiV/paA== X-Received: by 2002:a37:2fc1:: with SMTP id v184mr14030772qkh.71.1551713482756; Mon, 04 Mar 2019 07:31:22 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id v131sm3642066qka.95.2019.03.04.07.31.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:31:22 -0800 (PST) Date: Mon, 4 Mar 2019 12:31:20 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: References: MIME-Version: 1.0 In-Reply-To: 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IOoRQhXw067ys5/u35L6S2JFPR9EliiCKY3XXqxBqvA=; b=WErYaQn5F/aQAB9baFhHlDpDq3S+VWMhXQR/w14iDpo2cLuxyM0EgQN7CwqH7yMqYJ nOZDPfElGCY0nuvrM0e4JICzi533afJpC/faPKmVjTEpeqM1XQ9Vx8/dWUfXkCeGPnFH oLXo0rACI/O5Ani7rCLB8+9+k+XI/T1H+YwkjzB1lim50Dt8qpVrmWTtGXQXbFvbXiBe lhYpm8sGCiK+ss2yeqwpFgq8SvD7HngYBym3ef/DUs8ZjPO6Fi4z2/SplikS1HTq6VN7 inbtUR+9xT2YYWQBOGm+YFtchAv4zNksZkdk4PocLoUUBSUisIxPdmP5tjHi59beiJZA RlXg== Subject: [Intel-gfx] [PATCH i-g-t 5/7] kms_flip: Remove magic constant in run_test_on_crtc_set() 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 function run_test_on_crtc_set() expects a parameter named crtc_count which slight changes the behavior of the test. If this crtc_count is ‘1’, the test will run in a single CRTC; otherwise, it will run in two different CRTC. However, this function uses hardcoded literal 1 and 2 for each case. This patch creates two constant with the goal to improve the readability. Signed-off-by: Rodrigo Siqueira --- tests/kms_flip.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 9ef77de9..42ae3ebc 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -76,6 +76,9 @@ #define EVENT_FLIP (1 << 0) #define EVENT_VBLANK (1 << 1) +#define RUN_TEST 1 +#define RUN_PAIR 2 + #ifndef DRM_CAP_TIMESTAMP_MONOTONIC #define DRM_CAP_TIMESTAMP_MONOTONIC 6 #endif @@ -1164,7 +1167,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs, int i; switch (crtc_count) { - case 1: + case RUN_TEST: connector_find_preferred_mode(o->_connector[0], crtc_idxs[0], o); if (!o->mode_valid) return; @@ -1175,7 +1178,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs, kmstest_connector_type_str(o->kconnector[0]->connector_type), o->kconnector[0]->connector_type_id); break; - case 2: + case RUN_PAIR: connector_find_compatible_mode(crtc_idxs[0], crtc_idxs[1], o); if (!o->mode_valid) return; @@ -1341,7 +1344,7 @@ static int run_test(int duration, int flags) o.depth = 24; crtc_idx = n; - run_test_on_crtc_set(&o, &crtc_idx, 1, duration); + run_test_on_crtc_set(&o, &crtc_idx, RUN_TEST, duration); } } @@ -1410,7 +1413,8 @@ static int run_pair(int duration, int flags) crtc_idxs[0] = n; crtc_idxs[1] = m; - run_test_on_crtc_set(&o, crtc_idxs, 2, + run_test_on_crtc_set(&o, crtc_idxs, + RUN_PAIR, duration); } } From patchwork Mon Mar 4 15:31:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837967 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 A7D3514DE for ; Mon, 4 Mar 2019 15:31:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EFAF2A5EC for ; Mon, 4 Mar 2019 15:31:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D2072A5C8; Mon, 4 Mar 2019 15:31:52 +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 4DDA92A758 for ; Mon, 4 Mar 2019 15:31:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9332589D39; Mon, 4 Mar 2019 15:31:51 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 347C089D39; Mon, 4 Mar 2019 15:31:50 +0000 (UTC) Received: by mail-qt1-x82c.google.com with SMTP id j36so5529376qta.7; Mon, 04 Mar 2019 07:31:50 -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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=d2oEUZbDzyryZRfqwkJ4GakXhe9FwHDLRMrWLv1jRaU=; b=J4v4NUBFkgDtlyd2RrdBsVtG/nNa1/bKNO3p+EQSUF3oFXJJgiaEbO5D05PAVXlJfc UiKkeFcLZXWuHQ6Yqv5L1SXo9Mc/dwIhHkAOLJjKyI06xjYrHTYABzu/+/4hQuSfBUey siJVpYE1jFSaTYxQrZnKqoYSg5Lzt52isgnbRcOsFzyWqEqTeUNb8HoFaNPPgVCtIGYn KCnHhtJQGkApkl/SNfOUCldscusrXZ+5AJ88q2KEysfatOeIY2p3B1BkvaljB4LyzqdT 2i0C8N7FL0n3GHppyVb8+EMb8kUV9jv4Z2SCsiykkJ1wemnXl6rjLesVfR6VsvlNw00D UmHQ== X-Gm-Message-State: APjAAAV2/Zg27NAlgsn41ZycHA+G8z2ZxnXISiFsvEu9GNYqu+jeDDdn /vIL45+khMYlan4AIJTiiGw= X-Google-Smtp-Source: APXvYqyhwkdS/xrVXCf8/SMr/p0wM7uzukNotQUukrTn5voamcdlEEZgW+FQU86bEKzrPqJkimB3kQ== X-Received: by 2002:ac8:2ef3:: with SMTP id i48mr14581565qta.316.1551713509307; Mon, 04 Mar 2019 07:31:49 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id q2sm3504637qtn.47.2019.03.04.07.31.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:31:48 -0800 (PST) Date: Mon, 4 Mar 2019 12:31:46 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: References: MIME-Version: 1.0 In-Reply-To: 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=d2oEUZbDzyryZRfqwkJ4GakXhe9FwHDLRMrWLv1jRaU=; b=MFU/O/gZ/sNfdaywrDU6ri6EICcW8HHVQhn5yMWWCAex50SS9dN+ToZteSEsnJ6eQU KDoO9+qRORA814REDnbsMQoBccD96UHixUd2TwUHob1iE+zcOCiUQ0X65nzinuIyMa9/ RrlLD4fL1anttmuqlad5o3bZ3ewlt6B1e9AfwOuLdOlO10r2VHR3kqzBgOYV/v5YJve2 TJWFSmKKMopH1bGb4qiLb1VXVUuQlPznTk5v8/KrC+Wfzh/8qdljNCvZ3nHXOSaER/uX eHuzqYK0dCQCDdLao4iWxirnEvR/DP0rvg7dlyU4WoxQObAGputb9bkgrG3UVN03oRln I9UA== Subject: [Intel-gfx] [PATCH i-g-t 6/7] kms_flip: Rework set_mode() 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 This patch removes the duplicate code inside the function set_mode(). Signed-off-by: Rodrigo Siqueira --- tests/kms_flip.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 42ae3ebc..de3ab600 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -609,22 +609,24 @@ static bool is_wedged(int fd) static int set_mode(struct test_output *o, uint32_t fb, int x, int y) { - int n; + int n, ret; for (n = o->count - 1; n >= 0; n--) { + uint32_t buffer_id = fb, x_crtc = x, y_crtc = y; + uint32_t *conn = &o->_connector[n]; + int count = 1; + drmModeModeInfoPtr mode = &o->kmode[n]; + if (fb == 0) { - int ret = drmModeSetCrtc(drm_fd, o->_crtc[n], - 0, 0, 0, - 0, 0, 0); - if (ret) - return ret; - } else { - int ret = drmModeSetCrtc(drm_fd, o->_crtc[n], - fb, x, y, - &o->_connector[n], 1, &o->kmode[n]); - if (ret) - return ret; + buffer_id = x_crtc = y_crtc = count = 0; + conn = NULL; mode = NULL; } + + ret = drmModeSetCrtc(drm_fd, o->_crtc[n], + buffer_id, x_crtc, y_crtc, + conn, count, mode); + if (ret) + return ret; } return 0; From patchwork Mon Mar 4 15:32:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837969 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 462EA14DE for ; Mon, 4 Mar 2019 15:32:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3260E2A84E for ; Mon, 4 Mar 2019 15:32:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 309D62A868; Mon, 4 Mar 2019 15:32:14 +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 DAA7B2A875 for ; Mon, 4 Mar 2019 15:32:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2723C89CF2; Mon, 4 Mar 2019 15:32:13 +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 82E8E89CF2; Mon, 4 Mar 2019 15:32:11 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id w4so5545683qtc.1; Mon, 04 Mar 2019 07:32:11 -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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YNXizZ1AZVlNdIZaIZ9Hna5DBBH/LhKs798wEtuzrBU=; b=dwVQEDl6M+LRsKPs7VNxCVeMm6UCnY6qt6fhmy2FNXNExlwRr3WouLssZAmqHxdPpv gawXzUsAk1xHwNIMZNnb566DO+y3wb1czChqGYabBytCSEAstz2cE/smisZNEOs08/uP xYvn3Stl0MuOnnn3PVDlg2f/JZYJGMGCwG0byPgxy3QDkfhl+vWiknUc8c7RhsD57NLy MjFF8XyGIRTUjNWqBaGxRMA+mRWyYDAvtcQUPqWls46g6cOGdNpmPUSAmQRrc4AJ3Pwx kcOAzfXru8PA/jKBFjboOHLfc9n+zXCri/GEugYP8Qk10oS7AOtZK5PGFcBr68Lyd7Gc 8NMQ== X-Gm-Message-State: APjAAAVZTUw9FJF/RKc+5L95CBr2j4pcQ7TJhH2Qj64WA59Zo+1bmott mw4P3jFLFiXiLSprRf+a5A8uCAyS X-Google-Smtp-Source: APXvYqxD6Sh0by5mo7TsffiAfa7TBTQCixGVNbKXvXCv5iGuO4AxXvfgp07VgoyDu10GQWaJX9cYHA== X-Received: by 2002:aed:3988:: with SMTP id m8mr15318706qte.177.1551713530674; Mon, 04 Mar 2019 07:32:10 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id 188sm3694953qkd.67.2019.03.04.07.32.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:32:10 -0800 (PST) Date: Mon, 4 Mar 2019 12:32:08 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: References: MIME-Version: 1.0 In-Reply-To: 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YNXizZ1AZVlNdIZaIZ9Hna5DBBH/LhKs798wEtuzrBU=; b=aBusO5k1gSVZIDBjceHLOG8+VDnbwEHyp4/tjHqdvGi6SuSM1sCsXog3pulYNEqj9w Kjxl/JGKtu+7vILIwSFApi0ZFct/rcX/3AW0QdaQjOMlxLQZVOZoaU9ezjOrF1DidCy8 pBnwn3wVnbPOpVd4F6+8X5/VOZDQk7vDqL/DwcgfJwNEWtcuaxWEzdxo2rIuD9bCSQyo 2e1u4wAPqrvF8hpg5TAKYAwX7b76/A8+akIl9URPfpf1x4JFQBXPwPQCJDBVswv5sFat +y+0s4FPY44V7ILsw27N1Lrj/BUbme5BUgDTgwH1WFTK4IDTlaLmeq4OA7L8N3DStK3h n0ow== Subject: [Intel-gfx] [PATCH i-g-t 7/7] kms_flip: Standardize return value for fb_is_bound 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 function fb_is_bound() mix integer value with booleans for handling the return value. This commit standardizes the return value of fb_is_bound() for using only booleans. Signed-off-by: Rodrigo Siqueira Reviewed-by: Maarten Lankhorst --- tests/kms_flip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index de3ab600..abfdd363 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -947,8 +947,7 @@ static void paint_flip_mode(struct igt_fb *fb, bool odd_frame) igt_put_cairo_ctx(drm_fd, fb, cr); } -static int -fb_is_bound(struct test_output *o, int fb) +static bool fb_is_bound(struct test_output *o, int fb) { int n; @@ -958,7 +957,7 @@ fb_is_bound(struct test_output *o, int fb) }; if (drmIoctl(drm_fd, DRM_IOCTL_MODE_GETCRTC, &mode)) - return 0; + return false; if (!mode.mode_valid || mode.fb_id != fb) return false;