Lines Matching refs:dlb
288 struct vsp1_dl_body *dlb = &pool->bodies[i];
290 dlb->pool = pool;
291 dlb->max_entries = num_entries;
293 dlb->dma = pool->dma + i * dlb_size;
294 dlb->entries = pool->mem + i * dlb_size;
296 list_add_tail(&dlb->free, &pool->free);
331 struct vsp1_dl_body *dlb = NULL;
337 dlb = list_first_entry(&pool->free, struct vsp1_dl_body, free);
338 list_del(&dlb->free);
339 refcount_set(&dlb->refcnt, 1);
344 return dlb;
349 * @dlb: The display list body
353 void vsp1_dl_body_put(struct vsp1_dl_body *dlb)
357 if (!dlb)
360 if (!refcount_dec_and_test(&dlb->refcnt))
363 dlb->num_entries = 0;
365 spin_lock_irqsave(&dlb->pool->lock, flags);
366 list_add_tail(&dlb->free, &dlb->pool->free);
367 spin_unlock_irqrestore(&dlb->pool->lock, flags);
372 * @dlb: The body
380 void vsp1_dl_body_write(struct vsp1_dl_body *dlb, u32 reg, u32 data)
382 if (WARN_ONCE(dlb->num_entries >= dlb->max_entries,
383 "DLB size exceeded (max %u)", dlb->max_entries))
386 dlb->entries[dlb->num_entries].addr = reg;
387 dlb->entries[dlb->num_entries].data = data;
388 dlb->num_entries++;
580 struct vsp1_dl_body *dlb, *tmp;
582 list_for_each_entry_safe(dlb, tmp, &dl->bodies, list) {
583 list_del(&dlb->list);
584 vsp1_dl_body_put(dlb);
699 * @dlb: The body
712 int vsp1_dl_list_add_body(struct vsp1_dl_list *dl, struct vsp1_dl_body *dlb)
714 refcount_inc(&dlb->refcnt);
716 list_add_tail(&dlb->list, &dl->bodies);
755 struct vsp1_dl_body *dlb;
767 list_for_each_entry(dlb, &dl->bodies, list) {
771 hdr->addr = dlb->dma;
772 hdr->num_bytes = dlb->num_entries