ttm_buffer_object_transfer(9)
π NAME π
ttm_buffer_object_transfer β and bestie, the OG page literally leaves it at that. No little tagline, no "this does X" summary, nothing. Just the name sitting there with main character energy and zero explanation. We respect it. π«Ά
Oh and hey, real quick before we dive in β you're reading the Kernel API Manual page for ttm_buffer_object_transfer(9), so like... kernel API business, not your regular userland stuff. Iykyk. β¨
β¨ SYNOPSIS β¨
int ttm_buffer_object_transfer (struct ttm_buffer_object *bo , struct
ttm_buffer_object **new_obj );
π ARGUMENTS π
boβ a pointer to astruct ttm_buffer_object. That's the one you're transferring from, the original, the source of truth, the moment before the glow-up. πnew_objβ a pointer to a pointer to a newly createdttm_buffer_object. Yes, double pointer, that's not a typo, bestie, that's how it hands you back the fresh object. This new one holds the data ofbowith the old placement. π¦
πΈ DESCRIPTION πΈ
Okay so here's the vibe. This is a utility function, and you may call it after an accelerated move has been scheduled. Like, the move is already in motion, the driver is out here doing its thing, and now you need a lil placeholder to hold onto the old stuff while it's being copied.
So a new buffer object gets created as a placeholder for the old data while it's being copied. That's its whole job. It sits there, it holds the old data, it's doing background-character-with-a-purpose energy. π§
Then, when that buffer object is idle β and only then, like let it rest β it can be destroyed, which releases the space of the old placement. Slay. Clean up after yourself. π
β RETURN β
!0β Failure. That's it, that's the listed return value. No big triumphant success number documented, just... if it's not zero, something went wrong. π
π₯ SEE ALSO π₯
Okay this is the part where the page just goes feral and lists literally everyone. The kernel file in question is ./drivers/gpu/drm/ttm/ttm_bo_util.c, and the whole squad is:
ttm_move_memcpy(9)ttm_bo_move_memcpy(9)ttm_io_prot(9)ttm_bo_kmap_try_from_panic(9)ttm_bo_kmap(9)ttm_bo_kunmap(9)ttm_bo_vmap(9)ttm_bo_vunmap(9)ttm_bo_move_accel_cleanup(9)ttm_bo_move_sync_cleanup(9)ttm_bo_pipeline_gutting(9)ttm_lru_walk_for_evict(9)ttm_bo_lru_cursor_fini(9)ttm_bo_lru_cursor_init(9)ttm_bo_lru_cursor_next(9)ttm_bo_lru_cursor_first(9)ttm_bo_shrink(9)ttm_bo_shrink_suitable(9)ttm_bo_shrink_avoid_wait(9)
Like, the whole friend group showed up to the function. Obsessed. π
Heads up bestie: this page is from the ./drivers/gpu/drm/ttm corner of the kernel tree β the TTM neighbourhood β so that's where you go looking if you wanna read the actual code. π
And that's the whole page, periodt. Shoutout to the Kernel API Manual, source living over at ./drivers/gpu/drm/ttm, dated October 2026, page ttm_buffer_object_transfer(9) β mwah, no notes. πππ
π¦ 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