Lines Matching refs:pt

21 			   const struct i915_page_table *pt)  in gen6_write_pde()  argument
23 dma_addr_t addr = pt ? px_dma(pt) : px_dma(ppgtt->base.vm.scratch[1]); in gen6_write_pde()
85 struct i915_page_table * const pt = in gen6_ppgtt_clear_range() local
92 GEM_BUG_ON(count > atomic_read(&pt->used)); in gen6_ppgtt_clear_range()
93 if (!atomic_sub_return(count, &pt->used)) in gen6_ppgtt_clear_range()
103 vaddr = px_vaddr(pt); in gen6_ppgtt_clear_range()
153 struct i915_page_table *pt; in gen6_flush_pd() local
161 gen6_for_each_pde(pt, pd, start, end, pde) in gen6_flush_pd()
162 gen6_write_pde(ppgtt, pde, pt); in gen6_flush_pd()
178 struct i915_page_table *pt; in gen6_alloc_va_range() local
184 gen6_for_each_pde(pt, pd, start, length, pde) { in gen6_alloc_va_range()
187 if (!pt) { in gen6_alloc_va_range()
190 pt = stash->pt[0]; in gen6_alloc_va_range()
191 __i915_gem_object_pin_pages(pt->base); in gen6_alloc_va_range()
193 fill32_px(pt, vm->scratch[0]->encode); in gen6_alloc_va_range()
197 stash->pt[0] = pt->stash; in gen6_alloc_va_range()
198 atomic_set(&pt->used, 0); in gen6_alloc_va_range()
199 pd->entry[pde] = pt; in gen6_alloc_va_range()
201 pt = pd->entry[pde]; in gen6_alloc_va_range()
207 atomic_add(count, &pt->used); in gen6_alloc_va_range()
259 struct i915_page_table *pt; in gen6_ppgtt_free_pd() local
262 gen6_for_all_pdes(pt, pd, pde) in gen6_ppgtt_free_pd()
263 if (pt) in gen6_ppgtt_free_pd()
264 free_pt(&ppgtt->base.vm, pt); in gen6_ppgtt_free_pd()
301 struct i915_page_table *pt; in pd_vma_unbind() local
308 gen6_for_all_pdes(pt, ppgtt->base.pd, pde) { in pd_vma_unbind()
309 if (!pt || atomic_read(&pt->used)) in pd_vma_unbind()
312 free_pt(&ppgtt->base.vm, pt); in pd_vma_unbind()
390 pd->pt.base = __i915_gem_object_create_internal(ppgtt->base.vm.gt->i915, in gen6_alloc_top_pd()
393 if (IS_ERR(pd->pt.base)) { in gen6_alloc_top_pd()
394 err = PTR_ERR(pd->pt.base); in gen6_alloc_top_pd()
395 pd->pt.base = NULL; in gen6_alloc_top_pd()
399 pd->pt.base->base.resv = i915_vm_resv_get(&ppgtt->base.vm); in gen6_alloc_top_pd()
400 pd->pt.base->shares_resv_from = &ppgtt->base.vm; in gen6_alloc_top_pd()
402 ppgtt->vma = i915_vma_instance(pd->pt.base, &ggtt->vm, NULL); in gen6_alloc_top_pd()