pixels normally used to initialize the ISP filters.
This is why the raw output resolution should normally be set to
the input resolution - 8x8. */
-#ifdef ISP2401
+ /* ISP2401 */
struct ia_css_resolution output_system_in_res_info;
/** For IPU3 only. Info about output system in resolution which is considered
as gdc out resolution. */
-#endif
struct ia_css_shading_info shading_info;
/** After an image pipe is created, this field will contain the info
for the shading correction. */
enum ia_css_shading_correction_type type, /* [in] */
unsigned int required_bds_factor, /* [in] */
const struct ia_css_stream_config *stream_config, /* [in] */
-#ifndef ISP2401
- struct ia_css_shading_info *info) /* [out] */
-#else
struct ia_css_shading_info *shading_info, /* [out] */
struct ia_css_pipe_config *pipe_config) /* [out] */
-#endif
{
enum ia_css_err err;
assert(binary);
-#ifndef ISP2401
- assert(info);
-#else
assert(shading_info);
IA_CSS_ENTER_PRIVATE("binary=%p, type=%d, required_bds_factor=%d, stream_config=%p",
binary, type, required_bds_factor, stream_config);
-#endif
if (type == IA_CSS_SHADING_CORRECTION_TYPE_1)
#ifndef ISP2401
- err = ia_css_binary_get_shading_info_type_1(binary, required_bds_factor, stream_config, info);
+ err = ia_css_binary_get_shading_info_type_1(binary, required_bds_factor, stream_config,
+ shading_info);
#else
err = ia_css_binary_get_shading_info_type_1(binary, required_bds_factor, stream_config,
shading_info, pipe_config);
static enum ia_css_err
sh_css_pipe_get_shading_info(struct ia_css_pipe *pipe,
-#ifndef ISP2401
- struct ia_css_shading_info *info)
-#else
struct ia_css_shading_info *shading_info,
struct ia_css_pipe_config *pipe_config)
-#endif
{
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_binary *binary = NULL;
- assert(pipe);
-#ifndef ISP2401
- assert(info);
-#else
- assert(shading_info);
- assert(pipe_config);
-#endif
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"sh_css_pipe_get_shading_info() enter:\n");
IA_CSS_SHADING_CORRECTION_TYPE_1,
pipe->required_bds_factor,
(const struct ia_css_stream_config *)&pipe->stream->config,
-#ifndef ISP2401
- info);
-#else
shading_info, pipe_config);
-#endif
+
/* Other function calls can be added here when other shading correction types will be added
* in the future.
*/
* information. It is not a error case, and then
* this function should return IA_CSS_SUCCESS.
*/
-#ifndef ISP2401
- memset(info, 0, sizeof(*info));
-#else
memset(shading_info, 0, sizeof(*shading_info));
-#endif
}
return err;
}
if (err != IA_CSS_SUCCESS)
goto ERR;
}
-#ifdef ISP2401
- pipe_info->output_system_in_res_info = curr_pipe->config.output_system_in_res;
-#endif
+
+ if (atomisp_hw_is_isp2401)
+ pipe_info->output_system_in_res_info = curr_pipe->config.output_system_in_res;
+
if (!spcopyonly) {
- err = sh_css_pipe_get_shading_info(curr_pipe,
-#ifndef ISP2401
- &pipe_info->shading_info);
-#else
- & pipe_info->shading_info, &curr_pipe->config);
-#endif
+ if (!atomisp_hw_is_isp2401)
+ err = sh_css_pipe_get_shading_info(curr_pipe,
+ &pipe_info->shading_info, NULL);
+ else
+ err = sh_css_pipe_get_shading_info(curr_pipe,
+ &pipe_info->shading_info, &curr_pipe->config);
+
if (err != IA_CSS_SUCCESS)
goto ERR;
err = sh_css_pipe_get_grid_info(curr_pipe,