dma_filter_fn(9)
π
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 throughdma_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 π:
dma_cookie_t(9)enum dma_status(9)enum dma_transaction_type(9)enum dma_transfer_direction(9)struct data_chunk(9)struct dma_interleaved_template(9)struct dma_vec(9)enum dma_ctrl_flags(9)enum sum_check_bits(9)enum sum_check_flags(9)enum dma_desc_metadata_mode(9)struct dma_chan_percpu(9)struct dma_router(9)struct dma_chan(9)struct dma_chan_dev(9)enum dma_slave_buswidth(9)struct dma_slave_config(9)enum dma_residue_granularity(9)struct dma_slave_caps(9)struct dma_async_tx_descriptor(9)struct dma_tx_state(9)enum dmaengine_alignment(9)struct dma_slave_map(9)struct dma_filter(9)struct dma_device(9)dmaengine_prep_peripheral_dma_vec(9)dmaengine_prep_config_sg_safe(9)dmaengine_prep_config_single_safe(9)dmaengine_prep_dma_memset(9)dmaengine_terminate_all(9)dmaengine_terminate_async(9)dmaengine_synchronize(9)dmaengine_terminate_sync(9)dma_async_issue_pending(9)dma_async_is_tx_complete(9)dma_async_is_complete(9)
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
- 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