From patchwork Wed Mar 8 13:30:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 9611115 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 A82D16046A for ; Wed, 8 Mar 2017 13:30:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 725E128532 for ; Wed, 8 Mar 2017 13:30:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6750B28551; Wed, 8 Mar 2017 13:30:18 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 CC27228532 for ; Wed, 8 Mar 2017 13:30:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4FCE6E8FA; Wed, 8 Mar 2017 13:30:15 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 15B016E8FA for ; Wed, 8 Mar 2017 13:30:14 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id l37so4142194wrc.3 for ; Wed, 08 Mar 2017 05:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=3NJlR8Xua/okTGpJT0Kpz6BRUbbMWWPWw92JT4nH2nU=; b=FI7HtEr3r5R9o8myNPsQTXQYCPqomGUSbkwK+7po/aFmDVnB9wikdtnamS2IntTrdc EMlfzBsHFXzq2OvaHqoj1e3uAqIHtoY3lJG8gkwpfgwk8fSSZYW74BeLgUUov8H7M2NF iL92WAUBrqs1WNcbk33NACBq4DtiJiuhf6hdo74gR9vEIr2Qq0POKfU99vf7qxQjlMjO CoRjgJLEjWE4w3NmLPl2PXyNvSWcwCIN5ro9cXRoolu7oxJ0ekIjpJa3B1ixwOK6O1yA yCBQwJzpRWdFKmpUmXuaZnRgj+PX622f1X52pH3YjhOD29AXvYlh+Wk7bzQpmG/qKgJ7 0rJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=3NJlR8Xua/okTGpJT0Kpz6BRUbbMWWPWw92JT4nH2nU=; b=oZ3N0rXQlIWBRwLTOrVherv7mU5EKl7JZ9aVuJAb0LNDHB00mILMjWpYrl/hiUWfre SlxnHmT1Mmq80bBtYN+pmluiwTxHiTucEmIRZ5R/fjHa4C2nPYH+EY5gYIDjqrHhNDN2 1idrzQpwfZ0YvcQf1lY2cbhPWOu+jkhUhfJBwzjOg+iR5cJhEtaOkMPreezXordlrtGt 7jtpHrgHZOJmFoAtIDfMcvPCYNFUvNcJMvcdIR8nvGahpPrYCsFm0ZAjBnD6aq0dQwfU bZJHeGmr55j5xFewTlQp3/9+dWE8/cfe1RCHYwTDQxnZu1TEWwOSyfqGATK8cDxE5kDJ XCSw== X-Gm-Message-State: AMke39kufq8tVH/H0GZG8GWkVolO9kArdfdPPEGU+IxKnevGh2lPm6aINQ7ICDu8GNQ2Nw== X-Received: by 10.223.173.53 with SMTP id p50mr5819247wrc.112.1488979812288; Wed, 08 Mar 2017 05:30:12 -0800 (PST) Received: from localhost.localdomain ([109.74.48.129]) by smtp.gmail.com with ESMTPSA id i133sm14875543wmg.26.2017.03.08.05.30.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 05:30:11 -0800 (PST) From: Tomeu Vizoso To: Intel GFX discussion Date: Wed, 8 Mar 2017 14:30:00 +0100 Message-Id: <20170308133000.26225-2-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170308133000.26225-1-tomeu.vizoso@collabora.com> References: <20170308133000.26225-1-tomeu.vizoso@collabora.com> Cc: Tomeu Vizoso Subject: [Intel-gfx] [PATCH i-g-t 2/2] kms_pipe_crc_basic: Skip sequence tests if the source doesn't provide frame numbers 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 Some frame sources such as sinks aren't able to provide meaningful frame numbers, so in those cases just skip the TEST_SEQUENCE tests. Signed-off-by: Tomeu Vizoso Reviewed-by: Robert Foss --- tests/kms_pipe_crc_basic.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c index d0dc2a1b58cf..415efd90330c 100644 --- a/tests/kms_pipe_crc_basic.c +++ b/tests/kms_pipe_crc_basic.c @@ -89,7 +89,7 @@ static void test_bad_source(data_t *data) #define TEST_SEQUENCE (1<<0) #define TEST_NONBLOCK (1<<1) -static void +static bool test_read_crc_for_output(data_t *data, int pipe, igt_output_t *output, unsigned flags) { @@ -163,9 +163,24 @@ test_read_crc_for_output(data_t *data, int pipe, igt_output_t *output, for (j = 0; j < (n_crcs - 1); j++) igt_assert_crc_equal(&crcs[j], &crcs[j + 1]); - if (flags & TEST_SEQUENCE) - for (j = 0; j < (n_crcs - 1); j++) - igt_assert_eq(crcs[j].frame + 1, crcs[j + 1].frame); + if (flags & TEST_SEQUENCE) { + if (!crcs[0].has_valid_frame) { + igt_info("Skipping connector, its 'auto' source doesn't give us frame numbers.\n"); + + free(crcs); + igt_pipe_crc_free(pipe_crc); + igt_remove_fb(data->drm_fd, &data->fb); + igt_plane_set_fb(primary, NULL); + + igt_output_set_pipe(output, PIPE_ANY); + + return false; + } else { + for (j = 0; j < (n_crcs - 1); j++) + igt_assert_eq(crcs[j].frame + 1, + crcs[j + 1].frame); + } + } free(crcs); igt_pipe_crc_free(pipe_crc); @@ -174,6 +189,8 @@ test_read_crc_for_output(data_t *data, int pipe, igt_output_t *output, igt_output_set_pipe(output, PIPE_ANY); } + + return true; } static void test_read_crc(data_t *data, int pipe, unsigned flags) @@ -190,8 +207,8 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags) igt_subtest_name(), igt_output_name(output), kmstest_pipe_name(pipe)); - test_read_crc_for_output(data, pipe, output, flags); - valid_connectors ++; + if (test_read_crc_for_output(data, pipe, output, flags)) + valid_connectors ++; } igt_require_f(valid_connectors, "No connector found for pipe %i\n", pipe);