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

media: atomisp: propagate errors at ia_css_*_configure()

Propagate the lower lever ia_css config errors to the next
level.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 08ae0ffd
......@@ -34,14 +34,12 @@ ia_css_copy_output_config(
to->enable = from->enable;
}
void
ia_css_copy_output_configure(
const struct ia_css_binary *binary,
int ia_css_copy_output_configure(const struct ia_css_binary *binary,
bool enable)
{
struct ia_css_copy_output_configuration config = default_config;
config.enable = enable;
ia_css_configure_copy_output(binary, &config);
return ia_css_configure_copy_output(binary, &config);
}
......@@ -27,9 +27,7 @@ ia_css_copy_output_config(
const struct ia_css_copy_output_configuration *from,
unsigned int size);
void
ia_css_copy_output_configure(
const struct ia_css_binary *binary,
int ia_css_copy_output_configure(const struct ia_css_binary *binary,
bool enable);
#endif /* __IA_CSS_COPY_OUTPUT_HOST_H */
......@@ -52,14 +52,12 @@ ia_css_crop_config(
assert(elems_a % to->port_b.elems == 0);
}
void
ia_css_crop_configure(
const struct ia_css_binary *binary,
int ia_css_crop_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *info)
{
struct ia_css_crop_configuration config = default_config;
config.info = info;
ia_css_configure_crop(binary, &config);
return ia_css_configure_crop(binary, &config);
}
......@@ -34,9 +34,7 @@ ia_css_crop_config(
const struct ia_css_crop_configuration *from,
unsigned int size);
void
ia_css_crop_configure(
const struct ia_css_binary *binary,
int ia_css_crop_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *from);
#endif /* __IA_CSS_CROP_HOST_H */
......@@ -46,16 +46,14 @@ ia_css_dvs_config(
DVS_NUM_BLOCKS_Y(from->info->res.height);
}
void
ia_css_dvs_configure(
const struct ia_css_binary *binary,
int ia_css_dvs_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *info)
{
struct ia_css_dvs_configuration config = default_config;
config.info = info;
ia_css_configure_dvs(binary, &config);
return ia_css_configure_dvs(binary, &config);
}
static void
......
......@@ -35,9 +35,7 @@ ia_css_dvs_config(
const struct ia_css_dvs_configuration *from,
unsigned int size);
void
ia_css_dvs_configure(
const struct ia_css_binary *binary,
int ia_css_dvs_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *from);
void
......
......@@ -67,9 +67,7 @@ ia_css_fpn_config(
assert(elems_a % to->port_b.elems == 0);
}
void
ia_css_fpn_configure(
const struct ia_css_binary *binary,
int ia_css_fpn_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *info)
{
struct ia_css_frame_info my_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
......@@ -85,5 +83,5 @@ ia_css_fpn_configure(
my_info.raw_bayer_order = info->raw_bayer_order;
my_info.crop_info = info->crop_info;
ia_css_configure_fpn(binary, &config);
return ia_css_configure_fpn(binary, &config);
}
......@@ -37,9 +37,7 @@ ia_css_fpn_config(
const struct ia_css_fpn_configuration *from,
unsigned int size);
void
ia_css_fpn_configure(
const struct ia_css_binary *binary,
int ia_css_fpn_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *from);
#endif /* __IA_CSS_FPN_HOST_H */
......@@ -38,10 +38,9 @@ ia_css_iterator_config(
ia_css_resolution_to_sp_resolution(&to->dvs_envelope, from->dvs_envelope);
}
int
ia_css_iterator_configure(
const struct ia_css_binary *binary,
const struct ia_css_frame_info *in_info) {
int ia_css_iterator_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *in_info)
{
struct ia_css_frame_info my_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
struct ia_css_iterator_configuration config = default_config;
......@@ -75,7 +74,5 @@ ia_css_iterator_configure(
my_info.res.height <<= binary->vf_downscale_log2;
}
ia_css_configure_iterator(binary, &config);
return 0;
return ia_css_configure_iterator(binary, &config);
}
......@@ -91,9 +91,7 @@ ia_css_output1_config(
to, (const struct ia_css_output_configuration *)from, size);
}
void
ia_css_output_configure(
const struct ia_css_binary *binary,
int ia_css_output_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *info)
{
if (info) {
......@@ -102,13 +100,12 @@ ia_css_output_configure(
config.info = info;
ia_css_configure_output(binary, &config);
return ia_css_configure_output(binary, &config);
}
return 0;
}
void
ia_css_output0_configure(
const struct ia_css_binary *binary,
int ia_css_output0_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *info)
{
if (info) {
......@@ -117,13 +114,12 @@ ia_css_output0_configure(
config.info = info;
ia_css_configure_output0(binary, &config);
return ia_css_configure_output0(binary, &config);
}
return 0;
}
void
ia_css_output1_configure(
const struct ia_css_binary *binary,
int ia_css_output1_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *info)
{
if (info) {
......@@ -132,8 +128,9 @@ ia_css_output1_configure(
config.info = info;
ia_css_configure_output1(binary, &config);
return ia_css_configure_output1(binary, &config);
}
return 0;
}
void
......
......@@ -48,19 +48,13 @@ ia_css_output1_config(
const struct ia_css_output1_configuration *from,
unsigned int size);
void
ia_css_output_configure(
const struct ia_css_binary *binary,
int ia_css_output_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *from);
void
ia_css_output0_configure(
const struct ia_css_binary *binary,
int ia_css_output0_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *from);
void
ia_css_output1_configure(
const struct ia_css_binary *binary,
int ia_css_output1_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *from);
void
......
......@@ -47,9 +47,7 @@ ia_css_qplane_config(
to->format = from->info->format;
}
void
ia_css_qplane_configure(
const struct sh_css_sp_pipeline *pipe,
int ia_css_qplane_configure(const struct sh_css_sp_pipeline *pipe,
const struct ia_css_binary *binary,
const struct ia_css_frame_info *info)
{
......@@ -58,5 +56,5 @@ ia_css_qplane_configure(
config.pipe = pipe;
config.info = info;
ia_css_configure_qplane(binary, &config);
return ia_css_configure_qplane(binary, &config);
}
......@@ -35,9 +35,7 @@ ia_css_qplane_config(
const struct ia_css_qplane_configuration *from,
unsigned int size);
void
ia_css_qplane_configure(
const struct sh_css_sp_pipeline *pipe,
int ia_css_qplane_configure(const struct sh_css_sp_pipeline *pipe,
const struct ia_css_binary *binary,
const struct ia_css_frame_info *from);
......
......@@ -106,9 +106,7 @@ ia_css_raw_config(
#endif
}
void
ia_css_raw_configure(
const struct sh_css_sp_pipeline *pipe,
int ia_css_raw_configure(const struct sh_css_sp_pipeline *pipe,
const struct ia_css_binary *binary,
const struct ia_css_frame_info *in_info,
const struct ia_css_frame_info *internal_info,
......@@ -126,5 +124,5 @@ ia_css_raw_configure(
config.deinterleaved = deinterleaved;
config.enable_left_padding = enable_left_padding;
ia_css_configure_raw(binary, &config);
return ia_css_configure_raw(binary, &config);
}
......@@ -27,9 +27,7 @@ ia_css_raw_config(
const struct ia_css_raw_configuration *from,
unsigned int size);
void
ia_css_raw_configure(
const struct sh_css_sp_pipeline *pipe,
int ia_css_raw_configure(const struct sh_css_sp_pipeline *pipe,
const struct ia_css_binary *binary,
const struct ia_css_frame_info *in_info,
const struct ia_css_frame_info *internal_info,
......
......@@ -55,9 +55,7 @@ ia_css_ref_config(
assert(elems_a % to->port_b.elems == 0);
}
void
ia_css_ref_configure(
const struct ia_css_binary *binary,
int ia_css_ref_configure(const struct ia_css_binary *binary,
const struct ia_css_frame * const *ref_frames,
const uint32_t dvs_frame_delay)
{
......@@ -66,8 +64,10 @@ ia_css_ref_configure(
for (i = 0; i < MAX_NUM_VIDEO_DELAY_FRAMES; i++)
config.ref_frames[i] = ref_frames[i];
config.dvs_frame_delay = dvs_frame_delay;
ia_css_configure_ref(binary, &config);
return ia_css_configure_ref(binary, &config);
}
void
......
......@@ -29,9 +29,7 @@ ia_css_ref_config(
const struct ia_css_ref_configuration *from,
unsigned int size);
void
ia_css_ref_configure(
const struct ia_css_binary *binary,
int ia_css_ref_configure(const struct ia_css_binary *binary,
const struct ia_css_frame * const *ref_frames,
const uint32_t dvs_frame_delay);
......
......@@ -93,9 +93,7 @@ ia_css_tnr_config(
assert(elems_a % to->port_b.elems == 0);
}
void
ia_css_tnr_configure(
const struct ia_css_binary *binary,
int ia_css_tnr_configure(const struct ia_css_binary *binary,
const struct ia_css_frame * const *frames)
{
struct ia_css_tnr_configuration config;
......@@ -104,7 +102,7 @@ ia_css_tnr_configure(
for (i = 0; i < NUM_TNR_FRAMES; i++)
config.tnr_frames[i] = frames[i];
ia_css_configure_tnr(binary, &config);
return ia_css_configure_tnr(binary, &config);
}
void
......
......@@ -45,9 +45,7 @@ ia_css_tnr_config(
const struct ia_css_tnr_configuration *from,
unsigned int size);
void
ia_css_tnr_configure(
const struct ia_css_binary *binary,
int ia_css_tnr_configure(const struct ia_css_binary *binary,
const struct ia_css_frame * const *frames);
void
......
......@@ -120,12 +120,11 @@ configure_dma(
config->info = vf_info;
}
int
ia_css_vf_configure(
const struct ia_css_binary *binary,
int ia_css_vf_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *out_info,
struct ia_css_frame_info *vf_info,
unsigned int *downscale_log2) {
unsigned int *downscale_log2)
{
int err;
struct ia_css_vf_configuration config;
const struct ia_css_binary_info *info = &binary->info->sp;
......@@ -138,7 +137,6 @@ ia_css_vf_configure(
if (vf_info)
vf_info->raw_bit_depth = info->dma.vfdec_bits_per_pixel;
ia_css_configure_vf(binary, &config);
return 0;
return ia_css_configure_vf(binary, &config);
}
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