diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-03 17:02:51 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-20 12:32:20 +0200 |
commit | 32efca3d55799b3e644e1ceca10e2f3b6b6eb76a (patch) | |
tree | a406eca8c93301d5fda724a7f28d2f7768027803 /drivers/staging/media | |
parent | 8ac171401531a18016c3eb8258a6316aef65047b (diff) | |
download | linux-32efca3d55799b3e644e1ceca10e2f3b6b6eb76a.tar.bz2 |
media: atomisp: move ia_css_configure_sc() implementation
With the changes, this function is now undefined if built
for ISP2400. So, move its implementation to the file which
calls it.
Reported-by: Francescodario Cuzzocrea <francescodario.cuzzocrea@mail.polimi.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media')
3 files changed, 29 insertions, 35 deletions
diff --git a/drivers/staging/media/atomisp/pci/css_2401_system/hive/ia_css_isp_configs.c b/drivers/staging/media/atomisp/pci/css_2401_system/hive/ia_css_isp_configs.c index cd37e7e3d779..29d85407cac4 100644 --- a/drivers/staging/media/atomisp/pci/css_2401_system/hive/ia_css_isp_configs.c +++ b/drivers/staging/media/atomisp/pci/css_2401_system/hive/ia_css_isp_configs.c @@ -272,33 +272,6 @@ ia_css_configure_output( "ia_css_configure_output() leave:\n"); } -/* Code generated by genparam/genconfig.c:gen_configure_function() */ - -void -ia_css_configure_sc( - const struct ia_css_binary *binary, - const struct ia_css_sc_configuration *config_dmem) -{ - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "ia_css_configure_sc() enter:\n"); - - { - unsigned int offset = 0; - unsigned int size = 0; - - if (binary->info->mem_offsets.offsets.config) { - size = binary->info->mem_offsets.offsets.config->dmem.sc.size; - offset = binary->info->mem_offsets.offsets.config->dmem.sc.offset; - } - if (size) { - ia_css_sc_config((struct sh_css_isp_sc_isp_config *) - &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset], - config_dmem, size); - } - } - ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, - "ia_css_configure_sc() leave:\n"); -} /* Code generated by genparam/genconfig.c:gen_configure_function() */ diff --git a/drivers/staging/media/atomisp/pci/ia_css_isp_configs.h b/drivers/staging/media/atomisp/pci/ia_css_isp_configs.h index 6dd0205fa59e..6545efd24cbe 100644 --- a/drivers/staging/media/atomisp/pci/ia_css_isp_configs.h +++ b/drivers/staging/media/atomisp/pci/ia_css_isp_configs.h @@ -152,14 +152,6 @@ ia_css_configure_output( /* Code generated by genparam/genconfig.c:gen_configure_function() */ -/* ISP2401 */ -void -ia_css_configure_sc( - const struct ia_css_binary *binary, - const struct ia_css_sc_configuration *config_dmem); - -/* Code generated by genparam/genconfig.c:gen_configure_function() */ - void ia_css_configure_raw( const struct ia_css_binary *binary, diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/sc/sc_1.0/ia_css_sc.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/sc/sc_1.0/ia_css_sc.host.c index 000cbe600f97..43954ed6d106 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/sc/sc_1.0/ia_css_sc.host.c +++ b/drivers/staging/media/atomisp/pci/isp/kernels/sc/sc_1.0/ia_css_sc.host.c @@ -22,6 +22,35 @@ #include "ia_css_sc.host.h" +/* Code generated by genparam/genconfig.c:gen_configure_function() */ + +/* ISP2401 */ +static void +ia_css_configure_sc( + const struct ia_css_binary *binary, + const struct ia_css_sc_configuration *config_dmem) +{ + ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, + "ia_css_configure_sc() enter:\n"); + + { + unsigned int offset = 0; + unsigned int size = 0; + + if (binary->info->mem_offsets.offsets.config) { + size = binary->info->mem_offsets.offsets.config->dmem.sc.size; + offset = binary->info->mem_offsets.offsets.config->dmem.sc.offset; + } + if (size) { + ia_css_sc_config((struct sh_css_isp_sc_isp_config *) + &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset], + config_dmem, size); + } + } + ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, + "ia_css_configure_sc() leave:\n"); +} + void ia_css_sc_encode( struct sh_css_isp_sc_params *to, |