Re: [PATCH v4] drm/virtio: Track total GPU memory for virtio driver

2021-01-22 Thread Daniel Vetter
On Thu, Jan 21, 2021 at 11:58:22PM -0800, Yiwei Zhang wrote: > On Thu, Jan 21, 2021 at 9:40 PM Yiwei Zhang wrote: > > > > On the success of virtio_gpu_object_create, add size of newly allocated > > bo to the tracked total_mem. In drm_gem_object_funcs.free, after the gem > > bo loses its last

Re: [PATCH v4] drm/virtio: Track total GPU memory for virtio driver

2021-01-22 Thread Yiwei Zhangā€ˇ
On Thu, Jan 21, 2021 at 9:40 PM Yiwei Zhang wrote: > > On the success of virtio_gpu_object_create, add size of newly allocated > bo to the tracked total_mem. In drm_gem_object_funcs.free, after the gem > bo loses its last refcount, subtract the bo size from the tracked > total_mem if the original

[PATCH v4] drm/virtio: Track total GPU memory for virtio driver

2021-01-21 Thread Yiwei Zhang
On the success of virtio_gpu_object_create, add size of newly allocated bo to the tracked total_mem. In drm_gem_object_funcs.free, after the gem bo loses its last refcount, subtract the bo size from the tracked total_mem if the original underlying memory allocation is successful. It's more