panthor_heap_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– panthor_heap_create(9) β€” Create a heap context πŸ’–

okay so bestie, welcome to the Kernel API Manual, section 9 ✨ this one's all about panthor_heap_create β€” the little function that spins up a brand-new heap context from a pool you already have lying around. it's giving "let me birth a heap for u" energy, and honestly? iconic. πŸŽ€


🌸 SYNOPSIS 🌸

int panthor_heap_create (struct panthor_heap_pool *pool , u32
initial_chunk_count , u32 chunk_size , u32 max_chunks , u32
target_in_flight , u64 *heap_ctx_gpu_va , u64 *first_chunk_gpu_va );

like, yes, that's a lot of arguments. breathe. we'll get through them together, i promise 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pool β€” the pool you're instantiating this heap context from. your source of heap-y goodness, your main character origin story πŸ’…
  • initial_chunk_count β€” how many chunks get allocated at initialization time. and bestie, it must be at least 1. not zero. not negative. one or more. the math is mathing πŸ”₯
  • chunk_size β€” the size of each chunk. two very important vibe checks here: it must be page-aligned, and it has to lie in the [128k:8M] range. don't try to sneak outside that window, it's not gonna slay 😭
  • max_chunks β€” the maximum number of chunks that can be allocated. the ceiling. the limit. the "know your bounds" moment πŸ‘‘
  • target_in_flight β€” the maximum number of in-flight render passes. that's the target, and yes, "in-flight" is the exact terminology, iykyk ✨
  • heap_ctx_gpu_va β€” a pointer that holds the GPU address of the allocated heap context. so like, it's a pointer to a place that holds the address. very pointer-inception, very πŸŒ€
  • first_chunk_gpu_va β€” a pointer holding the GPU address of the first chunk assigned to the heap context. the first one!! the opener!! the main character chunk πŸ₯‡

🌈 RETURN 🌈

  • a positive handle on success β€” slay, it worked πŸ’–
  • a negative error otherwise β€” sad girl hours, something went wrong 😭

⭐ SEE ALSO ⭐

go read these next, bestie, they're all in the kernel file ./drivers/gpu/drm/panthor/panthor_heap.c fr fr:

like, that's the whole friend group right there 🫢✨


quick reminder: initial_chunk_count must be at least 1, and chunk_size must be page-aligned and inside [128k:8M]. break those rules and it's not giving success, it's giving negative error πŸ’€

and that's the page, bestie!! brought to you by ./drivers/gpu/drm/panthor, dated October 2026 β€” the panthor_heap_create(9) era, and we ate πŸ’…πŸŽ€βœ¨

πŸ“¦ where this page comes from