STRUCT XE_GGTT(9)
β¨ struct xe_ggtt(9) β¨
okay bestie, buckle up β this is page 9 of the Kernel API Manual, and we're talking about struct xe_ggtt, the main character of GGTT structs. π
π NAME π
struct xe_ggtt β the Main GGTT struct. yes, THE main one. iconic behavior only. π
π¦ SYNOPSIS π¦
like, here's literally the whole vibe of it:
struct xe_ggtt {
struct xe_tile *tile;
u64 start;
u64 size;
unsigned int flags;
struct xe_bo *scratch;
struct mutex lock;
u64 __iomem *gsm;
const struct xe_ggtt_pt_ops *pt_ops;
struct drm_mm mm;
unsigned int access_count;
struct workqueue_struct *wq;
};
not me pasting the entire struct definition, but alsoβ¦ yes. π«Ά
π Members π
tileβ back pointer to the tile where this GGTT belongs. it literally points back home, iykyk. πstartβ the start offset of the GGTT. where it all begins, periodt. β¨sizeβ the total usable size of this GGTT. the whole usable slay. πflagsβ flags for this GGTT. the acceptable ones are:XE_GGTT_FLAGS_64Kβ if the PTE size is 64K. otherwise, the regular one is 4K. no in-between, fr fr.XE_GGTT_FLAGS_ONLINEβ says whether the GGTT is online. it's protected byggtt->lockafter init. π‘οΈ
scratchβ an internal object allocation used as a scratch page. lil note-taking page energy. πlockβ a mutex lock that protects the GGTT data. do NOT skip the lock bestie. πgsmβ theiomempointer to the actual location of the translation table living in the GSM, so the PTE manipulation is easy. convenient and cute. π«pt_opsβ page table operations, per platform. every platform gets its own flavor. πmmβ the memory manager used to manage the individual GGTT allocations. she manages. she organizes. πaccess_countβ counts the GGTT writes. keeping count, always. π’wqβ a dedicated unordered work queue that processes node removals. dedicated, unordered, unbothered. πββοΈ
πΈ Description πΈ
so in general, each tile can contain its own Global Graphics Translation Table (GGTT) instance. like, each tile gets its own little GGTT moment. no cap. π§
π SEE ALSO π
the kernel file ./drivers/gpu/drm/xe/xe_ggtt.c, plus Global Graphics Translation Table (GGTT)(9), struct xe_ggtt_node(9), struct xe_ggtt_pt_ops(9), xe_ggtt_start(9), xe_ggtt_size(9), xe_ggtt_alloc(9), xe_ggtt_init_early(9), xe_ggtt_node_remove(9), xe_ggtt_init(9), xe_ggtt_shift_nodes(9), xe_ggtt_insert_node(9), xe_ggtt_node_pt_size(9), xe_ggtt_map_bo(9), xe_ggtt_map_bo_unlocked(9), xe_ggtt_insert_node_transform(9), xe_ggtt_insert_bo_at(9), xe_ggtt_insert_bo(9), xe_ggtt_remove_bo(9), xe_ggtt_largest_hole(9), xe_ggtt_assign(9), xe_ggtt_node_save(9), xe_ggtt_node_load(9), xe_ggtt_dump(9), xe_ggtt_print_holes(9), xe_ggtt_encode_pte_flags(9), xe_ggtt_read_pte(9), xe_ggtt_node_addr(9), xe_ggtt_node_size(9)
that's the whole page bestie, every last reference accounted for, we ate and left no crumbs π₯
alright, cute sign-off time: this lil beauty lives in ./drivers/gpu/drm/xe, dated October 2026, and it's struct xe_ggtt(9) β stan forever. ππβ
π¦ 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