From patchwork Thu Oct 27 07:58:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 9399043 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 96E6160233 for ; Thu, 27 Oct 2016 07:58:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D9362A0AA for ; Thu, 27 Oct 2016 07:58:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 601BB2A0AD; Thu, 27 Oct 2016 07:58:54 +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 48B1F2A0AA for ; Thu, 27 Oct 2016 07:58:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F4BF6E9F6; Thu, 27 Oct 2016 07:58:52 +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 EC8246E9F6 for ; Thu, 27 Oct 2016 07:58:50 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id m83so1343639wmc.0 for ; Thu, 27 Oct 2016 00:58:50 -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; bh=9WrnGUW8kXs3dp/ljbd3V7dnYlA7Bu0xO/e8pFMF2Dg=; b=wtn8cEfqKpvdADd//B4h4bA+V1odCIYWFkRyoPVgA+tOzySh8gOMhLQZHFuSYp9heb FkHyEyOPEERq4K4yBNG+yE4Ba25EZiTPQ8Uwi7wndTAZPMApwMsE+mx8ubsUPYZaxCxA 33vm8ssIinWPQjuEV94VP83LXDdMIoXNmwdfiB4WPgnO+qPYhYbeMHjWDHxqbZdUAmo0 1L0QLtgFE3Cr2fY6v9ap7zL5RxswbCKOYgZ/GuGZfhUg1tuKrHq/JNnucOkwN3JwF2gD U7S9Md5x0vWnsI3uev02mvq8C6R8pKlAWJPdnwkjrRi5uy5JT4fp1+1J6BN7FxznkXyV GYYw== 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; bh=9WrnGUW8kXs3dp/ljbd3V7dnYlA7Bu0xO/e8pFMF2Dg=; b=AXJIt/O/utQzgRE85pVcihSvmem8D/rLqAVd33IhwGe90ON9lJcapYy/OytcCWY57g p4w5iIoq8G/KO7GSYYummrFW6OkOps5Mq17gEDxSrYbAxnw5RAxdV7ItRtcusmWiDa18 YgL4BtTv8Yr0II9k/rKcs73hF5ZJUjjOekEQtLp5bmAHbJnFTdiq6CZS+nUh8PXWdNF+ TgMm5Lh8G6+wIOTeZ3n2nEcFkVlks7ZhS80QRzu0MmXNqwwpayVUzvOmdX7rOBhD+o5i GfW9UGMbkAsSogghdVcxkFk9rwdaZkmld52sxBdcBZGU3IjHWVs97M1KMRTn9Tgmi4gH te2g== X-Gm-Message-State: ABUngvdCCY7vWVf09fJ2wWG9B0adOZZTWscWndLa+AY966yZJ82BS9ZM+3UF7BZDObMLWQ== X-Received: by 10.194.87.130 with SMTP id ay2mr5213486wjb.44.1477555129398; Thu, 27 Oct 2016 00:58:49 -0700 (PDT) Received: from cizrna.lan ([109.72.12.6]) by smtp.gmail.com with ESMTPSA id j189sm1711454wmd.22.2016.10.27.00.58.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Oct 2016 00:58:48 -0700 (PDT) From: Tomeu Vizoso To: Intel GFX discussion Date: Thu, 27 Oct 2016 09:58:19 +0200 Message-Id: <1477555099-2333-1-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.7.4 Cc: Tomeu Vizoso Subject: [Intel-gfx] [PATCH i-g-t] lib/drmtest: Take DRIVER_ANY into account when opening the DRM device 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 __drm_open_driver was changed to bail out on VGEM devices unless they are explicitly asked for (DRIVER_VGEM). But with that change we lost support for DRIVER_ANY. Signed-off-by: Tomeu Vizoso Fixes: 7ce63894854d ("lib: Support opening vGEM device") Cc: Chris Wilson --- lib/drmtest.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/drmtest.c b/lib/drmtest.c index 5d3aaa836735..786ffa1b1fae 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -269,6 +269,10 @@ int __drm_open_driver(int chipset) is_virtio_device(fd)) return fd; + /* Only VGEM-specific tests should be run on VGEM */ + if (chipset & DRIVER_ANY && !is_vgem_device(fd)) + return fd; + close(fd); }