Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: atomisp: get rid of #ifdef ISP_VEC_NELEMS

This is defined as 64 for the devices/firmware that were chosen.

So, evaluate the macros accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

-20
-10
drivers/staging/media/atomisp/pci/isp/modes/interface/isp_const.h
··· 36 36 #define BITS8_ELEMENTS_PER_XMEM_ADDR CEIL_DIV(XMEM_WIDTH_BITS, 8) 37 37 #define BITS16_ELEMENTS_PER_XMEM_ADDR CEIL_DIV(XMEM_WIDTH_BITS, 16) 38 38 39 - #if ISP_VEC_NELEMS == 64 40 39 #define ISP_NWAY_LOG2 6 41 - #elif ISP_VEC_NELEMS == 32 42 - #define ISP_NWAY_LOG2 5 43 - #elif ISP_VEC_NELEMS == 16 44 - #define ISP_NWAY_LOG2 4 45 - #elif ISP_VEC_NELEMS == 8 46 - #define ISP_NWAY_LOG2 3 47 - #else 48 - #error "isp_const.h ISP_VEC_NELEMS must be one of {8, 16, 32, 64}" 49 - #endif 50 40 51 41 /* ***************************** 52 42 * ISP input/output buffer sizes
-10
drivers/staging/media/atomisp/pci/sh_css_defs.h
··· 117 117 #define SH_CSS_NUM_INPUT_BUF_LINES 4 118 118 119 119 /* Left cropping only applicable for sufficiently large nway */ 120 - #if ISP_VEC_NELEMS == 16 121 - #define SH_CSS_MAX_LEFT_CROPPING 0 122 - #define SH_CSS_MAX_TOP_CROPPING 0 123 - #else 124 120 #define SH_CSS_MAX_LEFT_CROPPING 12 125 121 #define SH_CSS_MAX_TOP_CROPPING 12 126 - #endif 127 122 128 123 #define SH_CSS_SP_MAX_WIDTH 1280 129 124 ··· 132 137 #define SH_CSS_MIN_DVS_ENVELOPE 12U 133 138 134 139 /* The FPGA system (vec_nelems == 16) only supports upto 5MP */ 135 - #if ISP_VEC_NELEMS == 16 136 - #define SH_CSS_MAX_SENSOR_WIDTH 2560 137 - #define SH_CSS_MAX_SENSOR_HEIGHT 1920 138 - #else 139 140 #define SH_CSS_MAX_SENSOR_WIDTH 4608 140 141 #define SH_CSS_MAX_SENSOR_HEIGHT 3450 141 - #endif 142 142 143 143 /* Limited to reduce vmem pressure */ 144 144 #if ISP_VMEM_DEPTH >= 3072