Commit c06e212d authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: ia_css_binary_get_shading_info(): don't test version

It doesn't make any sense to change the number of parameters
for this function depending on the ISP version.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent bd3016e9
...@@ -182,11 +182,10 @@ struct ia_css_pipe_info { ...@@ -182,11 +182,10 @@ struct ia_css_pipe_info {
pixels normally used to initialize the ISP filters. pixels normally used to initialize the ISP filters.
This is why the raw output resolution should normally be set to This is why the raw output resolution should normally be set to
the input resolution - 8x8. */ the input resolution - 8x8. */
#ifdef ISP2401 /* ISP2401 */
struct ia_css_resolution output_system_in_res_info; struct ia_css_resolution output_system_in_res_info;
/** For IPU3 only. Info about output system in resolution which is considered /** For IPU3 only. Info about output system in resolution which is considered
as gdc out resolution. */ as gdc out resolution. */
#endif
struct ia_css_shading_info shading_info; struct ia_css_shading_info shading_info;
/** After an image pipe is created, this field will contain the info /** After an image pipe is created, this field will contain the info
for the shading correction. */ for the shading correction. */
......
...@@ -219,12 +219,8 @@ ia_css_binary_get_shading_info(const struct ia_css_binary *binary, ...@@ -219,12 +219,8 @@ ia_css_binary_get_shading_info(const struct ia_css_binary *binary,
enum ia_css_shading_correction_type type, enum ia_css_shading_correction_type type,
unsigned int required_bds_factor, unsigned int required_bds_factor,
const struct ia_css_stream_config *stream_config, const struct ia_css_stream_config *stream_config,
#ifndef ISP2401
struct ia_css_shading_info *info);
#else
struct ia_css_shading_info *shading_info, struct ia_css_shading_info *shading_info,
struct ia_css_pipe_config *pipe_config); struct ia_css_pipe_config *pipe_config);
#endif
enum ia_css_err enum ia_css_err
ia_css_binary_3a_grid_info(const struct ia_css_binary *binary, ia_css_binary_3a_grid_info(const struct ia_css_binary *binary,
......
...@@ -706,28 +706,21 @@ ia_css_binary_get_shading_info(const struct ia_css_binary *binary, /* [in] */ ...@@ -706,28 +706,21 @@ ia_css_binary_get_shading_info(const struct ia_css_binary *binary, /* [in] */
enum ia_css_shading_correction_type type, /* [in] */ enum ia_css_shading_correction_type type, /* [in] */
unsigned int required_bds_factor, /* [in] */ unsigned int required_bds_factor, /* [in] */
const struct ia_css_stream_config *stream_config, /* [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_shading_info *shading_info, /* [out] */
struct ia_css_pipe_config *pipe_config) /* [out] */ struct ia_css_pipe_config *pipe_config) /* [out] */
#endif
{ {
enum ia_css_err err; enum ia_css_err err;
assert(binary); assert(binary);
#ifndef ISP2401
assert(info);
#else
assert(shading_info); assert(shading_info);
IA_CSS_ENTER_PRIVATE("binary=%p, type=%d, required_bds_factor=%d, stream_config=%p", IA_CSS_ENTER_PRIVATE("binary=%p, type=%d, required_bds_factor=%d, stream_config=%p",
binary, type, required_bds_factor, stream_config); binary, type, required_bds_factor, stream_config);
#endif
if (type == IA_CSS_SHADING_CORRECTION_TYPE_1) if (type == IA_CSS_SHADING_CORRECTION_TYPE_1)
#ifndef ISP2401 #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 #else
err = ia_css_binary_get_shading_info_type_1(binary, required_bds_factor, stream_config, err = ia_css_binary_get_shading_info_type_1(binary, required_bds_factor, stream_config,
shading_info, pipe_config); shading_info, pipe_config);
......
...@@ -5507,23 +5507,12 @@ static enum ia_css_err sh_css_pipe_configure_output( ...@@ -5507,23 +5507,12 @@ static enum ia_css_err sh_css_pipe_configure_output(
static enum ia_css_err static enum ia_css_err
sh_css_pipe_get_shading_info(struct ia_css_pipe *pipe, 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_shading_info *shading_info,
struct ia_css_pipe_config *pipe_config) struct ia_css_pipe_config *pipe_config)
#endif
{ {
enum ia_css_err err = IA_CSS_SUCCESS; enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_binary *binary = NULL; 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, ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"sh_css_pipe_get_shading_info() enter:\n"); "sh_css_pipe_get_shading_info() enter:\n");
...@@ -5535,11 +5524,8 @@ sh_css_pipe_get_shading_info(struct ia_css_pipe *pipe, ...@@ -5535,11 +5524,8 @@ sh_css_pipe_get_shading_info(struct ia_css_pipe *pipe,
IA_CSS_SHADING_CORRECTION_TYPE_1, IA_CSS_SHADING_CORRECTION_TYPE_1,
pipe->required_bds_factor, pipe->required_bds_factor,
(const struct ia_css_stream_config *)&pipe->stream->config, (const struct ia_css_stream_config *)&pipe->stream->config,
#ifndef ISP2401
info);
#else
shading_info, pipe_config); shading_info, pipe_config);
#endif
/* Other function calls can be added here when other shading correction types will be added /* Other function calls can be added here when other shading correction types will be added
* in the future. * in the future.
*/ */
...@@ -5550,11 +5536,7 @@ sh_css_pipe_get_shading_info(struct ia_css_pipe *pipe, ...@@ -5550,11 +5536,7 @@ sh_css_pipe_get_shading_info(struct ia_css_pipe *pipe,
* information. It is not a error case, and then * information. It is not a error case, and then
* this function should return IA_CSS_SUCCESS. * this function should return IA_CSS_SUCCESS.
*/ */
#ifndef ISP2401
memset(info, 0, sizeof(*info));
#else
memset(shading_info, 0, sizeof(*shading_info)); memset(shading_info, 0, sizeof(*shading_info));
#endif
} }
return err; return err;
} }
...@@ -9951,16 +9933,18 @@ static enum ia_css_err load_primary_binaries( ...@@ -9951,16 +9933,18 @@ static enum ia_css_err load_primary_binaries(
if (err != IA_CSS_SUCCESS) if (err != IA_CSS_SUCCESS)
goto ERR; goto ERR;
} }
#ifdef ISP2401
pipe_info->output_system_in_res_info = curr_pipe->config.output_system_in_res; if (atomisp_hw_is_isp2401)
#endif pipe_info->output_system_in_res_info = curr_pipe->config.output_system_in_res;
if (!spcopyonly) { if (!spcopyonly) {
err = sh_css_pipe_get_shading_info(curr_pipe, if (!atomisp_hw_is_isp2401)
#ifndef ISP2401 err = sh_css_pipe_get_shading_info(curr_pipe,
&pipe_info->shading_info); &pipe_info->shading_info, NULL);
#else else
& pipe_info->shading_info, &curr_pipe->config); err = sh_css_pipe_get_shading_info(curr_pipe,
#endif &pipe_info->shading_info, &curr_pipe->config);
if (err != IA_CSS_SUCCESS) if (err != IA_CSS_SUCCESS)
goto ERR; goto ERR;
err = sh_css_pipe_get_grid_info(curr_pipe, err = sh_css_pipe_get_grid_info(curr_pipe,
......
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