Re: [PATCH v3 4/8] media: uapi: Add NXP NEOISP user interface header file
From: Frank Li
Date: Fri Jun 12 2026 - 14:32:20 EST
On Fri, Jun 12, 2026 at 03:20:35PM +0200, Antoine Bouyer wrote:
>
> Add user space api header file for meta data structures definitions.
>
> This header describes `parameters` buffer for the ISP blocks control by
> userspace, and `statistics` buffer for userspace and IPA handling.
>
> Both buffers use the newly introduced generic `v4l2_isp_buffer`
> definition, which behaves the same as the generic `v4l2_isp_params_buffer`
> already used by other ISP devices (rkisp1, mali-c55).
>
> Signed-off-by: Antoine Bouyer <antoine.bouyer@xxxxxxx>
> ---
...
> + */
> +struct neoisp_hdr_decompress0_cfg_s {
> + __u16 knee_point1;
> + __u16 knee_point2;
> + __u16 knee_point3;
> + __u16 knee_point4;
Not sure why don't use __u16 knee_point[4] to make code clear and short?
> + __u16 knee_offset0;
> + __u16 knee_offset1;
> + __u16 knee_offset2;
> + __u16 knee_offset3;
> + __u16 knee_offset4;
...
> + */
> +struct neoisp_ir_compress_cfg_s {
> + __u8 ctrl_obpp;
do we need pad some data to align next __u32
> + __u32 knee_point1_kneepoint;
> + __u32 knee_point2_kneepoint;
> + __u32 knee_point3_kneepoint;
> + __u32 knee_point4_kneepoint;
> + __u32 knee_offset0_offset;
> + __u32 knee_offset1_offset;
> + __u32 knee_offset2_offset;
> + __u32 knee_offset3_offset;
> + __u32 knee_offset4_offset;
> + __u16 knee_ratio01_ratio0;
> + __u16 knee_ratio01_ratio1;
> + __u16 knee_ratio23_ratio2;
> + __u16 knee_ratio23_ratio3;
> + __u16 knee_ratio4_ratio4;
> + __u16 knee_npoint0_kneepoint;
> + __u16 knee_npoint1_kneepoint;
> + __u16 knee_npoint2_kneepoint;
> + __u16 knee_npoint3_kneepoint;
> + __u16 knee_npoint4_kneepoint;
> +};
> +
...
> +struct neoisp_bnr_cfg_s {
> + __u8 ctrl_debug;
> + __u8 ctrl_obpp;
> + __u8 ctrl_nhood;
> + __u8 ypeak_peak_outsel;
> + __u8 ypeak_peak_sel;
> + __u16 ypeak_peak_low;
> + __u16 ypeak_peak_high;
> + __u32 yedge_th0_edge_th0;
> + __u16 yedge_scale_scale;
> + __u8 yedge_scale_shift;
> + __u32 yedges_th0_edge_th0;
> + __u16 yedges_scale_scale;
> + __u8 yedges_scale_shift;
> + __u32 yedgea_th0_edge_th0;
> + __u16 yedgea_scale_scale;
> + __u8 yedgea_scale_shift;
> + __u32 yluma_x_th0_th;
> + __u16 yluma_y_th_luma_y_th0;
> + __u16 yluma_y_th_luma_y_th1;
> + __u16 yluma_scale_scale;
> + __u8 yluma_scale_shift;
> + __u16 yalpha_gain_gain;
> + __u16 yalpha_gain_offset;
> + __u8 cpeak_peak_outsel;
> + __u8 cpeak_peak_sel;
> + __u16 cpeak_peak_low;
> + __u16 cpeak_peak_high;
> + __u32 cedge_th0_edge_th0;
> + __u16 cedge_scale_scale;
> + __u8 cedge_scale_shift;
> + __u32 cedges_th0_edge_th0;
> + __u16 cedges_scale_scale;
> + __u8 cedges_scale_shift;
> + __u32 cedgea_th0_edge_th0;
> + __u16 cedgea_scale_scale;
> + __u8 cedgea_scale_shift;
> + __u32 cluma_x_th0_th;
> + __u16 cluma_y_th_luma_y_th0;
> + __u16 cluma_y_th_luma_y_th1;
> + __u16 cluma_scale_scale;
> + __u8 cluma_scale_shift;
> + __u16 calpha_gain_gain;
> + __u16 calpha_gain_offset;
> + __u16 stretch_gain;
> +};
Does have data alginment problem if use difference compiler? User APP
may difference compiler and compiler options.