udma_get_tr_counters(9)
π udma_get_tr_counters(9) β calculate TR counters for a given length
okay so this page is from the Kernel API Manual, section 9, bestie. today's main character is udma_get_tr_counters, and it is literally here to calculate TR counters for a given length. it's giving βlet me do the math so you don't have toβ energy fr fr. π¦
πΈ NAME πΈ
udma_get_tr_counters β calculate TR counters for a given length. periodt. π
β¨ SYNOPSIS β¨
int udma_get_tr_counters (size_t len , unsigned long align_to , u16
*tr0_cnt0 , u16 *tr0_cnt1 , u16 *tr1_cnt0 );
π ARGUMENTS π
lenβ Length of the trasnfer. yes, that spelling is in the page, not me, iykyk πalign_toβ Preferred alignment. the alignment you want it to vibe with.tr0_cnt0β First TRicnt0. first TR counter slot, iconic.tr0_cnt1β First TRicnt1. second counter for the first TR.tr1_cnt0β Second (if used) TRicnt0. only relevant when the second TR actually gets used.
π DESCRIPTION π
For len < SZ_64K only one TR is enough, and tr1_cnt0 is not updated. that's the lowkey simple case π
For len >= SZ_64K two TRs are used in a simple way:
- First TR:
SZ_64K-alignment blocks (tr0_cnt0,tr0_cnt1) - Second TR: the remaining length (
tr1_cnt0)
Returns the number of TRs the length needs (1 or 2). If the length can not be supported, it returns -EINVAL. no cap, that's the whole vibe check π₯
π SEE ALSO π
Kernel file ./drivers/dma/ti/k3-udma.c β and also __udma_alloc_gp_rflow_range(9). go read those if you're obsessed like me π«Ά
mwah π β source/version: ./drivers/dma/ti; date: October 2026. periodt, bestie. slay β¨
π¦ 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