Lines Matching refs:fd
41 int gpu_mem_alloc_id(int fd, int size, int flags, in gpu_mem_alloc_id() argument
47 ret = ioctl(fd, IOCTL_KGSL_GPUMEM_ALLOC_ID, alloc); in gpu_mem_alloc_id()
51 int gpu_sharedmem_free(int fd, unsigned long gpu_addr) { in gpu_sharedmem_free() argument
55 ret = ioctl(fd, IOCTL_KGSL_SHAREDMEM_FREE, &addr); in gpu_sharedmem_free()
59 unsigned long gpu_mem_alloc(int fd, int size, unsigned int flags) { in gpu_mem_alloc() argument
64 if (ioctl(fd, IOCTL_KGSL_GPUMEM_ALLOC, &alloc) < 0) { in gpu_mem_alloc()
70 int gpu_mem_get_info_from_id(int fd, int id, in gpu_mem_get_info_from_id() argument
75 ret = ioctl(fd, IOCTL_KGSL_GPUMEM_GET_INFO, info); in gpu_mem_get_info_from_id()
95 int gpu_map_user_mem(int fd, uintptr_t addr, size_t size, size_t offset, in gpu_map_user_mem() argument
100 user_mem.fd = -1; in gpu_map_user_mem()
108 result = ioctl(fd, IOCTL_KGSL_MAP_USER_MEM, &user_mem); in gpu_map_user_mem()
115 int create_code_page(int fd, int size, void **cpu_addr, in create_code_page() argument
121 if (gpu_mem_alloc_id(fd, size, in create_code_page()
129 mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, alloc.id << 12); in create_code_page()
134 if (gpu_mem_get_info_from_id(fd, alloc.id, &info) < 0) { in create_code_page()
143 void trigger(int fd, uintptr_t start, uintptr_t end) { in trigger() argument
148 gpu_map_user_mem(fd, (uintptr_t)hostptr, end - start, 0, in trigger()