Blob Blame Raw
From ba493d2395a3833470e4dd12ef1a7b0f32905772 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Fri, 14 Dec 2018 08:26:41 +0000
Subject: [PATCH 4/5] ui: Allow specifying 'rendernode' display option for
 egl-headless
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

RH-Author: Gerd Hoffmann <kraxel@redhat.com>
Message-id: <20181214082642.21878-5-kraxel@redhat.com>
Patchwork-id: 83506
O-Subject: [RHEL8/rhel qemu-kvm PATCH 4/5] ui: Allow specifying 'rendernode' display option for egl-headless
Bugzilla: 1652871
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
RH-Acked-by: Daniel P. Berrange <berrange@redhat.com>
RH-Acked-by: Erik Skultety <eskultet@redhat.com>

From: Erik Skultety <eskultet@redhat.com>

As libvirt can't predict which rendernode QEMU would pick, it
won't adjust the permissions on the device, hence QEMU getting
"Permission denied" when opening the DRI device. Therefore, enable
'rendernode' option for egl-headless display type.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1648236

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Message-id: 27f4617f19aa1072114f10f1aa9dd199735ef982.1542362949.git.eskultet@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 91e61947eb2be21b00091d34f5692f89cef41376)
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>

Conflicts:
	ui/egl-headless.c

Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
 ui/egl-headless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/egl-headless.c b/ui/egl-headless.c
index 7c87712..03fec49 100644
--- a/ui/egl-headless.c
+++ b/ui/egl-headless.c
@@ -175,7 +175,7 @@ static void egl_headless_init(DisplayState *ds, DisplayOptions *opts)
     egl_dpy *edpy;
     int idx;
 
-    if (egl_rendernode_init(NULL) < 0) {
+    if (egl_rendernode_init(opts->u.egl_headless.rendernode) < 0) {
         error_report("egl: render node init failed");
         exit(1);
     }
-- 
1.8.3.1