From: Gustavo Padovan <gustavo@padovan.org>
To: intel-gfx@lists.freedesktop.org
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
dri-devel@lists.freedesktop.org
Subject: [PATCH i-g-t 2/2] lib/drmtest: add virtio_gpu support
Date: Mon, 14 Nov 2016 18:59:15 +0900 [thread overview]
Message-ID: <1479117566-17709-4-git-send-email-gustavo@padovan.org> (raw)
In-Reply-To: <1479117566-17709-1-git-send-email-gustavo@padovan.org>
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Support the virtio GPU on drmtest.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
lib/drmtest.c | 9 +++++++++
lib/drmtest.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 9f3ac7f..b374006 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -115,6 +115,11 @@ static bool is_vgem_device(int fd)
return __is_device(fd, "vgem");
}
+static bool is_virtio_device(int fd)
+{
+ return __is_device(fd, "virt");
+}
+
static bool has_known_intel_chipset(int fd)
{
struct drm_i915_getparam gp;
@@ -260,6 +265,10 @@ int __drm_open_driver(int chipset)
is_vgem_device(fd))
return fd;
+ if (chipset & DRIVER_VIRTIO &&
+ is_virtio_device(fd))
+ return fd;
+
close(fd);
}
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 8ce32a6..19d4bd1 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -41,6 +41,7 @@
#define DRIVER_INTEL (1 << 0)
#define DRIVER_VC4 (1 << 1)
#define DRIVER_VGEM (1 << 2)
+#define DRIVER_VIRTIO (1 << 3)
#define DRIVER_ANY ~(DRIVER_VGEM)
#ifdef ANDROID
--
2.5.5
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-11-14 9:59 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 9:59 [PATCH 00/12] kms tests for the DRM fences interfaces Gustavo Padovan
2016-11-14 9:59 ` [PATCH i-g-t 1/2] lib/drmtest: Fix igt_skip message Gustavo Padovan
2016-11-14 9:59 ` [PATCH 01/12] tests/kms_atomic_transition: use select + read instead of blocking read Gustavo Padovan
2016-11-15 7:57 ` Daniel Vetter
2016-11-14 9:59 ` Gustavo Padovan [this message]
2016-11-14 9:59 ` [PATCH 02/12] tests/kms_atomic_transition: don't assume max pipes Gustavo Padovan
2016-11-15 8:01 ` [Intel-gfx] " Daniel Vetter
2016-11-15 13:25 ` Tomeu Vizoso
2016-11-15 15:30 ` [Intel-gfx] " Robert Foss
2016-11-14 9:59 ` [PATCH 03/12] lib/igt_kms: move igt_kms_get_alt_edid() to the right place Gustavo Padovan
2016-11-14 9:59 ` [PATCH 04/12] lib/igt_kms: export properties names Gustavo Padovan
2016-11-15 8:34 ` [Intel-gfx] " Daniel Vetter
2016-11-14 9:59 ` [PATCH 05/12] tests/kms_atomic: use global atomic properties definitions Gustavo Padovan
2016-11-14 9:59 ` [PATCH 06/12] lib/igt_kms: Add support for the IN_FENCE_FD property Gustavo Padovan
2016-11-22 11:41 ` Brian Starkey
2016-11-14 9:59 ` [PATCH 07/12] lib/igt_kms: Add support for the OUT_FENCE_PTR property Gustavo Padovan
2016-11-22 10:53 ` [Intel-gfx] " Brian Starkey
2016-11-22 11:06 ` Chris Wilson
2016-11-22 11:54 ` Brian Starkey
2016-11-22 12:10 ` [Intel-gfx] " Chris Wilson
2016-11-22 12:37 ` Brian Starkey
2016-11-22 13:12 ` Daniel Vetter
2016-11-22 13:50 ` Brian Starkey
2016-11-22 13:56 ` Daniel Vetter
2016-11-22 14:06 ` Brian Starkey
2016-11-14 9:59 ` [PATCH 08/12] tests/kms_atomic: stress possible fence settings Gustavo Padovan
2016-11-15 8:39 ` Daniel Vetter
2016-11-14 9:59 ` [PATCH 09/12] tests/kms_atomic_transition: add fencing parameter to run_transition_tests Gustavo Padovan
2016-11-14 9:59 ` [PATCH 10/12] tests/kms_atomic_transition: add out_fences tests Gustavo Padovan
2016-11-14 9:59 ` [PATCH 11/12] tests/kms_atomic_transition: add in_fences tests Gustavo Padovan
2016-11-14 9:59 ` [PATCH 12/12] tests/kms_atomic_transition: set out_fence for all crtcs Gustavo Padovan
-- strict thread matches above, loose matches on Subject: below --
2016-06-30 21:29 [PATCH i-g-t 1/2] lib/drmtest: Fix igt_skip message Gustavo Padovan
2016-06-30 21:29 ` [PATCH i-g-t 2/2] lib/drmtest: add virtio_gpu support Gustavo Padovan
2016-07-12 12:24 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479117566-17709-4-git-send-email-gustavo@padovan.org \
--to=gustavo@padovan.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).