提交 1215195f 编写于 作者: E Erik Skultety

domain: conf: graphics: Fix picking DRI renderer automatically for SPICE

Commit 255e0732 introduced a few graphics-related helpers. The problem
is that virDomainGraphicsNeedsAutoRenderNode returns true if it gets
NULL as a response from virDomainGraphicsNeedsAutoRenderNode. That's
okay for egl-headless because that one always needs a DRM render node,
the same is not true for SPICE though, and unless the XML specifies
<gl enable='yes'> for SPICE, there's no need for any renderer.
Signed-off-by: NErik Skultety <eskultet@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 067aad26
......@@ -30982,8 +30982,7 @@ virDomainGraphicsGetRenderNode(const virDomainGraphicsDef *graphics)
switch (graphics->type) {
case VIR_DOMAIN_GRAPHICS_TYPE_SPICE:
if (graphics->data.spice.gl == VIR_TRISTATE_BOOL_YES)
ret = graphics->data.spice.rendernode;
ret = graphics->data.spice.rendernode;
break;
case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS:
ret = graphics->data.egl_headless.rendernode;
......@@ -31006,6 +31005,10 @@ virDomainGraphicsNeedsAutoRenderNode(const virDomainGraphicsDef *graphics)
if (!virDomainGraphicsSupportsRenderNode(graphics))
return false;
if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE &&
graphics->data.spice.gl != VIR_TRISTATE_BOOL_YES)
return false;
if (virDomainGraphicsGetRenderNode(graphics))
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册