__i915_gem_object_migrate(9)
β¨ __i915_gem_object_migrate(9) β a Kernel API Manual moment β¨
okay bestie, welcome to the Kernel API Manual π
this is the page for __i915_gem_object_migrate, and honestly? it's giving "move my stuff to a better neighborhood" energy and i'm obsessed π¦
πΈ NAME πΈ
__i915_gem_object_migrate β migrate an object to the desired region id, with control of the extra flags β¨
π SYNOPSIS π
int __i915_gem_object_migrate (struct drm_i915_gem_object *obj , struct i915_gem_ww_ctx *ww , enum intel_region_id id , unsigned int flags );
π ARGUMENTS π
objβ the object you wanna migrate. that's the main character π«Άwwβ an optionalstruct i915_gem_ww_ctx. and lowkey important: if it'sNULL, the backend may not be successful in evicting other objects to make room for this object πidβ the region id you're migrating to. the destination, the vibe, the new address π‘flagsβ the object flags. normally justobj->flags. simple like that π
π DESCRIPTION π
so what we're doing here is attempting to migrate the object to the desired memory region β¨ but there are rules, bestie, and they are not negotiable:
- the object backend must support migration
- the object may not be pinned (that means no explicitly pinned pages and no pinned vmas)
- the object must be locked π
on successful completion, the object will have pages pointing to memory in the new region β but (and this is the part people miss, no cap) an async migration task may not have completed yet π³ and to accomplish that, i915_gem_object_wait_migration must be called. don't skip that step fr fr π§
β NOTE β
the ww parameter is not used yet π but it's included to make sure callers put some effort into obtaining a valid ww ctx if one is available. it's giving "dress for the job you want" π
π₯ RETURN π₯
0on success π- a negative error code on failure. in particular it may return:
-ENXIOβ lack of region space π¬-EDEADLKβ for deadlock avoidance ifwwis set π-EINTRor-ERESTARTSYSβ if signal pending π-EBUSYβ if the object is pinned π
π¦ SEE ALSO π¦
kernel file ./drivers/gpu/drm/i915/gem/i915_gem_object.c
__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)
okay that's the whole page, you ate that π
this lil gem came to you from ./drivers/gpu/drm/i915/gem and it's stamped October 2026 β periodt, go migrate something responsibly π«Άπ
π¦ 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