[PATCH] drm/virtio: delete notify in virtio_gpu_object_create

Chia-I Wu olvaffe at gmail.com
Wed Mar 25 23:35:59 UTC 2020


On Thu, Mar 26, 2020 at 7:10 AM Gurchetan Singh
<gurchetansingh at chromium.org> wrote:
>
> For 3D buffers, virtio_gpu_gem_object_open notifies.
> We can have the same behavior for dumb buffer.
>
> v2: virtio_gpu_gem_object_open always notifies
> v3: avoid boolean variable
Series is

Reviewed-by: Chia-I Wu <olvaffe at gmail.com>

>
> Signed-off-by: Gurchetan Singh <gurchetansingh at chromium.org>
> ---
>  drivers/gpu/drm/virtio/virtgpu_gem.c    | 3 ++-
>  drivers/gpu/drm/virtio/virtgpu_object.c | 1 -
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c
> index 90c0a8ea1708c..1025658be4df2 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_gem.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_gem.c
> @@ -114,7 +114,7 @@ int virtio_gpu_gem_object_open(struct drm_gem_object *obj,
>         struct virtio_gpu_object_array *objs;
>
>         if (!vgdev->has_virgl_3d)
> -               return 0;
> +               goto out_notify;
>
>         objs = virtio_gpu_array_alloc(1);
>         if (!objs)
> @@ -123,6 +123,7 @@ int virtio_gpu_gem_object_open(struct drm_gem_object *obj,
>
>         virtio_gpu_cmd_context_attach_resource(vgdev, vfpriv->ctx_id,
>                                                objs);
> +out_notify:
>         virtio_gpu_notify(vgdev);
>         return 0;
>  }
> diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
> index d9039bb7c5e37..51a8da7d5ef3b 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.24.1
>
> _______________________________________________
> 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