From patchwork Thu Sep 6 00:03:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak Singh Rawat X-Patchwork-Id: 10589677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F0FF15E9 for ; Thu, 6 Sep 2018 00:04:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EF4E2A9E0 for ; Thu, 6 Sep 2018 00:04:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72D0A2A9FC; Thu, 6 Sep 2018 00:04:14 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 2F27D2A9E0 for ; Thu, 6 Sep 2018 00:04:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A1B576E586; Thu, 6 Sep 2018 00:04:13 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from EX13-EDG-OU-002.vmware.com (ex13-edg-ou-002.vmware.com [208.91.0.190]) by gabe.freedesktop.org (Postfix) with ESMTPS id 714A16E580; Thu, 6 Sep 2018 00:04:11 +0000 (UTC) Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Wed, 5 Sep 2018 17:04:04 -0700 Received: from ubuntu.localdomain (promb-2n-dhcp79.eng.vmware.com [10.20.88.79]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id CE3B4B0823; Wed, 5 Sep 2018 20:04:10 -0400 (EDT) From: Deepak Rawat To: , , , , Date: Wed, 5 Sep 2018 17:03:46 -0700 Message-ID: <20180906000350.2478-2-drawat@vmware.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180906000350.2478-1-drawat@vmware.com> References: <20180906000350.2478-1-drawat@vmware.com> MIME-Version: 1.0 Received-SPF: None (EX13-EDG-OU-002.vmware.com: drawat@vmware.com does not designate permitted sender hosts) Subject: [Intel-gfx] [PATCH i-g-t 1/5] lib/igt_vmwgfx: Add vmwgfx device X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Deepak Rawat Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Add DRIVER_VMWGFX to represent vmwgfx device for running igt tests. Signed-off-by: Deepak Rawat --- lib/drmtest.c | 9 ++++++++- lib/drmtest.h | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index bfa2e0f0..563d5b8b 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -105,6 +105,11 @@ bool is_i915_device(int fd) return __is_device(fd, "i915"); } +bool is_vmwgfx_device(int fd) +{ + return __is_device(fd, "vmwg"); +} + static bool has_known_intel_chipset(int fd) { struct drm_i915_getparam gp; @@ -205,7 +210,7 @@ static const struct module { { DRIVER_VC4, "vc4" }, { DRIVER_VGEM, "vgem" }, { DRIVER_VIRTIO, "virtio-gpu" }, - { DRIVER_VIRTIO, "virtio_gpu" }, + { DRIVER_VMWGFX, "vmwgfx" }, {} }; @@ -335,6 +340,8 @@ static const char *chipset_to_str(int chipset) return "virtio"; case DRIVER_AMDGPU: return "amdgpu"; + case DRIVER_VMWGFX: + return "vmwgfx"; case DRIVER_ANY: return "any"; default: diff --git a/lib/drmtest.h b/lib/drmtest.h index 949865ee..0213fb51 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -43,6 +43,7 @@ #define DRIVER_VGEM (1 << 2) #define DRIVER_VIRTIO (1 << 3) #define DRIVER_AMDGPU (1 << 4) +#define DRIVER_VMWGFX (1 << 5) /* * Exclude DRVER_VGEM from DRIVER_ANY since if you run on a system * with vgem as well as a supported driver, you can end up with a @@ -80,6 +81,8 @@ void igt_require_intel(int fd); bool is_i915_device(int fd); +bool is_vmwgfx_device(int fd); + /** * do_or_die: * @x: command