Skip to contentSkip to conversation

hw/display/cirrus_vga: Move "isa-cirrus-vga" device into a separate file

PATCH New Thomas Huth 1 participant 1 message Oct 12, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 hw/display/cirrus_vga: Move "isa-cirrus-vga" device into a separate file

In downstream distros like RHEL we'd like to disable some of the "legacy" devices of QEMU. The ISA version of the Cirrus VGA device is one of these legacy devices. So let's make the build process a little bit more flexible here by putting the Cirrus ISA code into a separate file which is only included if both, CONFIG_VGA_CIRRUS and CONFIG_VGA_ISA are set.

Note that this disables "isa-cirrus-vga" for the ppc-softmmu and the alpha-softmmu target since CONFIG_VGA_ISA is not set there. But I think this is OK since these targets are only interested in the PCI variant anyway.

---
v2: Use CONFIG_VGA_ISA instead of new config option

 hw/display/Makefile.objs         |   1 +
 hw/display/cirrus_vga.c          | 143 ++-------------------------------------
 hw/display/cirrus_vga_internal.h | 103 ++++++++++++++++++++++++++++
 hw/display/cirrus_vga_isa.c      |  98 +++++++++++++++++++++++++++
 4 files changed, 207 insertions(+), 138 deletions(-)
 create mode 100644 hw/display/cirrus_vga_internal.h
 create mode 100644 hw/display/cirrus_vga_isa.c
hw/display/Makefile.objs +1 -0
index 780a76b..5c3d629 100644
@@ -5,6 +5,7 @@ common-obj-$(CONFIG_FW_CFG_DMA) += ramfb-standalone.o
 
 common-obj-$(CONFIG_ADS7846) += ads7846.o
 common-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o
+common-obj-$(call land,$(CONFIG_VGA_CIRRUS),$(CONFIG_VGA_ISA))+=cirrus_vga_isa.o
 common-obj-$(CONFIG_G364FB) += g364fb.o
 common-obj-$(CONFIG_JAZZ_LED) += jazz_led.o
 common-obj-$(CONFIG_PL110) += pl110.o
hw/display/cirrus_vga.c +5 -138

196 lines not on this page · raw message

hw/display/cirrus_vga_internal.h new file +103 -0

103 lines not on this page · raw message

hw/display/cirrus_vga_isa.c new file +98 -0

98 lines not on this page · raw message

Signature · 1 line
1.8.3.1