cmdq_pkt_poll_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cmdq_pkt_poll_addr(9) β€” the Kernel API Manual, but make it cute

okay so bestie, welcome to the cmdq_pkt_poll_addr page from the Kernel API Manual ✨ this one's short and sweet and honestly kind of a baddie β€” it's all about making the GCE wait for a register to hit a value. let's get into it 🫢


🌸 NAME 🌸

cmdq_pkt_poll_addr β€” appends a blocking POLL command to a CMDQ packet πŸ‘‘

Translation: you're yeeting a "wait until this register looks right" instruction into your packet, and literally everything stops until it does. main character energy, but make it a spin-loop πŸ’…


✨ SYNOPSIS ✨

int cmdq_pkt_poll_addr (struct cmdq_pkt *pkt , dma_addr_t addr , u32
value , u32 mask );

four args, one int back. slay. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pkt β€” the CMDQ packet. this is the little envelope you're stuffing your command into πŸ’Œ
  • addr β€” the hardware register address. where the drama is happening, fr fr
  • value β€” the specified target register value. the number you're literally waiting for 🌟
  • mask β€” the specified target register mask. the filter that decides which bits you actually care about 🎯

πŸ’– DESCRIPTION πŸ’–

so here's the vibe: this function appends a polling (POLL) command to the CMDQ packet, and it asks the GCE to execute an instruction that checks for the specified value β€” with or without mask, your choice β€” to appear in the specified hardware register addr πŸ‘€

and the important part, bestie, do NOT miss this:

All GCE threads will be blocked by this instruction. all of them. every single one. it's giving "the whole group chat is waiting on you to reply" energy 😭

so yeah β€” super useful, but it does not play about holding everything up πŸ’€


🌈 RETURN 🌈

0 for success, or a negative error code πŸ™ˆ (iykyk, go check that return value)


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file that started it all:

./include/linux/soc/mediatek/mtk-cmdq.h

and the whole cmdq friend group, all here, all iconic, all linked πŸ’œ:


and that's the page, bestie πŸŽ€ this one lives at ./include/linux/soc/mediatek, and the manual's dated October 2026 β€” so go forth, poll that address, and remember to unblock your threads. bye ily πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from