media: atomisp: sh_css_defs.h: get rid of build time dependencies
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 22 Apr 2020 13:17:30 +0000 (15:17 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 10:32:16 +0000 (12:32 +0200)
There are several #ifdefs checking for ISP version there. Some
of them are just two different ways to represent the same contants,
while 3 parameters are actually different, depending on the ISP
version.

Change the header in a way that it will be compatible with both
versions, and change dependent code to keep running, removing
ifdefs there only when possible.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
12 files changed:
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_const.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h

index 9bc899536cf7316bca18d3345fd06a06011c493e..4fc65c745fa59c36947ca98f6ea1bf8ebab81fb9 100644 (file)
@@ -3605,10 +3605,18 @@ int atomisp_cp_lsc_table(struct atomisp_sub_device *asd,
        }
 
        /* Shading table size per color */
-       if (st->width > SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
-           st->height > SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR) {
-               dev_err(asd->isp->dev, "shading table w/h validate failed!");
-               return -EINVAL;
+       if (!atomisp_hw_is_isp2401) {
+               if (st->width > ISP2400_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
+                   st->height > ISP2400_SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR) {
+                       dev_err(asd->isp->dev, "shading table w/h validate failed!");
+                       return -EINVAL;
+               }
+       } else {
+               if (st->width > ISP2401_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
+                   st->height > ISP2401_SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR) {
+                       dev_err(asd->isp->dev, "shading table w/h validate failed!");
+                       return -EINVAL;
+               }
        }
 
        shading_table = atomisp_css_shading_table_alloc(st->width, st->height);
@@ -6078,9 +6086,15 @@ int atomisp_set_shading_table(struct atomisp_sub_device *asd,
        }
 
        /* Shading table size per color */
-       if (user_shading_table->width > SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
-           user_shading_table->height > SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR)
-               return -EINVAL;
+       if (!atomisp_hw_is_isp2401) {
+               if (user_shading_table->width > ISP2400_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
+                   user_shading_table->height > ISP2400_SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR)
+                       return -EINVAL;
+       } else {
+               if (user_shading_table->width > ISP2401_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
+                   user_shading_table->height > ISP2401_SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR)
+                       return -EINVAL;
+       }
 
        shading_table = atomisp_css_shading_table_alloc(
                            user_shading_table->width, user_shading_table->height);
index fed632cef5a961a52ce6dd258c5e63aac6967fac..91653952f1a76f9de2c09a4ccf6868b182a6ec50 100644 (file)
@@ -82,11 +82,7 @@ struct ia_css_video_settings {
        struct ia_css_binary vf_pp_binary;
        struct ia_css_binary *yuv_scaler_binary;
        struct ia_css_frame *delay_frames[MAX_NUM_VIDEO_DELAY_FRAMES];
-#ifndef ISP2401
-       struct ia_css_frame *tnr_frames[NUM_VIDEO_TNR_FRAMES];
-#else
        struct ia_css_frame *tnr_frames[NUM_TNR_FRAMES];
-#endif
        struct ia_css_frame *vf_pp_in_frame;
        struct ia_css_pipe *copy_pipe;
        struct ia_css_pipe *capture_pipe;
index 85bc4f2c8d06fc61d07e831bc45b48de5f85eb58..cc44b6a57e968903b1e2df0230c5e0aa5d130ab6 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "type_support.h"
 
-#ifdef ISP2401
 /* To position the shading center grid point on the center of output image,
  * one more grid cell is needed as margin. */
 #define SH_CSS_SCTBL_CENTERING_MARGIN  1
@@ -25,6 +24,7 @@
 /* The shading table width and height are the number of grids, not cells. The last grid should be counted. */
 #define SH_CSS_SCTBL_LAST_GRID_COUNT   1
 
+#ifdef ISP2401
 /* Number of horizontal grids per color in the shading table. */
 #define _ISP_SCTBL_WIDTH_PER_COLOR(input_width, deci_factor_log2) \
        (ISP_BQ_GRID_WIDTH(input_width, deci_factor_log2) + \
@@ -34,6 +34,7 @@
 #define _ISP_SCTBL_HEIGHT(input_height, deci_factor_log2) \
        (ISP_BQ_GRID_HEIGHT(input_height, deci_factor_log2) + \
        SH_CSS_SCTBL_CENTERING_MARGIN + SH_CSS_SCTBL_LAST_GRID_COUNT)
+#endif
 
 /* Legacy API: Number of horizontal grids per color in the shading table. */
 #define _ISP_SCTBL_LEGACY_WIDTH_PER_COLOR(input_width, deci_factor_log2) \
 #define _ISP_SCTBL_LEGACY_HEIGHT(input_height, deci_factor_log2) \
        (ISP_BQ_GRID_HEIGHT(input_height, deci_factor_log2) + SH_CSS_SCTBL_LAST_GRID_COUNT)
 
-#endif
 /* SC (Shading Corrction) */
 struct sh_css_isp_sc_params {
        s32 gain_shift;
 };
 
-#ifdef ISP2401
 /* Number of horizontal slice times for interpolated gain:
  *
  * The start position of the internal frame does not match the start position of the shading table.
@@ -67,5 +66,4 @@ struct sh_css_isp_sc_isp_config {
        u32 internal_frame_origin_y_bqs_on_sctbl;
 };
 
-#endif
 #endif /* __IA_CSS_SC_PARAM_H */
index 519e33a0555497bee91c86effa6abe2adb1cb0ec..ecbd3042951a756f067270b163dcf35f25565791 100644 (file)
@@ -83,11 +83,7 @@ ia_css_tnr_config(
        ia_css_dma_configure_from_info(&to->port_b, &from->tnr_frames[0]->info);
        to->width_a_over_b = elems_a / to->port_b.elems;
        to->frame_height = from->tnr_frames[0]->info.res.height;
-#ifndef ISP2401
-       for (i = 0; i < NUM_VIDEO_TNR_FRAMES; i++) {
-#else
        for (i = 0; i < NUM_TNR_FRAMES; i++) {
-#endif
                to->tnr_frame_addr[i] = from->tnr_frames[i]->data +
                                        from->tnr_frames[i]->planes.yuyv.offset;
        }
@@ -104,11 +100,7 @@ ia_css_tnr_configure(
        struct ia_css_tnr_configuration config;
        unsigned int i;
 
-#ifndef ISP2401
-       for (i = 0; i < NUM_VIDEO_TNR_FRAMES; i++)
-#else
        for (i = 0; i < NUM_TNR_FRAMES; i++)
-#endif
                config.tnr_frames[i] = frames[i];
 
        ia_css_configure_tnr(binary, &config);
@@ -121,9 +113,7 @@ ia_css_init_tnr_state(
 {
        (void)size;
 
-#ifndef ISP2401
-       assert(NUM_VIDEO_TNR_FRAMES >= 2);
-#endif
+       assert(NUM_TNR_FRAMES >= 2);
        assert(sizeof(*state) == size);
        state->tnr_in_buf_idx = 0;
        state->tnr_out_buf_idx = 1;
index 64eab3c8e5464d55abc87fab1f7b787f7a428d55..1973766d8e4104b96c3fd365dc1739c88f69cc68 100644 (file)
@@ -27,22 +27,14 @@ struct sh_css_isp_tnr_params {
 };
 
 struct ia_css_tnr_configuration {
-#ifndef ISP2401
-       const struct ia_css_frame *tnr_frames[NUM_VIDEO_TNR_FRAMES];
-#else
        const struct ia_css_frame *tnr_frames[NUM_TNR_FRAMES];
-#endif
 };
 
 struct sh_css_isp_tnr_isp_config {
        u32 width_a_over_b;
        u32 frame_height;
        struct dma_port_config port_b;
-#ifndef ISP2401
-       hrt_vaddress tnr_frame_addr[NUM_VIDEO_TNR_FRAMES];
-#else
        hrt_vaddress tnr_frame_addr[NUM_TNR_FRAMES];
-#endif
 };
 
 #endif /* __IA_CSS_TNR_PARAM_H */
index b1854fa85d6185cee7cb415d531636e26a970c15..b9a00894d34830d93fb11c1e4ce8df1f12a070e3 100644 (file)
@@ -463,8 +463,10 @@ more details.
 
 /* [isp vmem] table size[vectors] per line per color (GR,R,B,GB),
    multiples of NWAY */
-#define SCTBL_VECTORS_PER_LINE_PER_COLOR \
-       CEIL_DIV(SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR, ISP_VEC_NELEMS)
+#define ISP2400_SCTBL_VECTORS_PER_LINE_PER_COLOR \
+       CEIL_DIV(ISP2400_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR, ISP_VEC_NELEMS)
+#define ISP2401_SCTBL_VECTORS_PER_LINE_PER_COLOR \
+       CEIL_DIV(ISP2401_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR, ISP_VEC_NELEMS)
 /* [isp vmem] table size[vectors] per line for 4colors (GR,R,B,GB),
    multiples of NWAY */
 #define SCTBL_VECTORS_PER_LINE \
index 17560e4abfb3f6e15b0352ecd9adc4acdee9fce9..ddc087c50ec5fabd6feb12c7315e6ec121f107d6 100644 (file)
@@ -145,10 +145,8 @@ struct ia_css_binary {
        int                      sctbl_width_per_color;
        int                      sctbl_aligned_width_per_color;
        int                      sctbl_height;
-#ifdef ISP2401
        int                      sctbl_legacy_width_per_color;
        int                      sctbl_legacy_height;
-#endif
        struct ia_css_sdis_info  dis;
        struct ia_css_resolution dvs_envelope;
        bool                     online;
index 8f012aece09cea3390a033cf972c2a9817bd5731..f5282bb6ad6c7d5e61069fc4005a98941916b9a2 100644 (file)
@@ -1360,34 +1360,28 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
 
        if (info->enable.sc)
        {
-               binary->sctbl_width_per_color  =
-#ifndef ISP2401
-                   _ISP_SCTBL_WIDTH_PER_COLOR(sc_3a_dis_padded_width,
-                                              s3a_log_deci);
-#else
-                   _ISP_SCTBL_WIDTH_PER_COLOR(isp_internal_width, s3a_log_deci);
-#endif
-               binary->sctbl_aligned_width_per_color =
-                   SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR;
-               binary->sctbl_height =
-#ifndef ISP2401
-                   _ISP_SCTBL_HEIGHT(sc_3a_dis_height, s3a_log_deci);
-#else
-                   _ISP_SCTBL_HEIGHT(isp_internal_height, s3a_log_deci);
-               binary->sctbl_legacy_width_per_color  =
-                   _ISP_SCTBL_LEGACY_WIDTH_PER_COLOR(sc_3a_dis_padded_width, s3a_log_deci);
-               binary->sctbl_legacy_height =
-                   _ISP_SCTBL_LEGACY_HEIGHT(sc_3a_dis_height, s3a_log_deci);
+               if (!atomisp_hw_is_isp2401) {
+                       binary->sctbl_width_per_color = _ISP_SCTBL_WIDTH_PER_COLOR(sc_3a_dis_padded_width, s3a_log_deci);
+                       binary->sctbl_aligned_width_per_color = ISP2400_SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR;
+                       binary->sctbl_height = _ISP_SCTBL_HEIGHT(sc_3a_dis_height, s3a_log_deci);
+               } else {
+                       binary->sctbl_width_per_color = _ISP_SCTBL_WIDTH_PER_COLOR(isp_internal_width, s3a_log_deci);
+                       binary->sctbl_aligned_width_per_color = ISP2401_SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR;
+                       binary->sctbl_height = _ISP_SCTBL_HEIGHT(isp_internal_height, s3a_log_deci);
+#ifdef ISP2401
+                       binary->sctbl_legacy_width_per_color  = _ISP_SCTBL_LEGACY_WIDTH_PER_COLOR(sc_3a_dis_padded_width, s3a_log_deci);
+                       binary->sctbl_legacy_height = _ISP_SCTBL_LEGACY_HEIGHT(sc_3a_dis_height, s3a_log_deci);
 #endif
+               }
        } else
        {
                binary->sctbl_width_per_color         = 0;
                binary->sctbl_aligned_width_per_color = 0;
                binary->sctbl_height                  = 0;
-#ifdef ISP2401
-               binary->sctbl_legacy_width_per_color  = 0;
-               binary->sctbl_legacy_height           = 0;
-#endif
+               if (atomisp_hw_is_isp2401) {
+                       binary->sctbl_legacy_width_per_color  = 0;
+                       binary->sctbl_legacy_height           = 0;
+               }
        }
        ia_css_sdis_init_info(&binary->dis,
                              sc_3a_dis_width,
index 88d43ce3f97034e35a21a8601dc8c4bb10cedb7e..c17e36dac8623003fe9388d779da7e4df0a7db3a 100644 (file)
@@ -2945,11 +2945,7 @@ ia_css_debug_pipe_graph_dump_stage(
                    "in", true);
        }
 
-#ifndef ISP2401
-       for (i = 0; i < NUM_VIDEO_TNR_FRAMES; i++) {
-#else
        for (i = 0; i < NUM_TNR_FRAMES; i++) {
-#endif
                if (stage->args.tnr_frames[i]) {
                        ia_css_debug_pipe_graph_dump_frame(
                            stage->args.tnr_frames[i], id,
index 91251faa9b49a3d3c91360c55272d5409a46b2dc..0427407ed911ce86f105ff6b954f923d4c30e952 100644 (file)
@@ -1440,11 +1440,7 @@ void sh_css_binary_args_reset(struct sh_css_binary_args *args)
 {
        unsigned int i;
 
-#ifndef ISP2401
-       for (i = 0; i < NUM_VIDEO_TNR_FRAMES; i++)
-#else
        for (i = 0; i < NUM_TNR_FRAMES; i++)
-#endif
                args->tnr_frames[i] = NULL;
        for (i = 0; i < MAX_NUM_VIDEO_DELAY_FRAMES; i++)
                args->delay_frames[i] = NULL;
@@ -2581,7 +2577,7 @@ ia_css_pipe_destroy(struct ia_css_pipe *pipe) {
                        }
                }
 #ifndef ISP2401
-               ia_css_frame_free_multiple(NUM_VIDEO_TNR_FRAMES,
+               ia_css_frame_free_multiple(NUM_TNR_FRAMES,
                                           pipe->pipe_settings.video.tnr_frames);
 #else
                ia_css_frame_free_multiple(NUM_TNR_FRAMES,
@@ -3805,7 +3801,7 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
        if (video_stage) {
                int frm;
 #ifndef ISP2401
-               for (frm = 0; frm < NUM_VIDEO_TNR_FRAMES; frm++) {
+               for (frm = 0; frm < NUM_TNR_FRAMES; frm++) {
 #else
                for (frm = 0; frm < NUM_TNR_FRAMES; frm++) {
 #endif
@@ -5986,7 +5982,7 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
        tnr_info.raw_bit_depth = SH_CSS_TNR_BIT_DEPTH;
 
 #ifndef ISP2401
-       for (i = 0; i < NUM_VIDEO_TNR_FRAMES; i++) {
+       for (i = 0; i < NUM_TNR_FRAMES; i++) {
 #else
        for (i = 0; i < NUM_TNR_FRAMES; i++) {
 #endif
index c601745be2a6a9749f4944d3a5d339937bc32054..611a522eb64951dbe2369342360d66c6603356f4 100644 (file)
@@ -163,15 +163,6 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
 #define SH_CSS_MIN_SENSOR_WIDTH           2
 #define SH_CSS_MIN_SENSOR_HEIGHT          2
 
-#if defined(IS_ISP_2400_SYSTEM)
-/* MAX width and height set to the same to allow for rotated
- * resolutions. */
-#define SH_CSS_MAX_VF_WIDTH               1920
-#define SH_CSS_MAX_VF_HEIGHT              1920
-#else
-#define SH_CSS_MAX_VF_WIDTH               1280
-#define SH_CSS_MAX_VF_HEIGHT              960
-#endif
 /*
 #define SH_CSS_MAX_VF_WIDTH_DEC               1920
 #define SH_CSS_MAX_VF_HEIGHT_DEC              1080
@@ -186,34 +177,24 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
 #define SH_CSS_MORPH_TABLE_ELEMS_PER_DDR_WORD \
        (HIVE_ISP_DDR_WORD_BYTES / SH_CSS_MORPH_TABLE_ELEM_BYTES)
 
-#ifndef ISP2401
-#define SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR   (SH_CSS_MAX_BQ_GRID_WIDTH + 1)
-#define SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR   (SH_CSS_MAX_BQ_GRID_HEIGHT + 1)
-#else
+
+#define ISP2400_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR   (SH_CSS_MAX_BQ_GRID_WIDTH + 1)
+#define ISP2400_SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR   (SH_CSS_MAX_BQ_GRID_HEIGHT + 1)
+
+#define ISP2400_SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR \
+       CEIL_MUL(ISP2400_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR, ISP_VEC_NELEMS)
+
 /* TODO: I will move macros of "*_SCTBL_*" to SC kernel.
    "+ 2" should be "+ SH_CSS_SCTBL_CENTERING_MARGIN + SH_CSS_SCTBL_LAST_GRID_COUNT". (michie, Sep/23/2014) */
-#define SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR   (SH_CSS_MAX_BQ_GRID_WIDTH + 2)
-#define SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR   (SH_CSS_MAX_BQ_GRID_HEIGHT + 2)
-#endif
-#define SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR \
-       CEIL_MUL(SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR, ISP_VEC_NELEMS)
+#define ISP2401_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR   (SH_CSS_MAX_BQ_GRID_WIDTH + 2)
+#define ISP2401_SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR   (SH_CSS_MAX_BQ_GRID_HEIGHT + 2)
+
+#define ISP2401_SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR \
+       CEIL_MUL(ISP2400_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR, ISP_VEC_NELEMS)
 
 /* Each line of this table is aligned to the maximum line width. */
 #define SH_CSS_MAX_S3ATBL_WIDTH              SH_CSS_MAX_BQ_GRID_WIDTH
 
-#ifndef ISP2401
-/* The video binary supports a delay of 1 or 2 */
-#define MAX_DVS_FRAME_DELAY            2
-/* We always need one additional frame because the video binary
- * reads the previous and writes the current frame concurrently */
-#define MAX_NUM_VIDEO_DELAY_FRAMES     (MAX_DVS_FRAME_DELAY + 1)
-#define NUM_VIDEO_TNR_FRAMES           2
-
-#define NUM_TNR_FRAMES                 2       /* FIXME */
-
-#define MAX_NUM_DELAY_FRAMES           MAX_NUM_VIDEO_DELAY_FRAMES
-
-#else
 /* Video mode specific DVS define */
 /* The video binary supports a delay of 1 or 2 frames */
 #define VIDEO_FRAME_DELAY              2
@@ -237,15 +218,14 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
  */
 #define NUM_VALID_TNR_REF_FRAMES               (1) /* At least one valid TNR reference frame is required */
 #define NUM_TNR_FRAMES_PER_REF_BUF_SET         (2)
-
 /* In luma-only mode alternate illuminated frames are supported, that requires two double buffers */
 #define NUM_TNR_REF_BUF_SETS   (1)
 
 #define NUM_TNR_FRAMES         (NUM_TNR_FRAMES_PER_REF_BUF_SET * NUM_TNR_REF_BUF_SETS)
 
-#define MAX_NUM_DELAY_FRAMES   MAX(MAX_NUM_VIDEO_DELAY_FRAMES, NUM_PREVIEW_DVS_FRAMES)
+#define NUM_VIDEO_TNR_FRAMES           2
 
-#endif
+#define MAX_NUM_DELAY_FRAMES   MAX(MAX_NUM_VIDEO_DELAY_FRAMES, NUM_PREVIEW_DVS_FRAMES)
 
 /* Note that this is the define used to configure all data structures common for all modes */
 /* It should be equal or bigger to the max number of DVS frames for all possible modes */
@@ -272,7 +252,6 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
        CEIL_MUL(_ISP_MORPH_TABLE_WIDTH(width), \
                 SH_CSS_MORPH_TABLE_ELEMS_PER_DDR_WORD)
 
-#ifndef ISP2401
 #define _ISP_SCTBL_WIDTH_PER_COLOR(input_width, deci_factor_log2) \
        (ISP_BQ_GRID_WIDTH(input_width, deci_factor_log2) + 1)
 #define _ISP_SCTBL_HEIGHT(input_height, deci_factor_log2) \
@@ -281,7 +260,7 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
        CEIL_MUL(_ISP_SCTBL_WIDTH_PER_COLOR(input_width, deci_factor_log2), \
                 ISP_VEC_NELEMS)
 
-#endif
+
 /* *****************************************************************
  * Statistics for 3A (Auto Focus, Auto White Balance, Auto Exposure)
  * *****************************************************************/
index 84e8f1e5421c31317b766d40fcdbc7983b0f9acf..cef1caa264b4984d2219f6d14d6ab5c10330aa33 100644 (file)
@@ -285,11 +285,7 @@ struct sh_css_binary_args {
        struct ia_css_frame *in_frame;       /* input frame */
        struct ia_css_frame
                *delay_frames[MAX_NUM_VIDEO_DELAY_FRAMES];   /* reference input frame */
-#ifndef ISP2401
-       struct ia_css_frame *tnr_frames[NUM_VIDEO_TNR_FRAMES];   /* tnr frames */
-#else
        struct ia_css_frame *tnr_frames[NUM_TNR_FRAMES];   /* tnr frames */
-#endif
        struct ia_css_frame
                *out_frame[IA_CSS_BINARY_MAX_OUTPUT_PORTS];      /* output frame */
        struct ia_css_frame *out_vf_frame;   /* viewfinder output frame */