cmdq_pkt_assign(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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