From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: [PATCH v4 01/12] drm/virtio: pass gem reservation object to ttm init Date: Thu, 20 Jun 2019 08:07:15 +0200 Message-ID: <20190620060726.926-2-kraxel@redhat.com> References: <20190620060726.926-1-kraxel@redhat.com> Return-path: In-Reply-To: <20190620060726.926-1-kraxel@redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: dri-devel@lists.freedesktop.org Cc: Gerd Hoffmann , David Airlie , Daniel Vetter , "open list:VIRTIO GPU DRIVER" , open list List-Id: dri-devel@lists.freedesktop.org With this gem and ttm will use the same reservation object, so mixing and matching ttm / gem reservation helpers should work fine. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/virtio/virtgpu_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index b2da31310d24..242766d644a7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, virtio_gpu_init_ttm_placement(bo); ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, - true, acc_size, NULL, NULL, + true, acc_size, NULL, + bo->gem_base.resv, &virtio_gpu_ttm_bo_destroy); /* ttm_bo_init failure will call the destroy */ if (ret != 0) -- 2.18.1