Skip to content

VGA cleanup

Juan Quintela qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest23 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23vga: remove useless cast from void *hw/vga.c+5 -50 replies
2/23cirrus_vga: prefix vga_ioport_{read, write} with cirrushw/cirrus_vga.c+14 -140 replies
3/23vga: export vga_ioport_{read,write}hw/vga.c hw/vga_int.h+6 -40 replies
4/23vga: split vga_{load, save} into pci and common partshw/vga.c hw/vga_int.h hw/vmware_vga.c+37 -190 replies
5/23vga: split pci bits into vga-pci.cMakefile.target hw/vga-pci.c hw/vga.c+170 -1370 replies
6/23vga: split isa bits inco vga-isa.cMakefile.target hw/vga-isa.c hw/vga.c+52 -230 replies
7/23vga: export vga_mem_{read,write}hw/vga.c hw/vga_int.h+4 -20 replies
8/23vga: split vga-isa-mm.oMakefile.target hw/vga-isa-mm.c hw/vga.c +1 more+131 -980 replies
9/23vga and cirrus_vga: create vga_ioport_invalid() and use it everywherehw/cirrus_vga.c hw/vga.c hw/vga_int.h+19 -140 replies
10/23cirrus_vga: Add a VGACommonState local var to cirrus_vga_ioport_{read, write}hw/cirrus_vga.c+82 -800 replies
11/23vga: change tabs to spaceshw/vga.c+3 -30 replies
12/23cirrus_vga: make cirrus_read_hidden_dac() return its resulthw/cirrus_vga.c+5 -50 replies
13/23vga and cirrus_vga: substitute switch for equivalent assigntmenthw/cirrus_vga.c hw/vga.c+2 -270 replies
14/23vga: Rename last VGAState occurrences to VGACommonStatehw/vga.c hw/vga_template.h+39 -410 replies
15/23cirrus_vga: rename cirrus_hook_read_sr() cirrus_vga_read_sr()hw/cirrus_vga.c+12 -200 replies
16/23cirrus_vga: rename cirrus_hook_write_sr() cirrus_vga_write_sr()hw/cirrus_vga.c+22 -230 replies
17/23cirrus_vga: rename cirrus_hook_read_palette() cirrus_vga_read_palette()hw/cirrus_vga.c+12 -150 replies
18/23cirrus_vga: rename cirrus_hook_write_palette() cirrus_vga_write_palette()hw/cirrus_vga.c+9 -150 replies
19/23cirrus_vga: rename cirrus_hook_read_gr() cirrus_vga_read_gr()hw/cirrus_vga.c+38 -450 replies
20/23cirrus_vga: rename cirrus_hook_write_gr() cirrus_vga_write_gr()hw/cirrus_vga.c+38 -410 replies
21/23cirrus_vga: rename cirrus_hook_read_cr() cirrus_vga_read_cr()hw/cirrus_vga.c+7 -150 replies
22/23cirrus_vga: rename cirrus_hook_write_cr() cirrus_vga_write_cr()hw/cirrus_vga.c+27 -320 replies
23/23cirrus_vga: CIRRUS_HOOK_* is not used anymorehw/cirrus_vga.c+0 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/23] VGA cleanup

This patch:
- cleans the differences between VGAState/VGACommon state
- moves vga pci, isa, isa-mm out of vga.c (cirrus and blizzar uses VGA common state).
- Cleans all the cirrus_hook_* stuff is something that don't look like a hook :)

I would want this bits morged/reviewed before going the rest of the cleanup:

Todo:
- vga_ioport_read/write and cirrus_vga_ioport_read/write are almost identical after this series of changes. Creating read/write() callbacks for sr/gr/cr/palette. Should put us there. The cirrus ones were the difficult ones, the vga ones are trivial.
- CONFIG_VBE_BOCHS code. This code is only used by vga std (pci + isa). Neither cirrus/blizzard/isa-mm uses it. It should be moved out of vga.c, vga-std.c?, and then used by vga-isa and vga-pci?
- vmware_vga: it uses vga as embeded, but it don't save its state, I am not sure if it wants/need VBE_BOCHS, .... I haven't looked at vmware_vga too much, just to vga and cirrus_vga.

Comments?

Later, Juan.

Juan Quintela (23):
vga: remove useless cast from void *
cirrus_vga: prefix vga_ioport_{read,write} with cirrus
vga: export vga_ioport_{read,write}
vga: split vga_{load,save} into pci and common parts
vga: split pci bits into vga-pci.c
vga: split isa bits inco vga-isa.c
vga: export vga_mem_{read,write}
vga: split vga-isa-mm.o
vga and cirrus_vga: create vga_ioport_invalid() and use it everywhere
cirrus_vga: Add a VGACommonState local var to

    cirrus_vga_ioport_{read,write}

vga: change tabs to spaces
cirrus_vga: make cirrus_read_hidden_dac() return its result vga and cirrus_vga: substitute switch for equivalent assigntment
vga: Rename last VGAState occurrences to VGACommonState
cirrus_vga: rename cirrus_hook_read_sr() cirrus_vga_read_sr()
cirrus_vga: rename cirrus_hook_write_sr() cirrus_vga_write_sr()
cirrus_vga: rename cirrus_hook_read_palette()
cirrus_vga_read_palette()
cirrus_vga: rename cirrus_hook_write_palette()
cirrus_vga_write_palette()
cirrus_vga: rename cirrus_hook_read_gr() cirrus_vga_read_gr()
cirrus_vga: rename cirrus_hook_write_gr() cirrus_vga_write_gr()
cirrus_vga: rename cirrus_hook_read_cr() cirrus_vga_read_cr()
cirrus_vga: rename cirrus_hook_write_cr() cirrus_vga_write_cr()
cirrus_vga: CIRRUS_HOOK_* is not used anymore

 Makefile.target   |    9 +-
 hw/cirrus_vga.c   |  532 +++++++++++++++++++++++-----------------------------
 hw/vga-isa-mm.c   |  130 +++++++++++++
 hw/vga-isa.c      |   50 +++++
 hw/vga-pci.c      |  164 ++++++++++++++++
 hw/vga.c          |  357 ++++++------------------------------
 hw/vga_int.h      |   10 +-
 hw/vga_template.h |   20 +-
 hw/vmware_vga.c   |    1 +
 9 files changed, 662 insertions(+), 611 deletions(-)
 create mode 100644 hw/vga-isa-mm.c
 create mode 100644 hw/vga-isa.c
 create mode 100644 hw/vga-pci.c