]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: unbreak non-gl displays
authorAlexander Kanavin <alex.kanavin@gmail.com>
Wed, 27 Oct 2021 20:18:29 +0000 (22:18 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 30 Oct 2021 17:55:54 +0000 (18:55 +0100)
Correct two issues:
1. Looking for dri.pc is only needed when gl is enabled.
2. virtio-vga-gl works only when gl is enabled via -display,
otherwise virtio-vga needs to be selected.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
scripts/runqemu

index 54f2336ba97727ecb4855cb083fa9acd1b792986..1143509975d0d9b28a4fc3dc071f5337133b5fc8 100755 (executable)
@@ -1349,9 +1349,14 @@ class BaseConfig(object):
             raise RunQemuError('Option gl/gl-es needs gtk or sdl option.')
 
         if self.sdl == True or self.gtk == True or self.egl_headless == True:
-            self.set_dri_path()
-            self.qemu_opt += ' -device virtio-vga-gl -display '
+            if self.gl or self.gl_es or self.egl_headless:
+                self.qemu_opt += ' -device virtio-vga-gl '
+            else:
+                self.qemu_opt += ' -device virtio-vga '
+
+            self.qemu_opt += '-display '
             if self.egl_headless == True:
+                self.set_dri_path()
                 self.qemu_opt += 'egl-headless,'
             else:
                 if self.sdl == True:
@@ -1360,8 +1365,10 @@ class BaseConfig(object):
                     self.qemu_opt += 'gtk,'
 
                 if self.gl == True:
+                    self.set_dri_path()
                     self.qemu_opt += 'gl=on,'
                 elif self.gl_es == True:
+                    self.set_dri_path()
                     self.qemu_opt += 'gl=es,'
             self.qemu_opt += 'show-cursor=on'