Lines Matching refs:iter
415 struct sgt_dma *iter, in gen8_ppgtt_insert_pte() argument
427 GEM_BUG_ON(sg_dma_len(iter->sg) < I915_GTT_PAGE_SIZE); in gen8_ppgtt_insert_pte()
428 vaddr[gen8_pd_index(idx, 0)] = pte_encode | iter->dma; in gen8_ppgtt_insert_pte()
430 iter->dma += I915_GTT_PAGE_SIZE; in gen8_ppgtt_insert_pte()
431 if (iter->dma >= iter->max) { in gen8_ppgtt_insert_pte()
432 iter->sg = __sg_next(iter->sg); in gen8_ppgtt_insert_pte()
433 if (!iter->sg || sg_dma_len(iter->sg) == 0) { in gen8_ppgtt_insert_pte()
438 iter->dma = sg_dma_address(iter->sg); in gen8_ppgtt_insert_pte()
439 iter->max = iter->dma + sg_dma_len(iter->sg); in gen8_ppgtt_insert_pte()
461 struct sgt_dma *iter, in gen8_ppgtt_insert_huge() argument
466 unsigned int rem = sg_dma_len(iter->sg); in gen8_ppgtt_insert_huge()
483 IS_ALIGNED(iter->dma, I915_GTT_PAGE_SIZE_2M) && in gen8_ppgtt_insert_huge()
500 IS_ALIGNED(iter->dma, I915_GTT_PAGE_SIZE_64K) && in gen8_ppgtt_insert_huge()
509 GEM_BUG_ON(sg_dma_len(iter->sg) < page_size); in gen8_ppgtt_insert_huge()
510 vaddr[index++] = encode | iter->dma; in gen8_ppgtt_insert_huge()
513 iter->dma += page_size; in gen8_ppgtt_insert_huge()
515 if (iter->dma >= iter->max) { in gen8_ppgtt_insert_huge()
516 iter->sg = __sg_next(iter->sg); in gen8_ppgtt_insert_huge()
517 if (!iter->sg) in gen8_ppgtt_insert_huge()
520 rem = sg_dma_len(iter->sg); in gen8_ppgtt_insert_huge()
524 iter->dma = sg_dma_address(iter->sg); in gen8_ppgtt_insert_huge()
525 iter->max = iter->dma + rem; in gen8_ppgtt_insert_huge()
528 !(IS_ALIGNED(iter->dma, I915_GTT_PAGE_SIZE_64K) && in gen8_ppgtt_insert_huge()
533 if (unlikely(!IS_ALIGNED(iter->dma, page_size))) in gen8_ppgtt_insert_huge()
549 !iter->sg && IS_ALIGNED(vma->node.start + in gen8_ppgtt_insert_huge()
578 } while (iter->sg && sg_dma_len(iter->sg)); in gen8_ppgtt_insert_huge()
587 struct sgt_dma iter = sgt_dma(vma); in gen8_ppgtt_insert() local
590 gen8_ppgtt_insert_huge(vma, &iter, cache_level, flags); in gen8_ppgtt_insert()
598 idx = gen8_ppgtt_insert_pte(ppgtt, pdp, &iter, idx, in gen8_ppgtt_insert()