Alper Nebi Yasak has uploaded this change for review.

View Change

drivers/qemu: Split Cirrus display support from Bochs display support

QEMU's Cirrus display device is supported along with the Bochs driver
since commit 7905f9254ebc ("qemu: cirrus native video init"). It is no
longer the default since QEMU 2.2. The code supporting it is quite
specific to x86, so split it from the Bochs display driver to make it
easier to support the latter in other architectures.

Change-Id: Ic9492b501ed4fdcbda6886db60b1e5348715e667
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
---
M src/drivers/emulation/qemu/Kconfig
M src/drivers/emulation/qemu/Makefile.mk
M src/drivers/emulation/qemu/cirrus.c
3 files changed, 27 insertions(+), 6 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/80375/1
diff --git a/src/drivers/emulation/qemu/Kconfig b/src/drivers/emulation/qemu/Kconfig
index c271825..e846a29 100644
--- a/src/drivers/emulation/qemu/Kconfig
+++ b/src/drivers/emulation/qemu/Kconfig
@@ -9,9 +9,7 @@
help
VGA driver for qemu emulated vga cards supporting
the bochs dispi interface. This includes
- standard vga, vmware svga and qxl. The default
- vga (cirrus) is *not* supported, so you have to
- pick another one explicitly via 'qemu -vga $card'.
+ standard vga, vmware svga, and qxl.

config DRIVERS_EMULATION_QEMU_BOCHS_XRES
int "bochs vga xres"
@@ -24,3 +22,26 @@
default 600
depends on LINEAR_FRAMEBUFFER
depends on DRIVERS_EMULATION_QEMU_BOCHS
+
+config DRIVERS_EMULATION_QEMU_CIRRUS
+ bool "cirrus svga driver"
+ default y
+ depends on CPU_QEMU_X86
+ depends on MAINBOARD_DO_NATIVE_VGA_INIT
+ select HAVE_VGA_TEXT_FRAMEBUFFER
+ select HAVE_LINEAR_FRAMEBUFFER
+ select VGA
+ help
+ VGA driver for qemu emulated cirrus svga card.
+
+config DRIVERS_EMULATION_QEMU_CIRRUS_XRES
+ int "cirrus svga xres"
+ default 800
+ depends on LINEAR_FRAMEBUFFER
+ depends on DRIVERS_EMULATION_QEMU_CIRRUS
+
+config DRIVERS_EMULATION_QEMU_CIRRUS_YRES
+ int "cirrus svga yres"
+ default 600
+ depends on LINEAR_FRAMEBUFFER
+ depends on DRIVERS_EMULATION_QEMU_CIRRUS
diff --git a/src/drivers/emulation/qemu/Makefile.mk b/src/drivers/emulation/qemu/Makefile.mk
index c9d94bd..619782f 100644
--- a/src/drivers/emulation/qemu/Makefile.mk
+++ b/src/drivers/emulation/qemu/Makefile.mk
@@ -6,4 +6,4 @@
ramstage-$(CONFIG_CONSOLE_QEMU_DEBUGCON) += qemu_debugcon.c

ramstage-$(CONFIG_DRIVERS_EMULATION_QEMU_BOCHS) += bochs.c
-ramstage-$(CONFIG_DRIVERS_EMULATION_QEMU_BOCHS) += cirrus.c
+ramstage-$(CONFIG_DRIVERS_EMULATION_QEMU_CIRRUS) += cirrus.c
diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c
index 1dc8ac9..5f7b7ff 100644
--- a/src/drivers/emulation/qemu/cirrus.c
+++ b/src/drivers/emulation/qemu/cirrus.c
@@ -9,8 +9,8 @@
#include <pc80/vga_io.h>
#include <framebuffer_info.h>

-static int width = CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_XRES;
-static int height = CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_YRES;
+static int width = CONFIG_DRIVERS_EMULATION_QEMU_CIRRUS_XRES;
+static int height = CONFIG_DRIVERS_EMULATION_QEMU_CIRRUS_YRES;
static u32 addr = 0;

enum

To view, visit change 80375. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ic9492b501ed4fdcbda6886db60b1e5348715e667
Gerrit-Change-Number: 80375
Gerrit-PatchSet: 1
Gerrit-Owner: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Gerrit-MessageType: newchange