aboutsummaryrefslogtreecommitdiff
path: root/hw/display/virtio-gpu.c
AgeCommit message (Collapse)Author
2016-02-06virtio: move allocation to virtqueue_pop/vring_popPaolo Bonzini
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>
2016-02-03virtio-gpu: block any rendering until client (ui) is doneGerd Hoffmann
Wire up gl_block callback, so ui code can request to stop virtio-gpu rendering. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-02-03virtio-gpu: add support to enable/disable command processingGerd Hoffmann
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>
2016-02-03virtio-gpu: maintain command queueGerd Hoffmann
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>
2016-01-29virtio: Clean up includesPeter Maydell
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
2015-12-17linux-headers: update from kvm/nextPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-10-08virtio-gpu: add cursor update tracepointGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2015-10-08virtio-gpu: add 3d mode and virgl rendering support.Gerd Hoffmann
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>
2015-10-08virtio-gpu: change licence from GPLv2 to GPLv2+Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-10-08virtio-gpu: move iov free to virtio_gpu_cleanup_mapping_iovGerd Hoffmann
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>
2015-07-27virtio: get_features() can failJason Wang
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>
2015-07-07virtio-gpu: use virtio_instance_init_common, fixup propertiesGerd Hoffmann
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>
2015-06-12virtio-gpu: fix error messageGerd Hoffmann
iov limit was raised, but the error message still has the old limit ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-10virtio-gpu/2d: add virtio gpu core codeGerd Hoffmann
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>