From patchwork Tue Mar 8 14:51:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 8534931 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 48A2C9F2B4 for ; Tue, 8 Mar 2016 14:52:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CAFD3200E7 for ; Tue, 8 Mar 2016 14:52:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D6281200DF for ; Tue, 8 Mar 2016 14:52:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 948316E6EF; Tue, 8 Mar 2016 14:52:14 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 45C1E6E6EE for ; Tue, 8 Mar 2016 14:52:11 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id n186so4559711wmn.0 for ; Tue, 08 Mar 2016 06:52:11 -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=BrnTyzF1PLLdLQrUTdwt2wOZpNdf1kFeQJCgywcz5Ow=; b=mFfVl8zhWZ2sqJcg5CW8qdV3BPsd+e00iSPx2T2Fo9sghhqN6+cEurHD1TLXjtpefN 44BbJH+Zi5+ZRp+fagCrZAwl8lI3hXwWmmI1cWSgvxnEfYbD7B+Nl6l7TQAdh859yUae hjlporyauKC+43GRZsF8rqfh/WyqeeeJaBAS03w1EYhurx/mvkI3ItWDDIn+/SZjd+v+ 5H9hXtpOvOI5VRwTXnPxYsFBsmGtFPu1wwn5S2VdQ3SlBDea4eVhrkzQxaUMj60WhJgu K4YZbPyx1bgqKBWWq2gvlcZ5wCrASVbBypUL48j83qa2Sw8hqzJ8j30EYLOv41WFlzlr h2GQ== 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=BrnTyzF1PLLdLQrUTdwt2wOZpNdf1kFeQJCgywcz5Ow=; b=m/Dy5fNvSDgymAQ5AoO8+AnmkU3XvYP6vdjRBTCVySifaABpNgaCTbQNa9IPkZmevM TJ4JxPzmflYDfWSLIoDMV5XA29BzDgeU8ckcm+UOXzgLMBNxlsQqD1uRGWhRr7Q2Ja+j 9fgEU4+mDJbmwSYMotFmeQRMrZbh74eQREfJ5GjwLSsLNn30U4GHfZJRxBSbshLzahgm /jThHgyWKeb+HNO8meJ0h72j79fXMiogm3lyNVxLfixzyYmnJ/HbvzgjatPWWnDmI+yd Pzb+09fBwalOVKhgpMV9B4C+bQ3K44Xk1VL2PvYrM6n8BglIPnuwAai8xG5VPWBlXIWw Bp3Q== X-Gm-Message-State: AD7BkJLYEJRKAI8V9RGzorn+RhtobW32MhKhvJUib18Z4pMNKoXzq0ZZrC1/klDrmXScgA== X-Received: by 10.194.205.103 with SMTP id lf7mr28620969wjc.147.1457448729418; Tue, 08 Mar 2016 06:52:09 -0800 (PST) Received: from cizrna.lan ([109.72.12.208]) by smtp.gmail.com with ESMTPSA id 3sm3781979wmp.14.2016.03.08.06.52.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Mar 2016 06:52:08 -0800 (PST) From: Tomeu Vizoso To: Intel GFX discussion Date: Tue, 8 Mar 2016 15:51:25 +0100 Message-Id: <1457448699-9778-4-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 03/17] lib: Have gem_set_tiling require intel 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 Before calling a i915-specific IOCTL, require i915. This allows us to skip subtests that are specific to that driver, though what should eventually happen is that tests don't generally call gem_set_tiling directly but go through an abstraction layer that constructs the buffer object in a driver-specific way. Signed-off-by: Tomeu Vizoso --- Changes in v2: None lib/ioctl_wrappers.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 5d4972931506..0221b7fef3a1 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -138,6 +138,8 @@ int __gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride) struct drm_i915_gem_set_tiling st; int ret; + igt_require_intel(fd); + memset(&st, 0, sizeof(st)); do { st.handle = handle;