|
|
0a7476 |
From 804b6a228fc35d8debb2cfef413c69d10fd57f31 Mon Sep 17 00:00:00 2001
|
|
|
0a7476 |
Message-Id: <804b6a228fc35d8debb2cfef413c69d10fd57f31@dist-git>
|
|
|
0a7476 |
From: Erik Skultety <eskultet@redhat.com>
|
|
|
0a7476 |
Date: Tue, 9 Apr 2019 08:34:36 +0200
|
|
|
0a7476 |
Subject: [PATCH] domain: conf: graphics: Fix picking DRI renderer
|
|
|
0a7476 |
automatically for SPICE
|
|
|
0a7476 |
MIME-Version: 1.0
|
|
|
0a7476 |
Content-Type: text/plain; charset=UTF-8
|
|
|
0a7476 |
Content-Transfer-Encoding: 8bit
|
|
|
0a7476 |
|
|
|
0a7476 |
Commit 255e0732 introduced a few graphics-related helpers. The problem
|
|
|
0a7476 |
is that virDomainGraphicsNeedsAutoRenderNode returns true if it gets
|
|
|
0a7476 |
NULL as a response from virDomainGraphicsNeedsAutoRenderNode. That's
|
|
|
0a7476 |
okay for egl-headless because that one always needs a DRM render node,
|
|
|
0a7476 |
the same is not true for SPICE though, and unless the XML specifies
|
|
|
0a7476 |
<gl enable='yes'> for SPICE, there's no need for any renderer.
|
|
|
0a7476 |
|
|
|
0a7476 |
Signed-off-by: Erik Skultety <eskultet@redhat.com>
|
|
|
0a7476 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
0a7476 |
(cherry picked from commit 1215195fd882efac47c07c16bfff0ad9a33c45a3)
|
|
|
0a7476 |
|
|
|
0a7476 |
https: //bugzilla.redhat.com/show_bug.cgi?id=1628892
|
|
|
0a7476 |
Signed-off-by: Erik Skultety <eskultet@redhat.com>
|
|
|
0a7476 |
Message-Id: <5c8d0a9c4926354df65414bb6b12bff5bcb823f2.1554791287.git.eskultet@redhat.com>
|
|
|
0a7476 |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
0a7476 |
---
|
|
|
0a7476 |
src/conf/domain_conf.c | 7 +++++--
|
|
|
0a7476 |
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
0a7476 |
|
|
|
0a7476 |
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
|
|
0a7476 |
index 1aef0c76f8..aaf6a6bab1 100644
|
|
|
0a7476 |
--- a/src/conf/domain_conf.c
|
|
|
0a7476 |
+++ b/src/conf/domain_conf.c
|
|
|
0a7476 |
@@ -30770,8 +30770,7 @@ virDomainGraphicsGetRenderNode(const virDomainGraphicsDef *graphics)
|
|
|
0a7476 |
|
|
|
0a7476 |
switch (graphics->type) {
|
|
|
0a7476 |
case VIR_DOMAIN_GRAPHICS_TYPE_SPICE:
|
|
|
0a7476 |
- if (graphics->data.spice.gl == VIR_TRISTATE_BOOL_YES)
|
|
|
0a7476 |
- ret = graphics->data.spice.rendernode;
|
|
|
0a7476 |
+ ret = graphics->data.spice.rendernode;
|
|
|
0a7476 |
break;
|
|
|
0a7476 |
case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS:
|
|
|
0a7476 |
ret = graphics->data.egl_headless.rendernode;
|
|
|
0a7476 |
@@ -30794,6 +30793,10 @@ virDomainGraphicsNeedsAutoRenderNode(const virDomainGraphicsDef *graphics)
|
|
|
0a7476 |
if (!virDomainGraphicsSupportsRenderNode(graphics))
|
|
|
0a7476 |
return false;
|
|
|
0a7476 |
|
|
|
0a7476 |
+ if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE &&
|
|
|
0a7476 |
+ graphics->data.spice.gl != VIR_TRISTATE_BOOL_YES)
|
|
|
0a7476 |
+ return false;
|
|
|
0a7476 |
+
|
|
|
0a7476 |
if (virDomainGraphicsGetRenderNode(graphics))
|
|
|
0a7476 |
return false;
|
|
|
0a7476 |
|
|
|
0a7476 |
--
|
|
|
0a7476 |
2.21.0
|
|
|
0a7476 |
|