xe_drm_pagemap_from_fd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xe_drm_pagemap_from_fd(9) β€” like, the whole kernel API manual, bestie ✨

okay so real talk, this page lives in the Kernel API Manual and it's about one very specific little function. no cap, it's a short one, so let's get into it 🫢


🌸 NAME 🌸

xe_drm_pagemap_from_fd β€” hands you back a drm_pagemap pointer when you give it a (file_descriptor, region_instance) pair. that's the whole vibe πŸ’«


✨ SYNOPSIS ✨

struct drm_pagemap * xe_drm_pagemap_from_fd (int fd , u32 region_instance );

like, you call it with two things and it gives you a struct drm_pagemap * back. iconic signature honestly πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • fd β€” an fd opened against an xe device. yes bestie, an actual file descriptor, opened on an xe device. that's the requirement, don't come at it with anything else πŸ™ˆ
  • region_instance β€” the region instance, and it's a u32. it's the one representing the device memory on the opened xe device. so like, which memory region on that device. iykyk πŸ’œ

πŸ¦‹ DESCRIPTION πŸ¦‹

this is where it does the thing: it opens a struct drm_pagemap pointer on the indicated device and region_instance. that's it, that's the function. lowkey elegant, highkey underrated. periodt πŸ’…


🌈 RETURN 🌈

  • on success πŸŽ‰ β€” you get a reference-counted struct drm_pagemap pointer. note the reference-counted part, it's giving "you own a reference now, act like it" energy.
  • on failure 😭 β€” you get a negative error pointer. classic kernel move, so check that thing with your error-checking macros, okay? don't be out here dereferencing it fr fr πŸ’€

⭐ SEE ALSO ⭐

the whole friend group, no one left out 🫢:


go read them, bestie, they're all literally right there in the same directory πŸ§šβ€β™€οΈ

and that's the tea β˜• this one's brought to you by source ./drivers/gpu/drm/xe, dated October 2026 β€” mwah, xoxo, go get that pagemap πŸ“πŸ’–

πŸ“¦ where this page comes from