__imx274_change_compose(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __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 β€” either V4L2_SUBDEV_FORMAT_ACTIVE or V4L2_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 (see width β€” same situation, same drama, just vertical 🌸)
  • flags β€” selection flags from struct v4l2_subdev_selection, or 0 if not available (that's the case when it's called from set_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 ⭐

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