From patchwork Mon Apr 18 11:42:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 8871661 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2649F9F39D for ; Mon, 18 Apr 2016 11:44:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E3AC20270 for ; Mon, 18 Apr 2016 11:44:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5028920123 for ; Mon, 18 Apr 2016 11:44:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 871346E5B4; Mon, 18 Apr 2016 11:44:04 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id A92D66E5B4 for ; Mon, 18 Apr 2016 11:43:32 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id n3so23931096wmn.1 for ; Mon, 18 Apr 2016 04:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=hSNzZ0gLS/fbTGqUjRXGdIv96vx+Rwerj99dYtZ6NYU=; b=uDTXgd0uZo5iXvx7RJ8fHiUVOek+jXXbZiURyBTfJlmZKNSHZa/3HRdCxHWsYwL/j1 gbAnLI0Zj9JVNlSKTgn/ACZ6Yfk7iwOOrPdO47R0SlUtEhEiABITGTkCGUnbqF8/13vj fLOEZsbt3F6aLk7lfkoVCe+fn7sPIaSTC5gPaDky1RmF20COl5YH3p28dnOgCB5ympJV YFZCEveL7Bm6pOyBdGU4UzZp6xqrxLFSb78EoSXvpvUKMuvjm6pKu/2tH1qZiyhEYUJ4 weoBrz7A05VzDBBGTqIxDGuma+I29Mbkj1Vw3wtcIMza6OUVHeTFOujTK5x7cmz08IpI UMuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=hSNzZ0gLS/fbTGqUjRXGdIv96vx+Rwerj99dYtZ6NYU=; b=NBdwfz06cI/YHinJdQYxYxuWNNUkAo9mi2XJpZNSUX4YfVAz7juRJiRmsT2pkC7PCo 3521jlaZmpEyuJIw0qrffHJPr6mfuotCMGMW2Y6CRsXTwLydGOo23VSYprqxXD2oKYxL V+1BJAQvXA15BSDtsX5ziHC9QSvOAxe3R3ciZI4UUX//Vy1uQCc3OAWpRPb16TuBeeTh DKn5PVNkRR9L/bSSSuwbbR95upcG2EYCmPXaRoENaqPFFg80g2MEfrj2tyNvYM9qdveW B1KniLdO7rIVWWhODtCS5k1ckTYUxk+Y0uMANyg1wOQZpZuzYEeNqD3Q9QLGVS5pKg5I WQBg== X-Gm-Message-State: AOPr4FVNfMyln61mpJk9Fkhwzn/J/kLsJVXtABkdC9S3cf3JdBWGV5uWkKay4ppLv38ijg== X-Received: by 10.194.86.200 with SMTP id r8mr6724470wjz.158.1460979810961; Mon, 18 Apr 2016 04:43:30 -0700 (PDT) Received: from cizrna.lan ([109.72.12.68]) by smtp.gmail.com with ESMTPSA id a184sm26348430wma.3.2016.04.18.04.43.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Apr 2016 04:43:30 -0700 (PDT) From: Tomeu Vizoso To: Intel GFX discussion Date: Mon, 18 Apr 2016 13:42:52 +0200 Message-Id: <1460979775-21702-5-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1460979775-21702-1-git-send-email-tomeu.vizoso@collabora.com> References: <1460979775-21702-1-git-send-email-tomeu.vizoso@collabora.com> Cc: Daniel Stone , Tomeu Vizoso , Daniel Vetter , Micah Fedke , Gustavo Padovan , Emil Velikov Subject: [Intel-gfx] [i-g-t PATCH v1 4/7] tests/kms_flip: Move bufmgr requirement into subtests 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-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Because bufmgr is currently a i915-only thing and it's only needed in a subset of the subtests, require it only in the subtests that actually need it so that the other subtests aren't skipped without a reason. Signed-off-by: Tomeu Vizoso --- tests/kms_flip.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 524a8a3c2d14..58b167d46d90 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -246,6 +246,8 @@ static int _emit_dummy_load__bcs(struct test_output *o, int limit, int timeout) drm_intel_bo *src_bo, *dst_bo, *fb_bo; struct igt_fb *fb_info = &o->fb_info[o->current_fb_id]; + igt_require(bufmgr); + src_bo = drm_intel_bo_alloc(bufmgr, "dummy_bo", 2048*2048*4, 4096); igt_assert(src_bo); @@ -298,6 +300,8 @@ static void emit_fence_stress(struct test_output *o) drm_intel_bo **bo; int i; + igt_require(bufmgr); + bo = calloc(sizeof(*bo), num_fences); exec = calloc(sizeof(*exec), num_fences+1); for (i = 0; i < num_fences - 1; i++) { @@ -337,6 +341,8 @@ static int _emit_dummy_load__rcs(struct test_output *o, int limit, int timeout) struct igt_buf sb[3], *src, *dst, *fb; int i, ret = 0; + igt_require(bufmgr); + copyfunc = igt_get_render_copyfunc(devid); if (copyfunc == NULL) return _emit_dummy_load__bcs(o, limit, timeout); @@ -1689,8 +1695,10 @@ int main(int argc, char **argv) get_timestamp_format(); bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096); - devid = intel_get_drm_devid(drm_fd); - batch = intel_batchbuffer_alloc(bufmgr, devid); + if (bufmgr) { + devid = intel_get_drm_devid(drm_fd); + batch = intel_batchbuffer_alloc(bufmgr, devid); + } } igt_subtest("nonblocking-read")