Lines Matching refs:pipe
33 static void vsp1_du_pipeline_frame_end(struct vsp1_pipeline *pipe, in vsp1_du_pipeline_frame_end() argument
36 struct vsp1_drm_pipeline *drm_pipe = to_vsp1_drm_pipeline(pipe); in vsp1_du_pipeline_frame_end()
64 struct vsp1_pipeline *pipe, in vsp1_du_insert_uif() argument
116 struct vsp1_pipeline *pipe, in vsp1_du_pipeline_setup_rpf() argument
190 ret = vsp1_du_insert_uif(vsp1, pipe, uif, &rpf->entity, RWPF_PAD_SOURCE, in vsp1_du_pipeline_setup_rpf()
191 pipe->brx, brx_input); in vsp1_du_pipeline_setup_rpf()
198 ret = v4l2_subdev_call(&pipe->brx->subdev, pad, set_fmt, NULL, in vsp1_du_pipeline_setup_rpf()
205 format.format.code, BRX_NAME(pipe->brx), format.pad); in vsp1_du_pipeline_setup_rpf()
211 ret = v4l2_subdev_call(&pipe->brx->subdev, pad, set_selection, NULL, in vsp1_du_pipeline_setup_rpf()
218 BRX_NAME(pipe->brx), sel.pad); in vsp1_du_pipeline_setup_rpf()
225 struct vsp1_pipeline *pipe);
226 static void vsp1_du_pipeline_configure(struct vsp1_pipeline *pipe);
229 struct vsp1_pipeline *pipe) in vsp1_du_pipeline_setup_brx() argument
231 struct vsp1_drm_pipeline *drm_pipe = to_vsp1_drm_pipeline(pipe); in vsp1_du_pipeline_setup_brx()
244 if (pipe->num_inputs > 2) in vsp1_du_pipeline_setup_brx()
246 else if (pipe->brx && !drm_pipe->force_brx_release) in vsp1_du_pipeline_setup_brx()
247 brx = pipe->brx; in vsp1_du_pipeline_setup_brx()
248 else if (vsp1_feature(vsp1, VSP1_HAS_BRU) && !vsp1->bru->entity.pipe) in vsp1_du_pipeline_setup_brx()
254 if (brx != pipe->brx) { in vsp1_du_pipeline_setup_brx()
258 if (pipe->brx) { in vsp1_du_pipeline_setup_brx()
260 __func__, pipe->lif->index, in vsp1_du_pipeline_setup_brx()
261 BRX_NAME(pipe->brx)); in vsp1_du_pipeline_setup_brx()
277 released_brx = pipe->brx; in vsp1_du_pipeline_setup_brx()
279 list_del(&pipe->brx->list_pipe); in vsp1_du_pipeline_setup_brx()
280 pipe->brx->sink = NULL; in vsp1_du_pipeline_setup_brx()
281 pipe->brx->pipe = NULL; in vsp1_du_pipeline_setup_brx()
282 pipe->brx = NULL; in vsp1_du_pipeline_setup_brx()
289 if (brx->pipe) { in vsp1_du_pipeline_setup_brx()
293 __func__, pipe->lif->index, BRX_NAME(brx)); in vsp1_du_pipeline_setup_brx()
295 owner_pipe = to_vsp1_drm_pipeline(brx->pipe); in vsp1_du_pipeline_setup_brx()
298 vsp1_du_pipeline_setup_inputs(vsp1, &owner_pipe->pipe); in vsp1_du_pipeline_setup_brx()
299 vsp1_du_pipeline_configure(&owner_pipe->pipe); in vsp1_du_pipeline_setup_brx()
307 owner_pipe->pipe.lif->index); in vsp1_du_pipeline_setup_brx()
316 if (released_brx && !released_brx->pipe) in vsp1_du_pipeline_setup_brx()
318 &pipe->entities); in vsp1_du_pipeline_setup_brx()
322 __func__, pipe->lif->index, BRX_NAME(brx)); in vsp1_du_pipeline_setup_brx()
324 pipe->brx = brx; in vsp1_du_pipeline_setup_brx()
325 pipe->brx->pipe = pipe; in vsp1_du_pipeline_setup_brx()
326 pipe->brx->sink = &pipe->output->entity; in vsp1_du_pipeline_setup_brx()
327 pipe->brx->sink_pad = 0; in vsp1_du_pipeline_setup_brx()
329 list_add_tail(&pipe->brx->list_pipe, &pipe->entities); in vsp1_du_pipeline_setup_brx()
368 struct vsp1_pipeline *pipe) in vsp1_du_pipeline_setup_inputs() argument
370 struct vsp1_drm_pipeline *drm_pipe = to_vsp1_drm_pipeline(pipe); in vsp1_du_pipeline_setup_inputs()
379 pipe->num_inputs = 0; in vsp1_du_pipeline_setup_inputs()
385 if (!pipe->inputs[i]) in vsp1_du_pipeline_setup_inputs()
389 for (j = pipe->num_inputs++; j > 0; --j) { in vsp1_du_pipeline_setup_inputs()
403 ret = vsp1_du_pipeline_setup_brx(vsp1, pipe); in vsp1_du_pipeline_setup_inputs()
406 BRX_NAME(pipe->brx)); in vsp1_du_pipeline_setup_inputs()
410 brx = to_brx(&pipe->brx->subdev); in vsp1_du_pipeline_setup_inputs()
413 for (i = 0; i < pipe->brx->source_pad; ++i) { in vsp1_du_pipeline_setup_inputs()
421 if (!rpf->entity.pipe) { in vsp1_du_pipeline_setup_inputs()
422 rpf->entity.pipe = pipe; in vsp1_du_pipeline_setup_inputs()
423 list_add_tail(&rpf->entity.list_pipe, &pipe->entities); in vsp1_du_pipeline_setup_inputs()
428 rpf->entity.sink = pipe->brx; in vsp1_du_pipeline_setup_inputs()
432 __func__, rpf->entity.index, BRX_NAME(pipe->brx), i); in vsp1_du_pipeline_setup_inputs()
438 ret = vsp1_du_pipeline_setup_rpf(vsp1, pipe, rpf, uif, i); in vsp1_du_pipeline_setup_inputs()
451 ret = vsp1_du_insert_uif(vsp1, pipe, uif, in vsp1_du_pipeline_setup_inputs()
452 pipe->brx, pipe->brx->source_pad, in vsp1_du_pipeline_setup_inputs()
453 &pipe->output->entity, 0); in vsp1_du_pipeline_setup_inputs()
456 __func__, BRX_NAME(pipe->brx)); in vsp1_du_pipeline_setup_inputs()
470 drm_pipe->uif->pipe = NULL; in vsp1_du_pipeline_setup_inputs()
471 } else if (!drm_pipe->uif->pipe) { in vsp1_du_pipeline_setup_inputs()
472 drm_pipe->uif->pipe = pipe; in vsp1_du_pipeline_setup_inputs()
473 list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities); in vsp1_du_pipeline_setup_inputs()
481 struct vsp1_pipeline *pipe) in vsp1_du_pipeline_setup_output() argument
483 struct vsp1_drm_pipeline *drm_pipe = to_vsp1_drm_pipeline(pipe); in vsp1_du_pipeline_setup_output()
494 ret = v4l2_subdev_call(&pipe->output->entity.subdev, pad, set_fmt, NULL, in vsp1_du_pipeline_setup_output()
501 format.format.code, pipe->output->entity.index); in vsp1_du_pipeline_setup_output()
504 ret = v4l2_subdev_call(&pipe->output->entity.subdev, pad, get_fmt, NULL, in vsp1_du_pipeline_setup_output()
511 format.format.code, pipe->output->entity.index); in vsp1_du_pipeline_setup_output()
514 ret = v4l2_subdev_call(&pipe->lif->subdev, pad, set_fmt, NULL, in vsp1_du_pipeline_setup_output()
521 format.format.code, pipe->lif->index); in vsp1_du_pipeline_setup_output()
531 pipe->lif->index); in vsp1_du_pipeline_setup_output()
539 static void vsp1_du_pipeline_configure(struct vsp1_pipeline *pipe) in vsp1_du_pipeline_configure() argument
541 struct vsp1_drm_pipeline *drm_pipe = to_vsp1_drm_pipeline(pipe); in vsp1_du_pipeline_configure()
550 if (pipe->output->writeback) in vsp1_du_pipeline_configure()
553 dl = vsp1_dl_list_get(pipe->output->dlm); in vsp1_du_pipeline_configure()
556 list_for_each_entry_safe(entity, next, &pipe->entities, list_pipe) { in vsp1_du_pipeline_configure()
558 if (!entity->pipe) { in vsp1_du_pipeline_configure()
568 vsp1_entity_route_setup(entity, pipe, dlb); in vsp1_du_pipeline_configure()
569 vsp1_entity_configure_stream(entity, pipe, dl, dlb); in vsp1_du_pipeline_configure()
570 vsp1_entity_configure_frame(entity, pipe, dl, dlb); in vsp1_du_pipeline_configure()
571 vsp1_entity_configure_partition(entity, pipe, dl, dlb); in vsp1_du_pipeline_configure()
648 struct vsp1_pipeline *pipe; in vsp1_du_setup_lif() local
656 drm_pipe = &vsp1->drm->pipe[pipe_index]; in vsp1_du_setup_lif()
657 pipe = &drm_pipe->pipe; in vsp1_du_setup_lif()
664 brx = to_brx(&pipe->brx->subdev); in vsp1_du_setup_lif()
670 ret = vsp1_pipeline_stop(pipe); in vsp1_du_setup_lif()
674 for (i = 0; i < ARRAY_SIZE(pipe->inputs); ++i) { in vsp1_du_setup_lif()
675 struct vsp1_rwpf *rpf = pipe->inputs[i]; in vsp1_du_setup_lif()
684 WARN_ON(!rpf->entity.pipe); in vsp1_du_setup_lif()
685 rpf->entity.pipe = NULL; in vsp1_du_setup_lif()
687 pipe->inputs[i] = NULL; in vsp1_du_setup_lif()
693 pipe->num_inputs = 0; in vsp1_du_setup_lif()
696 __func__, pipe->lif->index, in vsp1_du_setup_lif()
697 BRX_NAME(pipe->brx)); in vsp1_du_setup_lif()
699 list_del(&pipe->brx->list_pipe); in vsp1_du_setup_lif()
700 pipe->brx->pipe = NULL; in vsp1_du_setup_lif()
701 pipe->brx = NULL; in vsp1_du_setup_lif()
705 vsp1_dlm_reset(pipe->output->dlm); in vsp1_du_setup_lif()
715 pipe->interlaced = cfg->interlaced; in vsp1_du_setup_lif()
719 pipe->interlaced ? "i" : ""); in vsp1_du_setup_lif()
724 ret = vsp1_du_pipeline_setup_inputs(vsp1, pipe); in vsp1_du_setup_lif()
728 ret = vsp1_du_pipeline_setup_output(vsp1, pipe); in vsp1_du_setup_lif()
749 vsp1_du_pipeline_configure(pipe); in vsp1_du_setup_lif()
758 spin_lock_irqsave(&pipe->irqlock, flags); in vsp1_du_setup_lif()
759 vsp1_pipeline_run(pipe); in vsp1_du_setup_lif()
760 spin_unlock_irqrestore(&pipe->irqlock, flags); in vsp1_du_setup_lif()
813 struct vsp1_drm_pipeline *drm_pipe = &vsp1->drm->pipe[pipe_index]; in vsp1_du_atomic_update()
831 rpf->entity.pipe = NULL; in vsp1_du_atomic_update()
832 drm_pipe->pipe.inputs[rpf_index] = NULL; in vsp1_du_atomic_update()
863 drm_pipe->pipe.inputs[rpf_index] = rpf; in vsp1_du_atomic_update()
879 struct vsp1_drm_pipeline *drm_pipe = &vsp1->drm->pipe[pipe_index]; in vsp1_du_atomic_flush()
880 struct vsp1_pipeline *pipe = &drm_pipe->pipe; in vsp1_du_atomic_flush() local
890 ret = vsp1_du_pipeline_set_rwpf_format(vsp1, pipe->output, in vsp1_du_atomic_flush()
896 pipe->output->mem.addr[0] = wb_cfg->mem[0]; in vsp1_du_atomic_flush()
897 pipe->output->mem.addr[1] = wb_cfg->mem[1]; in vsp1_du_atomic_flush()
898 pipe->output->mem.addr[2] = wb_cfg->mem[2]; in vsp1_du_atomic_flush()
899 pipe->output->writeback = true; in vsp1_du_atomic_flush()
902 vsp1_du_pipeline_setup_inputs(vsp1, pipe); in vsp1_du_atomic_flush()
903 vsp1_du_pipeline_configure(pipe); in vsp1_du_atomic_flush()
949 struct vsp1_drm_pipeline *drm_pipe = &vsp1->drm->pipe[i]; in vsp1_drm_init()
950 struct vsp1_pipeline *pipe = &drm_pipe->pipe; in vsp1_drm_init() local
954 vsp1_pipeline_init(pipe); in vsp1_drm_init()
956 pipe->frame_end = vsp1_du_pipeline_frame_end; in vsp1_drm_init()
962 pipe->output = vsp1->wpf[i]; in vsp1_drm_init()
963 pipe->lif = &vsp1->lif[i]->entity; in vsp1_drm_init()
965 pipe->output->entity.pipe = pipe; in vsp1_drm_init()
966 pipe->output->entity.sink = pipe->lif; in vsp1_drm_init()
967 pipe->output->entity.sink_pad = 0; in vsp1_drm_init()
968 list_add_tail(&pipe->output->entity.list_pipe, &pipe->entities); in vsp1_drm_init()
970 pipe->lif->pipe = pipe; in vsp1_drm_init()
971 list_add_tail(&pipe->lif->list_pipe, &pipe->entities); in vsp1_drm_init()