[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v2 09/13] qemu: process: gfx: egl-headless: Pick the first available DRM node



Just like for SPICE, pick the first available DRM render node for
egl-headless.

Signed-off-by: Erik Skultety <eskultet redhat com>
---
 src/qemu/qemu_process.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index f3d194b0ce..bb2b8e8358 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4763,7 +4763,14 @@ qemuProcessGraphicsSetupListen(virQEMUDriverPtr driver,
 static int
 qemuProcessGraphicsSetupRenderNode(virDomainGraphicsDefPtr graphics)
 {
-    if (!(graphics->data.spice.rendernode = virHostGetDRMRenderNode()))
+    char **rendernode = NULL;
+
+    if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE)
+        rendernode = &graphics->data.spice.rendernode;
+    else
+        rendernode = &graphics->data.egl_headless.rendernode;
+
+    if (!(*rendernode = virHostGetDRMRenderNode()))
         return -1;
 
     return 0;
-- 
2.19.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]