xe_migrate_clear(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 that dst is currently bound to. (and yes, there's a TODO about her later, we'll get there, hold on 😭)
  • dst β€” the dst TTM 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 πŸ§šβ€β™€οΈ:


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