Home | History | Annotate | Download | only in ion

Lines Matching full:handle

48 int _ion_alloc_test(int fd, struct ion_handle **handle)
54 handle, &stride);
56 ret = ion_alloc(fd, len, align, alloc_flags, handle);
66 struct ion_handle **handle;
74 handle = (struct ion_handle **)malloc(count * sizeof(struct ion_handle *));
75 if(handle == NULL) {
83 ret = _ion_alloc_test(fd, &(handle[i]));
84 printf("%s(): Alloc handle[%d]=%p\n", __func__, i, handle[i]);
85 if(ret || ((int)handle[i] == -ENOMEM)) {
86 printf("%s(): Alloc handle[%d]=%p FAILED, err:%s\n",
87 __func__, i, handle[i], strerror(ret));
96 printf("%s(): Free handle[%d]=%p\n", __func__, i, handle[i]);
97 ret = ion_free(fd, handle[i]);
99 printf("%s(): Free handle[%d]=%p FAILED, err:%s\n",
100 __func__, i, handle[i], strerror(ret));
105 free(handle);
106 handle = NULL;
154 struct ion_handle **handle;
164 handle = (struct ion_handle **)malloc(count * sizeof(struct ion_handle *));
165 if(handle == NULL) {
175 ret = _ion_alloc_test(fd, &(handle[i]));
176 printf("%s(): Alloc handle[%d]=%p\n", __func__, i, handle[i]);
177 if(ret || ((int)handle[i] == -ENOMEM)) {
178 printf("%s(): Alloc handle[%d]=%p FAILED, err:%s\n",
179 __func__, i, handle[i], strerror(ret));
194 ret = ion_map(fd, handle[i], len, prot, map_flags, 0, &(ptr[i]), &(map_fd[i]));
195 printf("%s(): Map handle[%d]=%p, map_fd=%d, ptr=%p\n",
196 __func__, i, handle[i], map_fd[i], ptr[i]);
198 printf("%s Map handle[%d]=%p FAILED, err:%s\n",
199 __func__, i, handle[i], strerror(ret));
216 printf("%s(): Unmap handle[%d]=%p, map_fd=%d, ptr=%p\n",
217 __func__, i, handle[i], map_fd[i], ptr[i]);
219 printf("%s(): Unmap handle[%d]=%p FAILED, err:%s\n",
220 __func__, i, handle[i], strerror(ret));
232 printf("%s(): Free handle[%d]=%p\n", __func__, i, handle[i]);
233 ret = ion_free(fd, handle[i]);
235 printf("%s(): Free handle[%d]=%p FAILED, err:%s\n",
236 __func__, i, handle[i], strerror(ret));
241 free(handle);
242 handle = NULL;
262 struct ion_handle **handle;
273 handle = (struct ion_handle **)malloc(COUNT_ALLOC_MAX * sizeof(struct ion_handle *));
274 if(handle == NULL) {
281 ret = _ion_alloc_test(fd, &(handle[i]));
282 printf("%s(): Alloc handle[%d]=%p\n", __func__, i, handle[i]);
283 if(ret || ((int)handle[i] == -ENOMEM)) {
284 printf("%s(): Alloc handle[%d]=%p FAILED, err:%s\n\n",
285 __func__, i, handle[i], strerror(ret));
293 printf("%s(): Free handle[%d]=%p\n", __func__, i, handle[i]);
294 ret = ion_free(fd, handle[i]);
296 printf("%s(): Free handle[%d]=%p FAILED, err:%s\n\n",
297 __func__, i, handle[i], strerror(ret));
304 ret = _ion_alloc_test(fd, &(handle[i]));
305 printf("%s(): Alloc handle[%d]=%p\n", __func__, i, handle[i]);
306 if(ret || ((int)handle[i] == -ENOMEM)) {
307 printf("%s(): Alloc handle[%d]=%p FAILED, err:%s\n\n",
308 __func__, i, handle[i], strerror(ret));
318 printf("%s(): Free handle[%d]=%p\n", __func__, i, handle[i]);
319 ret = ion_free(fd, handle[i]);
321 printf("%s(): Free handle[%d]=%p FAILED, err:%s\n",
322 __func__, i, handle[i], strerror(ret));
327 free(handle);
328 handle = NULL;