Re: [PATCH 1/2] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized
From: Iuliana Prodan
Date: Wed Dec 03 2025 - 12:35:31 EST
On 11/26/2025 10:14 PM, Bjorn Andersson wrote:
On Tue, Nov 25, 2025 at 02:49:02PM +0200, Iuliana Prodan (OSS) wrote:Right, will do in v2.
From: Iuliana Prodan <iuliana.prodan@xxxxxxx>
Firmwares that do not use mailbox communication
(e.g., the hello_world sample) leave priv->tx_ch
as NULL. The current suspend logic unconditionally
sends RP_MBOX_SUSPEND_SYSTEM, which is invalid without
an initialized TX channel.
Detect the no_mailboxes case early and skip sending
the suspend message. Instead, proceed directly to
the runtime PM suspend path, which is the correct
behavior for firmwares that cannot respond to mailbox
requests.
Please use the allotted 75 characters of width for your commit message.
There's no error here; it's just a use case.
Signed-off-by: Iuliana Prodan <iuliana.prodan@xxxxxxx>
---
drivers/remoteproc/imx_dsp_rproc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
index f11662f9a12f..fc0470aa72c1 100644
--- a/drivers/remoteproc/imx_dsp_rproc.c
+++ b/drivers/remoteproc/imx_dsp_rproc.c
@@ -1308,6 +1308,15 @@ static int imx_dsp_suspend(struct device *dev)
if (rproc->state != RPROC_RUNNING)
goto out;
+ /*
+ * No channel available for sending messages;
+ * indicates no mailboxes present, so trigger PM runtime suspend
+ */
+ if (!priv->tx_ch) {
+ dev_err(dev, "No initialized mbox tx channel\n");
Commit message and comment above says this is "normal" behavior,
dev_err() indicates that it's not. Should this be a dev_info()?
That said, it's still a message every time you suspend, so perhaps even
omitting the print (or a dev_dbg()) makes more sense?
dev_dbg makes more sense, I agree.
Regards,
Bjorn
+ goto out;
+ }
+
reinit_completion(&priv->pm_comp);
/* Tell DSP that suspend is happening */
--
2.34.1