ENUM DMA_CTRL_FLAGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enum dma_ctrl_flags(9) β€” Kernel API Manual

okay so bestie, buckle up: what we have here is enum dma_ctrl_flags(9), and it's genuinely the main character of the DMA world. These are the DMA flags you use to augment operation preparation, control completion, and communicate status. That's the whole vibe. Let's get into it ✨


🌸 NAME 🌸

enum dma_ctrl_flags β€” the flag squad for DMA operations. They do three jobs, no cap:

  • augment operation preparation πŸŽ€
  • control completion πŸ¦‹
  • communicate status πŸ’«

and here's the quick rundown of the whole crew:

  • @DMA_PREP_INTERRUPT β€” trigger an interrupt (callback) upon completion of this transaction πŸ”₯
  • @DMA_CTRL_ACK β€” if clear, the descriptor cannot be reused until the client acknowledges receipt, i.e. has a chance to establish any dependency chains πŸ‘‘
  • @DMA_PREP_PQ_DISABLE_P β€” prevent generation of P while generating Q πŸ™ˆ
  • @DMA_PREP_PQ_DISABLE_Q β€” prevent generation of Q while generating P πŸ™ˆ
  • @DMA_PREP_CONTINUE β€” indicate to a driver that it is reusing buffers as sources that were the result of a previous operation; in the case of a PQ operation it continues the calculation with new sources 🧚
  • @DMA_PREP_FENCE β€” tell the driver that subsequent operations depend on the result of this operation ⭐

✨ SYNOPSIS ✨

enum dma_ctrl_flags {
    DMA_PREP_INTERRUPT ,
    DMA_CTRL_ACK ,
    DMA_PREP_PQ_DISABLE_P ,
    DMA_PREP_PQ_DISABLE_Q ,
    DMA_PREP_CONTINUE ,
    DMA_PREP_FENCE ,
    DMA_CTRL_REUSE ,
    DMA_PREP_CMD ,
    DMA_PREP_REPEAT ,
    DMA_PREP_LOAD_EOT

};

ten constants, all accounted for, we love a complete lineup πŸ’…


πŸ¦‹ Constants πŸ¦‹

so here's the thing β€” some of these are literally marked -- undescribed -- in the docs. not me exposing the kernel's unfinished homework 😭 but fr fr, that's what's written, so that's what you get:

  • DMA_PREP_INTERRUPT β€” -- undescribed -- 🫢
  • DMA_CTRL_ACK β€” -- undescribed -- 🫢
  • DMA_PREP_PQ_DISABLE_P β€” -- undescribed -- 🫢
  • DMA_PREP_PQ_DISABLE_Q β€” -- undescribed -- 🫢
  • DMA_PREP_CONTINUE β€” -- undescribed -- 🫢
  • DMA_PREP_FENCE β€” -- undescribed -- 🫢

(the vibes for those six are up in NAME, if you're nosy β€” go look πŸ’–)

and now the icons who did get their descriptions written:

  • DMA_CTRL_REUSE β€” client can reuse the descriptor and submit again till cleared or freed ♻️
  • DMA_PREP_CMD β€” tell the driver that the data passed to DMA API is command data and the descriptor should be in different format from normal data descriptors. it's giving "special edition descriptor" πŸ’Œ
  • DMA_PREP_REPEAT β€” tell the driver that the transaction shall be automatically repeated when it ends until a transaction is issued on the same channel with the DMA_PREP_LOAD_EOT flag set. This flag is only applicable to interleaved transactions and is ignored for all other transaction types. πŸ” so it's interleaved-only, iykyk
  • DMA_PREP_LOAD_EOT β€” tell the driver that the transaction shall replace any active repeated (as indicated by DMA_PREP_REPEAT) transaction when the repeated transaction ends.
⚠️ okay this next part is important, bestie, don't scroll past it: Not setting this flag when the previously queued transaction is marked with DMA_PREP_REPEAT will cause the new transaction to never be processed and stay in the issued queue forever. forever. 😭 like a text left on read, but for descriptors. The flag is ignored if the previous transaction is not a repeated transaction.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/dmaengine.h, plus the whole extended universe of DMA friends:

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 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), dma_filter_fn(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)

like I said. extended universe. slay πŸ†


mwah, that's the whole page 🫢 This one came from ./include/linux, dated October 2026 β€” so go forth and flag responsibly, bestie. periodt. πŸ’œπŸŒΈ

πŸ“¦ where this page comes from