Lines Matching refs:sa

50 static void drm_suballoc_remove_locked(struct drm_suballoc *sa);
95 struct drm_suballoc *sa, *tmp;
106 list_for_each_entry_safe(sa, tmp, &sa_manager->olist, olist) {
107 drm_suballoc_remove_locked(sa);
114 static void drm_suballoc_remove_locked(struct drm_suballoc *sa)
116 struct drm_suballoc_manager *sa_manager = sa->manager;
118 if (sa_manager->hole == &sa->olist)
119 sa_manager->hole = sa->olist.prev;
121 list_del_init(&sa->olist);
122 list_del_init(&sa->flist);
123 dma_fence_put(sa->fence);
124 kfree(sa);
129 struct drm_suballoc *sa, *tmp;
134 sa = list_entry(sa_manager->hole->next, struct drm_suballoc, olist);
135 list_for_each_entry_safe_from(sa, tmp, &sa_manager->olist, olist) {
136 if (!sa->fence || !dma_fence_is_signaled(sa->fence))
139 drm_suballoc_remove_locked(sa);
163 struct drm_suballoc *sa,
175 sa->manager = sa_manager;
176 sa->soffset = soffset;
177 sa->eoffset = soffset + size;
178 list_add(&sa->olist, sa_manager->hole);
179 INIT_LIST_HEAD(&sa->flist);
180 sa_manager->hole = &sa->olist;
242 /* go over all fence list and try to find the closest sa
246 struct drm_suballoc *sa;
253 sa = list_first_entry(&sa_manager->flist[i],
256 if (!dma_fence_is_signaled(sa->fence)) {
257 fences[i] = sa->fence;
265 tmp = sa->soffset;
272 /* this sa bo is the closest one */
275 best_bo = sa;
320 struct drm_suballoc *sa;
330 sa = kmalloc(sizeof(*sa), gfp);
331 if (!sa)
333 sa->manager = sa_manager;
334 sa->fence = NULL;
335 INIT_LIST_HEAD(&sa->olist);
336 INIT_LIST_HEAD(&sa->flist);
346 if (drm_suballoc_try_alloc(sa_manager, sa,
349 return sa;
386 kfree(sa);