STRUCT TTM_OPERATION_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ttm_operation_ctx(9)

okay so bestie, welcome to the Kernel API Manual page for struct ttm_operation_ctx. it’s short, it’s useful, and it’s lowkey the little context gremlin behind TTM operations. πŸ’…βœ¨


🌸 NAME 🌸

struct ttm_operation_ctx β€”

that’s the whole name line: just the struct name and a dash. minimal, mysterious, iconic. πŸŽ€


✨ SYNOPSIS ✨

here’s the entire struct, character-for-character, no edits, no cap:

struct ttm_operation_ctx {
    bool interruptible;
    bool no_wait_gpu;
    bool gfp_retry_mayfail;
    bool allow_res_evict;
    struct dma_resv *resv;
    uint64_t bytes_moved;
};

πŸ‘‘ Members πŸ‘‘

every member, bestie β€” nothing skipped:

  • interruptible β€” sleep interruptible if sleeping. that’s it; interruptible sleep, periodt. πŸ¦‹
  • no_wait_gpu β€” return immediately if the GPU is busy. no waiting around, we bounce. πŸ’¨
  • gfp_retry_mayfail β€” when allocating pages, use __GFP_RETRY_MAYFAIL | __GFP_NOWARN. the reason? to avoid invoking the OOM killer when populating a buffer object, so the error can be forwarded for it to be dealt with. 😭πŸ”₯
  • allow_res_evict β€” allow eviction of reserved BOs. can be used when multiple BOs share the same reservation object resv. πŸ’…
  • resv β€” reservation object to be used together with allow_res_evict. they go together, iykyk. πŸŽ€
  • bytes_moved β€” statistics on how many bytes have been moved. literally the bytes-moved counter. ⭐

🌈 Description 🌈

this is the context for TTM operations like changing buffer placement or general memory allocation. it’s giving β€œI hold the operation context so you don’t have to.” ✨


πŸ”₯ SEE ALSO πŸ”₯

go read these too, bestie β€” the whole little TTM cinematic universe:


source/version: ./include/drm/ttm Β· date: October 2026 Β· manual page: struct ttm_operation_ctx(9) β€” bye bestie, go move some bytes! πŸ’–πŸ¦‹

πŸ“¦ where this page comes from