UNION MALI_C55_PARAMS_BLOCK(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so this page is all about union mali_c55_params_block β€” literally the generalisation of a parameter block, bestie. that's the whole vibe. one union to rule them all ✨


✨ SYNOPSIS ✨

union mali_c55_params_block {
    const struct v4l2_isp_params_block_header *header;
    const struct mali_c55_params_sensor_off_preshading *sensor_offs;
    const struct mali_c55_params_aexp_hist *aexp_hist;
    const struct mali_c55_params_aexp_weights *aexp_weights;
    const struct mali_c55_params_digital_gain *digital_gain;
    const struct mali_c55_params_awb_gains *awb_gains;
    const struct mali_c55_params_awb_config *awb_config;
    const struct mali_c55_params_mesh_shading_config *shading_config;
    const struct mali_c55_params_mesh_shading_selection
*shading_selection;
    const struct mali_c55_params_ccm *ccm;
    const struct mali_c55_params_gamma *gamma;
    const __u8 *data;
 };

🌸 Members 🌸

  • header β€” pointer to the shared header struct that's embedded as the first member of every single one of the possible other members (except data, she's different πŸ’…). this is the one you hit first, bestie β€” you check the type field and that tells you which of the other members you're actually allowed to touch πŸ‘‘
  • sensor_offs β€” for header->type == MALI_C55_PARAM_BLOCK_SENSOR_OFFS πŸŽ€
  • aexp_hist β€” for header->type == MALI_C55_PARAM_BLOCK_AEXP_HIST and header->type == MALI_C55_PARAM_BLOCK_AEXP_IHIST πŸ“Š
  • aexp_weights β€” for header->type == MALI_C55_PARAM_BLOCK_AEXP_HIST_WEIGHTS and header->type = MALI_C55_PARAM_BLOCK_AEXP_IHIST_WEIGHTS (yeah that's a single = and a double space in the source, no cap, we don't edit the source here 🫢)
  • digital_gain β€” for header->type == MALI_C55_PARAM_BLOCK_DIGITAL_GAIN πŸ”₯
  • awb_gains β€” for header->type == MALI_C55_PARAM_BLOCK_AWB_GAINS and header->type = MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP 🌈
  • awb_config β€” for header->type == MALI_C55_PARAM_BLOCK_AWB_CONFIG ⭐
  • shading_config β€” for header->type == MALI_C55_PARAM_MESH_SHADING_CONFIG πŸ¦‹
  • shading_selection β€” for header->type == MALI_C55_PARAM_MESH_SHADING_SELECTION 🧚
  • ccm β€” for header->type == MALI_C55_PARAM_BLOCK_CCM πŸ’œ
  • gamma β€” for header->type == MALI_C55_PARAM_BLOCK_GAMMA_FR and header->type = MALI_C55_PARAM_BLOCK_GAMMA_DS 🌸
  • data β€” the chill one at the end, letting you initialise a union variable with a pointer into a __u8 array, easy peasy πŸ“

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: this union is how the driver gets to treat a block as a generic pointer to the union and safely reach the header and the block-specific struct without ever having to resort to casting 😭 no casting era, we love to see it.

here's the flow, bestie: the header member gets accessed first, and then the type field gets checked, and that is what lets the driver figure out which of the other members is the one to actually use. main character behaviour tbh πŸ‘‘

and then the data member at the very end is there so a pointer to an address within the data member of mali_c55_params_buffer (that's a :c:type: reference, iykyk) can initialise a union variable. it's giving convenience, it's giving slay ✨


πŸŽ€ SEE ALSO πŸŽ€

  • Kernel file ./drivers/media/platform/arm/mali-c55/mali-c55-params.c β€” go read it, it ate πŸ”₯

lowkey the footer is truncated in the original (./drivers/media/platform/arm/m...), and the date on it is October 2026, so like… manifesting that energy 🌈

and that's the whole page, bestie πŸ’– this was union mali_c55_params_block(9) from the Kernel API Manual, sourced from ./drivers/media/platform/arm/m..., dated October 2026 β€” periodt, go forth and check your type fields 🫢✨

πŸ“¦ where this page comes from