[PATCH i-g-t v3 13/29] lib/igt_kms: Automatically connect unigraf on display require

Louis Chauvet louis.chauvet at bootlin.com
Sat Aug 23 02:11:33 UTC 2025


As Unigraf can emualte a display, automatically connect it for all
devices. If a test is already using unigraf, this have no effect.

Signed-off-by: Louis Chauvet <louis.chauvet at bootlin.com>
---
 lib/igt_kms.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 6929b7ea87ab04e945499ea73f014ef68c60d3aa..1d01b9204de79ab54bb968f572bac3e74bf94fdc 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -37,6 +37,7 @@
 #include <sys/stat.h>
 #include <string.h>
 #include <stdlib.h>
+#include <xf86drmMode.h>
 #ifdef HAVE_LINUX_KD_H
 #include <linux/kd.h>
 #elif HAVE_SYS_KD_H
@@ -65,6 +66,9 @@
 #ifdef HAVE_CHAMELIUM
 #include "igt_chamelium.h"
 #endif
+#ifdef HAVE_UNIGRAF
+#include "unigraf/unigraf.h"
+#endif
 
 /**
  * SECTION:igt_kms
@@ -2957,6 +2961,9 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 		}
 	}
 #endif
+#ifdef HAVE_UNIGRAF
+	unigraf_open_device(drm_fd);
+#endif
 
 	igt_require_f(resources->count_crtcs <= IGT_MAX_PIPES,
 		     "count_crtcs exceeds IGT_MAX_PIPES, resources->count_crtcs=%d, IGT_MAX_PIPES=%d\n",

-- 
2.50.1



More information about the igt-dev mailing list