提交 83c49659 编写于 作者: P Peter Maydell

Merge remote-tracking branch 'remotes/kraxel/tags/fixes-31-20181116-pull-request' into staging

ui: add rendernode arg for egl-headless (fixes permission issues with libvirt)

# gpg: Signature made Fri 16 Nov 2018 13:29:15 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/fixes-31-20181116-pull-request:
  help: Provide help for egl-headless
  ui: Allow specifying 'rendernode' display option for egl-headless
  qapi: Add "rendernode" display option for egl-headless
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
......@@ -1037,6 +1037,20 @@
'data' : { '*grab-on-hover' : 'bool',
'*zoom-to-fit' : 'bool' } }
##
# @DisplayEGLHeadless:
#
# EGL headless display options.
#
# @rendernode: Which DRM render node should be used. Default is the first
# available node on the host.
#
# Since: 3.1
#
##
{ 'struct' : 'DisplayEGLHeadless',
'data' : { '*rendernode' : 'str' } }
##
# @DisplayGLMode:
#
......@@ -1086,4 +1100,5 @@
'*window-close' : 'bool',
'*gl' : 'DisplayGLMode' },
'discriminator' : 'type',
'data' : { 'gtk' : 'DisplayGTK' } }
'data' : { 'gtk' : 'DisplayGTK',
'egl-headless' : 'DisplayEGLHeadless'} }
......@@ -1216,7 +1216,8 @@ DEF("display", HAS_ARG, QEMU_OPTION_display,
"-display gtk[,grab_on_hover=on|off][,gl=on|off]|\n"
"-display vnc=<display>[,<optargs>]\n"
"-display curses\n"
"-display none"
"-display none\n"
"-display egl-headless[,rendernode=<file>]"
" select display type\n"
"The default display is equivalent to\n"
#if defined(CONFIG_GTK)
......@@ -1258,6 +1259,9 @@ menus and other UI elements to configure and control the VM during
runtime.
@item vnc
Start a VNC server on display <arg>
@item egl-headless
Offload all OpenGL operations to a local DRI device. For any graphical display,
this display needs to be paired with either VNC or SPICE displays.
@end table
ETEXI
......
......@@ -176,7 +176,7 @@ static void egl_headless_init(DisplayState *ds, DisplayOptions *opts)
egl_dpy *edpy;
int idx;
if (egl_rendernode_init(NULL, mode) < 0) {
if (egl_rendernode_init(opts->u.egl_headless.rendernode, mode) < 0) {
error_report("egl: render node init failed");
exit(1);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册