diff options
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob')
8 files changed, 0 insertions, 522 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2.host.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2.host.c deleted file mode 100644 index f77aff13f8e3..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2.host.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2015, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - */ - -#include "ia_css_types.h" -#include "sh_css_defs.h" -#include "sh_css_frac.h" -#ifndef IA_CSS_NO_DEBUG -#include "ia_css_debug.h" -#endif -#include "isp.h" -#include "ia_css_ob2.host.h" - -const struct ia_css_ob2_config default_ob2_config = { - 0, - 0, - 0, - 0 -}; - -void -ia_css_ob2_encode( - struct sh_css_isp_ob2_params *to, - const struct ia_css_ob2_config *from, - unsigned size) -{ - (void)size; - - /* Blacklevels types are u0_16 */ - to->blacklevel_gr = uDIGIT_FITTING(from->level_gr, 16, SH_CSS_BAYER_BITS); - to->blacklevel_r = uDIGIT_FITTING(from->level_r, 16, SH_CSS_BAYER_BITS); - to->blacklevel_b = uDIGIT_FITTING(from->level_b, 16, SH_CSS_BAYER_BITS); - to->blacklevel_gb = uDIGIT_FITTING(from->level_gb, 16, SH_CSS_BAYER_BITS); -} - -#ifndef IA_CSS_NO_DEBUG -void -ia_css_ob2_dump( - const struct sh_css_isp_ob2_params *ob2, - unsigned level) -{ - if (!ob2) - return; - - ia_css_debug_dtrace(level, "Optical Black 2:\n"); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "ob2_blacklevel_gr", ob2->blacklevel_gr); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "ob2_blacklevel_r", ob2->blacklevel_r); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "ob2_blacklevel_b", ob2->blacklevel_b); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "ob2_blacklevel_gb", ob2->blacklevel_gb); - -} - - -void -ia_css_ob2_debug_dtrace( - const struct ia_css_ob2_config *config, - unsigned level) -{ - ia_css_debug_dtrace(level, - "config.level_gr=%d, config.level_r=%d, " - "config.level_b=%d, config.level_gb=%d, ", - config->level_gr, config->level_r, - config->level_b, config->level_gb); -} -#endif diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2.host.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2.host.h deleted file mode 100644 index 06846502eca3..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2.host.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2015, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - */ - -#ifndef __IA_CSS_OB2_HOST_H -#define __IA_CSS_OB2_HOST_H - -#include "ia_css_ob2_types.h" -#include "ia_css_ob2_param.h" - -extern const struct ia_css_ob2_config default_ob2_config; - -void -ia_css_ob2_encode( - struct sh_css_isp_ob2_params *to, - const struct ia_css_ob2_config *from, - unsigned size); - -#ifndef IA_CSS_NO_DEBUG -void -ia_css_ob2_dump( - const struct sh_css_isp_ob2_params *ob2, - unsigned level); - -void -ia_css_ob2_debug_dtrace( - const struct ia_css_ob2_config *config, unsigned level); -#endif - -#endif /* __IA_CSS_OB2_HOST_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_param.h deleted file mode 100644 index 5c21d6a3911b..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_param.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2015, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - */ - -#ifndef __IA_CSS_OB2_PARAM_H -#define __IA_CSS_OB2_PARAM_H - -#include "type_support.h" - - -/* OB2 (Optical Black) */ -struct sh_css_isp_ob2_params { - int32_t blacklevel_gr; - int32_t blacklevel_r; - int32_t blacklevel_b; - int32_t blacklevel_gb; -}; - -#endif /* __IA_CSS_OB2_PARAM_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h deleted file mode 100644 index d981394c1c11..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2015, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - */ - -#ifndef __IA_CSS_OB2_TYPES_H -#define __IA_CSS_OB2_TYPES_H - -/* @file -* CSS-API header file for Optical Black algorithm parameters. -*/ - -/* Optical Black configuration - * - * ISP2.6.1: OB2 is used. - */ - -#include "ia_css_frac.h" - -struct ia_css_ob2_config { - ia_css_u0_16 level_gr; /** Black level for GR pixels. - u0.16, [0,65535], - default/ineffective 0 */ - ia_css_u0_16 level_r; /** Black level for R pixels. - u0.16, [0,65535], - default/ineffective 0 */ - ia_css_u0_16 level_b; /** Black level for B pixels. - u0.16, [0,65535], - default/ineffective 0 */ - ia_css_u0_16 level_gb; /** Black level for GB pixels. - u0.16, [0,65535], - default/ineffective 0 */ -}; - -#endif /* __IA_CSS_OB2_TYPES_H */ - diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.c deleted file mode 100644 index fd891ac092ed..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2015, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - */ - -#include "ia_css_types.h" -#include "sh_css_defs.h" -#include "ia_css_debug.h" -#include "isp.h" - -#include "ia_css_ob.host.h" - -const struct ia_css_ob_config default_ob_config = { - IA_CSS_OB_MODE_NONE, - 0, - 0, - 0, - 0, - 0, - 0 -}; - -/* TODO: include ob.isp.h to get isp knowledge and - add assert on platform restrictions */ - -void -ia_css_ob_configure( - struct sh_css_isp_ob_stream_config *config, - unsigned int isp_pipe_version, - unsigned int raw_bit_depth) -{ - config->isp_pipe_version = isp_pipe_version; - config->raw_bit_depth = raw_bit_depth; -} - -void -ia_css_ob_encode( - struct sh_css_isp_ob_params *to, - const struct ia_css_ob_config *from, - const struct sh_css_isp_ob_stream_config *config, - unsigned size) -{ - unsigned int ob_bit_depth - = config->isp_pipe_version == 2 ? SH_CSS_BAYER_BITS : config->raw_bit_depth; - unsigned int scale = 16 - ob_bit_depth; - - (void)size; - switch (from->mode) { - case IA_CSS_OB_MODE_FIXED: - to->blacklevel_gr = from->level_gr >> scale; - to->blacklevel_r = from->level_r >> scale; - to->blacklevel_b = from->level_b >> scale; - to->blacklevel_gb = from->level_gb >> scale; - to->area_start_bq = 0; - to->area_length_bq = 0; - to->area_length_bq_inverse = 0; - break; - case IA_CSS_OB_MODE_RASTER: - to->blacklevel_gr = 0; - to->blacklevel_r = 0; - to->blacklevel_b = 0; - to->blacklevel_gb = 0; - to->area_start_bq = from->start_position; - to->area_length_bq = - (from->end_position - from->start_position) + 1; - to->area_length_bq_inverse = AREA_LENGTH_UNIT / to->area_length_bq; - break; - default: - to->blacklevel_gr = 0; - to->blacklevel_r = 0; - to->blacklevel_b = 0; - to->blacklevel_gb = 0; - to->area_start_bq = 0; - to->area_length_bq = 0; - to->area_length_bq_inverse = 0; - break; - } -} - -void -ia_css_ob_vmem_encode( - struct sh_css_isp_ob_vmem_params *to, - const struct ia_css_ob_config *from, - const struct sh_css_isp_ob_stream_config *config, - unsigned size) -{ - struct sh_css_isp_ob_params tmp; - struct sh_css_isp_ob_params *ob = &tmp; - - (void)size; - ia_css_ob_encode(&tmp, from, config, sizeof(tmp)); - - { - unsigned i; - unsigned sp_obarea_start_bq = ob->area_start_bq; - unsigned sp_obarea_length_bq = ob->area_length_bq; - unsigned low = sp_obarea_start_bq; - unsigned high = low + sp_obarea_length_bq; - uint16_t all_ones = ~0; - - for (i = 0; i < OBAREA_MASK_SIZE; i++) { - if (i >= low && i < high) - to->vmask[i/ISP_VEC_NELEMS][i%ISP_VEC_NELEMS] = all_ones; - else - to->vmask[i/ISP_VEC_NELEMS][i%ISP_VEC_NELEMS] = 0; - } - } -} - -void -ia_css_ob_dump( - const struct sh_css_isp_ob_params *ob, - unsigned level) -{ - if (!ob) return; - ia_css_debug_dtrace(level, "Optical Black:\n"); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "ob_blacklevel_gr", ob->blacklevel_gr); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "ob_blacklevel_r", ob->blacklevel_r); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "ob_blacklevel_b", ob->blacklevel_b); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "ob_blacklevel_gb", ob->blacklevel_gb); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "obarea_start_bq", ob->area_start_bq); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "obarea_length_bq", ob->area_length_bq); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "obarea_length_bq_inverse", - ob->area_length_bq_inverse); -} - - -void -ia_css_ob_debug_dtrace( - const struct ia_css_ob_config *config, - unsigned level) -{ - ia_css_debug_dtrace(level, - "config.mode=%d, " - "config.level_gr=%d, config.level_r=%d, " - "config.level_b=%d, config.level_gb=%d, " - "config.start_position=%d, config.end_position=%d\n", - config->mode, - config->level_gr, config->level_r, - config->level_b, config->level_gb, - config->start_position, config->end_position); -} - diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.h deleted file mode 100644 index 4af181470f8d..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2015, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - */ - -#ifndef __IA_CSS_OB_HOST_H -#define __IA_CSS_OB_HOST_H - -#include "ia_css_ob_types.h" -#include "ia_css_ob_param.h" - -extern const struct ia_css_ob_config default_ob_config; - -void -ia_css_ob_configure( - struct sh_css_isp_ob_stream_config *config, - unsigned int isp_pipe_version, - unsigned int raw_bit_depth); - -void -ia_css_ob_encode( - struct sh_css_isp_ob_params *to, - const struct ia_css_ob_config *from, - const struct sh_css_isp_ob_stream_config *config, - unsigned size); - -void -ia_css_ob_vmem_encode( - struct sh_css_isp_ob_vmem_params *to, - const struct ia_css_ob_config *from, - const struct sh_css_isp_ob_stream_config *config, - unsigned size); - -void -ia_css_ob_dump( - const struct sh_css_isp_ob_params *ob, - unsigned level); - -void -ia_css_ob_debug_dtrace( - const struct ia_css_ob_config *config, unsigned level) -; - -#endif /* __IA_CSS_OB_HOST_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_param.h deleted file mode 100644 index a60a644bb4ff..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_param.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2015, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - */ - -#ifndef __IA_CSS_OB_PARAM_H -#define __IA_CSS_OB_PARAM_H - -#include "type_support.h" -#include "vmem.h" - -#define OBAREA_MASK_SIZE 64 -#define OBAREA_LENGTHBQ_INVERSE_SHIFT 12 - -/* AREA_LENGTH_UNIT is dependent on NWAY, requires rewrite */ -#define AREA_LENGTH_UNIT (1<<12) - - -/* OB (Optical Black) */ -struct sh_css_isp_ob_stream_config { - unsigned isp_pipe_version; - unsigned raw_bit_depth; -}; - -struct sh_css_isp_ob_params { - int32_t blacklevel_gr; - int32_t blacklevel_r; - int32_t blacklevel_b; - int32_t blacklevel_gb; - int32_t area_start_bq; - int32_t area_length_bq; - int32_t area_length_bq_inverse; -}; - -struct sh_css_isp_ob_vmem_params { - VMEM_ARRAY(vmask, OBAREA_MASK_SIZE); -}; - -#endif /* __IA_CSS_OB_PARAM_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_types.h deleted file mode 100644 index a9717b8f44ac..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_types.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2015, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - */ - -#ifndef __IA_CSS_OB_TYPES_H -#define __IA_CSS_OB_TYPES_H - -/* @file -* CSS-API header file for Optical Black level parameters. -*/ - -#include "ia_css_frac.h" - -/* Optical black mode. - */ -enum ia_css_ob_mode { - IA_CSS_OB_MODE_NONE, /** OB has no effect. */ - IA_CSS_OB_MODE_FIXED, /** Fixed OB */ - IA_CSS_OB_MODE_RASTER /** Raster OB */ -}; - -/* Optical Black level configuration. - * - * ISP block: OB1 - * ISP1: OB1 is used. - * ISP2: OB1 is used. - */ -struct ia_css_ob_config { - enum ia_css_ob_mode mode; /** Mode (None / Fixed / Raster). - enum, [0,2], - default 1, ineffective 0 */ - ia_css_u0_16 level_gr; /** Black level for GR pixels - (used for Fixed Mode only). - u0.16, [0,65535], - default/ineffective 0 */ - ia_css_u0_16 level_r; /** Black level for R pixels - (used for Fixed Mode only). - u0.16, [0,65535], - default/ineffective 0 */ - ia_css_u0_16 level_b; /** Black level for B pixels - (used for Fixed Mode only). - u0.16, [0,65535], - default/ineffective 0 */ - ia_css_u0_16 level_gb; /** Black level for GB pixels - (used for Fixed Mode only). - u0.16, [0,65535], - default/ineffective 0 */ - uint16_t start_position; /** Start position of OB area - (used for Raster Mode only). - u16.0, [0,63], - default/ineffective 0 */ - uint16_t end_position; /** End position of OB area - (used for Raster Mode only). - u16.0, [0,63], - default/ineffective 0 */ -}; - -#endif /* __IA_CSS_OB_TYPES_H */ - |