drm_pagemap_addr_encode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_pagemap_addr_encode(9) ✨

okay bestie, so this one is a kernel API manual page β€” literally from the Kernel API Manual, no cap πŸŽ€ β€” and it's about drm_pagemap_addr_encode. The way this function's whole personality is just taking a DMA address and stuffing some metadata in it πŸ¦‹. Iconic behavior, honestly.


🌸 NAME 🌸

drm_pagemap_addr_encode β€” bestie, it encodes a dma address with metadata. That's the gig. That's the whole thing. πŸ’…


✨ SYNOPSIS ✨

struct drm_pagemap_addr drm_pagemap_addr_encode (dma_addr_t addr , enum
drm_interconnect_protocol proto , unsigned int order , enum
dma_data_direction dir );

like, four arguments in, one struct out. She's a wrapper function and she knows it 🫢


πŸ’– ARGUMENTS πŸ’–

  • addr β€” the dma address, or honestly whatever driver-defined address you want if you're doing driver private interconnects (iykyk πŸ™ˆ). Your call, main character.
  • proto β€” the interconnect protocol. That's it, that's the whole description 😭 she's a simple girl.
  • order β€” the page order of the dma mapping. And because someone's gonna ask: the size is PAGE_SIZE << order. Math queen behavior πŸ‘‘
  • dir β€” the DMA direction. Which way is the data going? This tells you. ⭐

πŸ”₯ RETURN πŸ”₯

A struct drm_pagemap_addr encoding all of the above info. She takes your four little facts and gives you back one tidy struct. Slay πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/drm/drm_pagemap.h β€” and while you're in there, peep enum drm_interconnect_protocol(9), struct drm_pagemap_addr(9), struct drm_pagemap_ops(9), struct drm_pagemap(9), struct drm_pagemap_devmem_ops(9), drm_pagemap_get(9), drm_pagemap_get_unless_zero(9), struct drm_pagemap_devmem(9), struct drm_pagemap_migrate_details(9), and struct drm_pagemap_page_zone_device_data(9). It's giving the whole friend group, fr fr 🌈


and that's the page, bestie!! πŸŽ€ huge shoutout to ./include/drm for hosting all this, and to the October 2026 date stamp for being so punctual β€” this one's straight out of the Kernel API Manual and it ate πŸ’–βœ¨πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from