Skip to contentSkip to conversation

lib/drmtest: Fix igt_skip message

PATCH In review Gustavo Padovan 2 participants 3 messages Jun 30, 2016 – Jul 12, 2016 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 lib/drmtest: Fix igt_skip message

From: Gustavo Padovan <[email protected]>

Now other gpus are supported too.

---
 lib/drmtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/drmtest.c +1 -1
index 884fe7c..9f3ac7f 100644
@@ -263,7 +263,7 @@ int __drm_open_driver(int chipset)
 		close(fd);
 	}
 
-	igt_skip("No intel gpu found\n");
+	igt_skip("No known gpu found\n");
 	return -1;
 }
 
Signature · 6 lines
2.5.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/2 lib/drmtest: add virtio_gpu support

From: Gustavo Padovan <[email protected]>

Support the virtio GPU on drmtest.

---
 lib/drmtest.c | 9 +++++++++
 lib/drmtest.h | 1 +
 2 files changed, 10 insertions(+)
lib/drmtest.c +9 -0
index 9f3ac7f..b374006 100644
@@ -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);
 	}
 
lib/drmtest.h +1 -0
index 8ce32a6..19d4bd1 100644
@@ -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
Signature · 6 lines
2.5.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

Re: [PATCH i-g-t 2/2] lib/drmtest: add virtio_gpu support

Quoted 5 lines · Gustavo Padovan

From: Gustavo Padovan <[email protected]>

Support the virtio GPU on drmtest.

Both applied, thanks for the patches. Aside: i-g-t patches should be submitted to intel-gfx.
-Daniel

Quoted 51 lines
---
 lib/drmtest.c | 9 +++++++++
 lib/drmtest.h | 1 +
 2 files changed, 10 insertions(+)
lib/drmtest.c +9 -0
index 9f3ac7f..b374006 100644
@@ -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);
 	}
 
lib/drmtest.h +1 -0
index 8ce32a6..19d4bd1 100644
@@ -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
Signature · 6 lines
2.5.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel