smu_cmn_sen...g_with_param(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ smu_cmn_send_smc_msg_with_param ✨

okay so bestie, this one is from the Kernel API Manual and honestly it's kind of a baddie β€” it's the function that literally slides a message into the SMU and waits for it to text back πŸ’Œ


πŸŽ€ SYNOPSIS πŸŽ€

int smu_cmn_send_smc_msg_with_param (struct smu_context *smu , enum
smu_message_type msg , uint32_t param , uint32_t *read_arg );

πŸ’… ARGUMENTS πŸ’…

  • smu β€” pointer to an SMU context, aka the whole vibe check of where we're sending from 🫢
  • msg β€” the message to send, bestie. this is the actual thing we're shipping off πŸ“¨
  • param β€” the parameter to send to the SMU, tagging along for the ride ✨
  • read_arg β€” pointer to u32 used to return a value from the SMU back to the caller, like a little reply note passed back to you πŸ’Œ

🌸 DESCRIPTION 🌸

So here's the tea: this function sends the message msg with parameter param to the SMU, waits for the command to be completed (yes, it waits, it's a patient icon), and then hands a value from the SMU back to you through the read_arg pointer. periodt. πŸ’…

It returns 0 on success, and -errno when something goes wrong while sending the message or receiving the reply. But β€” and this is the important part, ngl β€” if there's a PCI bus recovery happening, or the destination is a virtual GPU that doesn't allow this message type, the message is just straight up dropped and success is returned anyway πŸ™ˆ. If you want the details of what that -errno actually means, go look at smu_msg_v1_decode_response.

If we weren't able to send the message to the SMU at all, we also print the error to the standard log. That's our little receipts moment πŸ”₯

Command completion status gets printed only if the -errno is -EREMOTEIO β€” which is the signal that the SMU returned back an undefined/unknown/unspecified result 😭. All the other cases are well-defined, so they don't get printed; instead they're handed back to the client so it can decide what to do next. main character energy: the client gets to make the call πŸ‘‘

And the return value read_arg is read back regardless, because we want to give the client as much info as possible. On error it would most likely be param, but like β€” we can't just assume that, bestie 🫠. This also eliminates more conditionals, which is honestly iconic of it.


πŸ¦‹ SEE ALSO πŸ¦‹


⭐ ok bye bestie, this page came to you from ./drivers/gpu/drm/amd/pm/swsmu, dated October 2026, and you're reading the Kernel API Manual πŸ’– go forth and send your messages, you've got this πŸ§šπŸ’œ

πŸ“¦ where this page comes from