i915_gem_object_pin_map(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, this page is i915_gem_object_pin_map(9) from the Kernel API Manual, and it is literally the β€œreturn a contiguous mapping of the entire object” function. no cap. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

void * i915_gem_object_pin_map (struct drm_i915_gem_object *obj , enum
       i915_map_type type );

πŸŽ€ ARGUMENTS πŸŽ€

  • obj β€” the object to map into kernel address space. main character energy, honestly.
  • type β€” the type of mapping, used to select pgprot_t. it’s giving β€œwhich mapping flavor are we doing” vibes.

🌸 DESCRIPTION 🌸

okay so here’s the tea: i915_gem_object_pin_map calls i915_gem_object_pin_pages to prevent reaping of the object’s pages, and then returns a contiguous mapping of the backing storage into the kernel address space. slay. πŸ’… based on the type of mapping, the PTE will be set to either WriteBack or WriteCombine (via pgprot_t). lowkey important detail, bestie.

The caller is responsible for calling i915_gem_object_unpin_map when the mapping is no longer required. so do not forget to clean up β€” that’s your job, not the function’s. 🫢

It returns the pointer through which to access the mapped object, or an ERR_PTR on error. so check that return value, fr fr. 😭


🌈 SEE ALSO 🌈

Kernel file: ./drivers/gpu/drm/i915/gem/i915_gem_object.h β€” go peek, iykyk. πŸ‘‘


xoxo, source/version: ./drivers/gpu/drm/i915/gem Β· date: October 2026 Β· page: i915_gem_object_pin_map(9) πŸ’‹βœ¨

πŸ“¦ where this page comes from