Lines Matching refs:i

65 	int fd, ret = 0, i, count_alloc;  in ion_alloc_test()  local
82 for(i = 0; i < count; i++) { in ion_alloc_test()
83 ret = _ion_alloc_test(fd, &(handle[i])); in ion_alloc_test()
84 printf("%s(): Alloc handle[%d]=%p\n", __func__, i, handle[i]); in ion_alloc_test()
85 if(ret || ((int)handle[i] == -ENOMEM)) { in ion_alloc_test()
87 __func__, i, handle[i], strerror(ret)); in ion_alloc_test()
88 count_alloc = i; in ion_alloc_test()
95 for (i = 0; i < count_alloc; i++) { in ion_alloc_test()
96 printf("%s(): Free handle[%d]=%p\n", __func__, i, handle[i]); in ion_alloc_test()
97 ret = ion_free(fd, handle[i]); in ion_alloc_test()
100 __func__, i, handle[i], strerror(ret)); in ion_alloc_test()
125 int i = (row * stride) + col; in _ion_tiler_map_test() local
126 ptr[i] = (unsigned char)i; in _ion_tiler_map_test()
130 int i = (row * stride) + col; in _ion_tiler_map_test() local
131 if (ptr[i] != (unsigned char)i) in _ion_tiler_map_test()
133 "memory\n", __func__, i, ptr[i]); in _ion_tiler_map_test()
139 size_t i; in _ion_map_test() local
141 for (i = 0; i < len; i++) { in _ion_map_test()
142 ptr[i] = (unsigned char)i; in _ion_map_test()
144 for (i = 0; i < len; i++) { in _ion_map_test()
145 if (ptr[i] != (unsigned char)i) in _ion_map_test()
147 "memory\n", __func__, i, ptr[i]); in _ion_map_test()
153 int fd, ret = 0, i, count_alloc, count_map; in ion_map_test() local
174 for(i = 0; i < count; i++) { in ion_map_test()
175 ret = _ion_alloc_test(fd, &(handle[i])); in ion_map_test()
176 printf("%s(): Alloc handle[%d]=%p\n", __func__, i, handle[i]); in ion_map_test()
177 if(ret || ((int)handle[i] == -ENOMEM)) { in ion_map_test()
179 __func__, i, handle[i], strerror(ret)); in ion_map_test()
180 count_alloc = i; in ion_map_test()
192 for(i = 0; i < count; i++) { in ion_map_test()
194 ret = ion_map(fd, handle[i], len, prot, map_flags, 0, &(ptr[i]), &(map_fd[i])); in ion_map_test()
196 __func__, i, handle[i], map_fd[i], ptr[i]); in ion_map_test()
199 __func__, i, handle[i], strerror(ret)); in ion_map_test()
200 count_map = i; in ion_map_test()
206 _ion_tiler_map_test(ptr[i]); in ion_map_test()
208 _ion_map_test(ptr[i]); in ion_map_test()
213 for(i = 0; i < count_map; i++) { in ion_map_test()
215 ret = munmap(ptr[i], len); in ion_map_test()
217 __func__, i, handle[i], map_fd[i], ptr[i]); in ion_map_test()
220 __func__, i, handle[i], strerror(ret)); in ion_map_test()
224 close(map_fd[i]); in ion_map_test()
231 for (i = 0; i < count_alloc; i++) { in ion_map_test()
232 printf("%s(): Free handle[%d]=%p\n", __func__, i, handle[i]); in ion_map_test()
233 ret = ion_free(fd, handle[i]); in ion_map_test()
236 __func__, i, handle[i], strerror(ret)); in ion_map_test()
261 int fd, ret = 0, i; in ion_alloc_fail_alloc_test() local
280 for(i = 0; i < COUNT_ALLOC_MAX; i++) { in ion_alloc_fail_alloc_test()
281 ret = _ion_alloc_test(fd, &(handle[i])); in ion_alloc_fail_alloc_test()
282 printf("%s(): Alloc handle[%d]=%p\n", __func__, i, handle[i]); in ion_alloc_fail_alloc_test()
283 if(ret || ((int)handle[i] == -ENOMEM)) { in ion_alloc_fail_alloc_test()
285 __func__, i, handle[i], strerror(ret)); in ion_alloc_fail_alloc_test()
286 count_alloc = i; in ion_alloc_fail_alloc_test()
292 for (i = count_alloc-1; i > (count_alloc-1 - COUNT_REALLOC_MAX); i--) { in ion_alloc_fail_alloc_test()
293 printf("%s(): Free handle[%d]=%p\n", __func__, i, handle[i]); in ion_alloc_fail_alloc_test()
294 ret = ion_free(fd, handle[i]); in ion_alloc_fail_alloc_test()
297 __func__, i, handle[i], strerror(ret)); in ion_alloc_fail_alloc_test()
303 for(i = (count_alloc - COUNT_REALLOC_MAX); i < count_alloc; i++) { in ion_alloc_fail_alloc_test()
304 ret = _ion_alloc_test(fd, &(handle[i])); in ion_alloc_fail_alloc_test()
305 printf("%s(): Alloc handle[%d]=%p\n", __func__, i, handle[i]); in ion_alloc_fail_alloc_test()
306 if(ret || ((int)handle[i] == -ENOMEM)) { in ion_alloc_fail_alloc_test()
308 __func__, i, handle[i], strerror(ret)); in ion_alloc_fail_alloc_test()
309 count_realloc = i; in ion_alloc_fail_alloc_test()
313 count_realloc = i; in ion_alloc_fail_alloc_test()
317 for (i = 0; i < count_alloc; i++) { in ion_alloc_fail_alloc_test()
318 printf("%s(): Free handle[%d]=%p\n", __func__, i, handle[i]); in ion_alloc_fail_alloc_test()
319 ret = ion_free(fd, handle[i]); in ion_alloc_fail_alloc_test()
322 __func__, i, handle[i], strerror(ret)); in ion_alloc_fail_alloc_test()
378 int i = 0; in main() local
379 c = getopt_long(argc, argv, "af:h:l:mr:stw:c:n:i:", opts, &i); in main()