summaryrefslogtreecommitdiffstats
path: root/hw/qxl.h
Commit message (Collapse)AuthorAgeFilesLines
* pci: update all users to look in pci/Michael S. Tsirkin2012-12-171-1/+1
| | | | | | update all users so we can remove the makefile hack. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* qxl: set default revision to 4Gerd Hoffmann2012-10-081-5/+0
| | | | | | | Set qxl pci revision to 4 (for pc-1.3+) so guests know spice-server 0.12 features are available. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: make number of surfaces runtime-configurable.Gerd Hoffmann2012-09-051-2/+1
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: add QXL_IO_MONITORS_CONFIG_ASYNCAlon Levy2012-09-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Revision bumped to 4 for new IO support, enabled for spice-server >= 0.11.1. New io enabled if revision is 4. Revision can be set to 4. [ kraxel: 3 continues to be the default revision. Once we have a new stable spice-server release and the qemu patches to enable the new bits merged we'll go flip the switch and make rev4 the default ] This io calls the corresponding new spice api spice_qxl_monitors_config_async to let spice-server read a new guest set monitors config and notify the client. On migration reissue spice_qxl_monitors_config_async. RHBZ: 770842 Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> fixup Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: add vgamem_size_mb and vgamem_sizeAlon Levy2012-06-221-0/+2
| | | | | | | | | | | | In preperation for supporting a larger framebuffer for multiple monitors on a single card, add a property to qxl vgamem_size_mb, and corresponding byte sized vgamem_size, and use instead of VGA_RAM_SIZE. [ kraxel: simplify property handling, add sanity checks ] [ kraxel: fix mode copying ] Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hw/qxl: ignore guest from guestbug until resetAlon Levy2012-06-221-0/+3
| | | | | | | | | | soft_reset is called from any of: * QXL_IO_RESET * vga io * pci reset handler Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hw/qxl: s/qxl_guest_bug/qxl_set_guest_bug/Alon Levy2012-06-221-1/+2
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: check for NULL return from qxl_phys2virtAlon Levy2012-05-031-3/+3
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: Add missing GCC_FMT_ATTR and fix format specifierStefan Weil2012-04-201-1/+1
| | | | | | | | val is an uint64_t, therefore %d was not correct. Signed-off-by: Stefan Weil <sw@weilnetz.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* qxl: add optinal 64bit vram barGerd Hoffmann2012-02-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an 64bit pci bar for vram. It is turned off by default. It can be enabled by setting the size of the 64bit bar to be larger than the 32bit bar. Both 32bit and 64bit bar refer to the same memory. Only the first part of the memory is available via 32bit bar. The intention is to allow large vram sizes for 64bit guests, by allowing the vram bar being mapped above 4G, so we don't have to squeeze it into the pci I/O window below 4G. With vram_size_mb=16 and vram64_size_mb=256 it looks like this: 00:02.0 VGA compatible controller: Red Hat, Inc. Device 0100 (rev 02) (prog-if 00 [VGA controller]) Subsystem: Red Hat, Inc Device 1100 Physical Slot: 2 Flags: fast devsel, IRQ 10 Memory at f8000000 (32-bit, non-prefetchable) [size=64M] Memory at fc000000 (32-bit, non-prefetchable) [size=16M] Memory at fd020000 (32-bit, non-prefetchable) [size=8K] I/O ports at c5a0 [size=32] Memory at ffe0000000 (64-bit, prefetchable) [size=256M] Expansion ROM at fd000000 [disabled] [size=64K] [ mapping above 4G needs patched seabios: http://www.kraxel.org/cgit/seabios/commit/?h=pci64 ]
* qxl: make qxl_render_update asyncAlon Levy2012-02-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | RHBZ# 747011 Removes the last user of QXL_SYNC when using update drivers that use the _ASYNC io ports. The last user is qxl_render_update, it is called both by qxl_hw_update which is the vga_hw_update_ptr passed to graphic_console_init, and by qxl_hw_screen_dump. At the same time the QXLRect area being passed to the red_worker thread is passed as a copy, as part of the QXLCookie. The implementation uses interface_update_area_complete with a bh to make sure dpy_update and qxl_flip are called from the io thread, otherwise the vga->ds->surface.data can change under our feet. With this patch sdl+spice works fine. But spice by itself doesn't produce the expected screendumps unless repeated a few times, due to ppm_save being called before update_area (rendering done in spice server thread) having a chance to complete. Fixed by next patch, but see commit message for problem introduced by it. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: introduce QXLCookieAlon Levy2012-02-271-1/+1
| | | | | | | Will be used in the next patch. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: remove flippedAlon Levy2012-02-271-1/+1
| | | | | | | | | Tested on linux and windows guests. For negative stride, qxl_flip copies directly to vga->ds->surface->data, for positive it's reallocated to share qxl->guest_primary.data Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: require spice >= 0.8.2Alon Levy2012-02-271-4/+0
| | | | | | | | | | | drop all ifdefs on SPICE_INTERFACE_QXL_MINOR >= 1 as a result, any check for SPICE_SERVER_VERSION that is now always satisfied, and SPICE_INTERFACE_CORE_MINOR >= 3 tests, because 0.8.2 has SPICE_INTERFACE_QXL_MINOR == 1 and SPICE_INTERFACE_CORE_MINOR == 3. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: drop qxl_spice_update_area_async definitionAlon Levy2012-02-271-6/+0
| | | | | | | | | | | It was never used. Introduced in 5ff4e36c804157bd84af43c139f8cd3a59722db9 qxl: async io support using new spice api But not used even then. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: add user-friendly bar size propertiesGerd Hoffmann2012-02-211-0/+4
| | | | | | | Add two properties to specify bar sizes in megabytes instead of bytes, which is alot more user-friendly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: stride fixupGerd Hoffmann2011-11-011-1/+2
| | | | | | | | | | spice uses negative stride value to signal the bitmap is upside down. The qxl renderer (used for scl, vnc and screenshots) wants a positive value because it is easier to work with. The positive value is then stored in the very same variable, which has the drawback that the upside-down test works only once. Fix by using two variables. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: Convert to QEMU thread APIJan Kiszka2011-10-251-1/+2
| | | | | | | | Use QEMU thread API instead of pthread directly. We still need to get rid of pthread_yield, though, to drop pthread.h inclusion. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vga: convert vga and its derivatives to the memory APIAvi Kivity2011-08-081-3/+3
| | | | | | | | | | | | | | | 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>
* qxl: bump pci revGerd Hoffmann2011-08-031-0/+6
| | | | | | | | | | | Inform guest drivers about the new features I/O commands we have now (async commands, S3 support) if building with newer spice, i.e. if SPICE_INTERFACE_QXL_MINOR >= 1. sneaked in some 81+ column line spliting. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Alon Levy <alevy@redhat.com>
* qxl: async io support using new spice apiAlon Levy2011-08-031-3/+13
| | | | | | | | | | | | | Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async command processing relies on an added QXLInterface::async_complete and added QXLWorker::*_async additions, in spice server qxl >= 3.1 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Alon Levy <alevy@redhat.com>
* qxl: make qxl_guest_bug take variable argumentsAlon Levy2011-08-011-1/+1
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: error handling fixes and cleanups.Gerd Hoffmann2011-08-011-1/+2
| | | | | | | | | | | | | | | Add qxl_guest_bug() function which is supposed to be called in case sanity checks of guest requests fail. It raises an error IRQ and logs a message in case guest debugging is enabled. Make PANIC_ON() abort instead of exit. That macro should be used for qemu bugs only, any guest-triggerable stuff should use the new qxl_guest_bug() function instead. Convert a few easy cases from PANIC_ON() to qxl_guest_bug() to show intended usage. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: fix surface tracking & lockingGerd Hoffmann2011-08-011-0/+2
| | | | | | | | Surface tracking needs proper locking since it is used from vcpu and spice worker threads, add it. Also reset the surface counter when zapping all surfaces. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice/qxl: move worker wrappersGerd Hoffmann2011-08-011-0/+13
| | | | | | | | Move the wrapper functions which are used by qxl only to qxl.c. Rename them from qemu_spice_* to qxl_spice_*. Also pass in a qxl state pointer instead of a SimpleSpiceDisplay pointer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice/qxl: zap spice 0.4 migration compatibility bitsGerd Hoffmann2011-01-241-4/+0
| | | | | | | | | Live migration from and to spice 0.4 qxl devices isn't going to work. Rip out the bits which attempt to support that. Zap the subsection logic which is obsolete now. Bumb the version to make a clean cut. This should obviously go in before 0.14 is released. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: add qxl deviceGerd Hoffmann2010-12-091-0/+112
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>
OpenPOWER on IntegriCloud