summaryrefslogtreecommitdiff
path: root/include/hw/virtio/virtio-gpu.h
AgeCommit message (Collapse)AuthorFilesLines
2016-08-16virtio-gpu: fix missing log.h include fileDaniel P. Berrange1-0/+1
The virtio-gpu.h file defines a macro VIRTIO_GPU_FILL_CMD which includes a call to qemu_log_mask, but does not include qemu/log.h. In a default configure, it is lucky and gets qemu/log.h indirectly due to the 'log' trace backend being enabled. If that trace backend is disabled though, eg ./configure --enable-trace-backends=nop Then the build will fail: In file included from /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:19:0: /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c: In function ‘virgl_cmd_create_resource_2d’: /home/berrange/src/virt/qemu/include/hw/virtio/virtio-gpu.h:138:13: error: implicit declaration of function ‘qemu_log_mask’ [-Werror=implicit-function-declaration] qemu_log_mask(LOG_GUEST_ERROR, \ ^ /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:34:5: note: in expansion of macro ‘VIRTIO_GPU_FILL_CMD’ VIRTIO_GPU_FILL_CMD(c2d); ^~~~~~~~~~~~~~~~~~~ /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:34:5: error: nested extern declaration of ‘qemu_log_mask’ [-Werror=nested-externs] In file included from /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:19:0: /home/berrange/src/virt/qemu/include/hw/virtio/virtio-gpu.h:138:27: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function) qemu_log_mask(LOG_GUEST_ERROR, \ [snip many more errors] Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1470648700-3474-1-git-send-email-berrange@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-07-21virtio-gpu: Use migrate_add_blocker for virgl migration blockingDr. David Alan Gilbert1-0/+2
virgl conditionally registers a vmstate as unmigratable when virgl is enabled; instead use the migrate_add_blocker mechanism. Signed-off-by: Dr. David Alan Gilbert <dgilbert@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> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
2016-07-12Clean up header guards that don't match their file nameMarkus Armbruster1-2/+2
Header guard symbols should match their file name to make guard collisions less likely. Offenders found with scripts/clean-header-guards.pl -vn. Cleaned up with scripts/clean-header-guards.pl, followed by some renaming of new guard symbols picked by the script to better ones. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
2016-07-06virgl: count the calls to gl_blockMarc-André Lureau1-1/+1
In virgl_cmd_resource_flush(), when several consoles are updated, it needs to keep blocking until all spice gl draws are done. This fixes an assert() in spice when using multiple monitors with virgl. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1465911849-30423-2-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-06-06virtio-gpu: add live migration supportGerd Hoffmann1-1/+3
Store some additional state for cursor and resource backing storage, so we can write out and reload things. Implement vmsave+vmload for 2d mode. Continue blocking live migration in 3d/virgl mode. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1464009727-7753-1-git-send-email-kraxel@redhat.com
2016-05-23virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTSMarc-André Lureau1-4/+2
The value is defined in virtio_gpu.h already (changing from 4 to 16). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1463653560-26958-6-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-02-03virtio-gpu: block any rendering until client (ui) is doneGerd Hoffmann1-0/+1
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 Hoffmann1-0/+2
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 Hoffmann1-0/+1
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>
2015-10-08virtio-gpu: add 3d mode and virgl rendering support.Gerd Hoffmann1-1/+21
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-07-07virtio-gpu: use virtio_instance_init_common, fixup propertiesGerd Hoffmann1-3/+0
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-10virtio-gpu/2d: add virtio gpu core codeGerd Hoffmann1-0/+145
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>