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

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

 



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

Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux