• Home
  • Raw
  • Download

Lines Matching refs:krec

60 	struct nouveau_pushbuf_krec *krec;  member
87 struct nouveau_pushbuf_krec *krec = nvpb->krec; in pushbuf_kref_fits() local
98 if (krec->vram_used + bo->size > dev->vram_limit) in pushbuf_kref_fits()
100 krec->vram_used += bo->size; in pushbuf_kref_fits()
108 if (krec->gart_used + bo->size <= dev->gart_limit) { in pushbuf_kref_fits()
109 krec->gart_used += bo->size; in pushbuf_kref_fits()
117 krec->vram_used + bo->size <= dev->vram_limit) { in pushbuf_kref_fits()
119 krec->vram_used += bo->size; in pushbuf_kref_fits()
127 kref = krec->buffer; in pushbuf_kref_fits()
128 for (i = 0; i < krec->nr_buffer; i++, kref++) { in pushbuf_kref_fits()
134 krec->vram_used + kbo->size > dev->vram_limit) in pushbuf_kref_fits()
138 krec->gart_used -= kbo->size; in pushbuf_kref_fits()
139 krec->vram_used += kbo->size; in pushbuf_kref_fits()
140 if (krec->gart_used + bo->size <= dev->gart_limit) { in pushbuf_kref_fits()
141 krec->gart_used += bo->size; in pushbuf_kref_fits()
156 struct nouveau_pushbuf_krec *krec = nvpb->krec; in pushbuf_kref() local
188 if (krec->vram_used + bo->size > dev->vram_limit) in pushbuf_kref()
190 krec->vram_used += bo->size; in pushbuf_kref()
191 krec->gart_used -= bo->size; in pushbuf_kref()
198 if (krec->nr_buffer == NOUVEAU_GEM_MAX_BUFFERS || in pushbuf_kref()
202 kref = &krec->buffer[krec->nr_buffer++]; in pushbuf_kref()
227 struct nouveau_pushbuf_krec *krec = nvpb->krec; in pushbuf_krel() local
235 krel = &krec->reloc[krec->nr_reloc++]; in pushbuf_krel()
239 krel->reloc_bo_index = pkref - krec->buffer; in pushbuf_krel()
241 krel->bo_index = bkref - krec->buffer; in pushbuf_krel()
267 pushbuf_dump(struct nouveau_pushbuf_krec *krec, int krec_id, int chid) in pushbuf_dump() argument
277 krec_id, krec->nr_push, krec->nr_buffer, krec->nr_reloc); in pushbuf_dump()
279 kref = krec->buffer; in pushbuf_dump()
280 for (i = 0; i < krec->nr_buffer; i++, kref++) { in pushbuf_dump()
286 krel = krec->reloc; in pushbuf_dump()
287 for (i = 0; i < krec->nr_reloc; i++, krel++) { in pushbuf_dump()
294 kpsh = krec->push; in pushbuf_dump()
295 for (i = 0; i < krec->nr_push; i++, kpsh++) { in pushbuf_dump()
296 kref = krec->buffer + kpsh->bo_index; in pushbuf_dump()
313 struct nouveau_pushbuf_krec *krec = nvpb->list; in pushbuf_submit() local
332 while (krec && krec->nr_push) { in pushbuf_submit()
334 req.nr_buffers = krec->nr_buffer; in pushbuf_submit()
335 req.buffers = (uint64_t)(unsigned long)krec->buffer; in pushbuf_submit()
336 req.nr_relocs = krec->nr_reloc; in pushbuf_submit()
337 req.nr_push = krec->nr_push; in pushbuf_submit()
338 req.relocs = (uint64_t)(unsigned long)krec->reloc; in pushbuf_submit()
339 req.push = (uint64_t)(unsigned long)krec->push; in pushbuf_submit()
346 pushbuf_dump(krec, krec_id++, fifo->channel); in pushbuf_submit()
364 pushbuf_dump(krec, krec_id++, fifo->channel); in pushbuf_submit()
368 kref = krec->buffer; in pushbuf_submit()
369 for (i = 0; i < krec->nr_buffer; i++, kref++) { in pushbuf_submit()
388 krec = krec->next; in pushbuf_submit()
398 struct nouveau_pushbuf_krec *krec = nvpb->krec; in pushbuf_flush() local
408 krec->next = malloc(sizeof(*krec)); in pushbuf_flush()
409 nvpb->krec = krec->next; in pushbuf_flush()
412 kref = krec->buffer; in pushbuf_flush()
413 for (i = 0; i < krec->nr_buffer; i++, kref++) { in pushbuf_flush()
420 krec = nvpb->krec; in pushbuf_flush()
421 krec->vram_used = 0; in pushbuf_flush()
422 krec->gart_used = 0; in pushbuf_flush()
423 krec->nr_buffer = 0; in pushbuf_flush()
424 krec->nr_reloc = 0; in pushbuf_flush()
425 krec->nr_push = 0; in pushbuf_flush()
440 struct nouveau_pushbuf_krec *krec = nvpb->krec; in pushbuf_refn_fail() local
443 kref = krec->buffer + sref; in pushbuf_refn_fail()
444 while (krec->nr_buffer-- > sref) { in pushbuf_refn_fail()
450 krec->nr_buffer = sref; in pushbuf_refn_fail()
451 krec->nr_reloc = srel; in pushbuf_refn_fail()
459 struct nouveau_pushbuf_krec *krec = nvpb->krec; in pushbuf_refn() local
461 int sref = krec->nr_buffer; in pushbuf_refn()
473 pushbuf_refn_fail(push, sref, krec->nr_reloc); in pushbuf_refn()
488 struct nouveau_pushbuf_krec *krec = nvpb->krec; in pushbuf_validate() local
499 sref = krec->nr_buffer; in pushbuf_validate()
500 srel = krec->nr_reloc; in pushbuf_validate()
571 nvpb->krec = calloc(1, sizeof(*nvpb->krec)); in nouveau_pushbuf_new()
572 nvpb->list = nvpb->krec; in nouveau_pushbuf_new()
573 if (!nvpb->krec) { in nouveau_pushbuf_new()
612 struct nouveau_pushbuf_krec *krec; in nouveau_pushbuf_del() local
613 while ((krec = nvpb->list)) { in nouveau_pushbuf_del()
614 kref = krec->buffer; in nouveau_pushbuf_del()
615 while (krec->nr_buffer--) { in nouveau_pushbuf_del()
621 nvpb->list = krec->next; in nouveau_pushbuf_del()
622 free(krec); in nouveau_pushbuf_del()
645 struct nouveau_pushbuf_krec *krec = nvpb->krec; in nouveau_pushbuf_space() local
676 krec->nr_reloc + relocs >= NOUVEAU_GEM_MAX_RELOCS || in nouveau_pushbuf_space()
677 krec->nr_push + pushes >= NOUVEAU_GEM_MAX_PUSH) { in nouveau_pushbuf_space()
678 if (nvpb->bo && krec->nr_buffer) in nouveau_pushbuf_space()
709 struct nouveau_pushbuf_krec *krec = nvpb->krec; in nouveau_pushbuf_data() local
728 kpsh = &krec->push[krec->nr_push++]; in nouveau_pushbuf_data()
729 kpsh->bo_index = kref - krec->buffer; in nouveau_pushbuf_data()