From patchwork Tue Mar 8 14:51:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 8535051 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 3FC0D9F2B4 for ; Tue, 8 Mar 2016 14:53:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 63F7F200D4 for ; Tue, 8 Mar 2016 14:53:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 908A9200D0 for ; Tue, 8 Mar 2016 14:53:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 271BD6E703; Tue, 8 Mar 2016 14:53:45 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id BC0B06E703 for ; Tue, 8 Mar 2016 14:53:41 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id l68so4541803wml.3 for ; Tue, 08 Mar 2016 06:53:41 -0800 (PST) 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=YrOd3TtDQjNYWnZrMh7VAwTDPBuBoswqvEPhf52DyTg=; b=Z6+ABHmT6JxGFP3FoKV4Er/jvu2E02NUEg7ToT9SxFVfnxul9ng5zhpFRzE4PDofpa dchvfmBcOrzJDAznxQwYy+7wipH+DjVH0iFu/G444h+UxsNiNE6hPArnkBOKauF3gVUk fIf6xQ9BJOTK4lHqHVQh7gZyBLcj5taLbEmoesCK2Px0ubBv8pKtoHJYWj8yWjNJ8zJP FxlU/IU94kDssa9xM1SdNVSlTayJVfJQ+JcKCFn6lOGXwkyNx4hPeA43UWX9pbEAm7ei l/1iarcWB+OeQjaT1ax0uj7/h2p2e4zby/3wrEJttE9H5LkJfHZewiqzbw+l/6mW12/V 2YzA== 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=YrOd3TtDQjNYWnZrMh7VAwTDPBuBoswqvEPhf52DyTg=; b=XdxtuLtz/vyd9NWaQd5kDKRu8OCkNZZwSrUnaSoVsYWO+vG1RMPNQUc34lS55iaHdz i+AqBrXfxNBgLwxGLyISycdCq0XZlYt+4lpyFEgqOyT0pXWmaV6VAN7dk/fPXfoTZIF9 KRlFvuNz4bpLjzyhwwgBaPn7NLI6WDp9Z6lTJWDpEy9+rt5tRhKGPvBnTxsNmIugULB5 8Z6EAkLtdo9ussP43SwzgZ3OWJn4dPw4/TEM4B+gbHJmzAF4RGpYdPeqCIWk3C6EE/wK EzpwvIxHBxAEE9BmmYXx6RwoIhEpZPD1OjZ7RJyD7np0yGLXO8iEIMpicfcgM+1s74Mb 8jiQ== X-Gm-Message-State: AD7BkJJm5FsQRmcAkNxCVyXRSF30nddU5ha3rzO5jx+w5iwUBfFZ7WLUsFyBOr6WJp3Png== X-Received: by 10.28.212.19 with SMTP id l19mr18868386wmg.97.1457448819461; Tue, 08 Mar 2016 06:53:39 -0800 (PST) Received: from cizrna.lan ([109.72.12.208]) by smtp.gmail.com with ESMTPSA id 3sm3781979wmp.14.2016.03.08.06.53.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Mar 2016 06:53:38 -0800 (PST) From: Tomeu Vizoso To: Intel GFX discussion Date: Tue, 8 Mar 2016 15:51:36 +0100 Message-Id: <1457448699-9778-15-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457448699-9778-1-git-send-email-tomeu.vizoso@collabora.com> References: <1457448699-9778-1-git-send-email-tomeu.vizoso@collabora.com> Cc: Daniel Stone , Tomeu Vizoso , Micah Fedke , Gustavo Padovan , Emil Velikov Subject: [Intel-gfx] [i-g-t PATCH v2 14/17] kms_addfb_basic: move tiling functionality into each subtest 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=-4.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 calls to gem_set_tiling will cause the subtest to be skipped on drivers other than i915, move them to each subtest that needs them so the other subtests aren't skipped as well. Signed-off-by: Tomeu Vizoso --- Changes in v2: None tests/kms_addfb_basic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c index 473b5e9d7236..e61d2502d78b 100644 --- a/tests/kms_addfb_basic.c +++ b/tests/kms_addfb_basic.c @@ -156,17 +156,17 @@ static void pitch_tests(int fd) } } - igt_fixture - gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4); f.pitches[0] = 1024*4; igt_subtest("basic-X-tiled") { + gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4); igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0); igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0); f.fb_id = 0; } igt_subtest("framebuffer-vs-set-tiling") { + gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4); igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0); igt_assert(__gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4) == -EBUSY); igt_assert(__gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4) == -EBUSY); @@ -176,14 +176,14 @@ static void pitch_tests(int fd) f.pitches[0] = 512*4; igt_subtest("tile-pitch-mismatch") { + gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4); igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 && errno == EINVAL); } - igt_fixture - gem_set_tiling(fd, gem_bo, I915_TILING_Y, 1024*4); f.pitches[0] = 1024*4; igt_subtest("basic-Y-tiled") { + gem_set_tiling(fd, gem_bo, I915_TILING_Y, 1024*4); igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 && errno == EINVAL); }