[PATCH v1 06/10] media: platform: mediatek: add isp_7x utility
CK Hu (胡俊光)
ck.hu at mediatek.com
Mon Oct 21 22:30:49 PDT 2024
Hi, Shu-hsiang:
On Wed, 2024-10-09 at 19:15 +0800, Shu-hsiang Yang wrote:
> Introduces utility files for the MediaTek ISP7.x camsys driver. These
> utilities provide essential platform definitions, debugging tools, and
> management functions to support ISP operations and SCP communication.
> Key functionalities include:
> 1.Hardware pipeline and register definitions for managing image
> processing modules.
> 2.DMA debugging utilities and buffer management functions.
> 3.Definitions of supported image formats for proper data handling.
> 4.IPI and SCP communication structures for module state management and
> configuring ISP.
> 5.Metadata parameters for configuring image processing.
>
> Signed-off-by: Shu-hsiang Yang <Shu-hsiang.Yang at mediatek.com>
> ---
[snip]
> +/*
> + * A U T O W H I T E B A L A N C E
> + */
> +
> +/* Maximum blocks that MediaTek AWB supports */
> +#define MTK_CAM_UAPI_AWB_MAX_LIGHT_AREA_NUM (10)
> +
> +/*
> + * struct mtk_cam_uapi_awb_param - parameters for AWB configurtion
> + *
> + * @stat_en: AWB stat enable
> + * @windownum_x: Number of horizontal AWB windows
> + * @windownum_y: Number of vertical AWB windows
> + * @lowthreshold_r: Low threshold of R
> + * @lowthreshold_g: Low threshold of G
> + * @lowthreshold_b: Low threshold of B
> + * @highthreshold_r: High threshold of R
> + * @highthreshold_g: High threshold of G
> + * @highthreshold_b: High threshold of B
> + * @lightsrc_lowthreshold_r: Low threshold of R for light source estimation
> + * @lightsrc_lowthreshold_g: Low threshold of G for light source estimation
> + * @lightsrc_lowthreshold_b: Low threshold of B for light source estimation
> + * @lightsrc_highthreshold_r: High threshold of R for light source estimation
> + * @lightsrc_highthreshold_g: High threshold of G for light source estimation
> + * @lightsrc_highthreshold_b: High threshold of B for light source estimation
> + * @pregainlimit_r: Maximum limit clipping for R color
> + * @pregainlimit_g: Maximum limit clipping for G color
> + * @pregainlimit_b: Maximum limit clipping for B color
> + * @pregain_r: unit module compensation gain for R color
> + * @pregain_g: unit module compensation gain for G color
> + * @pregain_b: unit module compensation gain for B color
> + * @valid_datawidth: valid bits of statistic data
> + * @hdr_support_en: support HDR mode
> + * @stat_mode: Output format select <1>sum mode <0>average mode
> + * @error_ratio: Programmable error pixel count by AWB window size
> + * (base : 256)
> + * @awbxv_win_r: light area of right bound, the size is defined in
> + * MTK_CAM_UAPI_AWB_MAX_LIGHT_AREA_NUM
> + * @awbxv_win_l: light area of left bound the size is defined in
> + * MTK_CAM_UAPI_AWB_MAX_LIGHT_AREA_NUM
> + * @awbxv_win_d: light area of lower bound the size is defined in
> + * MTK_CAM_UAPI_AWB_MAX_LIGHT_AREA_NUM
> + * @awbxv_win_u: light area of upper bound the size is defined in
> + * MTK_CAM_UAPI_AWB_MAX_LIGHT_AREA_NUM
> + * @pregain2_r: white balance gain of R color
> + * @pregain2_g: white balance gain of G color
> + * @pregain2_b: white balance gain of B color
> + */
> +struct mtk_cam_uapi_awb_param {
> + u32 stat_en;
> + u32 windownum_x;
windownum_x is useless, so drop it.
Regards,
CK
> + u32 windownum_y;
> + u32 lowthreshold_r;
> + u32 lowthreshold_g;
> + u32 lowthreshold_b;
> + u32 highthreshold_r;
> + u32 highthreshold_g;
> + u32 highthreshold_b;
> + u32 lightsrc_lowthreshold_r;
> + u32 lightsrc_lowthreshold_g;
> + u32 lightsrc_lowthreshold_b;
> + u32 lightsrc_highthreshold_r;
> + u32 lightsrc_highthreshold_g;
> + u32 lightsrc_highthreshold_b;
> + u32 pregainlimit_r;
> + u32 pregainlimit_g;
> + u32 pregainlimit_b;
> + u32 pregain_r;
> + u32 pregain_g;
> + u32 pregain_b;
> + u32 valid_datawidth;
> + u32 hdr_support_en;
> + u32 stat_mode;
> + u32 format_shift;
> + u32 error_ratio;
> + u32 postgain_r;
> + u32 postgain_g;
> + u32 postgain_b;
> + u32 postgain2_hi_r;
> + u32 postgain2_hi_g;
> + u32 postgain2_hi_b;
> + u32 postgain2_med_r;
> + u32 postgain2_med_g;
> + u32 postgain2_med_b;
> + u32 postgain2_low_r;
> + u32 postgain2_low_g;
> + u32 postgain2_low_b;
> + s32 awbxv_win_r[MTK_CAM_UAPI_AWB_MAX_LIGHT_AREA_NUM];
> + s32 awbxv_win_l[MTK_CAM_UAPI_AWB_MAX_LIGHT_AREA_NUM];
> + s32 awbxv_win_d[MTK_CAM_UAPI_AWB_MAX_LIGHT_AREA_NUM];
> + s32 awbxv_win_u[MTK_CAM_UAPI_AWB_MAX_LIGHT_AREA_NUM];
> + u32 csc_ccm[9];
> + u32 acc;
> + u32 med_region[4];
> + u32 low_region[4];
> + u32 pregain2_r;
> + u32 pregain2_g;
> + u32 pregain2_b;
> +} __packed;
> +
More information about the Linux-mediatek
mailing list