Commit 7b53e162 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: fix pipeline initialization code

The code under load_primary_binaries() is complex and
were hard to understand, because it used to have lots
of ifdefs and broken identation.

The patch which cleaned it and removed the version-specific
ifdefs added a regression.

Solve it.

Fixes: 3c0538fb ("media: atomisp: get rid of most checks for ISP2401 version")
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 938b29db
......@@ -3716,11 +3716,7 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
}
if (video_stage) {
int frm;
#ifndef ISP2401
for (frm = 0; frm < NUM_TNR_FRAMES; frm++) {
#else
for (frm = 0; frm < NUM_TNR_FRAMES; frm++) {
#endif
video_stage->args.tnr_frames[frm] =
pipe->pipe_settings.video.tnr_frames[frm];
}
......@@ -6117,6 +6113,7 @@ static enum ia_css_err load_primary_binaries(
struct ia_css_capture_settings *mycs;
unsigned int i;
bool need_extra_yuv_scaler = false;
struct ia_css_binary_descr prim_descr[MAX_NUM_PRIMARY_STAGES];
IA_CSS_ENTER_PRIVATE("");
assert(pipe);
......@@ -6187,16 +6184,6 @@ static enum ia_css_err load_primary_binaries(
capt_pp_out_info.res.height /= MAX_PREFERRED_YUV_DS_PER_STEP;
ia_css_frame_info_set_width(&capt_pp_out_info, capt_pp_out_info.res.width, 0);
/*
* WARNING: The #if def flag has been added below as a
* temporary solution to solve the problem of enabling the
* view finder in a single binary in a capture flow. The
* vf-pp stage has been removed for Skycam in the solution
* provided. The vf-pp stage should be re-introduced when
* required. This should not be considered as a clean solution.
* Proper investigation should be done to come up with the clean
* solution.
* */
need_extra_yuv_scaler = need_downscaling(capt_pp_out_info.res,
pipe_out_info->res);
......@@ -6251,7 +6238,6 @@ static enum ia_css_err load_primary_binaries(
/* TODO Do we disable ldc for skycam */
need_ldc = need_capt_ldc(pipe);
if (atomisp_hw_is_isp2401 && need_ldc) {
/* ldc and capt_pp are not supported in the same pipeline */
struct ia_css_binary_descr capt_ldc_descr;
......@@ -6269,9 +6255,11 @@ static enum ia_css_err load_primary_binaries(
need_pp = 0;
need_ldc = 0;
}
/* we build up the pipeline starting at the end */
/* Capture post-processing */
if (need_pp) {
struct ia_css_binary_descr capture_pp_descr;
struct ia_css_binary_descr prim_descr[MAX_NUM_PRIMARY_STAGES];
if (!atomisp_hw_is_isp2401)
capt_pp_in_info = need_ldc ? &capt_ldc_out_info : &prim_out_info;
......@@ -6301,6 +6289,7 @@ static enum ia_css_err load_primary_binaries(
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
}
} else {
prim_out_info = *pipe_out_info;
}
......@@ -6372,7 +6361,6 @@ static enum ia_css_err load_primary_binaries(
return err;
}
}
}
return IA_CSS_SUCCESS;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment