]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: atomisp: get rid of some broken code
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Apr 2020 10:12:25 +0000 (12:12 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 10:32:19 +0000 (12:32 +0200)
Probably due to some version conflicts while the atomisp code
were generated, some things don't build for ISP2401. So, use
the ISP2400 variant when available, or get rid of the
code that doesn't build.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/ia_css_types.h
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
drivers/staging/media/atomisp/pci/sh_css.c
drivers/staging/media/atomisp/pci/sh_css_params.c
drivers/staging/media/atomisp/pci/sh_css_sp.c

index 08e9b24c3d93f3f6b5852d17cd16bed221fc3825..d3584756e34ec6fee274029b31ddd4ea8abb16a9 100644 (file)
@@ -589,10 +589,6 @@ struct ia_css_isp_config {
        struct ia_css_output_config
                *output_config; /** Main Output Mirroring, flipping */
 
-       /* ISP 2401 */
-       struct ia_css_tnr3_kernel_config
-               *tnr3_config;           /** TNR3 config */
-
        struct ia_css_scaler_config
                *scaler_config;         /** Skylake: scaler config (optional) */
        struct ia_css_formats_config
index c17e36dac8623003fe9388d779da7e4df0a7db3a..da0df52896f3f0fd231ac3404c9fd0f767d82447 100644 (file)
@@ -49,9 +49,6 @@
 #include "assert_support.h"
 #include "print_support.h"
 #include "string_support.h"
-#ifdef ISP2401
-#include "ia_css_system_ctrl.h"
-#endif
 
 #include "fifo_monitor.h"
 
index 76b110431407d980f42782285b71a481de9e9e54..46a5e6ed7d29a2108fece2e56aa6f813c2db02e9 100644 (file)
@@ -1522,7 +1522,6 @@ sh_css_invalidate_shading_tables(struct ia_css_stream *stream)
                            "sh_css_invalidate_shading_tables() leave: return_void\n");
 }
 
-#ifndef ISP2401
 static void
 enable_interrupts(enum ia_css_irq_type irq_type)
 {
@@ -1564,8 +1563,6 @@ enable_interrupts(enum ia_css_irq_type irq_type)
        IA_CSS_LEAVE_PRIVATE("");
 }
 
-#endif
-
 static bool sh_css_setup_spctrl_config(const struct ia_css_fw_info *fw,
                                       const char *program,
                                       ia_css_spctrl_cfg  *spctrl_cfg)
@@ -1736,11 +1733,8 @@ ia_css_init(const struct ia_css_env *env,
        enable = gpio_reg_load(GPIO0_ID, _gpio_block_reg_do_e)
        | GPIO_FLASH_PIN_MASK;
        sh_css_mmu_set_page_table_base_index(mmu_l1_base);
-#ifndef ISP2401
+
        my_css_save.mmu_base = mmu_l1_base;
-#else
-       ia_css_save_mmu_base_addr(mmu_l1_base);
-#endif
 
        ia_css_reset_defaults(&my_css);
 
@@ -1754,13 +1748,8 @@ ia_css_init(const struct ia_css_env *env,
                return err;
        }
 
-#ifndef ISP2401
        IA_CSS_LOG("init: %d", my_css_save_initialized);
-#else
-       ia_css_save_restore_data_init();
-#endif
 
-#ifndef ISP2401
        if (!my_css_save_initialized)
        {
                my_css_save_initialized = true;
@@ -1769,7 +1758,7 @@ ia_css_init(const struct ia_css_env *env,
                       sizeof(struct sh_css_stream_seed) * MAX_ACTIVE_STREAMS);
                IA_CSS_LOG("init: %d mode=%d", my_css_save_initialized, my_css_save.mode);
        }
-#endif
+
        mipi_init();
 
 #ifndef ISP2401
@@ -1779,11 +1768,9 @@ ia_css_init(const struct ia_css_env *env,
 
 #endif
        my_css.irq_type = irq_type;
-#ifndef ISP2401
+
        my_css_save.irq_type = irq_type;
-#else
-       ia_css_save_irq_type(irq_type);
-#endif
+
        enable_interrupts(my_css.irq_type);
 
        /* configure GPIO to output mode */
@@ -9442,12 +9429,9 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
        int i, j;
        enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
        struct ia_css_metadata_info md_info;
-#ifndef ISP2401
        struct ia_css_resolution effective_res;
-#else
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
        bool aspect_ratio_crop_enabled = false;
-#endif
 #endif
 
        IA_CSS_ENTER("num_pipes=%d", num_pipes);
@@ -9934,6 +9918,8 @@ ia_css_stream_destroy(struct ia_css_stream *stream) {
            ia_css_pipeline_is_mapped(stream->last_pipe->pipe_num))
        {
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
+               bool free_mpi;
+
                for (i = 0; i < stream->num_pipes; i++) {
                        struct ia_css_pipe *entry = stream->pipes[i];
                        unsigned int sp_thread_id;
index 224274c61a3d2f5fa0c574fe48b5c77a77062da6..baa5259bcf917f4ca64c6d05c089e1a032c57119 100644 (file)
@@ -2708,7 +2708,6 @@ ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
        IA_CSS_LEAVE("void");
 }
 
-#ifndef ISP2401
 /*
  * coding style says the return of "mmgr_NULL" is the error signal
  *
@@ -2774,8 +2773,6 @@ static bool reallocate_buffer(
        return ret;
 }
 
-#endif
-
 struct ia_css_isp_3a_statistics *
 ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
 {
@@ -3143,9 +3140,6 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
 
                ia_css_sdis_clear_coefficients(&params->dvs_coefs);
                params->dis_coef_table_changed = true;
-#ifdef ISP2401
-               ia_css_tnr3_set_default_config(&params->tnr3_config);
-#endif
        } else {
                ia_css_set_xnr3_config(params, &stream_params->xnr3_config);
 
@@ -3945,9 +3939,6 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
                         */
                        g_param_buffer_enqueue_count++;
                        assert(g_param_buffer_enqueue_count < g_param_buffer_dequeue_count + 50);
-#ifdef ISP2401
-                       ia_css_save_latest_paramset_ptr(pipe, cpy);
-#endif
                        /*
                         * Tell the SP which queues are not empty,
                         * by sending the software event.
index 5eb45db5c65317fd81ad9819f90cf383f0718c47..e574396ad0f43814284dfd9ef5d5e00a9c36c1cf 100644 (file)
@@ -117,10 +117,6 @@ copy_isp_stage_to_sp_stage(void)
        */
        sh_css_sp_stage.enable.sdis = sh_css_isp_stage.binary_info.enable.dis;
        sh_css_sp_stage.enable.s3a = sh_css_isp_stage.binary_info.enable.s3a;
-#ifdef ISP2401
-       sh_css_sp_stage.enable.lace_stats =
-           sh_css_isp_stage.binary_info.enable.lace_stats;
-#endif
 }
 
 void
@@ -827,11 +823,6 @@ configure_isp_from_args(
     const struct sh_css_binary_args *args,
     bool two_ppc,
     bool deinterleaved) {
-#ifdef ISP2401
-       struct ia_css_pipe *pipe = find_pipe_by_num(pipeline->pipe_num);
-       const struct ia_css_resolution *res;
-
-#endif
        ia_css_fpn_configure(binary,  &binary->in_frame_info);
        ia_css_crop_configure(binary, &args->delay_frames[0]->info);
        ia_css_qplane_configure(pipeline, binary, &binary->in_frame_info);