dma_filter_fn(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dma_filter_fn(9) β€” like, the callback filter for dma_request_channel, bestie

okay so this is dma_filter_fn(9) straight out of the Kernel API Manual, and honestly? it's giving tiny-but-mighty. one little callback, one huge job: deciding which DMA channel is the one. let's get into it πŸŽ€


✨ NAME ✨

dma_filter_fn β€” callback filter for dma_request_channel. that's it, that's the whole vibe. it's the bouncer at the channel club. πŸ’…


✨ SYNOPSIS ✨

bool dma_filter_fn (struct dma_chan *chan , void *filter_param );

like, yes, it returns a bool and yes, that's lowkey the whole point. ✨


✨ ARGUMENTS ✨

  • chan β€” the channel to be reviewed πŸ•΅οΈβ€β™€οΈ like, this is the candidate, the one under the microscope, the main character of the moment.
  • filter_param β€” an opaque parameter passed through dma_request_channel. opaque means don't look at it funny, it's not your business, it just rides along. πŸ™ˆ

✨ DESCRIPTION ✨

so here's the tea β˜•: when this optional parameter is specified in a call to dma_request_channel, a suitable channel gets passed to this routine for further dispositioning before being returned. yes β€” further dispositioning. iconic word. she's doing admin work before the channel ever reaches you 🫢

and what even is "suitable"? glad you asked, bestie. 'suitable' indicates a non-busy channel that satisfies the given capability mask. so: not busy, and it matches the mask. both. no cap. πŸ’―

it returns 'true' to indicate that the channel is suitable. that's the whole verdict β€” true means slay, come on in. πŸ‘‘

ngl, the vibes are immaculate but the contract is strict: return 'true' only when the channel is genuinely suitable, and remember this whole thing is optional. you only get called if you show up. πŸ¦‹

✨ SEE ALSO ✨

Kernel file ./include/linux/dmaengine.h, plus the whole extended friend group πŸ’–:


okay that's the page!! 🌸 quick lil sign-off so you have the receipts: this one lives in ./include/linux, it's dated October 2026, and it's part of the Kernel API Manual. go forth and filter those channels, bestie β€” iykyk πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from