cik_ctx_switch_enable(9)
π cik_ctx_switch_enable β the Kernel API Manual page, bestie edition
okay so real talk, this is cik_ctx_switch_enable(9) from the Kernel API Manual and it's lowkey one of those tiny functions that does exactly one job and does it slayfully. it's the one that stops the async dma engines context switch. that's the whole vibe. π
β¨ NAME β¨
cik_ctx_switch_enable β stop the async dma engines context switch
like, that's literally her job description and she's not gonna elaborate.
β¨ SYNOPSIS β¨
void cik_ctx_switch_enable (struct amdgpu_device *adev , bool enable );
no return value, no surprises, just a void and two args. she's not giving you anything back and honestly? respect. π«Ά
β¨ ARGUMENTS β¨
adevβ anamdgpu_devicepointer, aka your whole entire GPU situation. you gotta hand her the device, she's not gonna go find it herself. πenableβ aboolthat says enable/disable the DMA MEs context switch. so it's a yes-or-no, a vibe check passed in as a parameter.truevsfalse, main character energy either way.
β¨ DESCRIPTION β¨
Halt or unhalt the async dma engines context switch (VI). π¦
that's it. that's the whole function. you're either putting the async dma engines' context switch on pause or you're letting it live its life again. halt π or unhalt βΆοΈ. and yes, that (VI) is doing important work β it's part of the description, not me being cute, so don't come for me.
ngl it's giving "small function, big responsibility" β if you flip this the wrong way at the wrong time things are gonna be weird, so know what you're doing before you halt somebody. π
π SEE ALSO π
the source lives in the kernel file ./drivers/gpu/drm/amd/amdgpu/cik_sdma.c β go read it, it's right there, iykyk.
and here's the whole friend group, every single one of them, no cap:
cik_sdma_init_microcode(9)cik_sdma_ring_get_rptr(9)cik_sdma_ring_get_wptr(9)cik_sdma_ring_set_wptr(9)cik_sdma_ring_emit_ib(9)cik_sdma_ring_emit_hdp_flush(9)cik_sdma_ring_emit_fence(9)cik_sdma_gfx_stop(9)cik_sdma_rlc_stop(9)cik_sdma_enable(9)cik_sdma_gfx_resume(9)cik_sdma_rlc_resume(9)cik_sdma_load_microcode(9)cik_sdma_start(9)cik_sdma_ring_test_ring(9)cik_sdma_ring_test_ib(9)cik_sdma_vm_copy_pte(9)cik_sdma_vm_write_pte(9)cik_sdma_vm_set_pte_pde(9)cik_sdma_ring_pad_ib(9)cik_sdma_ring_emit_pipeline_sync(9)cik_sdma_ring_emit_vm_flush(9)cik_sdma_emit_copy_buffer(9)cik_sdma_emit_fill_buffer(9)
that's 24 little besties plus the source file itself. the way that entire sdma roster showed up at the function's birthday party π obsESSED.
and that's the page, babes π§β¨ β this one comes from ./drivers/gpu/drm/amd/amdgpu and it's dated October 2026, so screenshot it, cite it, print it out and put it on your wall. periodt. ππΈ
π¦ 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