Lines Matching refs:kgsl_pipe
35 struct kgsl_pipe *kgsl_pipe = to_kgsl_pipe(pipe); in kgsl_pipe_get_param() local
38 *value = kgsl_pipe->devinfo.device_id; in kgsl_pipe_get_param()
41 *value = kgsl_pipe->devinfo.gpu_id; in kgsl_pipe_get_param()
44 *value = kgsl_pipe->devinfo.gmem_sizebytes; in kgsl_pipe_get_param()
47 *value = kgsl_pipe->devinfo.chip_id; in kgsl_pipe_get_param()
63 struct kgsl_pipe *kgsl_pipe = to_kgsl_pipe(pipe); in kgsl_pipe_wait() local
71 ret = ioctl(kgsl_pipe->fd, IOCTL_KGSL_DEVICE_WAITTIMESTAMP, &req); in kgsl_pipe_wait()
76 kgsl_pipe_process_pending(kgsl_pipe, timestamp); in kgsl_pipe_wait()
80 drm_private int kgsl_pipe_timestamp(struct kgsl_pipe *kgsl_pipe, in kgsl_pipe_timestamp() argument
86 int ret = ioctl(kgsl_pipe->fd, IOCTL_KGSL_CMDSTREAM_READTIMESTAMP, &req); in kgsl_pipe_timestamp()
98 struct kgsl_pipe *kgsl_pipe = to_kgsl_pipe(pipe); in kgsl_pipe_destroy() local
100 .drawctxt_id = kgsl_pipe->drawctxt_id, in kgsl_pipe_destroy()
103 if (kgsl_pipe->drawctxt_id) in kgsl_pipe_destroy()
104 ioctl(kgsl_pipe->fd, IOCTL_KGSL_DRAWCTXT_DESTROY, &req); in kgsl_pipe_destroy()
106 if (kgsl_pipe->fd >= 0) in kgsl_pipe_destroy()
107 close(kgsl_pipe->fd); in kgsl_pipe_destroy()
109 free(kgsl_pipe); in kgsl_pipe_destroy()
125 drm_private void kgsl_pipe_add_submit(struct kgsl_pipe *kgsl_pipe, in kgsl_pipe_add_submit() argument
128 struct fd_pipe *pipe = &kgsl_pipe->base; in kgsl_pipe_add_submit()
136 list_addtail(list, &kgsl_pipe->submit_list); in kgsl_pipe_add_submit()
140 drm_private void kgsl_pipe_pre_submit(struct kgsl_pipe *kgsl_pipe) in kgsl_pipe_pre_submit() argument
142 struct fd_pipe *pipe = &kgsl_pipe->base; in kgsl_pipe_pre_submit()
145 if (!kgsl_pipe->p3d) in kgsl_pipe_pre_submit()
146 kgsl_pipe->p3d = fd_pipe_new(pipe->dev, FD_PIPE_3D); in kgsl_pipe_pre_submit()
148 LIST_FOR_EACH_ENTRY(kgsl_bo, &kgsl_pipe->submit_list, list[pipe->id]) { in kgsl_pipe_pre_submit()
151 fd_pipe_wait(kgsl_pipe->p3d, timestamp); in kgsl_pipe_pre_submit()
156 drm_private void kgsl_pipe_post_submit(struct kgsl_pipe *kgsl_pipe, in kgsl_pipe_post_submit() argument
159 struct fd_pipe *pipe = &kgsl_pipe->base; in kgsl_pipe_post_submit()
162 LIST_FOR_EACH_ENTRY_SAFE(kgsl_bo, tmp, &kgsl_pipe->submit_list, list[pipe->id]) { in kgsl_pipe_post_submit()
166 list_addtail(list, &kgsl_pipe->pending_list); in kgsl_pipe_post_submit()
171 if (!kgsl_pipe_timestamp(kgsl_pipe, ×tamp)) in kgsl_pipe_post_submit()
172 kgsl_pipe_process_pending(kgsl_pipe, timestamp); in kgsl_pipe_post_submit()
175 drm_private void kgsl_pipe_process_pending(struct kgsl_pipe *kgsl_pipe, in kgsl_pipe_process_pending() argument
178 struct fd_pipe *pipe = &kgsl_pipe->base; in kgsl_pipe_process_pending()
181 LIST_FOR_EACH_ENTRY_SAFE(kgsl_bo, tmp, &kgsl_pipe->pending_list, list[pipe->id]) { in kgsl_pipe_process_pending()
219 struct kgsl_pipe *kgsl_pipe = NULL; in kgsl_pipe_new() local
237 kgsl_pipe = calloc(1, sizeof(*kgsl_pipe)); in kgsl_pipe_new()
238 if (!kgsl_pipe) { in kgsl_pipe_new()
243 pipe = &kgsl_pipe->base; in kgsl_pipe_new()
246 kgsl_pipe->fd = fd; in kgsl_pipe_new()
247 kgsl_pipe->drawctxt_id = req.drawctxt_id; in kgsl_pipe_new()
249 list_inithead(&kgsl_pipe->submit_list); in kgsl_pipe_new()
250 list_inithead(&kgsl_pipe->pending_list); in kgsl_pipe_new()
252 GETPROP(fd, VERSION, kgsl_pipe->version); in kgsl_pipe_new()
253 GETPROP(fd, DEVICE_INFO, kgsl_pipe->devinfo); in kgsl_pipe_new()
255 if (kgsl_pipe->devinfo.gpu_id >= 500) { in kgsl_pipe_new()
263 (kgsl_pipe->devinfo.chip_id >> 24) & 0xff, in kgsl_pipe_new()
264 (kgsl_pipe->devinfo.chip_id >> 16) & 0xff, in kgsl_pipe_new()
265 (kgsl_pipe->devinfo.chip_id >> 8) & 0xff, in kgsl_pipe_new()
266 (kgsl_pipe->devinfo.chip_id >> 0) & 0xff); in kgsl_pipe_new()
267 INFO_MSG(" Device-id: %d", kgsl_pipe->devinfo.device_id); in kgsl_pipe_new()
268 INFO_MSG(" GPU-id: %d", kgsl_pipe->devinfo.gpu_id); in kgsl_pipe_new()
269 INFO_MSG(" MMU enabled: %d", kgsl_pipe->devinfo.mmu_enabled); in kgsl_pipe_new()
270 INFO_MSG(" GMEM Base addr: 0x%08x", kgsl_pipe->devinfo.gmem_gpubaseaddr); in kgsl_pipe_new()
271 INFO_MSG(" GMEM size: 0x%08x", kgsl_pipe->devinfo.gmem_sizebytes); in kgsl_pipe_new()
273 kgsl_pipe->version.drv_major, kgsl_pipe->version.drv_minor); in kgsl_pipe_new()
275 kgsl_pipe->version.dev_major, kgsl_pipe->version.dev_minor); in kgsl_pipe_new()