i915_gem_object_migrate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, this is the i915_gem_object_migrate(9) page in the Kernel API Manual β€” and the star, i915_gem_object_migrate, is here to migrate an object to the desired region id. Periodt. πŸ’…

✨ SYNOPSIS ✨

int i915_gem_object_migrate (struct drm_i915_gem_object *obj , struct i915_gem_ww_ctx *ww , enum intel_region_id id );

🫢 ARGUMENTS 🫢

  • obj β€” the object to migrate. That's the passenger, bestie. πŸš—
  • ww β€” an optional struct i915_gem_ww_ctx. If NULL, the backend may not be successful in evicting other objects to make room for this object. Ngl, that's the tea. β˜•
  • id β€” the region id to migrate to. Destination: the region id. πŸ“

🧚 DESCRIPTION 🧚

Attempt to migrate the object to the desired memory region. The object backend must support migration, and the object may not be pinned (explicitly pinned pages or pinned vmas). The object must be locked. πŸ”’

On successful completion, the object will have pages pointing to memory in the new region, but an async migration task may not have completed yet, and to accomplish that, i915_gem_object_wait_migration must be called. So like, don't pop the confetti until you've done that, okay? πŸŽ‰

πŸ’€ NOTE πŸ’€

the ww parameter is not used yet, but included to make sure callers put some effort into obtaining a valid ww ctx if one is available.

Lowkey a little "hold this thought" moment. 🫢

🌈 RETURN 🌈

  • 0 on success. Slay. βœ…
  • Negative error code on failure. 😭
  • In particular may return:
    • -ENXIO on lack of region space
    • -EDEADLK for deadlock avoidance if ww is set
    • -EINTR or -ERESTARTSYS if signal pending
    • -EBUSY if the object is pinned

πŸŽ€ SEE ALSO πŸŽ€

Kernel file ./drivers/gpu/drm/i915/gem/i915_gem_object.c, plus the whole friend group:


Source/version: ./drivers/gpu/drm/i915/gem Β· date: October 2026. That's the whole i915_gem_object_migrate(9) saga, bestie β€” hydrate and go be iconic. πŸ’–βœ¨

πŸ“¦ where this page comes from