Displaying 20 results from an estimated 21 matches for "out_fence_fd".
2023 Mar 22
0
[PATCH v2 1/2] drm/virtio: Refactor job submission code path
...struct drm_virtgpu_execbuffer *exbuf;
> + struct virtio_gpu_fence *out_fence;
> + struct virtio_gpu_fpriv *vfpriv;
> + struct virtio_gpu_device *vgdev;
> + struct drm_file *file;
> + uint64_t fence_ctx;
> + uint32_t ring_idx;
> + int out_fence_fd;
> + void *buf;
> +};
> +
> +static int virtio_gpu_do_fence_wait(struct virtio_gpu_submit *submit,
> + struct dma_fence *dma_fence)
> +{
> + uint32_t context = submit->fence_ctx + submit->ring_idx;
> +
> + if (dma_...
2020 Apr 07
0
[vhost:vhost 32/44] drivers/gpu/drm/virtio/virtgpu_ioctl.c:113:7: error: implicit declaration of function 'copy_from_user'; did you mean 'sg_copy_from_buffer'?
...Gerd Hoffmann 2019-08-29 63 struct virtio_gpu_object_array *buflist = NULL;
2cd7b6f08bc4cf Robert Foss 2018-11-12 64 struct sync_file *sync_file;
2cd7b6f08bc4cf Robert Foss 2018-11-12 65 int in_fence_fd = exbuf->fence_fd;
2cd7b6f08bc4cf Robert Foss 2018-11-12 66 int out_fence_fd = -1;
62fb7a5e10962a Gerd Hoffmann 2014-10-28 67 void *buf;
62fb7a5e10962a Gerd Hoffmann 2014-10-28 68
62fb7a5e10962a Gerd Hoffmann 2014-10-28 69 if (vgdev->has_virgl_3d == false)
62fb7a5e10962a Gerd Hoffmann 2014-10-28 70 return -ENOSYS;
62fb7a5e10962a Gerd Hoffmann 2...
2019 Jun 28
2
[PATCH v5 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...ist_head validate_list;
- struct ttm_validate_buffer *buflist = NULL;
+ struct virtio_gpu_object_array *buflist = NULL;
int i;
struct ww_acquire_ctx ticket;
struct sync_file *sync_file;
@@ -155,15 +152,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
return out_fence_fd;
}
- INIT_LIST_HEAD(&validate_list);
if (exbuf->num_bo_handles) {
-
bo_handles = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(uint32_t), GFP_KERNEL);
- buflist = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(struct ttm_validate_buffer),
- GFP_KERNEL |...
2019 Jun 28
2
[PATCH v5 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...ist_head validate_list;
- struct ttm_validate_buffer *buflist = NULL;
+ struct virtio_gpu_object_array *buflist = NULL;
int i;
struct ww_acquire_ctx ticket;
struct sync_file *sync_file;
@@ -155,15 +152,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
return out_fence_fd;
}
- INIT_LIST_HEAD(&validate_list);
if (exbuf->num_bo_handles) {
-
bo_handles = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(uint32_t), GFP_KERNEL);
- buflist = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(struct ttm_validate_buffer),
- GFP_KERNEL |...
2019 Jul 02
2
[PATCH v6 08/18] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...dles = NULL;
void __user *user_bo_handles = NULL;
- struct list_head validate_list;
- struct ttm_validate_buffer *buflist = NULL;
- int i;
- struct ww_acquire_ctx ticket;
+ struct virtio_gpu_object_array *buflist = NULL;
struct sync_file *sync_file;
int in_fence_fd = exbuf->fence_fd;
int out_fence_fd = -1;
@@ -155,15 +150,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
return out_fence_fd;
}
- INIT_LIST_HEAD(&validate_list);
if (exbuf->num_bo_handles) {
-
bo_handles = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(uint32_t), GFP_KER...
2019 Jul 02
2
[PATCH v6 08/18] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...dles = NULL;
void __user *user_bo_handles = NULL;
- struct list_head validate_list;
- struct ttm_validate_buffer *buflist = NULL;
- int i;
- struct ww_acquire_ctx ticket;
+ struct virtio_gpu_object_array *buflist = NULL;
struct sync_file *sync_file;
int in_fence_fd = exbuf->fence_fd;
int out_fence_fd = -1;
@@ -155,15 +150,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
return out_fence_fd;
}
- INIT_LIST_HEAD(&validate_list);
if (exbuf->num_bo_handles) {
-
bo_handles = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(uint32_t), GFP_KER...
2019 Jun 20
2
[PATCH v4 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...ist_head validate_list;
- struct ttm_validate_buffer *buflist = NULL;
+ struct virtio_gpu_object_array *buflist = NULL;
int i;
struct ww_acquire_ctx ticket;
struct sync_file *sync_file;
@@ -155,15 +152,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
return out_fence_fd;
}
- INIT_LIST_HEAD(&validate_list);
if (exbuf->num_bo_handles) {
-
bo_handles = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(uint32_t), GFP_KERNEL);
- buflist = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(struct ttm_validate_buffer),
- GFP_KERNEL |...
2019 Jun 20
2
[PATCH v4 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...ist_head validate_list;
- struct ttm_validate_buffer *buflist = NULL;
+ struct virtio_gpu_object_array *buflist = NULL;
int i;
struct ww_acquire_ctx ticket;
struct sync_file *sync_file;
@@ -155,15 +152,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
return out_fence_fd;
}
- INIT_LIST_HEAD(&validate_list);
if (exbuf->num_bo_handles) {
-
bo_handles = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(uint32_t), GFP_KERNEL);
- buflist = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(struct ttm_validate_buffer),
- GFP_KERNEL |...
2019 Jun 19
2
[PATCH v3 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...t list_head validate_list;
- struct ttm_validate_buffer *buflist = NULL;
+ struct drm_gem_object_array *buflist = NULL;
int i;
struct ww_acquire_ctx ticket;
struct sync_file *sync_file;
@@ -155,15 +152,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
return out_fence_fd;
}
- INIT_LIST_HEAD(&validate_list);
if (exbuf->num_bo_handles) {
-
bo_handles = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(uint32_t), GFP_KERNEL);
- buflist = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(struct ttm_validate_buffer),
- GFP_KERNEL |...
2019 Jun 19
2
[PATCH v3 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...t list_head validate_list;
- struct ttm_validate_buffer *buflist = NULL;
+ struct drm_gem_object_array *buflist = NULL;
int i;
struct ww_acquire_ctx ticket;
struct sync_file *sync_file;
@@ -155,15 +152,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
return out_fence_fd;
}
- INIT_LIST_HEAD(&validate_list);
if (exbuf->num_bo_handles) {
-
bo_handles = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(uint32_t), GFP_KERNEL);
- buflist = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(struct ttm_validate_buffer),
- GFP_KERNEL |...
2019 Jun 30
0
[PATCH v5 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...+ struct virtio_gpu_object_array *buflist = NULL;
> int i;
> struct ww_acquire_ctx ticket;
> struct sync_file *sync_file;
> @@ -155,15 +152,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
> return out_fence_fd;
> }
>
> - INIT_LIST_HEAD(&validate_list);
> if (exbuf->num_bo_handles) {
> -
> bo_handles = kvmalloc_array(exbuf->num_bo_handles,
> - sizeof(uint32_t), GFP_KERNEL);
> - bu...
2019 Aug 02
0
[PATCH v7 08/18] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...dles = NULL;
void __user *user_bo_handles = NULL;
- struct list_head validate_list;
- struct ttm_validate_buffer *buflist = NULL;
- int i;
- struct ww_acquire_ctx ticket;
+ struct virtio_gpu_object_array *buflist = NULL;
struct sync_file *sync_file;
int in_fence_fd = exbuf->fence_fd;
int out_fence_fd = -1;
@@ -157,15 +152,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
return out_fence_fd;
}
- INIT_LIST_HEAD(&validate_list);
if (exbuf->num_bo_handles) {
-
bo_handles = kvmalloc_array(exbuf->num_bo_handles,
- sizeof(uint32_t), GFP_KER...
2016 Dec 12
6
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
Refactor fence creation to remove the potential allocation failure from
the cmd_submit and atomic_commit paths. Now the fence should be allocated
first and just after we should proceed with the rest of the execution.
Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
---
drivers/gpu/drm/virtio/virtgpu_drv.h
2016 Dec 12
6
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
Refactor fence creation to remove the potential allocation failure from
the cmd_submit and atomic_commit paths. Now the fence should be allocated
first and just after we should proceed with the rest of the execution.
Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
---
drivers/gpu/drm/virtio/virtgpu_drv.h
2019 Jul 03
0
[PATCH v6 08/18] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...te_list;
> - struct ttm_validate_buffer *buflist = NULL;
> - int i;
> - struct ww_acquire_ctx ticket;
> + struct virtio_gpu_object_array *buflist = NULL;
> struct sync_file *sync_file;
> int in_fence_fd = exbuf->fence_fd;
> int out_fence_fd = -1;
> @@ -155,15 +150,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
> return out_fence_fd;
> }
>
> - INIT_LIST_HEAD(&validate_list);
> if (exbuf->num_bo_handles) {
> -
>...
2019 Jun 27
0
[PATCH v4 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...+ struct virtio_gpu_object_array *buflist = NULL;
> int i;
> struct ww_acquire_ctx ticket;
> struct sync_file *sync_file;
> @@ -155,15 +152,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
> return out_fence_fd;
> }
>
> - INIT_LIST_HEAD(&validate_list);
> if (exbuf->num_bo_handles) {
> -
> bo_handles = kvmalloc_array(exbuf->num_bo_handles,
> - sizeof(uint32_t), GFP_KERNEL);
> - bu...
2019 Jun 19
0
[PATCH v3 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...truct ttm_validate_buffer *buflist = NULL;
> + struct drm_gem_object_array *buflist = NULL;
> int i;
> struct ww_acquire_ctx ticket;
> struct sync_file *sync_file;
> @@ -155,15 +152,10 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
> return out_fence_fd;
> }
>
> - INIT_LIST_HEAD(&validate_list);
> if (exbuf->num_bo_handles) {
> -
> bo_handles = kvmalloc_array(exbuf->num_bo_handles,
> - sizeof(uint32_t), GFP_KERNEL);
> - buflist = kvmalloc_array(exbuf->num_bo_handles,
> - sizeof(struct...
2019 Jun 18
2
[PATCH v2 07/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...&validate_list);
+ drm_gem_unlock_reservations(buflist, exbuf->num_bo_handles, &ticket);
out_unused_fd:
kvfree(bo_handles);
+ for (i = 0; i < exbuf->num_bo_handles; i++)
+ if (buflist && buflist[i])
+ drm_gem_object_put_unlocked(buflist[i]);
kvfree(buflist);
if (out_fence_fd >= 0)
--
2.18.1
2019 Jun 18
2
[PATCH v2 07/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...&validate_list);
+ drm_gem_unlock_reservations(buflist, exbuf->num_bo_handles, &ticket);
out_unused_fd:
kvfree(bo_handles);
+ for (i = 0; i < exbuf->num_bo_handles; i++)
+ if (buflist && buflist[i])
+ drm_gem_object_put_unlocked(buflist[i]);
kvfree(buflist);
if (out_fence_fd >= 0)
--
2.18.1
2020 Feb 11
0
[PATCH 1/2] drm/virtio: fix virtio_gpu_execbuffer_ioctl locking
...PTR_ERR(buf);
- goto out_unresv;
+ goto out_unused_fd;
+ }
+
+ if (buflist) {
+ ret = virtio_gpu_array_lock_resv(buflist);
+ if (ret)
+ goto out_memdup;
}
out_fence = virtio_gpu_fence_alloc(vgdev);
if(!out_fence) {
ret = -ENOMEM;
- goto out_memdup;
+ goto out_unresv;
}
if (out_fence_fd >= 0) {
@@ -160,11 +160,11 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
vfpriv->ctx_id, buflist, out_fence);
return 0;
-out_memdup:
- kvfree(buf);
out_unresv:
if (buflist)
virtio_gpu_array_unlock_resv(buflist);
+out_memdup:
+ kvfree(buf);...