Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* [PATCH 1/2] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized
@ 2025-11-25 12:49 Iuliana Prodan (OSS)
  2025-11-25 12:49 ` [PATCH 2/2] remoteproc: imx_dsp_rproc: Wait for suspend ACK only if WAIT_FW_READY is set Iuliana Prodan (OSS)
  2025-11-26 20:14 ` [PATCH 1/2] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Bjorn Andersson
  0 siblings, 2 replies; 6+ messages in thread
From: Iuliana Prodan (OSS) @ 2025-11-25 12:49 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
	S.J. Wang, Fabio Estevam, Daniel Baluta, Iuliana Prodan
  Cc: imx, linux-remoteproc, linux-arm-kernel, linux-kernel,
	Pengutronix Kernel Team

From: Iuliana Prodan <iuliana.prodan@nxp.com>

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.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
---
 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");
+		goto out;
+	}
+
 	reinit_completion(&priv->pm_comp);
 
 	/* Tell DSP that suspend is happening */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-12-03 18:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 12:49 [PATCH 1/2] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Iuliana Prodan (OSS)
2025-11-25 12:49 ` [PATCH 2/2] remoteproc: imx_dsp_rproc: Wait for suspend ACK only if WAIT_FW_READY is set Iuliana Prodan (OSS)
2025-11-26 20:21   ` Bjorn Andersson
2025-12-03 18:09     ` Iuliana Prodan
2025-11-26 20:14 ` [PATCH 1/2] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Bjorn Andersson
2025-12-03 17:35   ` Iuliana Prodan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox