Lines Matching refs:ret
48 int ret = ioctl(fd, req, arg); in ion_ioctl() local
49 if (ret < 0) { in ion_ioctl()
51 ret, strerror(errno)); in ion_ioctl()
54 return ret; in ion_ioctl()
60 int ret = -EINVAL; in ion_alloc() local
72 ret = ion_ioctl(fd, ION_IOC_ALLOC, &data); in ion_alloc()
73 if (ret >= 0) in ion_alloc()
77 ion_dbg_func("leave: ret %d\n", ret); in ion_alloc()
79 return ret; in ion_alloc()
84 int ret; in ion_free() local
90 ret = ion_ioctl(fd, ION_IOC_FREE, &data); in ion_free()
91 ion_dbg_func("leave: ret %d\n", ret); in ion_free()
92 return ret; in ion_free()
97 int ret; in ion_map_fd() local
105 ret = ion_ioctl(fd, ION_IOC_MAP, &data); in ion_map_fd()
106 if (ret < 0) in ion_map_fd()
107 return ret; in ion_map_fd()
202 RK_S32 ret = ION_DETECT_IOMMU_DISABLE; in check_sysfs_iommu() local
218 return ret; in check_sysfs_iommu()
234 ret = ION_DETECT_IOMMU_ENABLE; in check_sysfs_iommu()
247 ret = ION_DETECT_IOMMU_ENABLE; in check_sysfs_iommu()
256 ret = ION_DETECT_NO_DTS; in check_sysfs_iommu()
259 return ret; in check_sysfs_iommu()
346 MPP_RET ret = MPP_OK; in allocator_ion_alloc() local
359 ret = ion_alloc(p->ion_device, info->size, p->alignment, ion_heap_mask, in allocator_ion_alloc()
361 if (ret) in allocator_ion_alloc()
362 mpp_err_f("ion_alloc failed ret %d\n", ret); in allocator_ion_alloc()
364 ret = ion_map_fd(p->ion_device, hnd, &fd); in allocator_ion_alloc()
365 if (ret) in allocator_ion_alloc()
366 mpp_err_f("ion_map_fd failed ret %d\n", ret); in allocator_ion_alloc()
373 ion_dbg_func("leave: ret %d handle %d fd %d\n", ret, hnd, fd); in allocator_ion_alloc()
374 return ret; in allocator_ion_alloc()
379 MPP_RET ret = MPP_NOK; in allocator_ion_import() local
387 ret = ion_ioctl(p->ion_device, ION_IOC_IMPORT, &fd_data); in allocator_ion_import()
394 ret = ion_map_fd(p->ion_device, fd_data.handle, &data->fd); in allocator_ion_import()
397 ion_dbg_func("leave: ret %d handle %d\n", ret, data->hnd); in allocator_ion_import()
398 return ret; in allocator_ion_import()
403 MPP_RET ret = MPP_OK; in allocator_ion_mmap() local
413 ret = ion_mmap(data->fd, data->size, PROT_READ | PROT_WRITE, in allocator_ion_mmap()
416 ion_dbg_func("leave: ret %d ptr %p\n", ret, data->ptr); in allocator_ion_mmap()
417 return ret; in allocator_ion_mmap()
453 int ret; in allocator_ion_close() local
464 ret = close(p->ion_device); in allocator_ion_close()
466 if (ret < 0) in allocator_ion_close()
467 ret = (MPP_RET) - errno; in allocator_ion_close()
469 ion_dbg_func("leave: ret %d\n", ret); in allocator_ion_close()
471 return ret; in allocator_ion_close()