v4l2_subdev_..._passthrough(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… v4l2_subdev_get_frame_desc_passthrough β€” Kernel API Manual ✨

okay so bestie, welcome to the glow-up edition of the v4l2_subdev_get_frame_desc_passthrough(9) page πŸ’– this one lives in the Kernel API Manual, and it's genuinely the chillest little helper in the whole media subsystem. no cap.


🌸 NAME 🌸

v4l2_subdev_get_frame_desc_passthrough β€” literally the helper that implements the subdev get_frame_desc operation for you in the simple passthrough cases πŸŽ€ it's giving "I got you, bestie, you don't have to write this yourself."


✨ SYNOPSIS ✨

int v4l2_subdev_get_frame_desc_passthrough (struct v4l2_subdev *sd ,
       unsigned int pad , struct v4l2_mbus_frame_desc *fd );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • sd β€” the subdevice. the main character, honestly πŸ‘‘
  • pad β€” the source pad index. it's a source pad specifically, don't come for me πŸ™ˆ
  • fd β€” the mbus frame desc. the whole point of the function, fr fr

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the vibe check on what this function actually does 🫢

it locks the subdevice's active state, calls __v4l2_subdev_get_frame_desc_passthrough, and then unlocks the state. lock β†’ do the thing β†’ unlock, iconic behaviour, no notes πŸ’…

you can assign this function directly as the .get_frame_desc callback in v4l2_subdev_pad_ops β€” but only for subdevices that pass streams through without modification ✨ like, if your subdev is just vibing and forwarding stuff untouched, this is your girl. slay.

if you're a driver that needs to do additional work beyond that, though? then nope, this one's not for you β€” use __v4l2_subdev_get_frame_desc_passthrough inside your own custom .get_frame_desc implementation instead. two underscores, different energy, iykyk 🌈

ngl the distinction actually matters β€” the double-underscore version is the one you reach for when you're doing the locking yourself as part of a bigger custom implementation πŸ’œ

⭐ RETURN ⭐

0 on success, or a negative error code otherwise πŸ“ (so like, always check your return value, bestie, please 😭)


πŸŽ€ SEE ALSO πŸŽ€

the whole extended friend group πŸ’– first up, the kernel file ./include/media/v4l2-subdev.h struct, then literally all of these:


🧚 sign-off 🧚

that's the whole page, bestie, you ate πŸ’… this came out of ./include/media in October 2026 and it's part of the Kernel API Manual β€” go forth and pass those streams through unmodified, mwah πŸ«ΆπŸ’–

πŸ“¦ where this page comes from