cmdq_pkt_assign(9)
π cmdq_pkt_assign(9) β like, the Kernel API Manual glow-up π
okay so bestie, this one lives in the Kernel API Manual and it's basically the "write a number into a register" era of your CMDQ journey. Let's get into it β¨
πΈ NAME πΈ
cmdq_pkt_assign β appends a logic assign command to the CMDQ packet, which asks the GCE to execute an instruction that sets a constant value into an internal register, and then that thing gets used as a value, a mask, or an address in a read/write instruction. iykyk π₯
π¦ SYNOPSIS π¦
int cmdq_pkt_assign (struct cmdq_pkt *pkt , u16 reg_idx , u32 value );
π ARGUMENTS π
pktβ the CMDQ packet π (the thing you're stuffing the command into)reg_idxβ the CMDQ internal register ID, like the little locker number you're writing into ποΈvalueβ the specified value, aka the actual number that goes in there β
π RETURN π
Returns 0 for success β slay π
β otherwise the error code is returned, so, y'know, vibe check your return value fr fr.
π SEE ALSO π
Kernel file ./include/linux/soc/mediatek/mtk-cmdq.h β go read it, it's giving source of truth π
and the whole friend group: cmdq_dev_get_client_reg(9), cmdq_mbox_create(9), cmdq_mbox_destroy(9), cmdq_pkt_create(9), cmdq_pkt_destroy(9), cmdq_pkt_write(9), cmdq_pkt_write_pa(9), cmdq_pkt_write_subsys(9), cmdq_pkt_write_mask(9), cmdq_pkt_write_mask_pa(9), cmdq_pkt_write_mask_subsys(9), cmdq_pkt_write_s(9), cmdq_pkt_write_s_mask(9),
cmdq_pkt_write_s_value(9), cmdq_pkt_write_s_mask_value(9), cmdq_pkt_mem_move(9), cmdq_pkt_wfe(9), cmdq_pkt_acquire_event(9), cmdq_pkt_clear_event(9), cmdq_pkt_set_event(9), cmdq_pkt_poll(9), cmdq_pkt_poll_mask(9), cmdq_pkt_logic_command(9), cmdq_pkt_poll_addr(9),
cmdq_pkt_jump_abs(9), cmdq_pkt_jump_rel(9), cmdq_pkt_jump_rel_temp(9), cmdq_pkt_eoc(9) π (yes that's all of them, I counted, no cap)
ok that's the whole page bestie, every flag, every name, every reference β nothing skipped, periodt π«Ά
and before you go β this lil page came from ./include/linux/soc/mediatek, dated October 2026, and its whole identity is cmdq_pkt_assign(9). mwah, go write some registers ππ§
π¦ 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