From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752116AbbJBL6i (ORCPT ); Fri, 2 Oct 2015 07:58:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49091 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750755AbbJBL6g (ORCPT ); Fri, 2 Oct 2015 07:58:36 -0400 From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Cc: David Airlie , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , virtualization@lists.linux-foundation.org (open list:VIRTIO GPU DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 3/7] virtio-gpu: wait for cursor updates finish Date: Fri, 2 Oct 2015 13:58:20 +0200 Message-Id: <1443787104-24243-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1443787104-24243-1-git-send-email-kraxel@redhat.com> References: <1443787104-24243-1-git-send-email-kraxel@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_display.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index 4e160ef..c9c1427 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); -- 1.8.3.1