Commit graph

11 commits

Author SHA1 Message Date
Dave Airlie
7552ed8a1a virtio-gpu: don't free things on ttm_bo_init failure
ttm_bo_init will call the destroy callback which will do all
this, this was causing a double free.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-10-16 10:44:01 +02:00
Gerd Hoffmann
6d41533433 virtio-gpu: wait for cursor updates finish
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-10-16 10:44:00 +02:00
Gerd Hoffmann
ec2f0577c7 virtio-gpu: add & use virtio_gpu_queue_fenced_ctrl_buffer
Add helper function to handle the submission of fenced control requests.
Make sure we initialize the fence while holding the virtqueue lock, so
requests can't be reordered.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-10-16 10:44:00 +02:00
Gerd Hoffmann
9c73f47826 virtio-gpu: add virtio_gpu_queue_ctrl_buffer_locked
Add virtio_gpu_queue_ctrl_buffer_locked function, which does the same as
virtio_gpu_queue_ctrl_buffer but does not take the virtqueue lock.  The
caller must hold the lock instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-10-16 10:43:59 +02:00
Archit Taneja
0843010bbd drm/virtio: Use new drm_fb_helper functions
Use the newly created wrapper drm_fb_helper functions instead of calling
core fbdev functions directly. They also simplify the fb_info creation.

v3:
- Don't touch remove_conflicting_framebuffers

v2:
- add missing header for virtgpu_fb.c

Cc: David Airlie <airlied@linux.ie>
Cc: Gerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-08-06 14:13:07 +02:00
Dave Airlie
d5084f1711 virtio-gpu: add locking for vbuf pool
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-16 11:22:41 +02:00
Dave Airlie
441012aff6 drm/virtgpu: initialise fbdev after getting initial display info
This should avoid issues with the fbdev path trying to render
before we've gotten the display info.

Signed-off-by: Dave Airlie <airlied@redhat.com>

[ kraxel: wait for display-info reply ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-16 11:22:40 +02:00
Gerd Hoffmann
50cb941a26 Add virtio-vga bits. 2015-06-16 11:22:40 +02:00
Dan Carpenter
3f05eb4e3f drm/virtio: remove some dead code
The goto is correct, and we never reach the return statement so just
delete the dead code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-11 13:16:35 +10:00
Dan Carpenter
2b7edcad69 drm/virtio: checking for NULL instead of IS_ERR
virtio_gpu_alloc_object() returns an error pointer, it never returns
NULL.

Fixes: dc5698e80c ('Add virtio gpu driver.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-11 13:16:29 +10:00
Dave Airlie
dc5698e80c Add virtio gpu driver.
This patch adds a kms driver for the virtio gpu.  The xorg modesetting
driver can handle the device just fine, the framebuffer for fbcon is
there too.

Qemu patches for the host side are under review currently.

The pci version of the device comes in two variants: with and without
vga compatibility.  The former has a extra memory bar for the vga
framebuffer, the later is a pure virtio device.  The only concern for
this driver is that in the virtio-vga case we have to kick out the
firmware framebuffer.

Initial revision has only 2d support, 3d (virgl) support requires
some more work on the qemu side and will be added later.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-03 14:17:38 +02:00