summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/virtio
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-09-15 08:20:46 +0200
committerGerd Hoffmann <kraxel@redhat.com>2015-10-16 10:44:00 +0200
commit6d41533433e2eff26005ee39d103948fa65dd891 (patch)
tree996690c8d87710d9e65df9aa66f7172e379469dc /drivers/gpu/drm/virtio
parentvirtio-gpu: add & use virtio_gpu_queue_fenced_ctrl_buffer (diff)
downloadlinux-6d41533433e2eff26005ee39d103948fa65dd891.tar.xz
linux-6d41533433e2eff26005ee39d103948fa65dd891.zip
virtio-gpu: wait for cursor updates finish
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/virtio')
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_display.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index 4e160efc9402..c9c1427c361d 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -90,6 +90,14 @@ static int virtio_gpu_crtc_cursor_set(struct drm_crtc *crtc,
cpu_to_le32(64),
cpu_to_le32(64),
0, 0, &fence);
+ ret = virtio_gpu_object_reserve(qobj, false);
+ if (!ret) {
+ reservation_object_add_excl_fence(qobj->tbo.resv,
+ &fence->f);
+ fence_put(&fence->f);
+ virtio_gpu_object_unreserve(qobj);
+ virtio_gpu_object_wait(qobj, false);
+ }
output->cursor.hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_UPDATE_CURSOR);
output->cursor.resource_id = cpu_to_le32(qobj->hw_res_handle);