diff options
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp')
4 files changed, 0 insertions, 265 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp.host.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp.host.c deleted file mode 100644 index b1f9dc8d662d..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp.host.c +++ /dev/null @@ -1,132 +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 "sh_css_frac.h" - -#include "ia_css_dp.host.h" - -#ifdef ISP2401 -/* We use a different set of DPC configuration parameters when - * DPC is used before OBC and NORM. Currently these parameters - * are used in usecases which selects both BDS and DPC. - **/ -const struct ia_css_dp_config default_dp_10bpp_config = { - 1024, - 2048, - 32768, - 32768, - 32768, - 32768 -}; -#endif -const struct ia_css_dp_config default_dp_config = { - 8192, - 2048, - 32768, - 32768, - 32768, - 32768 -}; - -void -ia_css_dp_encode( - struct sh_css_isp_dp_params *to, - const struct ia_css_dp_config *from, - unsigned size) -{ - int gain = from->gain; - int gr = from->gr; - int r = from->r; - int b = from->b; - int gb = from->gb; - - (void)size; - to->threshold_single = - SH_CSS_BAYER_MAXVAL; - to->threshold_2adjacent = - uDIGIT_FITTING(from->threshold, 16, SH_CSS_BAYER_BITS); - to->gain = - uDIGIT_FITTING(from->gain, 8, SH_CSS_DP_GAIN_SHIFT); - - to->coef_rr_gr = - uDIGIT_FITTING (gain * gr / r, 8, SH_CSS_DP_GAIN_SHIFT); - to->coef_rr_gb = - uDIGIT_FITTING (gain * gb / r, 8, SH_CSS_DP_GAIN_SHIFT); - to->coef_bb_gb = - uDIGIT_FITTING (gain * gb / b, 8, SH_CSS_DP_GAIN_SHIFT); - to->coef_bb_gr = - uDIGIT_FITTING (gain * gr / b, 8, SH_CSS_DP_GAIN_SHIFT); - to->coef_gr_rr = - uDIGIT_FITTING (gain * r / gr, 8, SH_CSS_DP_GAIN_SHIFT); - to->coef_gr_bb = - uDIGIT_FITTING (gain * b / gr, 8, SH_CSS_DP_GAIN_SHIFT); - to->coef_gb_bb = - uDIGIT_FITTING (gain * b / gb, 8, SH_CSS_DP_GAIN_SHIFT); - to->coef_gb_rr = - uDIGIT_FITTING (gain * r / gb, 8, SH_CSS_DP_GAIN_SHIFT); -} - -void -ia_css_dp_dump( - const struct sh_css_isp_dp_params *dp, - unsigned level) -{ - if (!dp) return; - ia_css_debug_dtrace(level, "Defect Pixel Correction:\n"); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dp_threshold_single_w_2adj_on", - dp->threshold_single); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dp_threshold_2adj_w_2adj_on", - dp->threshold_2adjacent); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dp_gain", dp->gain); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dpc_coef_rr_gr", dp->coef_rr_gr); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dpc_coef_rr_gb", dp->coef_rr_gb); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dpc_coef_bb_gb", dp->coef_bb_gb); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dpc_coef_bb_gr", dp->coef_bb_gr); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dpc_coef_gr_rr", dp->coef_gr_rr); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dpc_coef_gr_bb", dp->coef_gr_bb); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dpc_coef_gb_bb", dp->coef_gb_bb); - ia_css_debug_dtrace(level, "\t%-32s = %d\n", - "dpc_coef_gb_rr", dp->coef_gb_rr); -} - -void -ia_css_dp_debug_dtrace( - const struct ia_css_dp_config *config, - unsigned level) -{ - ia_css_debug_dtrace(level, - "config.threshold=%d, config.gain=%d\n", - config->threshold, config->gain); -} - -void -ia_css_init_dp_state( - void/*struct sh_css_isp_dp_vmem_state*/ *state, - size_t size) -{ - memset(state, 0, size); -} diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp.host.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp.host.h deleted file mode 100644 index db21814ad3db..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp.host.h +++ /dev/null @@ -1,47 +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_DP_HOST_H -#define __IA_CSS_DP_HOST_H - -#include "ia_css_dp_types.h" -#include "ia_css_dp_param.h" - -extern const struct ia_css_dp_config default_dp_config; -#ifdef ISP2401 -extern const struct ia_css_dp_config default_dp_10bpp_config; -#endif - -void -ia_css_dp_encode( - struct sh_css_isp_dp_params *to, - const struct ia_css_dp_config *from, - unsigned size); - -void -ia_css_dp_dump( - const struct sh_css_isp_dp_params *dp, - unsigned level); - -void -ia_css_dp_debug_dtrace( - const struct ia_css_dp_config *config, - unsigned level); - -void -ia_css_init_dp_state( - void/*struct sh_css_isp_dp_vmem_state*/ *state, - size_t size); - -#endif /* __IA_CSS_DP_HOST_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_param.h deleted file mode 100644 index fc9035a98d92..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_param.h +++ /dev/null @@ -1,36 +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_DP_PARAM_H -#define __IA_CSS_DP_PARAM_H - -#include "type_support.h" -#include "bnr/bnr_1.0/ia_css_bnr_param.h" - -/* DP (Defect Pixel Correction) */ -struct sh_css_isp_dp_params { - int32_t threshold_single; - int32_t threshold_2adjacent; - int32_t gain; - int32_t coef_rr_gr; - int32_t coef_rr_gb; - int32_t coef_bb_gb; - int32_t coef_bb_gr; - int32_t coef_gr_rr; - int32_t coef_gr_bb; - int32_t coef_gb_bb; - int32_t coef_gb_rr; -}; - -#endif /* __IA_CSS_DP_PARAM_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_types.h deleted file mode 100644 index 1bf6dcef7dc7..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_types.h +++ /dev/null @@ -1,50 +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_DP_TYPES_H -#define __IA_CSS_DP_TYPES_H - -/* @file -* CSS-API header file for Defect Pixel Correction (DPC) parameters. -*/ - - -/* Defect Pixel Correction configuration. - * - * ISP block: DPC1 (DPC after WB) - * DPC2 (DPC before WB) - * ISP1: DPC1 is used. - * ISP2: DPC2 is used. - */ -struct ia_css_dp_config { - ia_css_u0_16 threshold; /** The threshold of defect pixel correction, - representing the permissible difference of - intensity between one pixel and its - surrounding pixels. Smaller values result - in more frequent pixel corrections. - u0.16, [0,65535], - default 8192, ineffective 65535 */ - ia_css_u8_8 gain; /** The sensitivity of mis-correction. ISP will - miss a lot of defects if the value is set - too large. - u8.8, [0,65535], - default 4096, ineffective 65535 */ - uint32_t gr; /* unsigned <integer_bits>.<16-integer_bits> */ - uint32_t r; /* unsigned <integer_bits>.<16-integer_bits> */ - uint32_t b; /* unsigned <integer_bits>.<16-integer_bits> */ - uint32_t gb; /* unsigned <integer_bits>.<16-integer_bits> */ -}; - -#endif /* __IA_CSS_DP_TYPES_H */ - |