UNION MALI_C55_PARAMS_BLOCK(9)
π 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 (exceptdata, she's different π ). this is the one you hit first, bestie β you check thetypefield and that tells you which of the other members you're actually allowed to touch πsensor_offsβ forheader->type == MALI_C55_PARAM_BLOCK_SENSOR_OFFSπaexp_histβ forheader->type == MALI_C55_PARAM_BLOCK_AEXP_HISTandheader->type == MALI_C55_PARAM_BLOCK_AEXP_IHISTπaexp_weightsβ forheader->type == MALI_C55_PARAM_BLOCK_AEXP_HIST_WEIGHTSandheader->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β forheader->type == MALI_C55_PARAM_BLOCK_DIGITAL_GAINπ₯awb_gainsβ forheader->type == MALI_C55_PARAM_BLOCK_AWB_GAINSandheader->type = MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXPπawb_configβ forheader->type == MALI_C55_PARAM_BLOCK_AWB_CONFIGβshading_configβ forheader->type == MALI_C55_PARAM_MESH_SHADING_CONFIGπ¦shading_selectionβ forheader->type == MALI_C55_PARAM_MESH_SHADING_SELECTIONπ§ccmβ forheader->type == MALI_C55_PARAM_BLOCK_CCMπgammaβ forheader->type == MALI_C55_PARAM_BLOCK_GAMMA_FRandheader->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__u8array, 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
- 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