Lines Matching refs:cur

56 				    struct amdgpu_res_cursor *cur)  in amdgpu_res_first()  argument
67 cur->mem_type = res->mem_type; in amdgpu_res_first()
69 switch (cur->mem_type) { in amdgpu_res_first()
87 cur->start = amdgpu_vram_mgr_block_start(block) + start; in amdgpu_res_first()
88 cur->size = min(amdgpu_vram_mgr_block_size(block) - start, size); in amdgpu_res_first()
89 cur->remaining = size; in amdgpu_res_first()
90 cur->node = block; in amdgpu_res_first()
98 cur->start = (node->start << PAGE_SHIFT) + start; in amdgpu_res_first()
99 cur->size = min((node->size << PAGE_SHIFT) - start, size); in amdgpu_res_first()
100 cur->remaining = size; in amdgpu_res_first()
101 cur->node = node; in amdgpu_res_first()
110 cur->start = start; in amdgpu_res_first()
111 cur->size = size; in amdgpu_res_first()
112 cur->remaining = size; in amdgpu_res_first()
113 cur->node = NULL; in amdgpu_res_first()
126 static inline void amdgpu_res_next(struct amdgpu_res_cursor *cur, uint64_t size) in amdgpu_res_next() argument
132 BUG_ON(size > cur->remaining); in amdgpu_res_next()
134 cur->remaining -= size; in amdgpu_res_next()
135 if (!cur->remaining) in amdgpu_res_next()
138 cur->size -= size; in amdgpu_res_next()
139 if (cur->size) { in amdgpu_res_next()
140 cur->start += size; in amdgpu_res_next()
144 switch (cur->mem_type) { in amdgpu_res_next()
146 block = cur->node; in amdgpu_res_next()
151 cur->node = block; in amdgpu_res_next()
152 cur->start = amdgpu_vram_mgr_block_start(block); in amdgpu_res_next()
153 cur->size = min(amdgpu_vram_mgr_block_size(block), cur->remaining); in amdgpu_res_next()
157 node = cur->node; in amdgpu_res_next()
159 cur->node = ++node; in amdgpu_res_next()
160 cur->start = node->start << PAGE_SHIFT; in amdgpu_res_next()
161 cur->size = min(node->size << PAGE_SHIFT, cur->remaining); in amdgpu_res_next()