Commit cde14fd4 authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}

Call reservation_object_* directly instead
of using ttm_bo_{reserve,unreserve}.

v4: check for EINTR only.
v3: check for EINTR too.
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-7-kraxel@redhat.com
parent 23a0e88e
......@@ -402,9 +402,9 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
{
int r;
r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
r = dma_resv_lock_interruptible(bo->gem_base.resv, NULL);
if (unlikely(r != 0)) {
if (r != -ERESTARTSYS) {
if (r != -EINTR) {
struct virtio_gpu_device *qdev =
bo->gem_base.dev->dev_private;
dev_err(qdev->dev, "%p reserve failed\n", bo);
......@@ -416,7 +416,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
static inline void virtio_gpu_object_unreserve(struct virtio_gpu_object *bo)
{
ttm_bo_unreserve(&bo->tbo);
dma_resv_unlock(bo->gem_base.resv);
}
/* virgl debufs */
......
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