amdgpu_dma_buf_map(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_dma_buf_map(9) β€” your fave kernel API manual, bestie

okay so this whole page lives in the Kernel API Manual, and the star of the show is amdgpu_dma_buf_map β€” literally the &dma_buf_ops.map_dma_buf implementation. no cap, that's the whole vibe. πŸ¦‹


✨ NAME ✨

amdgpu_dma_buf_map β€” bestie, this is the &dma_buf_ops.map_dma_buf implementation, that's it, that's the name πŸŽ€


🌸 SYNOPSIS 🌸

struct sg_table * amdgpu_dma_buf_map (struct dma_buf_attachment *attach
, enum dma_data_direction dir );

like, look at her. iconic signature. πŸ‘‘


🧚 ARGUMENTS 🧚

  • attach β€” the DMA-buf attachment πŸ’– like, the whole connection, the situationship between the buffer and the device.
  • dir β€” the DMA direction 🌈 which way the data's flowing, iykyk.

πŸ’œ DESCRIPTION πŸ’œ

so what does she do? she makes absolutely sure the shared DMA buffer can be accessed by the target device. that's the job. that's the assignment and she ate. πŸ”₯

for now? she simply pins it to the GTT domain β€” and that's the whole move, because that's where it should be accessible by all DMA devices. lowkey elegant, highkey necessary. πŸ’…


⭐ RETURN ⭐

on a good day you get an sg_table filled with the DMA addresses to use ✨

and on a bad day? ERR_PRT with a negative error code πŸ˜­πŸ™ˆ β€” that's the error vibe check failing, fr fr.


🫢 SEE ALSO 🫢

bestie, the whole friend group is here, like a group chat that never sleeps:


ok that's the whole page, go read the source bestie, mwah πŸ“

and finally, the cute little sign-off: this lil masterpiece comes from ./drivers/gpu/drm/amd/amdgpu, dated October 2026, and it's amdgpu_dma_buf_map(9) β€” periodt. πŸ’–πŸŽ€

πŸ“¦ where this page comes from