ttm_prime_fd_to_handle(9)
π ttm_prime_fd_to_handle β the Kernel API Manual, bestie edition
okay so you're looking at ttm_prime_fd_to_handle(9) and honestly? it's giving "small function, big job." let's get into it π«Ά
β¨ NAME β¨
ttm_prime_fd_to_handle β get a base object handle from a prime fd. that's the whole vibe. no cap. π
πΈ SYNOPSIS πΈ
int ttm_prime_fd_to_handle (struct ttm_object_file *tfile , int fd , u32 *handle );
yes the spacing is like that, we don't touch it, it's iconic π
π¦ ARGUMENTS π¦
tfileβ astruct ttm_object_filethat identifies the caller. it's basically the "who dis" of the operation πfdβ the prime / dmabuf fd. the file descriptor in question, the main character of this whole thing πhandleβ the returned handle. this is what you get back, it's the prize at the end of the quest π
π DESCRIPTION π
so what this function actually does: it returns a handle to an object that previously exported a dma-buf. that's it, that's the whole deal. lowkey simple, highkey useful β¨
β οΈ and here's the important bit, bestie, listen up: we don't handle imports yet, because we simply have no consumers of that implementation. fr fr, nobody's using it, so it's not built. don't come for us π
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpu/drm/vmwgfx/ttm_object.cβ the source file where all this lives π struct ttm_object_file(9)get_dma_buf_unless_doomed(9)β yes that's the real name, and yes it ate πttm_prime_refcount_release(9)ttm_prime_dmabuf_release(9)ttm_prime_handle_to_fd(9)ttm_prime_object_init(9)
π the cute sign-off π
this whole page is brought to you by ./drivers/gpu/drm/vmwgfx, dated October 2026, and the manual name is ttm_prime_fd_to_handle(9) in case you forgot already π that's it, periodt, go read some kernel source ππ
π¦ 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