On Wed, Feb 5, 2020 at 10:43 PM Gerd Hoffmann wrote:
>
> > > -
> > > - drm_gem_shmem_free_object(obj);
> > > + if (bo->created) {
> > > + virtio_gpu_cmd_unref_resource(vgdev, bo);
> > > + /* completion handler calls virtio_gpu_cleanup_object() */
> > nitpick
> > -
> > - drm_gem_shmem_free_object(obj);
> > + if (bo->created) {
> > + virtio_gpu_cmd_unref_resource(vgdev, bo);
> > + /* completion handler calls virtio_gpu_cleanup_object() */
> nitpick: we don't need this comment when virtio_gpu_cmd_unref_cb is
> defin
On Wed, Feb 5, 2020 at 3:00 AM Gerd Hoffmann wrote:
>
> Add new virtio_gpu_cleanup_object() helper function for object cleanup.
> Wire up callback function for resource unref, do cleanup from callback
> when we know the host stopped using the resource.
>
> Signed-off-by: Gerd Hoffmann
> ---
> dr
Add new virtio_gpu_cleanup_object() helper function for object cleanup.
Wire up callback function for resource unref, do cleanup from callback
when we know the host stopped using the resource.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 3 ++-
drivers/gpu/drm/virt