Re: [PATCH 2/4] drm/virtio: resource teardown tweaks

2020-02-06 Thread Chia-I Wu
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

Re: [PATCH 2/4] drm/virtio: resource teardown tweaks

2020-02-05 Thread Gerd Hoffmann
> > - > > - 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

Re: [PATCH 2/4] drm/virtio: resource teardown tweaks

2020-02-05 Thread Chia-I Wu
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

[PATCH 2/4] drm/virtio: resource teardown tweaks

2020-02-05 Thread Gerd Hoffmann
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