STRUCT MALI_C55_PARAMS_MESH_SHADING_CONFIG(9)
π NAME π
struct mali_c55_params_mesh_shading_config β bestie, this is the Mesh shading configuration struct, and yes we're covering it in the Kernel API Manual today. Buckle up π
β¨ SYNOPSIS β¨
Okay so here's the whole shape of her, no notes:
struct mali_c55_params_mesh_shading_config {
struct v4l2_isp_params_block_header header;
__u8 mesh_show;
__u8 mesh_scale;
__u8 mesh_page_r;
__u8 mesh_page_g;
__u8 mesh_page_b;
__u8 mesh_width;
__u8 mesh_height;
__u32 mesh[MALI_C55_NUM_MESH_SHADING_ELEMENTS];
};
πΈ MEMBERS πΈ
π«Ά the fields, one by one
headerβ the Mali-C55 parameters block header. Every block's little crown πmesh_showβ output the mesh data rather than image data. Like, she's showing you the math, not the photo. Respect tbh π§mesh_scaleβ set the precision and maximum gain range of mesh shading. The lore:0= 0-2x gain1= 0-4x gain2= 0-8x gain3= 0-16x gain4= 1-2x gain5= 1-3x gain6= 1-5x gain7= 1-9x gain
mesh_page_rβ mesh page select for red colour plane [0..2] π΄mesh_page_gβ mesh page select for green colour plane [0..2] π’mesh_page_bβ mesh page select for blue colour plane [0..2] π΅mesh_widthβ number of horizontal nodes minus 1 [15,31]. Yes, minus one, do not come for me πmesh_heightβ number of vertical nodes minus 1 [15,31]meshβ the mesh shading correction tables. The main character of this whole struct, honestly β
π¦ DESCRIPTION π¦
So the mesh shading correction module lets you program a separate table of either 16x16 or 32x32 node coefficients for 3 different light sources. The final correction coefficients that actually get applied are computed by blending the coefficients from two tables together. Blending! Two tables! It's giving collaboration π
A page of 1024 32-bit integers is associated to each colour channel, and the pages are stored consecutively in memory. Each 32-bit integer packs 3 8-bit correction coefficients for a single node, one for each of the three light sources. The 8 most significant bits are unused (they're just vibing, bless). Here's the layout, laid out all cute β¨
π Page (Colour Plane) 0
mesh[0]β mesh point 0,0 β bit 16,23 = LS2, bits 08-15 = LS1, bits 00-07 = LS0mesh[1]β mesh point 0,1 β bit 16,23 = LS2, bits 08-15 = LS1, bits 00-07 = LS0...β...β...mesh[1023]β mesh point 31,31 β bit 16,23 = LS2, bits 08-15 = LS1, bits 00-07 = LS0
π Page (Colour Plane) 1
mesh[1024]β mesh point 0,0 β bit 16,23 = LS2, bits 08-15 = LS1, bits 00-07 = LS0mesh[1025]β mesh point 0,1 β bit 16,23 = LS2, bits 08-15 = LS1, bits 00-07 = LS0...β...β...mesh[2047]β mesh point 31,31 β bit 16,23 = LS2, bits 08-15 = LS1, bits 00-07 = LS0
π Page (Colour Plane) 2
mesh[2048]β mesh point 0,0 β bit 16,23 = LS2, bits 08-15 = LS1, bits 00-07 = LS0mesh[2049]β mesh point 0,1 β bit 16,23 = LS2, bits 08-15 = LS1, bits 00-07 = LS0...β...β...mesh[3071]β mesh point 31,31 β bit 16,23 = LS2, bits 08-15 = LS1, bits 00-07 = LS0
The mesh_scale member determines the precision and the minimum and maximum gain. Example time, because examples ate π
β if mesh_scale is 0 and therefore selects 0 - 2x gain, then a value of 0 in a coefficient means 0.0 gain, a value of 128 means 1.0 gain, and 255 means 2.0 gain. Slay.
π¨ okay important one bestie:header.typeshould be set toMALI_C55_PARAM_MESH_SHADING_CONFIGfrommali_c55_param_block_typefor this block. Don't forget it, it's literally the vibe check for the whole block π
π SEE ALSO π
Kernel file ./include/uapi/linux/media/arm/mali-c55-config.h plus the whole friend group π«Ά
struct mali_c55_ae_1024bin_hist(9)struct mali_c55_ae_5bin_hist(9)struct mali_c55_awb_average_ratios(9)struct mali_c55_af_statistics(9)struct mali_c55_stats_buffer(9)enum mali_c55_param_block_type(9)struct mali_c55_params_sensor_off_preshading(9)enum mali_c55_aexp_hist_tap_points(9)enum mali_c55_aexp_skip_x(9)enum mali_c55_aexp_skip_y(9)enum mali_c55_aexp_row_column_offset(9)enum mali_c55_aexp_hist_plane_mode(9)struct mali_c55_params_aexp_hist(9)struct mali_c55_params_aexp_weights(9)struct mali_c55_params_digital_gain(9)enum mali_c55_awb_stats_mode(9)struct mali_c55_params_awb_gains(9)enum mali_c55_params_awb_tap_points(9)struct mali_c55_params_awb_config(9)struct mali_c55_params_mesh_shading_selection(9)struct mali_c55_params_ccm(9)struct mali_c55_params_gamma(9)MALI_C55_PARAMS_MAX_SIZE(9)
and that's the whole page bestie, go forth and shade those meshes β¨
Sign-off time π this one lives in ./include/uapi/linux/media/arm, it's dated October 2026, and the page answers to the name struct mali_...ading_config(9). Mwah, ily, bye π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms