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