search for: virtio_gpu_cmd_create_resourc

Displaying 20 results from an estimated 48 matches for "virtio_gpu_cmd_create_resourc".

2018 Dec 19
0
[PATCH 06/10] drm/virtio: params struct for virtio_gpu_cmd_create_resource()
Add format, width and height to the virtio_gpu_object_params struct and use the struct for virtio_gpu_cmd_create_resource(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 7 ++++--- drivers/gpu/drm/virtio/virtgpu_gem.c | 8 ++++---- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 6 ++++-- drivers/gpu/drm/virtio/virtgpu_vq.c | 10 ++++------ 4 files changed,...
2019 Mar 18
0
[PATCH v3 3/5] drm/virtio: params struct for virtio_gpu_cmd_create_resource()
Add format, width and height fields to the virtio_gpu_object_params struct. With that in place we can use the parameter struct for virtio_gpu_cmd_create_resource() calls too. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> Acked-by: Noralf Tr?nnes <noralf at tronnes.org> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 7 ++++--- drivers/gpu/drm/virtio/virtgpu_gem.c | 8 ++++---- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 6 ++++-- drivers...
2018 Dec 19
0
[PATCH 09/10] drm/virtio: move virtio_gpu_cmd_create_resource call into virtio_gpu_object_create
...file_priv, params.width = args->width; params.height = args->height; params.size = args->size; + params.dumb = true; ret = virtio_gpu_gem_create(file_priv, dev, &params, &gobj, &args->handle); if (ret) goto fail; obj = gem_to_virtio_gpu_obj(gobj); - virtio_gpu_cmd_create_resource(vgdev, obj, &params); /* attach the object to the resource */ ret = virtio_gpu_object_attach(vgdev, obj, NULL); if (ret) goto fail; - obj->dumb = true; args->pitch = pitch; return ret; diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu...
2019 Jun 28
1
[PATCH v5 09/12] drm/virtio: rework virtio_gpu_object_create fencing
...ff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 356d27132388..c4b266b6f731 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ 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 r...
2019 Mar 18
1
[PATCH v3 5/5] drm/virtio: rework resource creation workflow.
This patch moves the virtio_gpu_cmd_create_resource() call (which notifies the host about the new resource created) into the virtio_gpu_object_create() function. That way we can call virtio_gpu_cmd_create_resource() before ttm_bo_init(), so the host already knows about the object when ttm initializes the object and calls our driver callbacks. Spe...
2017 Apr 03
3
[PATCH 2/2] drm: virtio: fix virtio_gpu_mode_dumb_create
...->width * ((args->bpp + 1) / 8); args->size = pitch * args->height; @@ -98,9 +99,10 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv, if (ret) goto fail; + format = virtio_gpu_translate_format(DRM_FORMAT_XRGB8888); virtio_gpu_resource_id_get(vgdev, &resid); - virtio_gpu_cmd_create_resource(vgdev, resid, - 2, args->width, args->height); + virtio_gpu_cmd_create_resource(vgdev, resid, format, + args->width, args->height); /* attach the object to the resource */ obj = gem_to_virtio_gpu_obj(gobj); -- 2.9.3
2017 Apr 03
3
[PATCH 2/2] drm: virtio: fix virtio_gpu_mode_dumb_create
...->width * ((args->bpp + 1) / 8); args->size = pitch * args->height; @@ -98,9 +99,10 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv, if (ret) goto fail; + format = virtio_gpu_translate_format(DRM_FORMAT_XRGB8888); virtio_gpu_resource_id_get(vgdev, &resid); - virtio_gpu_cmd_create_resource(vgdev, resid, - 2, args->width, args->height); + virtio_gpu_cmd_create_resource(vgdev, resid, format, + args->width, args->height); /* attach the object to the resource */ obj = gem_to_virtio_gpu_obj(gobj); -- 2.9.3
2019 Jun 20
1
[PATCH v4 09/12] drm/virtio: rework virtio_gpu_object_create fencing
...ff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 65f5ce41c341..5213d7f499eb 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -267,7 +267,8 @@ 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_fence *fence); + struct virtio_gpu_fence *fence, + struct virtio_gpu_object_array *objs); void virtio_gpu_cmd_unref_resource(struct vi...
2019 Aug 02
0
[PATCH v7 09/18] drm/virtio: rework virtio_gpu_object_create fencing
...ff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 6e02f6f7cb5a..e5d85c104bd1 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -274,6 +274,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 r...
2019 Jul 02
0
[PATCH v6 09/18] drm/virtio: rework virtio_gpu_object_create fencing
...ff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 98511d1dfff2..bc8cb9218732 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -274,6 +274,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 r...
2020 Feb 13
1
[PATCH v3 3/4] drm/virtio: batch resource creation
Move virtio_gpu_notify() to higher-level functions for virtio_gpu_cmd_create_resource(), virtio_gpu_cmd_resource_create_3d() and virtio_gpu_cmd_resource_attach_backing(). virtio_gpu_object_create() will batch commands and notify only once when creating a resource. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_object.c | 1 + drivers...
2019 Jun 19
0
[PATCH v3 09/12] drm/virtio: rework virtio_gpu_object_create fencing
...ff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 573173c35c48..834cf7136c78 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -258,7 +258,8 @@ 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_fence *fence); + struct virtio_gpu_fence *fence, + struct drm_gem_object_array *objs); void virtio_gpu_cmd_unref_resource(struct virti...
2020 Feb 05
2
[PATCH 2/4] drm/virtio: resource teardown tweaks
...++++--- 3 files changed, 48 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 7e69c06e168e..372dd248cf02 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -262,7 +262,7 @@ void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev, 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); + struct virtio_gpu_object *bo); void virtio_gpu_cmd_transfer_to_host...
2020 Feb 05
2
[PATCH 2/4] drm/virtio: resource teardown tweaks
...++++--- 3 files changed, 48 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 7e69c06e168e..372dd248cf02 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -262,7 +262,7 @@ void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev, 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); + struct virtio_gpu_object *bo); void virtio_gpu_cmd_transfer_to_host...
2017 Apr 03
0
[PATCH 2/2] drm: virtio: fix virtio_gpu_mode_dumb_create
...gt; args->size = pitch * args->height; > @@ -98,9 +99,10 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv, > if (ret) > goto fail; > > + format = virtio_gpu_translate_format(DRM_FORMAT_XRGB8888); > virtio_gpu_resource_id_get(vgdev, &resid); > - virtio_gpu_cmd_create_resource(vgdev, resid, > - 2, args->width, args->height); > + virtio_gpu_cmd_create_resource(vgdev, resid, format, > + args->width, args->height); > > /* attach the object to the resource */ > obj = gem_to_virtio_gpu_obj(gobj); > -- > 2.9.3 &gt...
2019 Jun 18
0
[PATCH v2 11/12] drm/virtio: rework virtio_gpu_object_create fencing even more.
...rm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -120,30 +120,21 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, } bo->dumb = params->dumb; - if (params->virgl) { - virtio_gpu_cmd_resource_create_3d(vgdev, bo, params, fence); - } else { - virtio_gpu_cmd_create_resource(vgdev, bo, params, fence); - } - if (fence) { - struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; struct drm_gem_object *obj = &bo->base.base; struct ww_acquire_ctx ticket; - unsigned long irq_flags; - drm_gem_object_get(obj); ret = drm_gem_lock_reservations(&a...
2020 Feb 14
0
[PATCH v4 4/6] drm/virtio: batch resource creation
Move virtio_gpu_notify() to higher-level functions for virtio_gpu_cmd_create_resource(), virtio_gpu_cmd_resource_create_3d() and virtio_gpu_cmd_resource_attach_backing(). virtio_gpu_object_create() will batch commands and notify only once when creating a resource. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> Reviewed-by: Chia-I Wu <olvaffe at gmail.com> --- dr...
2020 Feb 07
0
[PATCH v2 2/4] drm/virtio: resource teardown tweaks
.../gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -114,6 +114,7 @@ struct virtio_gpu_vbuffer { char *resp_buf; int resp_size; virtio_gpu_resp_cb resp_cb; + void *resp_cb_data; struct virtio_gpu_object_array *objs; struct list_head list; @@ -262,7 +263,7 @@ void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev, 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); + struct virtio_gpu_object *bo); void virtio_gpu_cmd_transfer_to_host...
2020 Feb 05
0
[PATCH 2/4] drm/virtio: resource teardown tweaks
...insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h > index 7e69c06e168e..372dd248cf02 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_drv.h > +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h > @@ -262,7 +262,7 @@ void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev, > struct virtio_gpu_object_array *objs, > struct virtio_gpu_fence *fence); > void virtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev, > -...
2018 Sep 26
5
[PATCH 0/4] Improve virtio ID allocation
I noticed you were using IDRs where you could be using the more efficient IDAs, then while fixing that I noticed the lack of error handling, and I decided to follow that up with an efficiency improvement. There's probably a v2 of this to follow because I couldn't figure out how to properly handle one of the error cases ... see the comment embedded in one of the patches. Matthew Wilcox