0001
0002
0003
0004 #ifndef __IPU3_TABLES_H
0005 #define __IPU3_TABLES_H
0006
0007 #include <linux/bitops.h>
0008
0009 #include "ipu3-abi.h"
0010
0011 #define IMGU_BDS_GRANULARITY 32
0012 #define IMGU_BDS_MIN_SF_INV IMGU_BDS_GRANULARITY
0013 #define IMGU_BDS_CONFIG_LEN 97
0014
0015 #define IMGU_SCALER_DOWNSCALE_4TAPS_LEN 128
0016 #define IMGU_SCALER_DOWNSCALE_2TAPS_LEN 64
0017 #define IMGU_SCALER_FP BIT(31)
0018
0019 #define IMGU_XNR3_VMEM_LUT_LEN 16
0020
0021 #define IMGU_GDC_LUT_UNIT 4
0022 #define IMGU_GDC_LUT_LEN 256
0023
0024 struct imgu_css_bds_config {
0025 struct imgu_abi_bds_phase_arr hor_phase_arr;
0026 struct imgu_abi_bds_phase_arr ver_phase_arr;
0027 struct imgu_abi_bds_ptrn_arr ptrn_arr;
0028 u16 sample_patrn_length;
0029 u8 hor_ds_en;
0030 u8 ver_ds_en;
0031 };
0032
0033 struct imgu_css_xnr3_vmem_defaults {
0034 s16 x[IMGU_XNR3_VMEM_LUT_LEN];
0035 s16 a[IMGU_XNR3_VMEM_LUT_LEN];
0036 s16 b[IMGU_XNR3_VMEM_LUT_LEN];
0037 s16 c[IMGU_XNR3_VMEM_LUT_LEN];
0038 };
0039
0040 extern const struct imgu_css_bds_config
0041 imgu_css_bds_configs[IMGU_BDS_CONFIG_LEN];
0042 extern const s32 imgu_css_downscale_4taps[IMGU_SCALER_DOWNSCALE_4TAPS_LEN];
0043 extern const s32 imgu_css_downscale_2taps[IMGU_SCALER_DOWNSCALE_2TAPS_LEN];
0044 extern const s16 imgu_css_gdc_lut[IMGU_GDC_LUT_UNIT][IMGU_GDC_LUT_LEN];
0045 extern const struct imgu_css_xnr3_vmem_defaults imgu_css_xnr3_vmem_defaults;
0046 extern const struct ipu3_uapi_bnr_static_config imgu_css_bnr_defaults;
0047 extern const struct ipu3_uapi_dm_config imgu_css_dm_defaults;
0048 extern const struct ipu3_uapi_ccm_mat_config imgu_css_ccm_defaults;
0049 extern const struct ipu3_uapi_gamma_corr_lut imgu_css_gamma_lut;
0050 extern const struct ipu3_uapi_csc_mat_config imgu_css_csc_defaults;
0051 extern const struct ipu3_uapi_cds_params imgu_css_cds_defaults;
0052 extern const struct ipu3_uapi_shd_config_static imgu_css_shd_defaults;
0053 extern const struct ipu3_uapi_yuvp1_iefd_config imgu_css_iefd_defaults;
0054 extern const struct ipu3_uapi_yuvp1_yds_config imgu_css_yds_defaults;
0055 extern const struct ipu3_uapi_yuvp1_chnr_config imgu_css_chnr_defaults;
0056 extern const struct ipu3_uapi_yuvp1_y_ee_nr_config imgu_css_y_ee_nr_defaults;
0057 extern const struct ipu3_uapi_yuvp2_tcc_gain_pcwl_lut_static_config
0058 imgu_css_tcc_gain_pcwl_lut;
0059 extern const struct ipu3_uapi_yuvp2_tcc_r_sqr_lut_static_config
0060 imgu_css_tcc_r_sqr_lut;
0061 extern const struct imgu_abi_anr_config imgu_css_anr_defaults;
0062 extern const struct ipu3_uapi_awb_fr_config_s imgu_css_awb_fr_defaults;
0063 extern const struct ipu3_uapi_ae_grid_config imgu_css_ae_grid_defaults;
0064 extern const struct ipu3_uapi_ae_ccm imgu_css_ae_ccm_defaults;
0065 extern const struct ipu3_uapi_af_config_s imgu_css_af_defaults;
0066 extern const struct ipu3_uapi_awb_config_s imgu_css_awb_defaults;
0067
0068 #endif