search for: virtio_gpu_object_array

Displaying 20 results from an estimated 82 matches for "virtio_gpu_object_array".

2019 Jul 02
3
[PATCH v6 07/18] drm/virtio: add virtio_gpu_object_array & helpers
Some helper functions to manage an array of gem objects. v6: - add ticket to struct virtio_gpu_object_array. - add virtio_gpu_array_{lock,unlock}_resv helpers. - add virtio_gpu_array_add_fence helper. v5: some small optimizations (Chia-I Wu). v4: make them virtio-private instead of generic helpers. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 17...
2019 Jul 02
3
[PATCH v6 07/18] drm/virtio: add virtio_gpu_object_array & helpers
Some helper functions to manage an array of gem objects. v6: - add ticket to struct virtio_gpu_object_array. - add virtio_gpu_array_{lock,unlock}_resv helpers. - add virtio_gpu_array_add_fence helper. v5: some small optimizations (Chia-I Wu). v4: make them virtio-private instead of generic helpers. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 17...
2019 Jul 03
0
[PATCH v6 07/18] drm/virtio: add virtio_gpu_object_array & helpers
On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann <kraxel at redhat.com> wrote: > > Some helper functions to manage an array of gem objects. > > v6: > - add ticket to struct virtio_gpu_object_array. > - add virtio_gpu_array_{lock,unlock}_resv helpers. > - add virtio_gpu_array_add_fence helper. > v5: some small optimizations (Chia-I Wu). > v4: make them virtio-private instead of generic helpers. > > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> > --- > dr...
2019 Jul 03
1
[PATCH v6 07/18] drm/virtio: add virtio_gpu_object_array & helpers
...ed, Jul 3, 2019 at 11:31 AM Chia-I Wu <olvaffe at gmail.com> wrote: > > On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann <kraxel at redhat.com> wrote: > > > > Some helper functions to manage an array of gem objects. > > > > v6: > > - add ticket to struct virtio_gpu_object_array. > > - add virtio_gpu_array_{lock,unlock}_resv helpers. > > - add virtio_gpu_array_add_fence helper. > > v5: some small optimizations (Chia-I Wu). > > v4: make them virtio-private instead of generic helpers. > > > > Signed-off-by: Gerd Hoffmann <kraxel at re...
2019 Aug 02
0
[PATCH v7 07/18] drm/virtio: add virtio_gpu_object_array & helpers
Some helper functions to manage an array of gem objects. v6: - add ticket to struct virtio_gpu_object_array. - add virtio_gpu_array_{lock,unlock}_resv helpers. - add virtio_gpu_array_add_fence helper. v5: some small optimizations (Chia-I Wu). v4: make them virtio-private instead of generic helpers. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 17...
2019 Jun 20
1
[PATCH v4 07/12] drm/virtio: add virtio_gpu_object_array & helpers
...irtio/virtgpu_drv.h index 07f6001ea91e..98d646789d23 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -84,6 +84,11 @@ struct virtio_gpu_object { #define gem_to_virtio_gpu_obj(gobj) \ container_of((gobj), struct virtio_gpu_object, gem_base) +struct virtio_gpu_object_array { + u32 nents; + struct drm_gem_object *objs[]; +}; + struct virtio_gpu_vbuffer; struct virtio_gpu_device; @@ -251,6 +256,11 @@ int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, struct drm_device *dev, uint32_t handle, uint64_t *offset_p); +struct virtio_gpu_object...
2019 Jun 28
0
[PATCH v5 07/12] drm/virtio: add virtio_gpu_object_array & helpers
...irtio/virtgpu_drv.h index 07f6001ea91e..98d646789d23 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -84,6 +84,11 @@ struct virtio_gpu_object { #define gem_to_virtio_gpu_obj(gobj) \ container_of((gobj), struct virtio_gpu_object, gem_base) +struct virtio_gpu_object_array { + u32 nents; + struct drm_gem_object *objs[]; +}; + struct virtio_gpu_vbuffer; struct virtio_gpu_device; @@ -251,6 +256,11 @@ int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, struct drm_device *dev, uint32_t handle, uint64_t *offset_p); +struct virtio_gpu_object...
2019 Jul 02
2
[PATCH v6 16/18] drm/virtio: rework virtio_gpu_cmd_context_{attach, detach}_resource
...s/gpu/drm/virtio/virtgpu_drv.h @@ -292,10 +292,10 @@ void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, uint32_t id); void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device *vgdev, uint32_t ctx_id, - uint32_t resource_id); + struct virtio_gpu_object_array *objs); void virtio_gpu_cmd_context_detach_resource(struct virtio_gpu_device *vgdev, uint32_t ctx_id, - uint32_t resource_id); + struct virtio_gpu_object_array *objs); void virtio_gpu_cmd_submit(struct virtio_gpu_device *vgdev, void *data, uint32_t data_size,...
2019 Jul 02
2
[PATCH v6 16/18] drm/virtio: rework virtio_gpu_cmd_context_{attach, detach}_resource
...s/gpu/drm/virtio/virtgpu_drv.h @@ -292,10 +292,10 @@ void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, uint32_t id); void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device *vgdev, uint32_t ctx_id, - uint32_t resource_id); + struct virtio_gpu_object_array *objs); void virtio_gpu_cmd_context_detach_resource(struct virtio_gpu_device *vgdev, uint32_t ctx_id, - uint32_t resource_id); + struct virtio_gpu_object_array *objs); void virtio_gpu_cmd_submit(struct virtio_gpu_device *vgdev, void *data, uint32_t data_size,...
2023 Sep 22
1
[PATCH 7/9] drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by
...counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by for struct virtio_gpu_object_array. [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci Cc: David Airlie <airlied at redhat.com> Cc: Gerd Hoffmann <kraxel at redhat.com> Cc: Gurchetan Singh <gurchetansingh at chromium.org> Cc: Chia-I Wu <olvaffe at gmail.com> Cc: Daniel...
2023 Sep 22
1
[PATCH 7/9] drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by
...counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by for struct virtio_gpu_object_array. [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci Cc: David Airlie <airlied at redhat.com> Cc: Gerd Hoffmann <kraxel at redhat.com> Cc: Gurchetan Singh <gurchetansingh at chromium.org> Cc: Chia-I Wu <olvaffe at gmail.com> Cc: Daniel...
2023 Sep 22
1
[PATCH 7/9] drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by
...counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by for struct virtio_gpu_object_array. [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci Cc: David Airlie <airlied at redhat.com> Cc: Gerd Hoffmann <kraxel at redhat.com> Cc: Gurchetan Singh <gurchetansingh at chromium.org> Cc: Chia-I Wu <olvaffe at gmail.com> Cc: Daniel...
2019 Sep 03
0
[PATCH] drm/virtio: add worker for object release
...; diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h > index fb35831ed351..314e02f94d9c 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_drv.h > +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h > @@ -78,6 +78,7 @@ struct virtio_gpu_object { > > struct virtio_gpu_object_array { > struct ww_acquire_ctx ticket; > + struct list_head next; > u32 nents, total; > struct drm_gem_object *objs[]; > }; > @@ -197,6 +198,10 @@ struct virtio_gpu_device { > > struct work_struct config_changed_work; > > + struc...
2019 Aug 02
0
[PATCH v7 12/18] drm/virtio: rework virtio_gpu_cmd_context_{attach, detach}_resource
...s/gpu/drm/virtio/virtgpu_drv.h @@ -313,10 +313,10 @@ void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, uint32_t id); void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device *vgdev, uint32_t ctx_id, - uint32_t resource_id); + struct virtio_gpu_object_array *objs); void virtio_gpu_cmd_context_detach_resource(struct virtio_gpu_device *vgdev, uint32_t ctx_id, - uint32_t resource_id); + struct virtio_gpu_object_array *objs); void virtio_gpu_cmd_submit(struct virtio_gpu_device *vgdev, void *data, uint32_t data_size,...
2019 Aug 02
0
[PATCH v7 11/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
...irtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev, uint32_t resource_id); void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, - struct virtio_gpu_object *bo, uint64_t offset, __le32 width, __le32 height, __le32 x, __le32 y, + struct virtio_gpu_object_array *objs, struct virtio_gpu_fence *fence); void virtio_gpu_cmd_resource_flush(struct virtio_gpu_device *vgdev, uint32_t resource_id, @@ -329,10 +329,10 @@ void virtio_gpu_cmd_transfer_from_host_3d(struct virtio_gpu_device *vgdev, struct virtio_gpu_object_array *objs, str...
2019 Jul 03
0
[PATCH v6 16/18] drm/virtio: rework virtio_gpu_cmd_context_{attach, detach}_resource
...uint32_t id); > void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device > *vgdev, > uint32_t ctx_id, > - uint32_t resource_id); > + struct virtio_gpu_object_array > *objs); > void virtio_gpu_cmd_context_detach_resource(struct virtio_gpu_device > *vgdev, > uint32_t ctx_id, > - uint32_t resource_id); > + struct virt...
2019 Jul 02
2
[PATCH v6 08/18] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
Rework fencing workflow, starting with virtio_gpu_execbuffer_ioctl. Stop using ttm helpers, use the virtio_gpu_array_* helpers (which work on the reservation objects directly) instead. New workflow: (1) All gem objects needed by a command are added to a virtio_gpu_object_array. (2) All reservation objects will be locked (virtio_gpu_array_lock_resv). (3) virtio_gpu_fence_emit() completes fence initialization. (4) fence gets added to the objects, reservation objects are unlocked (virtio_gpu_array_add_fence, virtio_gpu_array_unlock_resv). (5) virtio command is subm...
2019 Jul 02
2
[PATCH v6 08/18] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
Rework fencing workflow, starting with virtio_gpu_execbuffer_ioctl. Stop using ttm helpers, use the virtio_gpu_array_* helpers (which work on the reservation objects directly) instead. New workflow: (1) All gem objects needed by a command are added to a virtio_gpu_object_array. (2) All reservation objects will be locked (virtio_gpu_array_lock_resv). (3) virtio_gpu_fence_emit() completes fence initialization. (4) fence gets added to the objects, reservation objects are unlocked (virtio_gpu_array_add_fence, virtio_gpu_array_unlock_resv). (5) virtio command is subm...
2019 Jun 28
1
[PATCH v5 09/12] drm/virtio: rework virtio_gpu_object_create fencing
...+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -267,6 +267,7 @@ void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev); void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev, struct virtio_gpu_object *bo, struct virtio_gpu_object_params *params, + struct virtio_gpu_object_array *objs, struct virtio_gpu_fence *fence); void virtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev, uint32_t resource_id); @@ -329,6 +330,7 @@ void virtio_gpu_cmd_resource_create_3d(struct virtio_gpu_device *vgdev, struct virtio_gpu_object *bo, struct virtio...
2019 Jun 20
1
[PATCH v4 09/12] drm/virtio: rework virtio_gpu_object_create fencing
...e_vbufs(struct virtio_gpu_device *vgdev); void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev, struct virtio_gpu_object *bo, struct virtio_gpu_object_params *params, - struct virtio_gpu_fence *fence); + struct virtio_gpu_fence *fence, + struct virtio_gpu_object_array *objs); void virtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev, uint32_t resource_id); void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, @@ -328,7 +329,8 @@ void virtio_gpu_cmd_resource_create_3d(struct virtio_gpu_device *vgdev, struct virtio_gpu...