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->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()
466 drm_pipe->uif->pipe = NULL; in vsp1_du_pipeline_setup_inputs()
467 } else if (!drm_pipe->uif->pipe) { in vsp1_du_pipeline_setup_inputs()
468 drm_pipe->uif->pipe = pipe; in vsp1_du_pipeline_setup_inputs()
469 list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities); in vsp1_du_pipeline_setup_inputs()
477 struct vsp1_pipeline *pipe) in vsp1_du_pipeline_setup_output() argument
479 struct vsp1_drm_pipeline *drm_pipe = to_vsp1_drm_pipeline(pipe); in vsp1_du_pipeline_setup_output()
490 ret = v4l2_subdev_call(&pipe->output->entity.subdev, pad, set_fmt, NULL, in vsp1_du_pipeline_setup_output()
497 format.format.code, pipe->output->entity.index); in vsp1_du_pipeline_setup_output()
500 ret = v4l2_subdev_call(&pipe->output->entity.subdev, pad, get_fmt, NULL, in vsp1_du_pipeline_setup_output()
507 format.format.code, pipe->output->entity.index); in vsp1_du_pipeline_setup_output()
510 ret = v4l2_subdev_call(&pipe->lif->subdev, pad, set_fmt, NULL, in vsp1_du_pipeline_setup_output()
517 format.format.code, pipe->lif->index); in vsp1_du_pipeline_setup_output()
527 pipe->lif->index); in vsp1_du_pipeline_setup_output()
535 static void vsp1_du_pipeline_configure(struct vsp1_pipeline *pipe) in vsp1_du_pipeline_configure() argument
537 struct vsp1_drm_pipeline *drm_pipe = to_vsp1_drm_pipeline(pipe); in vsp1_du_pipeline_configure()
546 if (pipe->output->writeback) in vsp1_du_pipeline_configure()
549 dl = vsp1_dl_list_get(pipe->output->dlm); in vsp1_du_pipeline_configure()
552 list_for_each_entry_safe(entity, next, &pipe->entities, list_pipe) { in vsp1_du_pipeline_configure()
554 if (!entity->pipe) { in vsp1_du_pipeline_configure()
564 vsp1_entity_route_setup(entity, pipe, dlb); in vsp1_du_pipeline_configure()
565 vsp1_entity_configure_stream(entity, pipe, dl, dlb); in vsp1_du_pipeline_configure()
566 vsp1_entity_configure_frame(entity, pipe, dl, dlb); in vsp1_du_pipeline_configure()
567 vsp1_entity_configure_partition(entity, pipe, dl, dlb); in vsp1_du_pipeline_configure()
644 struct vsp1_pipeline *pipe; in vsp1_du_setup_lif() local
652 drm_pipe = &vsp1->drm->pipe[pipe_index]; in vsp1_du_setup_lif()
653 pipe = &drm_pipe->pipe; in vsp1_du_setup_lif()
660 brx = to_brx(&pipe->brx->subdev); in vsp1_du_setup_lif()
666 ret = vsp1_pipeline_stop(pipe); in vsp1_du_setup_lif()
670 for (i = 0; i < ARRAY_SIZE(pipe->inputs); ++i) { in vsp1_du_setup_lif()
671 struct vsp1_rwpf *rpf = pipe->inputs[i]; in vsp1_du_setup_lif()
680 WARN_ON(!rpf->entity.pipe); in vsp1_du_setup_lif()
681 rpf->entity.pipe = NULL; in vsp1_du_setup_lif()
683 pipe->inputs[i] = NULL; in vsp1_du_setup_lif()
689 pipe->num_inputs = 0; in vsp1_du_setup_lif()
692 __func__, pipe->lif->index, in vsp1_du_setup_lif()
693 BRX_NAME(pipe->brx)); in vsp1_du_setup_lif()
695 list_del(&pipe->brx->list_pipe); in vsp1_du_setup_lif()
696 pipe->brx->pipe = NULL; in vsp1_du_setup_lif()
697 pipe->brx = NULL; in vsp1_du_setup_lif()
701 vsp1_dlm_reset(pipe->output->dlm); in vsp1_du_setup_lif()
711 pipe->interlaced = cfg->interlaced; in vsp1_du_setup_lif()
715 pipe->interlaced ? "i" : ""); in vsp1_du_setup_lif()
720 ret = vsp1_du_pipeline_setup_inputs(vsp1, pipe); in vsp1_du_setup_lif()
724 ret = vsp1_du_pipeline_setup_output(vsp1, pipe); in vsp1_du_setup_lif()
745 vsp1_du_pipeline_configure(pipe); in vsp1_du_setup_lif()
754 spin_lock_irqsave(&pipe->irqlock, flags); in vsp1_du_setup_lif()
755 vsp1_pipeline_run(pipe); in vsp1_du_setup_lif()
756 spin_unlock_irqrestore(&pipe->irqlock, flags); in vsp1_du_setup_lif()
809 struct vsp1_drm_pipeline *drm_pipe = &vsp1->drm->pipe[pipe_index]; in vsp1_du_atomic_update()
827 rpf->entity.pipe = NULL; in vsp1_du_atomic_update()
828 drm_pipe->pipe.inputs[rpf_index] = NULL; in vsp1_du_atomic_update()
859 drm_pipe->pipe.inputs[rpf_index] = rpf; in vsp1_du_atomic_update()
875 struct vsp1_drm_pipeline *drm_pipe = &vsp1->drm->pipe[pipe_index]; in vsp1_du_atomic_flush()
876 struct vsp1_pipeline *pipe = &drm_pipe->pipe; in vsp1_du_atomic_flush() local
886 ret = vsp1_du_pipeline_set_rwpf_format(vsp1, pipe->output, in vsp1_du_atomic_flush()
892 pipe->output->mem.addr[0] = wb_cfg->mem[0]; in vsp1_du_atomic_flush()
893 pipe->output->mem.addr[1] = wb_cfg->mem[1]; in vsp1_du_atomic_flush()
894 pipe->output->mem.addr[2] = wb_cfg->mem[2]; in vsp1_du_atomic_flush()
895 pipe->output->writeback = true; in vsp1_du_atomic_flush()
898 vsp1_du_pipeline_setup_inputs(vsp1, pipe); in vsp1_du_atomic_flush()
899 vsp1_du_pipeline_configure(pipe); in vsp1_du_atomic_flush()
945 struct vsp1_drm_pipeline *drm_pipe = &vsp1->drm->pipe[i]; in vsp1_drm_init()
946 struct vsp1_pipeline *pipe = &drm_pipe->pipe; in vsp1_drm_init() local
950 vsp1_pipeline_init(pipe); in vsp1_drm_init()
952 pipe->frame_end = vsp1_du_pipeline_frame_end; in vsp1_drm_init()
958 pipe->output = vsp1->wpf[i]; in vsp1_drm_init()
959 pipe->lif = &vsp1->lif[i]->entity; in vsp1_drm_init()
961 pipe->output->entity.pipe = pipe; in vsp1_drm_init()
962 pipe->output->entity.sink = pipe->lif; in vsp1_drm_init()
963 pipe->output->entity.sink_pad = 0; in vsp1_drm_init()
964 list_add_tail(&pipe->output->entity.list_pipe, &pipe->entities); in vsp1_drm_init()
966 pipe->lif->pipe = pipe; in vsp1_drm_init()
967 list_add_tail(&pipe->lif->list_pipe, &pipe->entities); in vsp1_drm_init()