[PATCH i-g-t v7 20/48] lib/igt_kms: Automatically connect unigraf on display require

Louis Chauvet
2026-02-23T12:09:12Z

As Unigraf can emulate 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@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@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 05d07ece6d9b..8fa2d8f9001e 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -66,6 +66,9 @@
#ifdef HAVE_CHAMELIUM
#include "igt_chamelium.h"
#endif
+#ifdef HAVE_UNIGRAF
+#include "unigraf/unigraf.h"
+#endif

/**
* SECTION:igt_kms
@@ -3125,6 +3128,10 @@ void igt_display_require(igt_display_t *display, int drm_fd)
int i, crtc_index;
bool is_intel_dev;

+#ifdef HAVE_UNIGRAF
+ unigraf_open_device(drm_fd);
+#endif
+
memset(display, 0, sizeof(igt_display_t));

LOG_INDENT(display, "init");

--
2.52.0