Lines Matching refs:stage

49 static void pipeline_stage_destroy(struct ia_css_pipeline_stage *stage);
260 /* @brief Add a stage to pipeline.
263 * @param[in] stage_desc The description of the stage
264 * @param[out] stage The successor of the stage.
267 * Add a new stage to a non-NULL pipeline.
268 * The stage consists of an ISP binary or firmware and input and
274 struct ia_css_pipeline_stage **stage)
294 /* Find the last stage */
299 * stage, if no previous stage, it's an error.
313 /* Create the new stage */
326 /* Output the new stage */
327 if (stage)
328 *stage = new_stage;
339 struct ia_css_pipeline_stage *stage;
342 for (stage = pipeline->stages; stage; stage = stage->next) {
343 stage->stage_num = i;
354 struct ia_css_pipeline_stage **stage)
359 assert(stage);
364 *stage = s;
374 struct ia_css_pipeline_stage **stage)
379 assert(stage);
383 *stage = s;
413 struct ia_css_pipeline_stage **stage)
418 assert(stage);
422 *stage = NULL;
427 *stage = s;
429 if (*stage)
432 return ia_css_pipeline_get_stage(pipeline, mode, stage);
491 * When input frames are not passed from outside, each stage will use the
492 * output frame of the previous stage as input (the full resolution output,
497 static void pipeline_stage_destroy(struct ia_css_pipeline_stage *stage)
502 if (stage->out_frame_allocated[i]) {
503 ia_css_frame_free(stage->args.out_frame[i]);
504 stage->args.out_frame[i] = NULL;
507 if (stage->vf_frame_allocated) {
508 ia_css_frame_free(stage->args.out_vf_frame);
509 stage->args.out_vf_frame = NULL;
511 kvfree(stage);
571 struct ia_css_pipeline_stage *stage = NULL;
592 stage = kvzalloc(sizeof(*stage), GFP_KERNEL);
593 if (!stage) {
599 stage->binary = NULL;
600 stage->binary_info =
603 stage->binary = binary;
605 stage->binary_info =
608 stage->binary_info = NULL;
611 stage->firmware = firmware;
612 stage->sp_func = stage_desc->sp_func;
613 stage->max_input_width = stage_desc->max_input_width;
614 stage->mode = stage_desc->mode;
616 stage->out_frame_allocated[i] = false;
617 stage->vf_frame_allocated = false;
618 stage->next = NULL;
619 sh_css_binary_args_reset(&stage->args);
628 stage->out_frame_allocated[i] = true;
642 stage->vf_frame_allocated = true;
648 stage->vf_frame_allocated = true;
651 stage->args.in_frame = stage_desc->in_frame;
653 stage->args.out_frame[i] = out_frame[i];
654 stage->args.out_vf_frame = vf_frame;
655 *new_stage = stage;
658 if (stage)
659 pipeline_stage_destroy(stage);
695 struct ia_css_pipeline_stage *stage = NULL;
700 /* in preview pipeline, vf_pp stage should do zoom */
701 err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_VF_PP, &stage);
703 stage->enable_zoom = true;
705 /* in capture pipeline, capture_pp stage should do zoom */
707 &stage);
709 stage->enable_zoom = true;
711 /* in video pipeline, video stage should do zoom */
712 err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_VIDEO, &stage);
714 stage->enable_zoom = true;
716 /* in yuvpp pipeline, first yuv_scaler stage should do zoom */
718 &stage);
720 stage->enable_zoom = true;