Lines Matching full:pipe
19 struct komeda_pipeline *pipe; in komeda_pipeline_add() local
27 if (size < sizeof(*pipe)) { in komeda_pipeline_add()
32 pipe = devm_kzalloc(mdev->dev, size, GFP_KERNEL); in komeda_pipeline_add()
33 if (!pipe) in komeda_pipeline_add()
36 pipe->mdev = mdev; in komeda_pipeline_add()
37 pipe->id = mdev->n_pipelines; in komeda_pipeline_add()
38 pipe->funcs = funcs; in komeda_pipeline_add()
40 mdev->pipelines[mdev->n_pipelines] = pipe; in komeda_pipeline_add()
43 return pipe; in komeda_pipeline_add()
47 struct komeda_pipeline *pipe) in komeda_pipeline_destroy() argument
51 unsigned long avail_comps = pipe->avail_comps; in komeda_pipeline_destroy()
54 c = komeda_pipeline_get_component(pipe, i); in komeda_pipeline_destroy()
58 clk_put(pipe->pxlclk); in komeda_pipeline_destroy()
60 of_node_put(pipe->of_output_links[0]); in komeda_pipeline_destroy()
61 of_node_put(pipe->of_output_links[1]); in komeda_pipeline_destroy()
62 of_node_put(pipe->of_output_port); in komeda_pipeline_destroy()
63 of_node_put(pipe->of_node); in komeda_pipeline_destroy()
65 devm_kfree(mdev->dev, pipe); in komeda_pipeline_destroy()
69 komeda_pipeline_get_component_pos(struct komeda_pipeline *pipe, int id) in komeda_pipeline_get_component_pos() argument
71 struct komeda_dev *mdev = pipe->mdev; in komeda_pipeline_get_component_pos()
80 pos = to_cpos(pipe->layers[id - KOMEDA_COMPONENT_LAYER0]); in komeda_pipeline_get_component_pos()
83 pos = to_cpos(pipe->wb_layer); in komeda_pipeline_get_component_pos()
96 pos = to_cpos(pipe->scalers[id - KOMEDA_COMPONENT_SCALER0]); in komeda_pipeline_get_component_pos()
99 pos = to_cpos(pipe->splitter); in komeda_pipeline_get_component_pos()
102 pos = to_cpos(pipe->merger); in komeda_pipeline_get_component_pos()
114 pos = to_cpos(pipe->ctrlr); in komeda_pipeline_get_component_pos()
126 komeda_pipeline_get_component(struct komeda_pipeline *pipe, int id) in komeda_pipeline_get_component() argument
131 pos = komeda_pipeline_get_component_pos(pipe, id); in komeda_pipeline_get_component()
139 komeda_pipeline_get_first_component(struct komeda_pipeline *pipe, in komeda_pipeline_get_first_component() argument
148 c = komeda_pipeline_get_component(pipe, id); in komeda_pipeline_get_first_component()
163 komeda_component_add(struct komeda_pipeline *pipe, in komeda_component_add() argument
180 pos = komeda_pipeline_get_component_pos(pipe, id); in komeda_component_add()
186 num = &pipe->n_layers; in komeda_component_add()
187 if (idx != pipe->n_layers) { in komeda_component_add()
193 num = &pipe->n_scalers; in komeda_component_add()
194 if (idx != pipe->n_scalers) { in komeda_component_add()
200 c = devm_kzalloc(pipe->mdev->dev, comp_sz, GFP_KERNEL); in komeda_component_add()
207 c->pipeline = pipe; in komeda_component_add()
224 pipe->avail_comps |= BIT(c->id); in komeda_component_add()
249 static void komeda_pipeline_dump(struct komeda_pipeline *pipe) in komeda_pipeline_dump() argument
253 unsigned long avail_comps = pipe->avail_comps; in komeda_pipeline_dump()
256 pipe->id, pipe->n_layers, pipe->n_scalers, in komeda_pipeline_dump()
257 pipe->dual_link ? "dual-link" : "single-link"); in komeda_pipeline_dump()
259 pipe->of_output_links[0] ? in komeda_pipeline_dump()
260 pipe->of_output_links[0]->full_name : "none"); in komeda_pipeline_dump()
262 pipe->of_output_links[1] ? in komeda_pipeline_dump()
263 pipe->of_output_links[1]->full_name : "none"); in komeda_pipeline_dump()
266 c = komeda_pipeline_get_component(pipe, id); in komeda_pipeline_dump()
274 struct komeda_pipeline *pipe = c->pipeline; in komeda_component_verify_inputs() local
280 input = komeda_pipeline_get_component(pipe, id); in komeda_component_verify_inputs()
293 komeda_get_layer_split_right_layer(struct komeda_pipeline *pipe, in komeda_get_layer_split_right_layer() argument
299 for (i = index + 1; i < pipe->n_layers; i++) in komeda_get_layer_split_right_layer()
300 if (left->layer_type == pipe->layers[i]->layer_type) in komeda_get_layer_split_right_layer()
301 return pipe->layers[i]; in komeda_get_layer_split_right_layer()
305 static void komeda_pipeline_assemble(struct komeda_pipeline *pipe) in komeda_pipeline_assemble() argument
310 unsigned long avail_comps = pipe->avail_comps; in komeda_pipeline_assemble()
313 c = komeda_pipeline_get_component(pipe, id); in komeda_pipeline_assemble()
317 for (i = 0; i < pipe->n_layers; i++) { in komeda_pipeline_assemble()
318 layer = pipe->layers[i]; in komeda_pipeline_assemble()
320 layer->right = komeda_get_layer_split_right_layer(pipe, layer); in komeda_pipeline_assemble()
323 if (pipe->dual_link && !pipe->ctrlr->supports_dual_link) { in komeda_pipeline_assemble()
324 pipe->dual_link = false; in komeda_pipeline_assemble()
325 DRM_WARN("PIPE-%d doesn't support dual-link, ignore DT dual-link configuration.\n", in komeda_pipeline_assemble()
326 pipe->id); in komeda_pipeline_assemble()
346 struct komeda_pipeline *pipe; in komeda_assemble_pipelines() local
350 pipe = mdev->pipelines[i]; in komeda_assemble_pipelines()
352 komeda_pipeline_assemble(pipe); in komeda_assemble_pipelines()
353 komeda_pipeline_dump(pipe); in komeda_assemble_pipelines()
359 void komeda_pipeline_dump_register(struct komeda_pipeline *pipe, in komeda_pipeline_dump_register() argument
366 seq_printf(sf, "\n======== Pipeline-%d ==========\n", pipe->id); in komeda_pipeline_dump_register()
368 if (pipe->funcs && pipe->funcs->dump_register) in komeda_pipeline_dump_register()
369 pipe->funcs->dump_register(pipe, sf); in komeda_pipeline_dump_register()
371 avail_comps = pipe->avail_comps; in komeda_pipeline_dump_register()
373 c = komeda_pipeline_get_component(pipe, id); in komeda_pipeline_dump_register()