i915_gem_object_migrate(9)
π 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 optionalstruct i915_gem_ww_ctx. IfNULL, 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 π
thewwparameter is not used yet, but included to make sure callers put some effort into obtaining a validwwctx if one is available.
Lowkey a little "hold this thought" moment. π«Ά
π RETURN π
0on success. Slay. β- Negative error code on failure. π
- In particular may return:
-ENXIOon lack of region space-EDEADLKfor deadlock avoidance ifwwis set-EINTRor-ERESTARTSYSif signal pending-EBUSYif the object is pinned
π SEE ALSO π
Kernel file ./drivers/gpu/drm/i915/gem/i915_gem_object.c, plus the whole friend group:
__i915_gem_object_fini(9)i915_gem_object_set_cache_coherency(9)i915_gem_object_set_pat_index(9)__i915_gem_object_pages_fini(9)i915_gem_object_read_from_page(9)i915_gem_object_evictable(9)i915_gem_object_migratable(9)i915_gem_object_has_struct_page(9)i915_gem_object_has_iomem(9)i915_gem_object_can_migrate(9)__i915_gem_object_migrate(9)i915_gem_object_placement_possible(9)i915_gem_object_needs_ccs_pages(9)i915_gem_object_get_moving_fence(9)i915_gem_object_wait_moving_fence(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms