Lines Matching refs:nents
156 struct virtio_gpu_object_array *virtio_gpu_array_alloc(u32 nents)
160 objs = kmalloc(struct_size(objs, objs, nents), GFP_KERNEL);
164 objs->nents = 0;
165 objs->total = nents;
175 virtio_gpu_array_from_handles(struct drm_file *drm_file, u32 *handles, u32 nents)
180 objs = virtio_gpu_array_alloc(nents);
184 for (i = 0; i < nents; i++) {
187 objs->nents = i;
192 objs->nents = i;
199 if (WARN_ON_ONCE(objs->nents == objs->total))
203 objs->objs[objs->nents] = obj;
204 objs->nents++;
211 if (objs->nents == 1) {
214 ret = drm_gem_lock_reservations(objs->objs, objs->nents,
222 if (objs->nents == 1) {
225 drm_gem_unlock_reservations(objs->objs, objs->nents,
235 for (i = 0; i < objs->nents; i++)
243 for (i = 0; i < objs->nents; i++)