Lines Matching refs:kgsl_pipe
39 struct kgsl_pipe *kgsl_pipe = to_kgsl_pipe(pipe); in kgsl_pipe_get_param() local
42 *value = kgsl_pipe->devinfo.device_id; in kgsl_pipe_get_param()
45 *value = kgsl_pipe->devinfo.gpu_id; in kgsl_pipe_get_param()
48 *value = kgsl_pipe->devinfo.gmem_sizebytes; in kgsl_pipe_get_param()
51 *value = kgsl_pipe->devinfo.chip_id; in kgsl_pipe_get_param()
66 struct kgsl_pipe *kgsl_pipe = to_kgsl_pipe(pipe); in kgsl_pipe_wait() local
74 ret = ioctl(kgsl_pipe->fd, IOCTL_KGSL_DEVICE_WAITTIMESTAMP, &req); in kgsl_pipe_wait()
79 kgsl_pipe_process_pending(kgsl_pipe, timestamp); in kgsl_pipe_wait()
83 drm_private int kgsl_pipe_timestamp(struct kgsl_pipe *kgsl_pipe, in kgsl_pipe_timestamp() argument
89 int ret = ioctl(kgsl_pipe->fd, IOCTL_KGSL_CMDSTREAM_READTIMESTAMP, &req); in kgsl_pipe_timestamp()
101 struct kgsl_pipe *kgsl_pipe = to_kgsl_pipe(pipe); in kgsl_pipe_destroy() local
103 .drawctxt_id = kgsl_pipe->drawctxt_id, in kgsl_pipe_destroy()
106 if (kgsl_pipe->drawctxt_id) in kgsl_pipe_destroy()
107 ioctl(kgsl_pipe->fd, IOCTL_KGSL_DRAWCTXT_DESTROY, &req); in kgsl_pipe_destroy()
109 if (kgsl_pipe->fd >= 0) in kgsl_pipe_destroy()
110 close(kgsl_pipe->fd); in kgsl_pipe_destroy()
112 free(kgsl_pipe); in kgsl_pipe_destroy()
128 drm_private void kgsl_pipe_add_submit(struct kgsl_pipe *kgsl_pipe, in kgsl_pipe_add_submit() argument
131 struct fd_pipe *pipe = &kgsl_pipe->base; in kgsl_pipe_add_submit()
139 list_addtail(list, &kgsl_pipe->submit_list); in kgsl_pipe_add_submit()
143 drm_private void kgsl_pipe_pre_submit(struct kgsl_pipe *kgsl_pipe) in kgsl_pipe_pre_submit() argument
145 struct fd_pipe *pipe = &kgsl_pipe->base; in kgsl_pipe_pre_submit()
148 if (!kgsl_pipe->p3d) in kgsl_pipe_pre_submit()
149 kgsl_pipe->p3d = fd_pipe_new(pipe->dev, FD_PIPE_3D); in kgsl_pipe_pre_submit()
151 LIST_FOR_EACH_ENTRY(kgsl_bo, &kgsl_pipe->submit_list, list[pipe->id]) { in kgsl_pipe_pre_submit()
154 fd_pipe_wait(kgsl_pipe->p3d, timestamp); in kgsl_pipe_pre_submit()
159 drm_private void kgsl_pipe_post_submit(struct kgsl_pipe *kgsl_pipe, in kgsl_pipe_post_submit() argument
162 struct fd_pipe *pipe = &kgsl_pipe->base; in kgsl_pipe_post_submit()
165 LIST_FOR_EACH_ENTRY_SAFE(kgsl_bo, tmp, &kgsl_pipe->submit_list, list[pipe->id]) { in kgsl_pipe_post_submit()
169 list_addtail(list, &kgsl_pipe->pending_list); in kgsl_pipe_post_submit()
174 if (!kgsl_pipe_timestamp(kgsl_pipe, ×tamp)) in kgsl_pipe_post_submit()
175 kgsl_pipe_process_pending(kgsl_pipe, timestamp); in kgsl_pipe_post_submit()
178 drm_private void kgsl_pipe_process_pending(struct kgsl_pipe *kgsl_pipe, in kgsl_pipe_process_pending() argument
181 struct fd_pipe *pipe = &kgsl_pipe->base; in kgsl_pipe_process_pending()
184 LIST_FOR_EACH_ENTRY_SAFE(kgsl_bo, tmp, &kgsl_pipe->pending_list, list[pipe->id]) { in kgsl_pipe_process_pending()
222 struct kgsl_pipe *kgsl_pipe = NULL; in kgsl_pipe_new() local
240 kgsl_pipe = calloc(1, sizeof(*kgsl_pipe)); in kgsl_pipe_new()
241 if (!kgsl_pipe) { in kgsl_pipe_new()
246 pipe = &kgsl_pipe->base; in kgsl_pipe_new()
249 kgsl_pipe->fd = fd; in kgsl_pipe_new()
250 kgsl_pipe->drawctxt_id = req.drawctxt_id; in kgsl_pipe_new()
252 list_inithead(&kgsl_pipe->submit_list); in kgsl_pipe_new()
253 list_inithead(&kgsl_pipe->pending_list); in kgsl_pipe_new()
255 GETPROP(fd, VERSION, kgsl_pipe->version); in kgsl_pipe_new()
256 GETPROP(fd, DEVICE_INFO, kgsl_pipe->devinfo); in kgsl_pipe_new()
258 if (kgsl_pipe->devinfo.gpu_id >= 500) { in kgsl_pipe_new()
266 (kgsl_pipe->devinfo.chip_id >> 24) & 0xff, in kgsl_pipe_new()
267 (kgsl_pipe->devinfo.chip_id >> 16) & 0xff, in kgsl_pipe_new()
268 (kgsl_pipe->devinfo.chip_id >> 8) & 0xff, in kgsl_pipe_new()
269 (kgsl_pipe->devinfo.chip_id >> 0) & 0xff); in kgsl_pipe_new()
270 INFO_MSG(" Device-id: %d", kgsl_pipe->devinfo.device_id); in kgsl_pipe_new()
271 INFO_MSG(" GPU-id: %d", kgsl_pipe->devinfo.gpu_id); in kgsl_pipe_new()
272 INFO_MSG(" MMU enabled: %d", kgsl_pipe->devinfo.mmu_enabled); in kgsl_pipe_new()
273 INFO_MSG(" GMEM Base addr: 0x%08x", kgsl_pipe->devinfo.gmem_gpubaseaddr); in kgsl_pipe_new()
274 INFO_MSG(" GMEM size: 0x%08x", kgsl_pipe->devinfo.gmem_sizebytes); in kgsl_pipe_new()
276 kgsl_pipe->version.drv_major, kgsl_pipe->version.drv_minor); in kgsl_pipe_new()
278 kgsl_pipe->version.dev_major, kgsl_pipe->version.dev_minor); in kgsl_pipe_new()