summary refs log tree commit diff stats
path: root/hw/display/virtio-gpu.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* virtio: move allocation to virtqueue_pop/vring_popPaolo Bonzini2016-02-061-8/+13
| | | | | | | | | | | | | | | | | | | | | The return code of virtqueue_pop/vring_pop is unused except to check for errors or 0. We can thus easily move allocation inside the functions and just return a pointer to the VirtQueueElement. The advantage is that we will be able to allocate only the space that is needed for the actual size of the s/g list instead of the full VIRTQUEUE_MAX_SIZE items. Currently VirtQueueElement takes about 48K of memory, and this kind of allocation puts a lot of stress on malloc. By cutting the size by two or three orders of magnitude, malloc can use much more efficient algorithms. The patch is pretty large, but changes to each device are testable more or less independently. Splitting it would mostly add churn. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* virtio-gpu: block any rendering until client (ui) is doneGerd Hoffmann2016-02-031-0/+11
| | | | | | | Wire up gl_block callback, so ui code can request to stop virtio-gpu rendering. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* virtio-gpu: add support to enable/disable command processingGerd Hoffmann2016-02-031-1/+4
| | | | | | | So we can stop rendering for a while in case we have to. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* virtio-gpu: maintain command queueGerd Hoffmann2016-02-031-17/+36
| | | | | | | | | | | We'll go take out the commands we receive out of the virt queue and put them into a linked list, to decouple virtio queue handling from actual command processing. Also move cmd processing to new virtio_gpu_handle_ctrl func, so we can easily kick it from different places. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* virtio: Clean up includesPeter Maydell2016-01-291-0/+1
| | | | | | | | | | Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-15-git-send-email-peter.maydell@linaro.org
* linux-headers: update from kvm/nextPaolo Bonzini2015-12-171-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* virtio-gpu: add cursor update tracepointGerd Hoffmann2015-10-081-1/+8
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* virtio-gpu: add 3d mode and virgl rendering support.Gerd Hoffmann2015-10-081-9/+128
| | | | | | | | | Add virglrenderer library detection. Add 3d mode to virtio-gpu, wire up virglrenderer library. When in 3d mode render using the new context management and texture scanout callbacks. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* virtio-gpu: change licence from GPLv2 to GPLv2+Gerd Hoffmann2015-10-081-1/+1
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* virtio-gpu: move iov free to virtio_gpu_cleanup_mapping_iovGerd Hoffmann2015-10-081-2/+1
| | | | | | | | | For symmetry reasons: virtio_gpu_create_mapping_iov() allocates it so virtio_gpu_cleanup_mapping_iov() should free it, otherwise it's easy to miss a free() needed and leak memory. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* virtio: get_features() can failJason Wang2015-07-271-1/+2
| | | | | | | Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
* virtio-gpu: use virtio_instance_init_common, fixup propertiesGerd Hoffmann2015-07-071-1/+1
| | | | | | | | | Switch over to virtio_instance_init_common. Drop duplicate properties in virtio-gpu-pci and virtio-vga as they are properly aliased now. Also drop the indirection via DEFINE_VIRTIO_GPU_PROPERTIES, we don't need it any more as the properties are defined in a single place now. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* virtio-gpu: fix error messageGerd Hoffmann2015-06-121-1/+1
| | | | | | iov limit was raised, but the error message still has the old limit ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* virtio-gpu/2d: add virtio gpu core codeGerd Hoffmann2015-06-101-0/+918
This patch adds the core code for virtio gpu emulation, covering 2d support. Written by Dave Airlie and Gerd Hoffmann. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>