#define ATOMISP_HW_STEPPING_A0 0x00
#define ATOMISP_HW_STEPPING_B0 0x10
-/*ISP binary running mode*/
+/* ISP binary running mode */
#define CI_MODE_PREVIEW 0x8000
#define CI_MODE_VIDEO 0x4000
#define CI_MODE_STILL_CAPTURE 0x2000
/* Configuration used by Bayer noise reduction and YCC noise reduction */
struct atomisp_nr_config {
- /* [gain] Strength of noise reduction for Bayer NR (Used by Bayer NR) */
+ /* [gain] Strength of noise reduction for Bayer NR */
unsigned int bnr_gain;
- /* [gain] Strength of noise reduction for YCC NR (Used by YCC NR) */
+ /* [gain] Strength of noise reduction for YCC NR */
unsigned int ynr_gain;
/* [intensity] Sensitivity of Edge (Used by Bayer NR) */
unsigned int direction;
unsigned int threshold_uv;/* [intensity] Motion sensitivity for U/V */
};
-/* Histogram. This contains num_elements values of type unsigned int.
+/*
+ * Contains num_elements values of type unsigned int.
* The data pointer is a DDR pointer (virtual address).
*/
struct atomisp_histogram {
/* Optical black level configuration */
struct atomisp_ob_config {
- /* Obtical black level mode (Fixed / Raster) */
+ /* Optical black level mode (Fixed / Raster) */
enum atomisp_ob_mode mode;
/* [intensity] optical black level for GR (relevant for fixed mode) */
unsigned int level_gr;
unsigned int ae_y_coef_r; /* [gain] Weight of R for Y */
unsigned int ae_y_coef_g; /* [gain] Weight of G for Y */
unsigned int ae_y_coef_b; /* [gain] Weight of B for Y */
- unsigned int awb_lg_high_raw; /* [intensity]
- AWB level gate high for raw */
+ unsigned int awb_lg_high_raw; /* [intensity] AWB level gate high for raw */
unsigned int awb_lg_low; /* [intensity] AWB level gate low */
unsigned int awb_lg_high; /* [intensity] AWB level gate high */
int af_fir1_coef[7]; /* [factor] AF FIR coefficients of fir1 */
int y;
};
-/* DVS 2.0 Coefficient types. This structure contains 4 pointers to
- * arrays that contain the coefficients for each type.
+/*
+ * DVS 2.0 Coefficient types. This structure contains 4 pointers to
+ * arrays that contain the coefficients for each type.
*/
struct atomisp_dvs2_coef_types {
- short __user *odd_real; /** real part of the odd coefficients*/
- short __user *odd_imag; /** imaginary part of the odd coefficients*/
- short __user *even_real;/** real part of the even coefficients*/
- short __user *even_imag;/** imaginary part of the even coefficients*/
+ short __user *odd_real; /* Real part of the odd coefficients */
+ short __user *odd_imag; /* Imaginary part of the odd coefficients */
+ short __user *even_real;/* Real part of the even coefficients */
+ short __user *even_imag;/* Imaginary part of the even coefficients */
};
/*
* arrays that contain the statistics for each type.
*/
struct atomisp_dvs2_stat_types {
- int __user *odd_real; /** real part of the odd statistics*/
- int __user *odd_imag; /** imaginary part of the odd statistics*/
- int __user *even_real;/** real part of the even statistics*/
- int __user *even_imag;/** imaginary part of the even statistics*/
+ int __user *odd_real; /* Real part of the odd statistics */
+ int __user *odd_imag; /* Imaginary part of the odd statistics */
+ int __user *even_real;/* Real part of the even statistics */
+ int __user *even_imag;/* Imaginary part of the even statistics */
};
struct atomisp_dis_coefficients {
};
/*
- * Because we have 2 pipes at max to output metadata, therefore driver will use
- * ATOMISP_MAIN_METADATA to specify the metadata from the pipe which keeps
- * streaming always and use ATOMISP_SEC_METADATA to specify the metadata from
- * the pipe which is streaming by request like capture pipe of ZSL or SDV mode
- * as secondary metadata. And for the use case which has only one pipe
- * streaming like online capture, ATOMISP_MAIN_METADATA will be used.
+ * As the driver can output metadata on two pipes at max,
+ * ATOMISP_MAIN_METADATA is used for the pipe that streams continuously.
+ * ATOMISP_SEC_METADATA is used for the pipe that streams on demand, e.g.,
+ * the capture pipe in ZSL or SDV modes.
+ * In use cases with a single streaming pipe (like online capture),
+ * only ATOMISP_MAIN_METADATA is used.
*/
enum atomisp_metadata_type {
ATOMISP_MAIN_METADATA = 0,
struct atomisp_3a_output __user *data;
struct atomisp_3a_rgby_output __user *rgby_data;
u32 exp_id; /* exposure ID */
- u32 isp_config_id; /* isp config ID */
+ u32 isp_config_id;
};
/* White Balance (Gain Adjust) */
/* Color Space Conversion settings */
struct atomisp_cc_config {
unsigned int fraction_bits;
- int matrix[3 * 3]; /* RGB2YUV Color matrix, signed
- <13-fraction_bits>.<fraction_bits> */
+ /* RGB2YUV Color matrix, signed <13-fraction_bits>.<fraction_bits> */
+ int matrix[3 * 3];
};
/* De pixel noise configuration */
/* Defect pixel correction configuration */
struct atomisp_dp_config {
- /* [intensity] The threshold of defect Pixel Correction, representing
+ /*
+ * [intensity] 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
*/
unsigned int threshold;
- /* [gain] The sensitivity of mis-correction. ISP will miss a lot of
+ /*
+ * [gain] The sensitivity of mis-correction. ISP will miss a lot of
* defects if the value is set too large. u8_8
*/
unsigned int gain;
__u16 threshold;
};
-/* metadata config */
+/* Metadata config */
struct atomisp_metadata_config {
u32 metadata_height;
u32 metadata_stride;
* Generic resolution structure.
*/
struct atomisp_resolution {
- u32 width; /** Width */
- u32 height; /** Height */
+ u32 width;
+ u32 height;
};
/*
- * This specifies the coordinates (x,y)
+ * Specifies the zoom point coordinates (x,y)
*/
struct atomisp_zoom_point {
- s32 x; /** x coordinate */
- s32 y; /** y coordinate */
+ s32 x;
+ s32 y;
};
/*
- * This specifies the region
+ * Specifies the zoom region
*/
struct atomisp_zoom_region {
- struct atomisp_zoom_point
- origin; /* Starting point coordinates for the region */
+ struct atomisp_zoom_point origin; /* Starting point coordinates for the region */
struct atomisp_resolution resolution; /* Region resolution */
};
struct atomisp_dz_config {
- u32 dx; /** Horizontal zoom factor */
- u32 dy; /** Vertical zoom factor */
- struct atomisp_zoom_region zoom_region; /** region for zoom */
+ u32 dx; /* Horizontal zoom factor */
+ u32 dy; /* Vertical zoom factor */
+ struct atomisp_zoom_region zoom_region;
};
struct atomisp_parm {
};
struct dvs2_bq_resolution {
- int width_bq; /* width [BQ] */
- int height_bq; /* height [BQ] */
+ int width_bq;
+ int height_bq;
};
struct atomisp_dvs2_bq_resolutions {
struct dvs2_bq_resolution output_bq;
/* GDC effective envelope size [BQ] */
struct dvs2_bq_resolution envelope_bq;
- /* isp pipe filter size [BQ] */
+ /* ISP pipe filter size [BQ] */
struct dvs2_bq_resolution ispfilter_bq;
- /* GDC shit size [BQ] */
+ /* GDC shift size [BQ] */
struct dvs2_bq_resolution gdc_shift_bq;
};
struct atomisp_cnr_config *cnr_config; /* Chroma Noise Reduction */
struct atomisp_macc_config *macc_config; /* MACC */
struct atomisp_ctc_config *ctc_config; /* Chroma Tone Control */
- struct atomisp_aa_config *aa_config; /* Anti-Aliasing */
- struct atomisp_aa_config *baa_config; /* Anti-Aliasing */
+ struct atomisp_aa_config *aa_config; /* Anti-Aliasing */
+ struct atomisp_aa_config *baa_config; /* Anti-Aliasing */
struct atomisp_ce_config *ce_config;
struct atomisp_dvs_6axis_config *dvs_6axis_config;
struct atomisp_ob_config *ob_config; /* Objective Black config */
struct atomisp_3a_config *a3a_config; /* 3A Statistics config */
struct atomisp_xnr_config *xnr_config; /* eXtra Noise Reduction */
struct atomisp_dz_config *dz_config; /* Digital Zoom */
- struct atomisp_cc_config *yuv2rgb_cc_config; /* Color
- Correction config */
- struct atomisp_cc_config *rgb2yuv_cc_config; /* Color
- Correction config */
+ struct atomisp_cc_config *yuv2rgb_cc_config; /* Color Correction config */
+ struct atomisp_cc_config *rgb2yuv_cc_config; /* Color Correction config */
struct atomisp_macc_table *macc_table;
struct atomisp_gamma_table *gamma_table;
struct atomisp_ctc_table *ctc_table;
void *res_mgr_2500_config;
/*
- * Output frame pointer the config is to be applied to (optional),
- * set to NULL to make this config is applied as global.
+ * Output frame pointer to which the config will be applied to (optional),
+ * Set to NULL to make this config be applied as global.
*/
void *output_frame;
/*
unsigned short data[ATOMISP_GAMMA_TABLE_SIZE];
};
-/* Morphing table for advanced ISP.
- * Each line of width elements takes up COORD_TABLE_EXT_WIDTH elements
- * in memory.
+/*
+ * Morphing table for advanced ISP.
+ * Each line of width elements takes up COORD_TABLE_EXT_WIDTH elements in memory.
*/
#define ATOMISP_MORPH_TABLE_NUM_PLANES 6
struct atomisp_morph_table {
__u16 *data[ATOMISP_NUM_SC_COLORS];
};
-/* parameter for MACC */
+/* Parameter for MACC */
#define ATOMISP_NUM_MACC_AXES 16
struct atomisp_macc_table {
short data[4 * ATOMISP_NUM_MACC_AXES];
struct atomisp_macc_table table;
};
-/* Parameter for ctc parameter control */
+/* CTC parameter control */
#define ATOMISP_CTC_TABLE_SIZE 1024
struct atomisp_ctc_table {
unsigned short data[ATOMISP_CTC_TABLE_SIZE];
/* Parameter for overlay image loading */
struct atomisp_overlay {
- /* the frame containing the overlay data The overlay frame width should
- * be the multiples of 2*ISP_VEC_NELEMS. The overlay frame height
- * should be the multiples of 2.
+ /*
+ * The frame containing the overlay data. The overlay frame width should
+ * be a multiple of 2 * ISP_VEC_NELEMS. The overlay frame height
+ * should be a multiple of 2.
*/
struct v4l2_framebuffer *frame;
/* Y value of overlay background */
char bg_u;
/* V value of overlay background */
char bg_v;
- /* the blending percent of input data for Y subpixels */
+ /* The blending percentage of input data for Y subpixels */
unsigned char blend_input_perc_y;
- /* the blending percent of input data for U subpixels */
+ /* The blending percentage of input data for U subpixels */
unsigned char blend_input_perc_u;
- /* the blending percent of input data for V subpixels */
+ /* The blending percentage of input data for V subpixels */
unsigned char blend_input_perc_v;
- /* the blending percent of overlay data for Y subpixels */
+ /* The blending percentage of overlay data for Y subpixels */
unsigned char blend_overlay_perc_y;
- /* the blending percent of overlay data for U subpixels */
+ /* The blending percentage of overlay data for U subpixels */
unsigned char blend_overlay_perc_u;
- /* the blending percent of overlay data for V subpixels */
+ /* The blending percentage of overlay data for V subpixels */
unsigned char blend_overlay_perc_v;
- /* the overlay start x pixel position on output frame It should be the
- multiples of 2*ISP_VEC_NELEMS. */
+ /*
+ * The overlay "start x" pixel position on the output frame. It should be a
+ * multiple of 2 * ISP_VEC_NELEMS.
+ */
unsigned int overlay_start_x;
- /* the overlay start y pixel position on output frame It should be the
- multiples of 2. */
+ /*
+ * The overlay "start y" pixel position on the output frame. It should be a
+ * multiple of 2.
+ */
unsigned int overlay_start_y;
};
#define EXT_ISP_SHOT_MODE_ANIMATED_PHOTO 10
#define EXT_ISP_SHOT_MODE_SPORTS 11
-/*Private IOCTLs for ISP */
+/* Private IOCTLs for ISP */
#define ATOMISP_IOC_G_XNR \
_IOR('v', BASE_VIDIOC_PRIVATE + 0, int)
#define ATOMISP_IOC_S_XNR \
_IOR('v', BASE_VIDIOC_PRIVATE + 5, struct atomisp_ee_config)
#define ATOMISP_IOC_S_EE \
_IOW('v', BASE_VIDIOC_PRIVATE + 5, struct atomisp_ee_config)
-/* Digital Image Stabilization:
+/*
+ * Digital Image Stabilization:
* 1. get dis statistics: reads DIS statistics from ISP (every frame)
* 2. set dis coefficients: set DIS filter coefficients (one time)
* 3. set dis motion vector: set motion vector (result of DIS, every frame)
#define ATOMISP_IOC_S_ISP_GDC_TAB \
_IOW('v', BASE_VIDIOC_PRIVATE + 10, struct atomisp_morph_table)
-/* macc parameter control*/
+/* MACC parameter control */
#define ATOMISP_IOC_G_ISP_MACC \
_IOR('v', BASE_VIDIOC_PRIVATE + 12, struct atomisp_macc_config)
#define ATOMISP_IOC_S_ISP_MACC \
_IOW('v', BASE_VIDIOC_PRIVATE + 12, struct atomisp_macc_config)
-/* Defect pixel detection & Correction */
+/* Defect pixel detection & correction */
#define ATOMISP_IOC_G_ISP_BAD_PIXEL_DETECTION \
_IOR('v', BASE_VIDIOC_PRIVATE + 13, struct atomisp_dp_config)
#define ATOMISP_IOC_S_ISP_BAD_PIXEL_DETECTION \
_IOW('v', BASE_VIDIOC_PRIVATE + 13, struct atomisp_dp_config)
-/* False Color Correction */
+/* False color correction */
#define ATOMISP_IOC_G_ISP_FALSE_COLOR_CORRECTION \
_IOR('v', BASE_VIDIOC_PRIVATE + 14, struct atomisp_de_config)
#define ATOMISP_IOC_S_ISP_FALSE_COLOR_CORRECTION \
_IOW('v', BASE_VIDIOC_PRIVATE + 14, struct atomisp_de_config)
-/* ctc parameter control */
+/* CTC parameter control */
#define ATOMISP_IOC_G_ISP_CTC \
_IOR('v', BASE_VIDIOC_PRIVATE + 15, struct atomisp_ctc_table)
#define ATOMISP_IOC_S_ISP_CTC \
_IOW('v', BASE_VIDIOC_PRIVATE + 15, struct atomisp_ctc_table)
-/* white balance Correction */
+/* White balance correction */
#define ATOMISP_IOC_G_ISP_WHITE_BALANCE \
_IOR('v', BASE_VIDIOC_PRIVATE + 16, struct atomisp_wb_config)
#define ATOMISP_IOC_S_ISP_WHITE_BALANCE \
_IOW('v', BASE_VIDIOC_PRIVATE + 16, struct atomisp_wb_config)
-/* fpn table loading */
+/* FPN table loading */
#define ATOMISP_IOC_S_ISP_FPN_TABLE \
_IOW('v', BASE_VIDIOC_PRIVATE + 17, struct v4l2_framebuffer)
-/* overlay image loading */
+/* Overlay image loading */
#define ATOMISP_IOC_G_ISP_OVERLAY \
_IOWR('v', BASE_VIDIOC_PRIVATE + 18, struct atomisp_overlay)
#define ATOMISP_IOC_S_ISP_OVERLAY \
_IOW('v', BASE_VIDIOC_PRIVATE + 18, struct atomisp_overlay)
-/* bcd driver bridge */
+/* BCD driver bridge */
#define ATOMISP_IOC_CAMERA_BRIDGE \
_IOWR('v', BASE_VIDIOC_PRIVATE + 19, struct atomisp_bc_video_package)
#define ATOMISP_IOC_S_EXPOSURE \
_IOW('v', BASE_VIDIOC_PRIVATE + 21, struct atomisp_exposure)
-/* white balance Correction */
+/* White balance correction */
#define ATOMISP_IOC_G_3A_CONFIG \
_IOR('v', BASE_VIDIOC_PRIVATE + 23, struct atomisp_3a_config)
#define ATOMISP_IOC_S_3A_CONFIG \
#define ATOMISP_IOC_S_ISP_SHD_TAB \
_IOWR('v', BASE_VIDIOC_PRIVATE + 27, struct atomisp_shading_table)
-/* Gamma Correction */
+/* Gamma correction */
#define ATOMISP_IOC_G_ISP_GAMMA_CORRECTION \
_IOR('v', BASE_VIDIOC_PRIVATE + 28, struct atomisp_gc_config)
#define ATOMISP_IOC_S_ARRAY_RESOLUTION \
_IOW('v', BASE_VIDIOC_PRIVATE + 45, struct atomisp_resolution)
-/* for depth mode sensor frame sync compensation */
+/* For depth mode sensor frame sync compensation */
#define ATOMISP_IOC_G_DEPTH_SYNC_COMP \
_IOR('v', BASE_VIDIOC_PRIVATE + 46, unsigned int)
* _IOW('v', BASE_VIDIOC_PRIVATE + 56, struct atomisp_sensor_regs)
*/
-/* ISP Private control IDs */
+/* ISP Private control IDs */
#define V4L2_CID_ATOMISP_BAD_PIXEL_DETECTION \
(V4L2_CID_PRIVATE_BASE + 0)
#define V4L2_CID_ATOMISP_POSTPROCESS_GDC_CAC \
#define V4L2_CID_ATOMISP_LOW_LIGHT \
(V4L2_CID_PRIVATE_BASE + 5)
-/* Camera class:
- * Exposure, Flash and privacy (indicator) light controls, to be upstreamed */
+/*
+ * Camera class:
+ * Exposure, Flash and privacy (indicator) light controls, to be upstreamed
+ */
#define V4L2_CID_CAMERA_LASTP1 (V4L2_CID_CAMERA_CLASS_BASE + 1024)
#define V4L2_CID_RUN_MODE (V4L2_CID_CAMERA_LASTP1 + 20)
#define V4L2_EVENT_ATOMISP_ACC_COMPLETE (V4L2_EVENT_PRIVATE_START + 4)
#define V4L2_EVENT_ATOMISP_PAUSE_BUFFER (V4L2_EVENT_PRIVATE_START + 5)
#define V4L2_EVENT_ATOMISP_CSS_RESET (V4L2_EVENT_PRIVATE_START + 6)
-/* Nonstandard color effects for V4L2_CID_COLORFX */
+/* Non-standard color effects for V4L2_CID_COLORFX */
enum {
V4L2_COLORFX_SKIN_WHITEN_LOW = 1001,
V4L2_COLORFX_SKIN_WHITEN_HIGH = 1002,