Lines Matching refs:pipe

17 	struct komeda_pipeline *pipe;  in komeda_pipeline_add()  local
25 if (size < sizeof(*pipe)) { in komeda_pipeline_add()
30 pipe = devm_kzalloc(mdev->dev, size, GFP_KERNEL); in komeda_pipeline_add()
31 if (!pipe) in komeda_pipeline_add()
34 pipe->mdev = mdev; in komeda_pipeline_add()
35 pipe->id = mdev->n_pipelines; in komeda_pipeline_add()
36 pipe->funcs = funcs; in komeda_pipeline_add()
38 mdev->pipelines[mdev->n_pipelines] = pipe; in komeda_pipeline_add()
41 return pipe; in komeda_pipeline_add()
45 struct komeda_pipeline *pipe) in komeda_pipeline_destroy() argument
49 unsigned long avail_comps = pipe->avail_comps; in komeda_pipeline_destroy()
52 c = komeda_pipeline_get_component(pipe, i); in komeda_pipeline_destroy()
56 clk_put(pipe->pxlclk); in komeda_pipeline_destroy()
58 of_node_put(pipe->of_output_links[0]); in komeda_pipeline_destroy()
59 of_node_put(pipe->of_output_links[1]); in komeda_pipeline_destroy()
60 of_node_put(pipe->of_output_port); in komeda_pipeline_destroy()
61 of_node_put(pipe->of_node); in komeda_pipeline_destroy()
63 devm_kfree(mdev->dev, pipe); in komeda_pipeline_destroy()
67 komeda_pipeline_get_component_pos(struct komeda_pipeline *pipe, int id) in komeda_pipeline_get_component_pos() argument
69 struct komeda_dev *mdev = pipe->mdev; in komeda_pipeline_get_component_pos()
78 pos = to_cpos(pipe->layers[id - KOMEDA_COMPONENT_LAYER0]); in komeda_pipeline_get_component_pos()
81 pos = to_cpos(pipe->wb_layer); in komeda_pipeline_get_component_pos()
94 pos = to_cpos(pipe->scalers[id - KOMEDA_COMPONENT_SCALER0]); in komeda_pipeline_get_component_pos()
97 pos = to_cpos(pipe->splitter); in komeda_pipeline_get_component_pos()
100 pos = to_cpos(pipe->merger); in komeda_pipeline_get_component_pos()
112 pos = to_cpos(pipe->ctrlr); in komeda_pipeline_get_component_pos()
124 komeda_pipeline_get_component(struct komeda_pipeline *pipe, int id) in komeda_pipeline_get_component() argument
129 pos = komeda_pipeline_get_component_pos(pipe, id); in komeda_pipeline_get_component()
137 komeda_pipeline_get_first_component(struct komeda_pipeline *pipe, in komeda_pipeline_get_first_component() argument
146 c = komeda_pipeline_get_component(pipe, id); in komeda_pipeline_get_first_component()
161 komeda_component_add(struct komeda_pipeline *pipe, in komeda_component_add() argument
178 pos = komeda_pipeline_get_component_pos(pipe, id); in komeda_component_add()
184 num = &pipe->n_layers; in komeda_component_add()
185 if (idx != pipe->n_layers) { in komeda_component_add()
191 num = &pipe->n_scalers; in komeda_component_add()
192 if (idx != pipe->n_scalers) { in komeda_component_add()
198 c = devm_kzalloc(pipe->mdev->dev, comp_sz, GFP_KERNEL); in komeda_component_add()
205 c->pipeline = pipe; in komeda_component_add()
222 pipe->avail_comps |= BIT(c->id); in komeda_component_add()
247 static void komeda_pipeline_dump(struct komeda_pipeline *pipe) in komeda_pipeline_dump() argument
251 unsigned long avail_comps = pipe->avail_comps; in komeda_pipeline_dump()
254 pipe->id, pipe->n_layers, pipe->n_scalers, in komeda_pipeline_dump()
255 pipe->dual_link ? "dual-link" : "single-link"); in komeda_pipeline_dump()
257 pipe->of_output_links[0] ? in komeda_pipeline_dump()
258 pipe->of_output_links[0]->full_name : "none"); in komeda_pipeline_dump()
260 pipe->of_output_links[1] ? in komeda_pipeline_dump()
261 pipe->of_output_links[1]->full_name : "none"); in komeda_pipeline_dump()
264 c = komeda_pipeline_get_component(pipe, id); in komeda_pipeline_dump()
272 struct komeda_pipeline *pipe = c->pipeline; in komeda_component_verify_inputs() local
278 input = komeda_pipeline_get_component(pipe, id); in komeda_component_verify_inputs()
291 komeda_get_layer_split_right_layer(struct komeda_pipeline *pipe, in komeda_get_layer_split_right_layer() argument
297 for (i = index + 1; i < pipe->n_layers; i++) in komeda_get_layer_split_right_layer()
298 if (left->layer_type == pipe->layers[i]->layer_type) in komeda_get_layer_split_right_layer()
299 return pipe->layers[i]; in komeda_get_layer_split_right_layer()
303 static void komeda_pipeline_assemble(struct komeda_pipeline *pipe) in komeda_pipeline_assemble() argument
308 unsigned long avail_comps = pipe->avail_comps; in komeda_pipeline_assemble()
311 c = komeda_pipeline_get_component(pipe, id); in komeda_pipeline_assemble()
315 for (i = 0; i < pipe->n_layers; i++) { in komeda_pipeline_assemble()
316 layer = pipe->layers[i]; in komeda_pipeline_assemble()
318 layer->right = komeda_get_layer_split_right_layer(pipe, layer); in komeda_pipeline_assemble()
321 if (pipe->dual_link && !pipe->ctrlr->supports_dual_link) { in komeda_pipeline_assemble()
322 pipe->dual_link = false; in komeda_pipeline_assemble()
324 pipe->id); in komeda_pipeline_assemble()
344 struct komeda_pipeline *pipe; in komeda_assemble_pipelines() local
348 pipe = mdev->pipelines[i]; in komeda_assemble_pipelines()
350 komeda_pipeline_assemble(pipe); in komeda_assemble_pipelines()
351 komeda_pipeline_dump(pipe); in komeda_assemble_pipelines()
357 void komeda_pipeline_dump_register(struct komeda_pipeline *pipe, in komeda_pipeline_dump_register() argument
364 seq_printf(sf, "\n======== Pipeline-%d ==========\n", pipe->id); in komeda_pipeline_dump_register()
366 if (pipe->funcs && pipe->funcs->dump_register) in komeda_pipeline_dump_register()
367 pipe->funcs->dump_register(pipe, sf); in komeda_pipeline_dump_register()
369 avail_comps = pipe->avail_comps; in komeda_pipeline_dump_register()
371 c = komeda_pipeline_get_component(pipe, id); in komeda_pipeline_dump_register()