Re: [PATCH v2] drm/i915/gvt: Make use of idr_find and idr_for_each_entry in dmabuf

2023-03-08 Thread Zhenyu Wang
On 2023.03.03 22:07:18 +0800, Cai Huoqing wrote: > This patch uses the already existing IDR mechanism to simplify > and improve the dmabuf code. > > Using 'vgpu.object_idr' directly instead of 'dmabuf_obj_list_head' > or 'dmabuf.list', because the dmabuf_obj can be found by 'idr_find' > or

[PATCH v2] drm/i915/gvt: Make use of idr_find and idr_for_each_entry in dmabuf

2023-03-03 Thread Cai Huoqing
This patch uses the already existing IDR mechanism to simplify and improve the dmabuf code. Using 'vgpu.object_idr' directly instead of 'dmabuf_obj_list_head' or 'dmabuf.list', because the dmabuf_obj can be found by 'idr_find' or 'idr_for_each_entry'. Signed-off-by: Cai Huoqing --- v1->v2: