Commit 889165ad authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm/virtio: pass gem reservation object to ttm init

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: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarChia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-2-kraxel@redhat.com
parent 37dfdc55
...@@ -138,7 +138,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, ...@@ -138,7 +138,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
virtio_gpu_init_ttm_placement(bo); virtio_gpu_init_ttm_placement(bo);
ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size,
ttm_bo_type_device, &bo->placement, 0, 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); &virtio_gpu_ttm_bo_destroy);
/* ttm_bo_init failure will call the destroy */ /* ttm_bo_init failure will call the destroy */
if (ret != 0) if (ret != 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment