amdgpu_dma_...n_cpu_access(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_dma_...n_cpu_access(9) β€” like, the Kernel API Manual era πŸŽ€

okay so bestie, welcome to the Kernel API Manual, and today's main character is amdgpu_dma_...n_cpu_access(9). yes the title is abbreviated with ellipsis, no that's not a typo, that's just how the man page do. let's get into it ✨


🌸 NAME 🌸

amdgpu_dma_buf_begin_cpu_access β€” literally the implementation of &dma_buf_ops.begin_cpu_access. that's it, that's the vibe. it's giving "I'm the callback behind the callback" energy πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int amdgpu_dma_buf_begin_cpu_access (struct dma_buf *dma_buf , enum
       dma_data_direction direction );

like, that's the whole signature. int in, int out, two args, slay. πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • dma_buf β€” a shared DMA buffer. the buffer in question. the shared one. you know the one 🫢
  • direction β€” the direction of the DMA transfer. which way is the data going, bestie? this tells you 🧭

✨ DESCRIPTION ✨

so this one gets called before CPU access to the shared DMA buffer's memory β€” like a little heads-up text before you show up πŸ’Œ

and here's the cute part: if it's a read access, the buffer gets moved to the GTT domain if possible, because that's for optimal CPU read performance πŸ‘‘ lowkey a glow-up for your read speeds, ngl.

note: it's if possible β€” the man page says so, so we say so. no cap.

🌈 RETURN 🌈

  • 0 on success πŸŽ‰
  • a negative error code on failure 😭

πŸŽ€ SEE ALSO πŸŽ€

kernel file: ./drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c

and the whole friend group, in order, because we don't skip anyone in this house:

like, the entire squad. obsessed. πŸ’œ


mwah πŸ’‹ that's the page! brought to you by the fine folks at ./drivers/gpu/drm/amd/amdgpu, stamped October 2026, and yeah we're still on amdgpu_dma_...n_cpu_access(9) β€” the ellipsis is forever iconic, periodt. πŸ“

πŸ“¦ where this page comes from