search for: out_unr

Displaying 20 results from an estimated 26 matches for "out_unr".

Did you mean: out_nr
2017 Sep 29
1
[PATCH] drm/virtio: Replace instances of reference/unreference with get/put
...ce *dev, void *data, ri->size = qobj->gem_base.size; ri->res_handle = qobj->hw_res_handle; - drm_gem_object_unreference_unlocked(gobj); + drm_gem_object_put_unlocked(gobj); return 0; } @@ -389,7 +389,7 @@ static int virtio_gpu_transfer_from_host_ioctl(struct drm_device *dev, out_unres: virtio_gpu_object_unreserve(qobj); out: - drm_gem_object_unreference_unlocked(gobj); + drm_gem_object_put_unlocked(gobj); return ret; } @@ -439,7 +439,7 @@ static int virtio_gpu_transfer_to_host_ioctl(struct drm_device *dev, void *data, out_unres: virtio_gpu_object_unreserve(qobj); o...
2017 Sep 29
1
[PATCH] drm/virtio: Replace instances of reference/unreference with get/put
...ce *dev, void *data, ri->size = qobj->gem_base.size; ri->res_handle = qobj->hw_res_handle; - drm_gem_object_unreference_unlocked(gobj); + drm_gem_object_put_unlocked(gobj); return 0; } @@ -389,7 +389,7 @@ static int virtio_gpu_transfer_from_host_ioctl(struct drm_device *dev, out_unres: virtio_gpu_object_unreserve(qobj); out: - drm_gem_object_unreference_unlocked(gobj); + drm_gem_object_put_unlocked(gobj); return ret; } @@ -439,7 +439,7 @@ static int virtio_gpu_transfer_to_host_ioctl(struct drm_device *dev, void *data, out_unres: virtio_gpu_object_unreserve(qobj); o...
2019 Aug 02
0
[PATCH v7 10/18] drm/virtio: rework virtio_gpu_transfer_from_host_ioctl fencing
..._handles(file, &args->bo_handle, 1); + if (objs == NULL) return -ENOENT; - qobj = gem_to_virtio_gpu_obj(gobj); - - ret = virtio_gpu_object_reserve(qobj); - if (ret) - goto out; - - ret = ttm_bo_validate(&qobj->tbo, &qobj->placement, &ctx); - if (unlikely(ret)) - goto out_unres; + ret = virtio_gpu_array_lock_resv(objs); + if (ret != 0) + goto err_put_free; convert_to_hw_box(&box, &args->box); fence = virtio_gpu_fence_alloc(vgdev); if (!fence) { ret = -ENOMEM; - goto out_unres; + goto err_unlock; } virtio_gpu_cmd_transfer_from_host_3d - (v...
2019 Jul 02
2
[PATCH v6 14/18] drm/virtio: rework virtio_gpu_transfer_from_host_ioctl fencing
..._gpu_obj(gobj); - - ret = virtio_gpu_object_reserve(qobj); - if (ret) - goto out; + ret = virtio_gpu_array_lock_resv(objs); + if (ret != 0) + goto err_put_free; convert_to_hw_box(&box, &args->box); fence = virtio_gpu_fence_alloc(vgdev); if (!fence) { ret = -ENOMEM; - goto out_unres; + goto err_unlock; } virtio_gpu_cmd_transfer_from_host_3d - (vgdev, qobj->hw_res_handle, - vfpriv->ctx_id, offset, args->level, - &box, fence); - reservation_object_add_excl_fence(qobj->base.base.resv, - &fence->f); - + (vgdev, vfpriv->ctx_id, offset, a...
2019 Jul 02
2
[PATCH v6 14/18] drm/virtio: rework virtio_gpu_transfer_from_host_ioctl fencing
..._gpu_obj(gobj); - - ret = virtio_gpu_object_reserve(qobj); - if (ret) - goto out; + ret = virtio_gpu_array_lock_resv(objs); + if (ret != 0) + goto err_put_free; convert_to_hw_box(&box, &args->box); fence = virtio_gpu_fence_alloc(vgdev); if (!fence) { ret = -ENOMEM; - goto out_unres; + goto err_unlock; } virtio_gpu_cmd_transfer_from_host_3d - (vgdev, qobj->hw_res_handle, - vfpriv->ctx_id, offset, args->level, - &box, fence); - reservation_object_add_excl_fence(qobj->base.base.resv, - &fence->f); - + (vgdev, vfpriv->ctx_id, offset, a...
2019 Jul 02
2
[PATCH v6 15/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
...->objs[0]), offset, box.w, box.h, box.x, box.y, NULL); + virtio_gpu_array_put_free(objs); } else { + ret = virtio_gpu_array_lock_resv(objs); + if (ret != 0) + goto err_put_free; + + ret = -ENOMEM; fence = virtio_gpu_fence_alloc(vgdev); - if (!fence) { - ret = -ENOMEM; - goto out_unres; - } + if (!fence) + goto err_unlock; + virtio_gpu_cmd_transfer_to_host_3d - (vgdev, qobj, + (vgdev, vfpriv ? vfpriv->ctx_id : 0, offset, - args->level, &box, fence); - reservation_object_add_excl_fence(qobj->base.base.resv, - &fence->f); + args-&...
2019 Jul 02
2
[PATCH v6 15/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
...->objs[0]), offset, box.w, box.h, box.x, box.y, NULL); + virtio_gpu_array_put_free(objs); } else { + ret = virtio_gpu_array_lock_resv(objs); + if (ret != 0) + goto err_put_free; + + ret = -ENOMEM; fence = virtio_gpu_fence_alloc(vgdev); - if (!fence) { - ret = -ENOMEM; - goto out_unres; - } + if (!fence) + goto err_unlock; + virtio_gpu_cmd_transfer_to_host_3d - (vgdev, qobj, + (vgdev, vfpriv ? vfpriv->ctx_id : 0, offset, - args->level, &box, fence); - reservation_object_add_excl_fence(qobj->base.base.resv, - &fence->f); + args-&...
2019 Aug 02
0
[PATCH v7 11/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
..._handles(file, &args->bo_handle, 1); + if (objs == NULL) return -ENOENT; - qobj = gem_to_virtio_gpu_obj(gobj); - - ret = virtio_gpu_object_reserve(qobj); - if (ret) - goto out; - - ret = ttm_bo_validate(&qobj->tbo, &qobj->placement, &ctx); - if (unlikely(ret)) - goto out_unres; - convert_to_hw_box(&box, &args->box); if (!vgdev->has_virgl_3d) { virtio_gpu_cmd_transfer_to_host_2d - (vgdev, qobj, offset, - box.w, box.h, box.x, box.y, NULL); + (vgdev, offset, + box.w, box.h, box.x, box.y, + objs, NULL); } else { + ret = virtio_gpu_array...
2019 Jul 03
0
[PATCH v6 15/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
...> + if (ret != 0) > + goto err_put_free; > + > + ret = -ENOMEM; > fence = virtio_gpu_fence_alloc(vgdev); > - if (!fence) { > - ret = -ENOMEM; > - goto out_unres; > - } > + if (!fence) > + goto err_unlock; > + > virtio_gpu_cmd_transfer_to_host_3d > - (vgdev, qobj, > + (vgdev, > vfpriv ? vfpriv->c...
2019 Jul 03
0
[PATCH v6 14/18] drm/virtio: rework virtio_gpu_transfer_from_host_ioctl fencing
...ray_lock_resv(objs); > + if (ret != 0) > + goto err_put_free; > > convert_to_hw_box(&box, &args->box); > > fence = virtio_gpu_fence_alloc(vgdev); > if (!fence) { > ret = -ENOMEM; > - goto out_unres; > + goto err_unlock; > } > virtio_gpu_cmd_transfer_from_host_3d > - (vgdev, qobj->hw_res_handle, > - vfpriv->ctx_id, offset, args->level, > - &box, fence); > - reservation_object_add...
2016 Dec 12
6
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
...pu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 61f3a96..da281103 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -164,8 +164,15 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, ret = PTR_ERR(buf); goto out_unresv; } + + fence = virtio_gpu_fence_alloc(vgdev); + if (!fence) { + kfree(buf); + ret = -ENOMEM; + goto out_unresv; + } virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, - vfpriv->ctx_id, &fence); + vfpriv->ctx_id, fence); ttm_eu_fence_buffer_objects(&ticket,...
2016 Dec 12
6
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
...pu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 61f3a96..da281103 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -164,8 +164,15 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, ret = PTR_ERR(buf); goto out_unresv; } + + fence = virtio_gpu_fence_alloc(vgdev); + if (!fence) { + kfree(buf); + ret = -ENOMEM; + goto out_unresv; + } virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, - vfpriv->ctx_id, &fence); + vfpriv->ctx_id, fence); ttm_eu_fence_buffer_objects(&ticket,...
2015 Sep 21
2
[PATCH v2 4/6] virtio-gpu: add 3d/virgl support
...->tbo; + + list_add(&buflist[i].head, &validate_list); + } + drm_free_large(bo_handles); + } + + ret = virtio_gpu_object_list_validate(&ticket, &validate_list); + if (ret) + goto out_free; + + buf = kmalloc(exbuf->size, GFP_KERNEL); + if (!buf) { + ret = -ENOMEM; + goto out_unresv; + } + if (copy_from_user(buf, (void __user *)(uintptr_t)exbuf->command, + exbuf->size)) { + kfree(buf); + ret = -EFAULT; + goto out_unresv; + } + virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, + vfpriv->ctx_id, &fence); + + ttm_eu_fence_buffer_objects(&ticket...
2015 Sep 21
2
[PATCH v2 4/6] virtio-gpu: add 3d/virgl support
...->tbo; + + list_add(&buflist[i].head, &validate_list); + } + drm_free_large(bo_handles); + } + + ret = virtio_gpu_object_list_validate(&ticket, &validate_list); + if (ret) + goto out_free; + + buf = kmalloc(exbuf->size, GFP_KERNEL); + if (!buf) { + ret = -ENOMEM; + goto out_unresv; + } + if (copy_from_user(buf, (void __user *)(uintptr_t)exbuf->command, + exbuf->size)) { + kfree(buf); + ret = -EFAULT; + goto out_unresv; + } + virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, + vfpriv->ctx_id, &fence); + + ttm_eu_fence_buffer_objects(&ticket...
2015 Oct 02
0
[PATCH v3 4/7] virtio-gpu: add 3d/virgl support
...->tbo; + + list_add(&buflist[i].head, &validate_list); + } + drm_free_large(bo_handles); + } + + ret = virtio_gpu_object_list_validate(&ticket, &validate_list); + if (ret) + goto out_free; + + buf = kmalloc(exbuf->size, GFP_KERNEL); + if (!buf) { + ret = -ENOMEM; + goto out_unresv; + } + if (copy_from_user(buf, (void __user *)(uintptr_t)exbuf->command, + exbuf->size)) { + kfree(buf); + ret = -EFAULT; + goto out_unresv; + } + virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, + vfpriv->ctx_id, &fence); + + ttm_eu_fence_buffer_objects(&ticket...
2015 Oct 02
0
[PATCH v3 4/7] virtio-gpu: add 3d/virgl support
...->tbo; + + list_add(&buflist[i].head, &validate_list); + } + drm_free_large(bo_handles); + } + + ret = virtio_gpu_object_list_validate(&ticket, &validate_list); + if (ret) + goto out_free; + + buf = kmalloc(exbuf->size, GFP_KERNEL); + if (!buf) { + ret = -ENOMEM; + goto out_unresv; + } + if (copy_from_user(buf, (void __user *)(uintptr_t)exbuf->command, + exbuf->size)) { + kfree(buf); + ret = -EFAULT; + goto out_unresv; + } + virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, + vfpriv->ctx_id, &fence); + + ttm_eu_fence_buffer_objects(&ticket...
2015 Sep 21
0
[PATCH v2 4/6] virtio-gpu: add 3d/virgl support
..._list); > + } > + drm_free_large(bo_handles); > + } > + > + ret = virtio_gpu_object_list_validate(&ticket, &validate_list); > + if (ret) > + goto out_free; > + > + buf = kmalloc(exbuf->size, GFP_KERNEL); > + if (!buf) { > + ret = -ENOMEM; > + goto out_unresv; > + } > + if (copy_from_user(buf, (void __user *)(uintptr_t)exbuf->command, > + exbuf->size)) { > + kfree(buf); > + ret = -EFAULT; > + goto out_unresv; > + } > + virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, > + vfpriv->ctx_id, &fence)...
2015 Sep 09
3
[PATCH 3/5] update virtio gpu driver: add 3d/virgl support
...->tbo; + + list_add(&buflist[i].head, &validate_list); + } + drm_free_large(bo_handles); + } + + ret = virtio_gpu_object_list_validate(&ticket, &validate_list); + if (ret) + goto out_free; + + buf = kmalloc(exbuf->size, GFP_KERNEL); + if (!buf) { + ret = -ENOMEM; + goto out_unresv; + } + if (copy_from_user(buf, (void __user *)(uintptr_t)exbuf->command, + exbuf->size)) { + kfree(buf); + ret = -EFAULT; + goto out_unresv; + } + virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, + vfpriv->ctx_id, &fence); + + ttm_eu_fence_buffer_objects(&ticket...
2015 Sep 09
3
[PATCH 3/5] update virtio gpu driver: add 3d/virgl support
...->tbo; + + list_add(&buflist[i].head, &validate_list); + } + drm_free_large(bo_handles); + } + + ret = virtio_gpu_object_list_validate(&ticket, &validate_list); + if (ret) + goto out_free; + + buf = kmalloc(exbuf->size, GFP_KERNEL); + if (!buf) { + ret = -ENOMEM; + goto out_unresv; + } + if (copy_from_user(buf, (void __user *)(uintptr_t)exbuf->command, + exbuf->size)) { + kfree(buf); + ret = -EFAULT; + goto out_unresv; + } + virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, + vfpriv->ctx_id, &fence); + + ttm_eu_fence_buffer_objects(&ticket...
2019 Jul 02
2
[PATCH v6 11/18] drm/virtio: switch from ttm to gem shmem helpers
...struct virtio_gpu_object *qobj = NULL; struct virtio_gpu_fence *fence; @@ -320,10 +318,6 @@ static int virtio_gpu_transfer_from_host_ioctl(struct drm_device *dev, if (ret) goto out; - ret = ttm_bo_validate(&qobj->tbo, &qobj->placement, &ctx); - if (unlikely(ret)) - goto out_unres; - convert_to_hw_box(&box, &args->box); fence = virtio_gpu_fence_alloc(vgdev); @@ -335,7 +329,7 @@ static int virtio_gpu_transfer_from_host_ioctl(struct drm_device *dev, (vgdev, qobj->hw_res_handle, vfpriv->ctx_id, offset, args->level, &box, fence); - rese...