host1x_bo_pin(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… host1x_bo_pin(9) β€” a Kernel API Manual moment

okay so bestie, welcome to host1x_bo_pin(9), straight out of the Kernel API Manual ✨ this one's short and sweet, no cap πŸŽ€


✨ NAME ✨

host1x_bo_pin β€” literally makes a DMA mapping for the buffer object, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

struct host1x_bo_mapping * host1x_bo_pin (struct device *dev , struct
host1x_bo *bo , enum dma_data_direction dir , struct host1x_bo_cache
*cache );

four args, one struct host1x_bo_mapping * coming back at you, periodt πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device you're DMA-mapping onto, like the destination of the whole operation 🫢
  • bo β€” the buffer object that's getting mapped, main character energy fr fr πŸ‘‘
  • dir β€” the DMA direction, that's an enum dma_data_direction situation
  • cache β€” the cache where the mapping gets stored… or NULL, your call bestie πŸ’œ

πŸ”₯ DESCRIPTION πŸ”₯

So what it does: it creates a DMA mapping pointing to bo for dev ✨ and the refcount of bo gets incremented β€” and it stays bumped until host1x_bo_unpin is called. no early exits, that's the deal 😀

and if you pass a cache? the mapping is also stored in the cache, and it is not released until bo is freed (aka refcount drops to zero) πŸŒ€ that's the whole reason it slaps: when a buffer is pinned and unpinned over and over, like in the case of display use, it improves performance. literally the glow-up βœ¨πŸ’€

ngl the caching part is the icon of this whole function β€” skip it and you're just doing the plain mapping. still valid, just less slay πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/host1x/bus.c and honestly the whole friend group 🫢:


okay that's the page!! 🧚 this one lives in ./drivers/gpu/host1x, dated October 2026, and it's filed under host1x_bo_pin(9) β€” go pin some buffers bestie, iykyk πŸ’–β­

πŸ“¦ where this page comes from