STRUCT THC_DMA_CONFIGURATION(9)
π¦ struct thc_dma_configuration β THC DMA configure π
okay so this is a page straight outta the Kernel API Manual, and honestly? it's giving "one struct to rule the DMA config" and I'm obsessed. bestie, sit down, we're learning exactly what goes in a struct thc_dma_configuration and why every single field is there. no cap, no skipping, we're doing all of them.
β¨ NAME β¨
struct thc_dma_configuration β THC DMA configure π
πΈ SYNOPSIS πΈ
here's the whole shape of her, literally character for character, do not touch:
struct thc_dma_configuration {
enum thc_dma_channel dma_channel;
dma_addr_t prd_tbls_dma_handle;
enum dma_data_direction dir;
bool is_enabled;
struct thc_prd_table *prd_tbls;
struct scatterlist *sgls[PRD_TABLES_NUM];
u8 sgls_nent_pages[PRD_TABLES_NUM];
u8 sgls_nent[PRD_TABLES_NUM];
u8 prd_tbl_num;
size_t max_packet_size;
u32 prd_base_addr_high;
u32 prd_base_addr_low;
u32 prd_cntrl;
u32 dma_cntrl;
};
π Members π
these are the icons, one by one, in order, zero skips π«Ά
dma_channelβ the DMA channel for the current DMA configuration. like, which lane this config is living in π«prd_tbls_dma_handleβ the DMA buffer handle. that's it, that's the whole vibe β¨dirβ the direction of DMA for this config. which way the data is flowing, bestie π¦prd_tblsβ the PRD tables for the current DMA πsglsβ an array of pointers to scatter-gather lists. plural, array, pointers, all of it πsgls_nent_pagesβ the number of pages per scatter-gather list πsgls_nentβ the actual number of entries per scatter-gather list. actual! not the page count, the entry count, keep them straight πprd_tbl_numβ the actual number of PRD tables π’max_packet_sizeβ the size of the buffer needed for 1 DMA message, and that means 1 PRD table, okurrr πprd_base_addr_highβ the high 32 bits of the memory address where the PRD table is stored β¬οΈprd_base_addr_lowβ the low 32 bits of the memory address where the PRD table is stored β¬οΈprd_cntrlβ the PRD control register value ποΈdma_cntrlβ the DMA control register value ποΈ
lowkey note: is_enabled is chillin' in the struct up in the synopsis but the Members rundown doesn't cover her β she's still part of the struct, so keep her in your code, periodt π
π₯ SEE ALSO π₯
- Kernel file
./drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.h struct thc_dma_context(9)
that's the whole page, bestie, you ate that π stay hydrated, go read that header file, and remember: 32 bits high, 32 bits low, and a whole lotta vibe π
signed off with love from ./drivers/hid/intel-thc-hid/in..., dated October 2026, page struct thc_d...onfiguration(9) ππ
π¦ 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