Skip to contentSkip to conversation

lib/drmtest: Add comment explaining DRIVER_ANY excluding DRIVER_VGEM

PATCH In review Robert Foss 2 participants 2 messages Jan 30, 2017 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/drmtest: Add comment explaining DRIVER_ANY excluding DRIVER_VGEM

---
 lib/drmtest.h | 7 +++++++
 1 file changed, 7 insertions(+)
lib/drmtest.h +7 -0
index 19d4bd19..c9c019c0 100644
@@ -42,8 +42,15 @@
 #define DRIVER_VC4	(1 << 1)
 #define DRIVER_VGEM	(1 << 2)
 #define DRIVER_VIRTIO	(1 << 3)
+/*
+ * 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
+ * near-100% skip rate if you don't explicitly specify the device,
+ * depending on device-load ordering.
+ */
 #define DRIVER_ANY 	~(DRIVER_VGEM)
 
+
 #ifdef ANDROID
 #if (!(defined HAVE_MMAP64)) && (!(defined __x86_64__))
 extern void*  __mmap2(void *, size_t, int, int, int, off_t);
Signature · 6 lines
2.11.0.453.g787f75f05

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Robert Foss
---
 lib/drmtest.h | 7 +++++++
 1 file changed, 7 insertions(+)
lib/drmtest.h +0 -0
index 19d4bd19..c9c019c0 100644

lib/drmtest.h line 51

Quoted 10 lines
lib/drmtest.h +6 -0
@@ -42,8 +42,15 @@
 #define DRIVER_VC4	(1 << 1)
 #define DRIVER_VGEM	(1 << 2)
 #define DRIVER_VIRTIO	(1 << 3)
+/*
+ * 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
+ * near-100% skip rate if you don't explicitly specify the device,
+ * depending on device-load ordering.
+ */
 #define DRIVER_ANY 	~(DRIVER_VGEM)

Brilliant, cheers :)

Quoted 8 lines
lib/drmtest.h +1 -0
+
 #ifdef ANDROID
 #if (!(defined HAVE_MMAP64)) && (!(defined __x86_64__))
 extern void*  __mmap2(void *, size_t, int, int, int, off_t);
Signature · 1 line
2.11.0.453.g787f75f05

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx