ttm_kmap_iter_iomap_init(9)
๐ ttm_kmap_iter_iomap_init(9) โ like, the Kernel API Manual one ๐
okay so bestie, welcome to the glow-up era of ttm_kmap_iter_iomap_init, straight out of the Kernel API Manual โจ this is the function that gets your struct ttm_kmap_iter_iomap all dressed and ready for the group chat, no cap.
๐ธ NAME ๐ธ
ttm_kmap_iter_iomap_init โ Initialize a struct ttm_kmap_iter_iomap ๐ซถ (yes that's the whole job and she does it well)
โจ SYNOPSIS โจ
struct ttm_kmap_iter * ttm_kmap_iter_iomap_init (struct
ttm_kmap_iter_iomap *iter_io , struct io_mapping *iomap , struct
sg_table *st , resource_size_t start );
she takes four args and returns a pointer, iconic behavior honestly ๐
๐ ARGUMENTS ๐
iter_ioโ thestruct ttm_kmap_iter_iomapyou want to initialize. this is the main character, she's getting set up ๐iomapโ thestruct io_mappingthat represents the underlying lineario_memory. literally the map to the whole vibe ๐บ๏ธstโ thesg_tableintoiomap, representing the memory of thestruct ttm_resource. it's giving "where the actual stuff lives" ๐startโ the offset that needs to be subtracted fromstso thatsg_dma_address(st->sgl) - start == 0for the iomap start. math girlies rise, this one's non-negotiable ๐งฎโจ
๐ฅ RETURN ๐ฅ
Pointer to the embedded struct ttm_kmap_iter. that's it, that's the gift ๐
๐ SEE ALSO ๐
the kernel file is right here bestie, go touch grass (the source): ./drivers/gpu/drm/ttm/ttm_resource.c
and the whole extended friend group ๐:
ttm_resource_cursor_init(9)ttm_resource_cursor_fini(9)ttm_lru_bulk_move_init(9)ttm_lru_bulk_move_fini(9)ttm_lru_bulk_move_tail(9)ttm_resource_init(9)ttm_resource_fini(9)ttm_resource_try_charge(9)ttm_resource_intersects(9)ttm_resource_compatible(9)ttm_resource_manager_init(9)ttm_resource_manager_usage(9)ttm_resource_manager_debug(9)ttm_resource_manager_first(9)ttm_resource_manager_next(9)ttm_lru_first_res_or_null(9)Linear io iterator(9)ttm_kmap_iter_linear_io_init(9)ttm_kmap_iter_linear_io_fini(9)ttm_resource_manager_create_debugfs(9)ttm_resource_manager_dmem_reclaim(9)ttm_resource_manager_set_dmem_region(9)
like, the whole squad showed up ๐๐
ngl bestie, if you're calling this you better have a realiomapand a realsg_tableready โ she's initializing, not fixing your life ๐
and that's the page!! brought to you by ./drivers/gpu/drm/ttm, October 2026 edition โ mwah ๐ stay hydrated, read your kernel source, and remember: kmap iterators are temporary but the friendships you make along the way are 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