atomisp: remove aa kernel wrappers
authorAlan Cox <alan@linux.intel.com>
Mon, 20 Mar 2017 14:38:27 +0000 (14:38 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Mar 2017 07:04:32 +0000 (08:04 +0100)
The aa kernel is used but it consists of nothing more than a set of wrappers
for a memset and an assignment. Replace these at the calling points with the
memset and assignment.

Keep the structures for now - those should disappear as the next layer up
gets unwrapped.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hive_isp_css_2400_system_generated/ia_css_isp_params.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hive_isp_css_2400_system_generated/ia_css_isp_states.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hive_isp_css_2401_system_csi2p_generated/ia_css_isp_params.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hive_isp_css_2401_system_csi2p_generated/ia_css_isp_states.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hive_isp_css_2401_system_generated/ia_css_isp_params.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hive_isp_css_2401_system_generated/ia_css_isp_states.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c

index 8a357501595d319fe8fb8331fa54874a4ee333bb..9620bc3215111fec7613eb503854bd1bdf1254f4 100644 (file)
@@ -70,27 +70,16 @@ ia_css_process_aa(
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
-
-       {
-               unsigned size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
-
-               unsigned offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
-
-               if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_aa() enter:\n");
-
-                       ia_css_aa_encode((struct sh_css_isp_aa_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->aa_config,
-size);
-                       params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
-
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_aa() leave:\n");
-               }
+       unsigned size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
+       unsigned offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
 
+       if (size) {
+               struct sh_css_isp_aa_params *t =  (struct sh_css_isp_aa_params *)
+                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+               t->strength = params->aa_config.strength;
        }
+       params->isp_params_changed = true;
+       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
 }
 
 /* Code generated by genparam/gencode.c:gen_process_function() */
@@ -2214,7 +2203,6 @@ ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
        *config = params->aa_config;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() leave\n");
-       ia_css_aa_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
@@ -2228,7 +2216,6 @@ ia_css_set_aa_config(struct ia_css_isp_parameters *params,
 
        assert(params != NULL);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_aa_config() enter:\n");
-       ia_css_aa_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->aa_config = *config;
        params->config_changed[IA_CSS_AA_ID] = true;
 #ifndef ISP2401
index 471ceba7f313ed985d29ed938ad95117e2a0b878..fb3ba08f69c1e0d6452d06e3eff9f8e47d5e459e 100644 (file)
@@ -31,11 +31,8 @@ ia_css_initialize_aa_state(
 
                unsigned offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
 
-               if (size) {
-                       ia_css_init_aa_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
-               }
+               if (size)
+                       memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset], 0, size);
 
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
index 2672137359722ec3b212a11c1b6cd760aeced13e..87a330862bfc8709110015309804e48eb8452d11 100644 (file)
@@ -71,26 +71,13 @@ ia_css_process_aa(
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
-
-       {
-               unsigned size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
-
-               unsigned offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
-
-               if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_aa() enter:\n");
-
-                       ia_css_aa_encode((struct sh_css_isp_aa_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->aa_config,
-size);
-                       params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
-
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_aa() leave:\n");
-               }
+       unsigned size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
+       unsigned offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
 
+       if (size) {
+               struct sh_css_isp_aa_params *t =  (struct sh_css_isp_aa_params *)
+                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+               t->strength = params->aa_config.strength;
        }
 }
 
@@ -2215,7 +2202,6 @@ ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
        *config = params->aa_config;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() leave\n");
-       ia_css_aa_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
@@ -2229,7 +2215,6 @@ ia_css_set_aa_config(struct ia_css_isp_parameters *params,
 
        assert(params != NULL);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_aa_config() enter:\n");
-       ia_css_aa_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->aa_config = *config;
        params->config_changed[IA_CSS_AA_ID] = true;
 #ifndef ISP2401
index a445d4f1fa2b44da67712bc6d3a47ee26550bb5e..e87d05bc73ae893a7ecc269c824c904190015623 100644 (file)
@@ -29,14 +29,10 @@ ia_css_initialize_aa_state(
 
        {
                unsigned size   = binary->info->mem_offsets.offsets.state->vmem.aa.size;
-
                unsigned offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
 
-               if (size) {
-                       ia_css_init_aa_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
-               }
+               if (size)
+                       memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset], 0, size);
 
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
index 2672137359722ec3b212a11c1b6cd760aeced13e..87a330862bfc8709110015309804e48eb8452d11 100644 (file)
@@ -71,26 +71,13 @@ ia_css_process_aa(
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
-
-       {
-               unsigned size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
-
-               unsigned offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
-
-               if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_aa() enter:\n");
-
-                       ia_css_aa_encode((struct sh_css_isp_aa_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->aa_config,
-size);
-                       params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
-
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_aa() leave:\n");
-               }
+       unsigned size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
+       unsigned offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
 
+       if (size) {
+               struct sh_css_isp_aa_params *t =  (struct sh_css_isp_aa_params *)
+                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+               t->strength = params->aa_config.strength;
        }
 }
 
@@ -2215,7 +2202,6 @@ ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
        *config = params->aa_config;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() leave\n");
-       ia_css_aa_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
@@ -2229,7 +2215,6 @@ ia_css_set_aa_config(struct ia_css_isp_parameters *params,
 
        assert(params != NULL);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_aa_config() enter:\n");
-       ia_css_aa_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->aa_config = *config;
        params->config_changed[IA_CSS_AA_ID] = true;
 #ifndef ISP2401
index a445d4f1fa2b44da67712bc6d3a47ee26550bb5e..e87d05bc73ae893a7ecc269c824c904190015623 100644 (file)
@@ -29,14 +29,10 @@ ia_css_initialize_aa_state(
 
        {
                unsigned size   = binary->info->mem_offsets.offsets.state->vmem.aa.size;
-
                unsigned offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
 
-               if (size) {
-                       ia_css_init_aa_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
-               }
+               if (size)
+                       memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset], 0, size);
 
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
index 942ebe078739cd8618459dadf66835cb500517fb..f7dd256b6f7a0b986fa07471f1303373ab4b9c29 100644 (file)
@@ -30,37 +30,3 @@ const struct ia_css_aa_config default_baa_config = {
        8191 /* default should be 0 */
 };
 
-void
-ia_css_aa_encode(
-       struct sh_css_isp_aa_params *to,
-       const struct ia_css_aa_config *from,
-       unsigned size)
-{
-       (void)size;
-       to->strength = from->strength;
-}
-
-void
-ia_css_init_aa_state(
-       void *state,
-       size_t size)
-{
-       memset(state, 0, size);
-}
-
-#ifndef IA_CSS_NO_DEBUG
-void
-ia_css_aa_dump(
-       const struct sh_css_isp_aa_params *aa,
-       unsigned level);
-
-void
-ia_css_aa_debug_dtrace(
-       const struct ia_css_aa_config *config,
-       unsigned level)
-{
-       ia_css_debug_dtrace(level,
-               "config.strength=%d\n",
-               config->strength);
-}
-#endif /* IA_CSS_NO_DEBUG */
index c3785e0d7c0221edc7c9334c1630ce2ca70c3d70..71587d85ff2d6c62012abaab4b6a6bd78f63024e 100644 (file)
@@ -24,27 +24,4 @@ extern const struct ia_css_aa_config default_aa_config;
 /* Bayer Anti-Aliasing configuration. */
 extern const struct ia_css_aa_config default_baa_config;
 
-void
-ia_css_aa_encode(
-       struct sh_css_isp_aa_params *to,
-       const struct ia_css_aa_config *from,
-       unsigned size);
-
-void
-ia_css_init_aa_state(
-       void *state,
-       size_t size);
-
-#ifndef IA_CSS_NO_DEBUG
-void
-ia_css_aa_dump(
-       const struct sh_css_isp_aa_params *aa,
-       unsigned level);
-
-void
-ia_css_aa_debug_dtrace(
-       const struct ia_css_aa_config *config,
-       unsigned level);
-#endif /* IA_CSS_NO_DEBUG */
-
 #endif /* __IA_CSS_AA_HOST_H */
index 9d51f1c653a2c44062112f5736b825b3257f948d..e4599f768154e9d113d9dee1c3a606883b5a09b0 100644 (file)
@@ -2326,7 +2326,6 @@ sh_css_set_baa_config(struct ia_css_isp_parameters *params,
        assert(params != NULL);
 
        IA_CSS_ENTER_PRIVATE("config=%p", config);
-       ia_css_aa_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 
        params->bds_config = *config;
        params->config_changed[IA_CSS_BDS_ID] = true;
@@ -2346,7 +2345,6 @@ sh_css_get_baa_config(const struct ia_css_isp_parameters *params,
 
        *config = params->bds_config;
 
-       ia_css_aa_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        IA_CSS_LEAVE_PRIVATE("void");
 }