STRUCT THC_DMA_CONFIGURATION(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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