[PATCH 3/3] drm/virtio: delete notify in virtio_gpu_object_create
Chia-I Wu
olvaffe at gmail.com
Tue Mar 24 22:11:56 UTC 2020
On Wed, Mar 25, 2020 at 12:44 AM Gurchetan Singh
<gurchetansingh at chromium.org> wrote:
>
> - For dumb buffers, virtio_gpu_gem_create can notify.
> - For 3D buffers, virtio_gpu_gem_object_open can notify.
Hmm, I feel this is a bit complex. virtio_gpu_gem_object_open may not
notify, and the caller needs to know about it.
Can we change it to virtio_gpu_object_create never notifies and
virtio_gpu_gem_object_open always notifies?
>
> Signed-off-by: Gurchetan Singh <gurchetansingh at chromium.org>
> ---
> drivers/gpu/drm/virtio/virtgpu_gem.c | 1 +
> drivers/gpu/drm/virtio/virtgpu_object.c | 1 -
> 2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c
> index 90c0a8ea1708..aa14dd12928e 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_gem.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_gem.c
> @@ -49,6 +49,7 @@ static int virtio_gpu_gem_create(struct drm_file *file,
> return ret;
> }
>
> + virtio_gpu_notify(vgdev);
> *obj_p = &obj->base.base;
>
> /* drop reference from allocate - handle holds it now */
> diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
> index d9039bb7c5e3..51a8da7d5ef3 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_object.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_object.c
> @@ -241,7 +241,6 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
> return ret;
> }
>
> - virtio_gpu_notify(vgdev);
> *bo_ptr = bo;
> return 0;
>
> --
> 2.25.1.696.g5e7596f4ac-goog
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
More information about the dri-devel
mailing list