ttm_bo_move_memcpy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ttm_bo_move_memcpy(9) ✨

okay so this is a page from the Kernel API Manual, bestie β€” it's ttm_bo_move_memcpy and it lives in section 9 πŸŽ€


🌸 NAME 🌸

ttm_bo_move_memcpy β€” and honestly? that's it. that's the whole name section. the original literally just has a lil dash there with no description, so i'm not gonna make one up for you πŸ’… (the vibes are "mysterious", the facts are "empty", and we respect that)


πŸ¦‹ SYNOPSIS πŸ¦‹

int ttm_bo_move_memcpy (struct ttm_buffer_object *bo , struct
       ttm_operation_ctx *ctx , struct ttm_resource *dst_mem );

so it's an int-returning function, three args, and yes the spacing in the prototype is exactly that, don't @ me, i'm copying it verbatim because that's the whole point 🫢


πŸ’– ARGUMENTS πŸ’–

  • bo β€” a pointer to a struct ttm_buffer_object. that's the buffer object we're talking about, she's the main character of this operation πŸ‘‘
  • ctx β€” the operation context ✨
  • dst_mem β€” a struct ttm_resource that tells you where we're moving to. the destination. the final destination (no cap) 🎯

πŸ”₯ DESCRIPTION πŸ”₯

okay so picture this: this is the fallback move function for a mappable buffer object in mappable memory. like when nobody fancy is available, this is the one who shows up and gets it done πŸ’ͺ

here's the tea on what happens when it works:

  • it frees any old aperture space (bye old space πŸ‘‹)
  • it sets (new_mem)->mm_node to NULL
  • it updates the (bo)->mem placement flags ✨

and here's the tea on what happens when it doesn't work, and this part matters so listen up:

if it's unsuccessful, the old data remains untouched β€” nothing lost, she's fine β€” and it's up to the caller to free the memory space indicated by new_mem. yes, that's your job now. the function is not doing it for you. i don't make the rules 🫠

⭐ RETURN ⭐

  • !0: Failure. (that's "not zero means failure" β€” zero means you're slaying, anything else means nope 😭)

🧚 SEE ALSO 🧚

the kernel file lives at ./drivers/gpu/drm/ttm/ttm_bo_util.c and here's the full bestie list, no skips, no cuts, periodt:

go read some of those, iykyk 🌈


πŸŽ€ sign-off πŸŽ€

this page came from the ./drivers/gpu/drm/ttm corner of the kernel, and it's dated October 2026 ⭐ that's the source, the version vibe, and the date all wrapped up in one cute lil bow. mwah πŸ’‹ go move some memory, bestie πŸ’œ

πŸ“¦ where this page comes from