xe_migrate_clear(9)
β¨ xe_migrate_clear β the Kernel API Manual glow-up β¨
okay so bestie, we're in the xe_migrate_clear(9) page today and honestly? it's lowkey iconic. it's giving "i just wipe things clean and look cute doing it" π
π NAME π
xe_migrate_clear β copy content of TTM resources β¨ (yes that's what it says, yes that's the vibe, we're going with it)
πΈ SYNOPSIS πΈ
struct dma_fence * xe_migrate_clear (struct xe_migrate *m , struct xe_bo
*bo , struct ttm_resource *dst , u32 clear_flags );
like, just look at her. four args, one fence pointer back. main character energy fr fr π
π¦ ARGUMENTS π¦
mβ the migration context. the whole operation lives here, she's the group chat basically.boβ the buffer object thatdstis currently bound to. (and yes, there's a TODO about her later, we'll get there, hold on π)dstβ thedstTTM resource that's about to get cleared. she's the one getting the glow-up.clear_flagsβ the flags telling us which data to clear: CCS, BO, or both. pick your fighter, or honestly, both β¨
π DESCRIPTION π
so here's the tea π β this function clears the contents of dst to zero when XE_MIGRATE_CLEAR_FLAG_BO_DATA is set.
on flat CCS devices, the CCS metadata gets cleared to zero with XE_MIGRATE_CLEAR_FLAG_CCS_DATA. periodt.
and if you set XE_MIGRATE_CLEAR_FLAG_FULL? that clears both bo and the CCS metadata at the same time. overachiever behavior honestly π«Ά
TODO: Eliminate the bo argument. (devs said "we'll deal with her later" and honestly? relatable. ngl she's still in the signature for now π)
π RETURN π
you get back a pointer to a dma_fence representing the last clear batch β¨ β or an error pointer on failure π
and important, bestie: if there is a failure, any clear operation started by the function call has been synced. so like, nothing's left hanging mid-clear. she cleans up after herself, we love to see it π
π SEE ALSO π
the friend group, the whole squad, the entire roster π§ββοΈ:
- Kernel file
./drivers/gpu/drm/xe/xe_migrate.c struct xe_migrate(9)xe_migrate_alloc(9)xe_migrate_init(9)xe_migrate_copy(9)xe_migrate_resolve(9)xe_migrate_lrc(9)xe_migrate_ccs_rw_copy(9)xe_migrate_ccs_rw_copy_clear(9)xe_migrate_exec_queue(9)xe_migrate_vram_copy_chunk(9)xe_migrate_update_pgtables(9)xe_migrate_wait(9)xe_migrate_to_vram(9)xe_migrate_from_vram(9)xe_migrate_access_memory(9)xe_migrate_job_lock(9)xe_migrate_job_unlock(9)xe_migrate_job_lock_assert(9)
and that's the page!! π shoutout to ./drivers/gpu/drm/xe for hosting this whole thing, and this edition is dated October 2026 β mark your calendars bestie, she's timeless β stay clear, stay slay, iykyk ππ₯
π¦ 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