* [PATCH 1/2] runqemu: add options that enable virgl with the SDL frontend
@ 2019-11-11 16:42 Alexander Kanavin
2019-11-11 16:42 ` [PATCH 2/2] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Kanavin @ 2019-11-11 16:42 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
scripts/runqemu | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index a05facd0db6..5c56c3fe6c1 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -67,9 +67,9 @@ of the following environment variables (in any order):
nographic - disable video console
sdl - choose the SDL UI frontend
gtk - choose the Gtk UI frontend
- gl - enable virgl-based GL acceleration (also needs gtk option)
- gl-es - enable virgl-based GL acceleration, using OpenGL ES (also needs gtk option)
- egl-headless - enable headless EGL output; use vnc or spice to see it
+ gl - enable virgl-based GL acceleration (also needs gtk or sdl options)
+ gl-es - enable virgl-based GL acceleration, using OpenGL ES (also needs gtk or sdl options)
+ egl-headless - enable headless EGL output; use vnc (via publicvnc option) or spice to see it
serial - enable a serial console on /dev/ttyS0
serialstdio - enable a serial console on the console (regardless of graphics mode)
slirp - enable user networking, no root privileges is required
@@ -437,7 +437,12 @@ class BaseConfig(object):
self.qemu_opt_script += ' -nographic'
self.kernel_cmdline_script += ' console=ttyS0'
elif arg == 'sdl':
- self.qemu_opt_script += ' -display sdl'
+ if 'gl' in sys.argv[1:]:
+ self.qemu_opt_script += ' -vga virtio -display sdl,gl=on'
+ elif 'gl-es' in sys.argv[1:]:
+ self.qemu_opt_script += ' -vga virtio -display sdl,gl=es'
+ else:
+ self.qemu_opt_script += ' -display sdl'
elif arg == 'gtk':
if 'gl' in sys.argv[1:]:
self.qemu_opt_script += ' -vga virtio -display gtk,gl=on'
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] oe-selftest: extend virgl gtk test to also check the SDL option
2019-11-11 16:42 [PATCH 1/2] runqemu: add options that enable virgl with the SDL frontend Alexander Kanavin
@ 2019-11-11 16:42 ` Alexander Kanavin
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Kanavin @ 2019-11-11 16:42 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
meta/lib/oeqa/selftest/cases/runtime_test.py | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 7d3922ce448..3632ae81ede 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -166,9 +166,9 @@ class TestImage(OESelftestTestCase):
bitbake('core-image-full-cmdline socat')
bitbake('-c testimage core-image-full-cmdline')
- def test_testimage_virgl_gtk(self):
+ def test_testimage_virgl_gtk_sdl(self):
"""
- Summary: Check host-assisted accelerate OpenGL functionality in qemu with gtk frontend
+ Summary: Check host-assisted accelerate OpenGL functionality in qemu with gtk and SDL frontends
Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled
2. Check that kmscube demo runs without crashing.
Product: oe-core
@@ -183,18 +183,27 @@ class TestImage(OESelftestTestCase):
self.skipTest('virgl isn\'t working with Centos 7')
qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
+ sdl_packageconfig = get_bb_var('PACKAGECONFIG', 'libsdl2-native')
features = 'INHERIT += "testimage"\n'
if 'gtk+' not in qemu_packageconfig:
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"\n'
+ if 'sdl' not in qemu_packageconfig:
+ features += 'PACKAGECONFIG_append_pn-qemu-system-native = " sdl"\n'
if 'virglrenderer' not in qemu_packageconfig:
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n'
if 'glx' not in qemu_packageconfig:
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n'
+ if 'opengl' not in sdl_packageconfig:
+ features += 'PACKAGECONFIG_append_pn-libsdl2-native = " opengl"\n'
features += 'TEST_SUITES = "ping ssh virgl"\n'
features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
features += 'IMAGE_INSTALL_append = " kmscube"\n'
- features += 'TEST_RUNQEMUPARAMS = "gtk gl"\n'
- self.write_config(features)
+ features_gtk = features + 'TEST_RUNQEMUPARAMS = "gtk gl"\n'
+ self.write_config(features_gtk)
+ bitbake('core-image-minimal')
+ bitbake('-c testimage core-image-minimal')
+ features_sdl = features + 'TEST_RUNQEMUPARAMS = "sdl gl"\n'
+ self.write_config(features_sdl)
bitbake('core-image-minimal')
bitbake('-c testimage core-image-minimal')
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-11 16:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 16:42 [PATCH 1/2] runqemu: add options that enable virgl with the SDL frontend Alexander Kanavin
2019-11-11 16:42 ` [PATCH 2/2] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.