WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] vfb: Add opengl option

# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1205855479 0
# Node ID bdaf721c361658b364ad3a9ec9d427274e4473f5
# Parent  c4de138175712f661e0a5bbe35b8834711db63b7
vfb: Add opengl option

(and replace bogus vncpasswd copy in xenapi_create in the SDL case)

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py   |    2 +-
 tools/python/xen/xend/image.py        |    4 +++-
 tools/python/xen/xend/server/vfbif.py |    2 +-
 tools/python/xen/xm/create.py         |    6 +++---
 tools/python/xen/xm/xenapi_create.py  |    2 +-
 5 files changed, 9 insertions(+), 7 deletions(-)

diff -r c4de13817571 -r bdaf721c3616 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Tue Mar 18 15:26:35 2008 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Tue Mar 18 15:51:19 2008 +0000
@@ -165,7 +165,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
 # Xen API console 'other_config' keys.
 XENAPI_CONSOLE_OTHER_CFG = ['vncunused', 'vncdisplay', 'vnclisten',
                             'vncpasswd', 'type', 'display', 'xauthority',
-                            'keymap']
+                            'keymap', 'opengl']
 
 # List of XendConfig configuration keys that have no direct equivalent
 # in the old world.
diff -r c4de13817571 -r bdaf721c3616 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Tue Mar 18 15:26:35 2008 +0000
+++ b/tools/python/xen/xend/image.py    Tue Mar 18 15:51:19 2008 +0000
@@ -202,6 +202,7 @@ class ImageHandler:
         vnc_config = {}
         has_vnc = int(vmConfig['platform'].get('vnc', 0)) != 0
         has_sdl = int(vmConfig['platform'].get('sdl', 0)) != 0
+        opengl = 1
         for dev_uuid in vmConfig['console_refs']:
             dev_type, dev_info = vmConfig['devices'][dev_uuid]
             if dev_type == 'vfb':
@@ -209,6 +210,7 @@ class ImageHandler:
                 if vfb_type == 'sdl':
                     self.display = dev_info.get('display', {})
                     self.xauthority = dev_info.get('xauthority', {})
+                    opengl = int(dev_info.get('opengl', opengl))
                     has_sdl = True
                 else:
                     vnc_config = dev_info.get('other_config', {})
@@ -263,7 +265,7 @@ class ImageHandler:
 
         elif has_sdl:
             # SDL is default in QEMU.
-            if int(vmConfig['platform'].get('opengl', 1)) != 1 :
+            if int(vmConfig['platform'].get('opengl', opengl)) != 1 :
                 ret.append('-disable-opengl')
         else:
             ret.append('-nographic')
diff -r c4de13817571 -r bdaf721c3616 tools/python/xen/xend/server/vfbif.py
--- a/tools/python/xen/xend/server/vfbif.py     Tue Mar 18 15:26:35 2008 +0000
+++ b/tools/python/xen/xend/server/vfbif.py     Tue Mar 18 15:51:19 2008 +0000
@@ -7,7 +7,7 @@ import os
 
 CONFIG_ENTRIES = ['type', 'vncdisplay', 'vnclisten', 'vncpasswd', 'vncunused',
                   'display', 'xauthority', 'keymap',
-                  'uuid', 'location', 'protocol']
+                  'uuid', 'location', 'protocol', 'opengl']
 
 class VfbifController(DevController):
     """Virtual frame buffer controller. Handles all vfb devices for a domain.
diff -r c4de13817571 -r bdaf721c3616 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Tue Mar 18 15:26:35 2008 +0000
+++ b/tools/python/xen/xm/create.py     Tue Mar 18 15:51:19 2008 +0000
@@ -319,7 +319,7 @@ gopts.var('irq', val='IRQ',
          For example 'irq=7'.
          This option may be repeated to add more than one IRQ.""")
 
-gopts.var('vfb', 
val="type={vnc,sdl},vncunused=1,vncdisplay=N,vnclisten=ADDR,display=DISPLAY,xauthority=XAUTHORITY,vncpasswd=PASSWORD",
+gopts.var('vfb', 
val="type={vnc,sdl},vncunused=1,vncdisplay=N,vnclisten=ADDR,display=DISPLAY,xauthority=XAUTHORITY,vncpasswd=PASSWORD,opengl=1",
           fn=append_value, default=[],
           use="""Make the domain a framebuffer backend.
           The backend type should be either sdl or vnc.
@@ -330,7 +330,7 @@ gopts.var('vfb', val="type={vnc,sdl},vnc
           default password.
           For type=sdl, a viewer will be started automatically using the
           given DISPLAY and XAUTHORITY, which default to the current user's
-          ones.""")
+          ones.  OpenGL will be used by default unless opengl is set to 0.""")
 
 gopts.var('vif', 
val="type=TYPE,mac=MAC,bridge=BRIDGE,ip=IPADDR,script=SCRIPT," + \
           "backend=DOM,vifname=NAME,rate=RATE,model=MODEL,accel=ACCEL",
@@ -645,7 +645,7 @@ def configure_vfbs(config_devs, vals):
             d['type'] = 'sdl'
         for (k,v) in d.iteritems():
             if not k in [ 'vnclisten', 'vncunused', 'vncdisplay', 'display',
-                          'xauthority', 'type', 'vncpasswd' ]:
+                          'xauthority', 'type', 'vncpasswd', 'opengl' ]:
                 err("configuration option %s unknown to vfbs" % k)
             config.append([k,v])
         if not d.has_key("keymap"):
diff -r c4de13817571 -r bdaf721c3616 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Tue Mar 18 15:26:35 2008 +0000
+++ b/tools/python/xen/xm/xenapi_create.py      Tue Mar 18 15:51:19 2008 +0000
@@ -810,7 +810,7 @@ class sxp2xml:
                 get_child_by_name(image, "vxauthority", "127.0.0.1"),
                 document))
             console.appendChild(self.mk_other_config(
-                "vncpasswd", get_child_by_name(image, "vncpasswd", ""),
+                "opengl", get_child_by_name(image, "opengl", "1"),
                 document))
             consoles.append(console)
             

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] vfb: Add opengl option, Xen patchbot-unstable <=