Skip to content

Commit 6d41533

Browse files
committed
virtio-gpu: wait for cursor updates finish
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
1 parent ec2f057 commit 6d41533

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎drivers/gpu/drm/virtio/virtgpu_display.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ static int virtio_gpu_crtc_cursor_set(struct drm_crtc *crtc,
9090
cpu_to_le32(64),
9191
cpu_to_le32(64),
9292
0, 0, &fence);
93+
ret = virtio_gpu_object_reserve(qobj, false);
94+
if (!ret) {
95+
reservation_object_add_excl_fence(qobj->tbo.resv,
96+
&fence->f);
97+
fence_put(&fence->f);
98+
virtio_gpu_object_unreserve(qobj);
99+
virtio_gpu_object_wait(qobj, false);
100+
}
93101

94102
output->cursor.hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_UPDATE_CURSOR);
95103
output->cursor.resource_id = cpu_to_le32(qobj->hw_res_handle);

0 commit comments

Comments
 (0)