smu_cmn_sen...g_with_param(9)
β¨ 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 tou32used 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 π¦
- Kernel file
./drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c smu_cmn_wait_for_response(9)smu_cmn_send_smc_msg_with_params_ext(9)smu_msg_v1_send_msg(9)smu_msg_send_async_locked(9)smu_cmn_disable_all_features_with_exception(9)smu_cmn_get_pptable_from_firmware(9)
β 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
- 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