summaryrefslogtreecommitdiffstats
path: root/hw/vga_int.h
Commit message (Collapse)AuthorAgeFilesLines
* hw: move private headers to hw/ subdirectories.Paolo Bonzini2013-04-081-218/+0
| | | | | | | Many headers are used only in a single directory. These can be kept in hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* console: stop using DisplayState in gfx hardware emulationGerd Hoffmann2013-03-181-1/+1
| | | | | | | Use QemuConsole instead. Updates interfaces in console.[ch] and adapts gfx hardware emulation code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* exec: move include files to include/exec/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qapi: move include files to include/qobject/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* janitor: add guards to headersPaolo Bonzini2012-12-191-0/+4
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* vmware_vga: Allow simple drivers to work without using the fifoBALATON Zoltan2012-11-031-0/+1
| | | | | | | | | | | Postpone stopping the dirty log to the point where the command fifo is configured to allow drivers which don't use the fifo to work too. (Without this the picture rendered into the vram never got to the screen and the DIRECT_VRAM option meant to support this case was removed a year ago.) Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vga: fix text mode updatingGerd Hoffmann2012-11-011-0/+2
| | | | | | | | | | | | | With both text (curses) and graphics (vnc/sdl/spice/...) display active vga text mode emulation fails to update both correctly. Depending on whenever vga_update_text() or vga_draw_text() happens to be called first only the text display or only the graphics display will see display resolution changes and full redraws. Fix it by calling both text/gfx resize functions in both code paths and keep track of full screen redraws needed in VGACommonState fields. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Rename target_phys_addr_t to hwaddrAvi Kivity2012-10-231-2/+2
| | | | | | | | | | | | | | | target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: remove CONFIG_BOCHS_VBEGerd Hoffmann2012-10-201-21/+7
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vga: add mmio bar to standard vgaGerd Hoffmann2012-10-201-0/+6
| | | | | | | | | | This patch adds a mmio bar to the qemu standard vga which allows to access the standard vga registers and bochs dispi interface registers via mmio. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vga: ppm_save(): add error handlingLuiz Capitulino2012-09-051-1/+2
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* vga: Implement blinking of text cursorJan Kiszka2012-07-141-0/+2
| | | | | | | | | Let the text cursor blink at 1.875 Hz, the original VGA cursor frequency. No timer is used, instead we rely on the fact that the display is updated periodically. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vga: make vram size configurableGerd Hoffmann2012-06-221-2/+2
| | | | | | | | | | | | | | | | | Zap the global VGA_RAM_SIZE #define, make the vga ram size configurable for standard vga and vmware vga. cirrus and qxl are left with a fixed size (and private VGA_RAM_SIZE #define) for now. qxl needs some non-trivial adjustments in the mode list handling deal with a runtime-configurable size, which calls for a separate qxl patch. cirrus emulates cards which have 2 MB (isa) and 4 MB (pci), so I guess it would make sense to use these sizes. That change would break migration though, so I left it fixed at 8 MB size. Making it configurabls is pretty pointless for cirrus as we have to match real hardware. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vga: raise xres+yres limitsGerd Hoffmann2012-06-221-2/+2
| | | | | | | | | | | The vgabios will check whenever any given video mode will fit into the given video memory before adding it to the list of available modes, so there is no need to keep xmax * ymax * 32bpp lower than VGA_RAM_SIZE. Lets raise the limits a bit. Should be good for a few years, display sizes are not growing that fast. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vga: fix vram double-mapping with -vga std and -M pc-0.12Avi Kivity2012-05-291-0/+1
| | | | | | | | | | | | With pc-0.12, we map the video RAM both through the PCI BAR (the guest does this) and through a fixed mapping at 0xe0000000. The memory API doesn't allow this double map, and aborts. Fix by using an alias. Reported-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: use constants from vga.hBlue Swirl2012-02-041-3/+0
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vga: move Cirrus VGA template to its own fileBlue Swirl2012-02-041-13/+0
| | | | | | | Standard VGA does not use vga_draw_cursor_line_* functions. Move the template to cirrus_vga_template.h. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vga: Convert to isa_register_portio_listRichard Henderson2011-10-111-2/+5
| | | | | | | | | [jan: fix cut'n'paste errors] [avi: adjust pci variants not to use isa functions] Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* vga: Drop some unused fieldsJan Kiszka2011-08-221-2/+0
| | | | | | | | Memory region refactorings obsoleted them. CC: Avi Kivity <avi@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: Use linear mapping + dirty logging in chain 4 memory access modeJan Kiszka2011-08-221-0/+2
| | | | | | | | | | | | | | | | | Most VGA memory access modes require MMIO handling as they demand weird logic to get a byte from or into the video RAM. However, there is one exception: chain 4 mode with all memory planes enabled for writing. This mode actually allows lineary mapping, which can then be combined with dirty logging to accelerate KVM. This patch accelerates specifically VBE accesses like they are used by grub in graphical mode. Not only the standard VGA adapter benefits from this, also vmware and spice in VGA mode. CC: Gerd Hoffmann <kraxel@redhat.com> CC: Avi Kivity <avi@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmware-vga: Eliminate vga_dirty_log_restartJan Kiszka2011-08-221-1/+0
| | | | | | | | | | | After the conversion to the new Memory API, vga_dirty_log_restart became seriously pointless. Remove it from vmware-vga and and then finally drop the service. CC: Andrzej Zaborowski <balrogg@gmail.com> CC: Avi Kivity <avi@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: drop get_system_memory() from vga devices and derivativesAvi Kivity2011-08-221-2/+2
| | | | | | | | Instead, use the bus accessors, or get the address space directly from the board constructor. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: simplify vga window mmio access functionsAvi Kivity2011-08-081-2/+2
| | | | | | | | | | | | Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. We have to keep vga_mem_{read,write}b() since they're used by cirrus. Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: convert vga and its derivatives to the memory APIAvi Kivity2011-08-081-9/+5
| | | | | | | | | | | | | | | Convert all vga memory to the memory API. Note we need to fall back to get_system_memory(), since the various buses don't pass the vga window as a memory region. We no longer need to sync the dirty bitmap of the cirrus mapped memory banks, since the memory API takes care of that for us. [jan: fix vga-pci logging] Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: Fix type of lfb/map_addr/end.Richard Henderson2011-07-231-5/+5
| | | | | | | | | | These addresses have been passed through pci_to_cpu_addr, and thus need to be full target_phys_addr_t. Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Cc: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga-isa: convert to qdevBlue Swirl2011-02-201-0/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* spice: add qxl deviceGerd Hoffmann2010-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | qxl is a paravirtual graphics card. The qxl device is the bridge between the guest and the spice server (aka libspice-server). The spice server will send the rendering commands to the spice client, which will actually render them. The spice server is also able to render locally, which is done in case the guest wants read something from video memory. Local rendering is also used to support display over vnc and sdl. qxl is activated using "-vga qxl". qxl supports multihead, additional cards can be added via '-device qxl". [ v2: add copyright to files ] [ v2: use qemu-common.h for standard includes ] [ v2: create separate qxl-vga device for primary ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* more stdvga cleanups.Gerd Hoffmann2010-11-161-2/+0
| | | | | | | video.x is gone now. It was the only user of the vga bios_offset + bios_size logic. Zap it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* update bochs vbe interfaceGerd Hoffmann2010-04-081-1/+3
| | | | | | | | | | The bochs vbe interface got a new register a while back, which specifies the linear framebuffer size in 64k units. This patch adds support for the new register to qemu. With this patch applied vgabios 0.6c works with qemu. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* VMware VGA: Only enable dirty log tracking when fifo is disabledAnthony Liguori2009-12-181-0/+2
| | | | | | | | | | | | This patch enables dirty log tracking whenever it's needed and disables it when it is not. We unconditionally enable dirty log tracking on reset, restart dirty log tracking when PCI IO regions are remapped, and disable/enable it based on commands from the guest. Rebased-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make sure to enable dirty tracking of VBE vram mappingAnthony Liguori2009-12-181-2/+3
| | | | | | | | | | | | | | | Apparently, VBE maps the VGA vram to a fixed physical location. KVM requires that all mappings of the VGA vram have dirty tracking enabled on them. Any access to the VGA vram through the VBE mapping currently fails to result in dirty page tracking updates causing a black screen. This is the true root cause of VMware VGA not working correctly under KVM and likely also an issue with some of the std-vga black screen issues too. Cirrus does not enable VBE so it would not be a problem when using Cirrus. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Rebased-by: Dave Airlie <airlied@redhat.com>
* Revert "vga: do not resize the screen on hw_invalidate"Aurelien Jarno2009-11-271-1/+0
| | | | | | | | This causes ctrl+alt+u or ctrl+alt+f to not work when windows hasn't been resized first. Other graphic emulators do resize the screen on hw_invalidate. This reverts commit 0bd8246bfec1dfb2eb959f52db535572c0260f4c.
* vga roms: move loading from pc.c to vga drivers.Gerd Hoffmann2009-10-301-0/+2
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: remove unused vga_common_save/loadJuan Quintela2009-10-271-2/+0
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: port vga_common_save/load to vmstateJuan Quintela2009-10-271-0/+4
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: create is_vbe_vmstate fieldJuan Quintela2009-10-271-0/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "Get rid of _t suffix"Anthony Liguori2009-10-011-3/+3
| | | | | | | | | | | | In the very least, a change like this requires discussion on the list. The naming convention is goofy and it causes a massive merge problem. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Get rid of _t suffixmalc2009-10-011-3/+3
| | | | | | | Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
* vga and cirrus_vga: create vga_ioport_invalid() and use it everywhereJuan Quintela2009-09-091-0/+2
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: split vga-isa-mm.oJuan Quintela2009-09-091-1/+0
| | | | | | | | | It is only used in mips softmmu, compile only there. it_shift field was only used for vga_isa_mm, move it from VGACommonState to ISAVGAMMstate. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: export vga_mem_{read,write}Juan Quintela2009-09-091-0/+2
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: split vga_{load, save} into pci and common partsJuan Quintela2009-09-091-1/+2
| | | | | | | | | Once there adjust VGAState <-> VGACommonState Export vga_common_save/vga_common_load (nreeded by wmvare_vga Remove vga.pci_dev field, it is not needed anymore Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: export vga_ioport_{read,write}Juan Quintela2009-09-091-0/+2
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Everything outside of vga.c should use VGACommonStateJuan Quintela2009-08-271-6/+4
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce vga_common_reset() to be able to typcheck vga_reset()Juan Quintela2009-08-271-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev/prop: convert vga.c to helper macros.Gerd Hoffmann2009-08-101-2/+2
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
* vga: do not resize the screen on hw_invalidateStefano Stabellini2009-08-101-0/+1
| | | | | | | | | | | | Hi all, currently vga always resizes the screen when vga_hw_invalidate is called while this is not required and all the other graphic emulators don't. This patch fixes it, making vga invalidate behaviour consistent with the other emulated devices. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
* Remove vga_ram_sizePaul Brook2009-05-131-0/+3
| | | | | | | | | | The vga_ram_size argument to machine init functions always has the same value, and is ignored by many machines (including SPARC32 which has an obsolete ifdef for VGA_RAM_SIZE). Remove it and push VGA_RAM_SIZE into vga_int.h. Signed-off-by: Paul Brook <paul@codesourcery.com>
* vga: Replace VGA_COMMON with a structureAvi Kivity2009-05-081-86/+84
| | | | | | | | | | | | | | All VGA devices share a common field subset; currently they do so by a macro which defines the common fields inline their state structures, relying on the the common state being placed at offset 0 in the structure. This makes refactoring the code difficult and requires a lot of error prone casts. Replace the macro by a new VGACommonState structure, and the casts by regular field access and container_of() for upcasts. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: Cleanup dirty logging (Jan Kiszka)aliguori2009-04-171-1/+0
| | | | | | | | | | | | | | In theory, there are no more quirks in the KVM slot management that requires dirty log start/stop all over the place. We just have to start the logging each time the mapping may have changed. This patch drops vga_dirty_log_stop for both standard and cirrus VGA. It also reverts #6851 as it was obviously a tribute to the old slot system. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7141 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud