__imx274_change_compose(9)
π __imx274_change_compose β Kernel API Manual, but make it make sense
okay so bestie, you're in the kernel API manual and this page is literally about __imx274_change_compose(9) β the little helper function that changes binning and sets both the compose rect and the format. it's giving "glue code that carries the whole team" energy, honestly π«Ά
β¨ NAME β¨
__imx274_change_compose β helper function to change binning and set both compose and format.
like, that's the whole job description and she's slaying it π
π¦ SYNOPSIS π¦
int __imx274_change_compose (struct stimx274 *imx274 , struct
v4l2_subdev_state *sd_state , u32 which , u32 *width , u32 *height , u32
flags );
copy that exactly, no cap, don't retype it from memory π
π ARGUMENTS π
imx274β the device object. your main character πsd_stateβ the subdev state we are editing for TRY requests. she's the vibe-check state, iykyk β¨whichβ eitherV4L2_SUBDEV_FORMAT_ACTIVEorV4L2_SUBDEV_FORMAT_TRY, straight from the caller. you don't pick it, they pick it πwidthβ input-output parameter: set it to the desired width before the call, and after it returns successfully it contains the chosen value. so she reads and writes, she's versatile π₯heightβ input-output parameter for height (seewidthβ same situation, same drama, just vertical πΈ)flagsβ selection flags fromstruct v4l2_subdev_selection, or0if not available (that's the case when it's called fromset_fmt) π¦
π DESCRIPTION π
okay so here's the lore: we have two entry points that change binning β set_fmt and set_selection(COMPOSE). both of them have to compute the new output size and set it in both the compose rect and the frame format size. and like, we also need to do the same things after setting cropping to restore 1:1 binning. three situations, same homework π
this function contains the common code for these three cases, and that's exactly why she has so many arguments β she's accommodating the needs of all of them. multipurpose queen π
β οΈ Must be called with imx274->lock locked. bestie. please. lock the lock. this is not a drill, do not skip it π
β SEE ALSO β
- Kernel file
./drivers/media/i2c/imx274.c imx274_read_mbreg(9)imx274_write_mbreg(9)imx274_load_default(9)
go read those next, they're the supporting cast and they ate π
that's the whole page, bestie β sourced from ./drivers/media/i2c, dated October 2026, brought to you by the kernel API manual. mwah, study hard, lock your mutexes, and stan __imx274_change_compose π§ββοΈππ
π¦ 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