* [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized
@ 2025-12-04 12:28 Iuliana Prodan (OSS)
2025-12-04 12:28 ` [PATCH v2 2/3] remoteproc: imx_dsp_rproc: Rename macro to reflect multiple contexts Iuliana Prodan (OSS)
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Iuliana Prodan (OSS) @ 2025-12-04 12:28 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>
---
Changes since v1:
- Wrapped commit message to 75 characters
- Changed dev_err to dev_dbg since this case is normal behavior
---
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 5130a35214c9..f51deaacc700 100644
--- a/drivers/remoteproc/imx_dsp_rproc.c
+++ b/drivers/remoteproc/imx_dsp_rproc.c
@@ -1242,6 +1242,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_dbg(dev, "No initialized mbox tx channel, suspend directly.\n");
+ goto out;
+ }
+
reinit_completion(&priv->pm_comp);
/* Tell DSP that suspend is happening */
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/3] remoteproc: imx_dsp_rproc: Rename macro to reflect multiple contexts
2025-12-04 12:28 [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Iuliana Prodan (OSS)
@ 2025-12-04 12:28 ` Iuliana Prodan (OSS)
2025-12-04 17:17 ` Frank Li
2025-12-09 14:10 ` Daniel Baluta
2025-12-04 12:28 ` [PATCH v2 3/3] remoteproc: imx_dsp_rproc: Wait for suspend ACK only if WAIT_FW_CONFIRMATION is set Iuliana Prodan (OSS)
` (2 subsequent siblings)
3 siblings, 2 replies; 9+ messages in thread
From: Iuliana Prodan (OSS) @ 2025-12-04 12:28 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>
Rename WAIT_FW_READY to WAIT_FW_CONFIRMATION and FEATURE_DONT_WAIT_FW_READY
to FEATURE_SKIP_FW_CONFIRMATION. This way, the term CONFIRMATION covers:
- waiting for firmware to confirm it is ready to start;
- waiting for any other confirmation from firmware.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
---
Changes since v1:
- New commit
---
drivers/remoteproc/imx_dsp_rproc.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
index f51deaacc700..1f3a35756769 100644
--- a/drivers/remoteproc/imx_dsp_rproc.c
+++ b/drivers/remoteproc/imx_dsp_rproc.c
@@ -38,15 +38,15 @@ MODULE_PARM_DESC(no_mailboxes,
/* Flag indicating that the remote is up and running */
#define REMOTE_IS_READY BIT(0)
-/* Flag indicating that the host should wait for a firmware-ready response */
-#define WAIT_FW_READY BIT(1)
+/* Flag indicating that the host should wait for a firmware-confirmation response */
+#define WAIT_FW_CONFIRMATION BIT(1)
#define REMOTE_READY_WAIT_MAX_RETRIES 500
/*
* This flag is set in the DSP resource table's features field to indicate
- * that the firmware requires the host NOT to wait for a FW_READY response.
+ * that the firmware requires the host NOT to wait for a FW_CONFIRMATION response.
*/
-#define FEATURE_DONT_WAIT_FW_READY BIT(0)
+#define FEATURE_SKIP_FW_CONFIRMATION BIT(0)
/* att flags */
/* DSP own area */
@@ -287,7 +287,7 @@ static int imx_dsp_rproc_ready(struct rproc *rproc)
* @avail: available space in the resource table
*
* Parse the DSP-specific resource entry and update flags accordingly.
- * If the WAIT_FW_READY feature is set, the host must wait for the firmware
+ * If the WAIT_FW_CONFIRMATION feature is set, the host must wait for the firmware
* to signal readiness before proceeding with execution.
*
* Return: RSC_HANDLED if processed successfully, RSC_IGNORED otherwise.
@@ -322,7 +322,7 @@ static int imx_dsp_rproc_handle_rsc(struct rproc *rproc, u32 rsc_type,
/*
* For now, in struct fw_rsc_imx_dsp, version 0,
- * only FEATURE_DONT_WAIT_FW_READY is valid.
+ * only FEATURE_SKIP_FW_CONFIRMATION is valid.
*
* When adding new features, please upgrade version.
*/
@@ -332,8 +332,8 @@ static int imx_dsp_rproc_handle_rsc(struct rproc *rproc, u32 rsc_type,
return RSC_IGNORED;
}
- if (imx_dsp_rsc->features & FEATURE_DONT_WAIT_FW_READY)
- priv->flags &= ~WAIT_FW_READY;
+ if (imx_dsp_rsc->features & FEATURE_SKIP_FW_CONFIRMATION)
+ priv->flags &= ~WAIT_FW_CONFIRMATION;
return RSC_HANDLED;
}
@@ -385,7 +385,7 @@ static int imx_dsp_rproc_start(struct rproc *rproc)
return ret;
}
- if (priv->flags & WAIT_FW_READY)
+ if (priv->flags & WAIT_FW_CONFIRMATION)
return imx_dsp_rproc_ready(rproc);
return 0;
@@ -1131,8 +1131,8 @@ static int imx_dsp_rproc_probe(struct platform_device *pdev)
priv = rproc->priv;
priv->rproc = rproc;
priv->dsp_dcfg = dsp_dcfg;
- /* By default, host waits for fw_ready reply */
- priv->flags |= WAIT_FW_READY;
+ /* By default, host waits for fw_confirmation reply */
+ priv->flags |= WAIT_FW_CONFIRMATION;
if (no_mailboxes)
imx_dsp_rproc_mbox_init = imx_dsp_rproc_mbox_no_alloc;
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/3] remoteproc: imx_dsp_rproc: Wait for suspend ACK only if WAIT_FW_CONFIRMATION is set
2025-12-04 12:28 [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Iuliana Prodan (OSS)
2025-12-04 12:28 ` [PATCH v2 2/3] remoteproc: imx_dsp_rproc: Rename macro to reflect multiple contexts Iuliana Prodan (OSS)
@ 2025-12-04 12:28 ` Iuliana Prodan (OSS)
2025-12-04 17:20 ` Frank Li
2025-12-09 14:11 ` Daniel Baluta
2025-12-09 14:09 ` [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Daniel Baluta
2025-12-15 2:11 ` Mathieu Poirier
3 siblings, 2 replies; 9+ messages in thread
From: Iuliana Prodan (OSS) @ 2025-12-04 12:28 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>
The DSP suspend path currently waits unconditionally for a suspend ack
from the firmware. This breaks firmwares that do not implement the
mailbox-based CONFIRMATION handshake, as the DSP never responds and
system suspend fails with -EBUSY.
The driver already uses the WAIT_FW_CONFIRMATION flag to indicate that
the firmware supports the CONFIRMATION handshake at boot. Apply the same
logic during suspend: only send the suspend message and wait for the
suspend ack when the firmware is expected to support it.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
---
Changes since v1:
- Moved confirmation check earlier to avoid sending the message when
FEATURE_SKIP_FW_CONFIRMATION is set, since RP_MBOX_SUSPEND_SYSTEM is
not handled on the remote side.
---
drivers/remoteproc/imx_dsp_rproc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
index 1f3a35756769..d03017d6b214 100644
--- a/drivers/remoteproc/imx_dsp_rproc.c
+++ b/drivers/remoteproc/imx_dsp_rproc.c
@@ -1251,6 +1251,12 @@ static int imx_dsp_suspend(struct device *dev)
goto out;
}
+ /* No fw confirmation expected, so trigger PM runtime suspend */
+ if (!(priv->flags & WAIT_FW_CONFIRMATION)) {
+ dev_dbg(dev, "No FW_CONFIRMATION needed, suspend directly.\n");
+ goto out;
+ }
+
reinit_completion(&priv->pm_comp);
/* Tell DSP that suspend is happening */
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] remoteproc: imx_dsp_rproc: Rename macro to reflect multiple contexts
2025-12-04 12:28 ` [PATCH v2 2/3] remoteproc: imx_dsp_rproc: Rename macro to reflect multiple contexts Iuliana Prodan (OSS)
@ 2025-12-04 17:17 ` Frank Li
2025-12-09 14:10 ` Daniel Baluta
1 sibling, 0 replies; 9+ messages in thread
From: Frank Li @ 2025-12-04 17:17 UTC (permalink / raw)
To: Iuliana Prodan (OSS)
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
S.J. Wang, Fabio Estevam, Daniel Baluta, Iuliana Prodan, imx,
linux-remoteproc, linux-arm-kernel, linux-kernel,
Pengutronix Kernel Team
On Thu, Dec 04, 2025 at 02:28:24PM +0200, Iuliana Prodan (OSS) wrote:
> From: Iuliana Prodan <iuliana.prodan@nxp.com>
>
> Rename WAIT_FW_READY to WAIT_FW_CONFIRMATION and FEATURE_DONT_WAIT_FW_READY
> to FEATURE_SKIP_FW_CONFIRMATION. This way, the term CONFIRMATION covers:
> - waiting for firmware to confirm it is ready to start;
> - waiting for any other confirmation from firmware.
>
> Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Changes since v1:
> - New commit
> ---
> drivers/remoteproc/imx_dsp_rproc.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
> index f51deaacc700..1f3a35756769 100644
> --- a/drivers/remoteproc/imx_dsp_rproc.c
> +++ b/drivers/remoteproc/imx_dsp_rproc.c
> @@ -38,15 +38,15 @@ MODULE_PARM_DESC(no_mailboxes,
>
> /* Flag indicating that the remote is up and running */
> #define REMOTE_IS_READY BIT(0)
> -/* Flag indicating that the host should wait for a firmware-ready response */
> -#define WAIT_FW_READY BIT(1)
> +/* Flag indicating that the host should wait for a firmware-confirmation response */
> +#define WAIT_FW_CONFIRMATION BIT(1)
> #define REMOTE_READY_WAIT_MAX_RETRIES 500
>
> /*
> * This flag is set in the DSP resource table's features field to indicate
> - * that the firmware requires the host NOT to wait for a FW_READY response.
> + * that the firmware requires the host NOT to wait for a FW_CONFIRMATION response.
> */
> -#define FEATURE_DONT_WAIT_FW_READY BIT(0)
> +#define FEATURE_SKIP_FW_CONFIRMATION BIT(0)
>
> /* att flags */
> /* DSP own area */
> @@ -287,7 +287,7 @@ static int imx_dsp_rproc_ready(struct rproc *rproc)
> * @avail: available space in the resource table
> *
> * Parse the DSP-specific resource entry and update flags accordingly.
> - * If the WAIT_FW_READY feature is set, the host must wait for the firmware
> + * If the WAIT_FW_CONFIRMATION feature is set, the host must wait for the firmware
> * to signal readiness before proceeding with execution.
> *
> * Return: RSC_HANDLED if processed successfully, RSC_IGNORED otherwise.
> @@ -322,7 +322,7 @@ static int imx_dsp_rproc_handle_rsc(struct rproc *rproc, u32 rsc_type,
>
> /*
> * For now, in struct fw_rsc_imx_dsp, version 0,
> - * only FEATURE_DONT_WAIT_FW_READY is valid.
> + * only FEATURE_SKIP_FW_CONFIRMATION is valid.
> *
> * When adding new features, please upgrade version.
> */
> @@ -332,8 +332,8 @@ static int imx_dsp_rproc_handle_rsc(struct rproc *rproc, u32 rsc_type,
> return RSC_IGNORED;
> }
>
> - if (imx_dsp_rsc->features & FEATURE_DONT_WAIT_FW_READY)
> - priv->flags &= ~WAIT_FW_READY;
> + if (imx_dsp_rsc->features & FEATURE_SKIP_FW_CONFIRMATION)
> + priv->flags &= ~WAIT_FW_CONFIRMATION;
>
> return RSC_HANDLED;
> }
> @@ -385,7 +385,7 @@ static int imx_dsp_rproc_start(struct rproc *rproc)
> return ret;
> }
>
> - if (priv->flags & WAIT_FW_READY)
> + if (priv->flags & WAIT_FW_CONFIRMATION)
> return imx_dsp_rproc_ready(rproc);
>
> return 0;
> @@ -1131,8 +1131,8 @@ static int imx_dsp_rproc_probe(struct platform_device *pdev)
> priv = rproc->priv;
> priv->rproc = rproc;
> priv->dsp_dcfg = dsp_dcfg;
> - /* By default, host waits for fw_ready reply */
> - priv->flags |= WAIT_FW_READY;
> + /* By default, host waits for fw_confirmation reply */
> + priv->flags |= WAIT_FW_CONFIRMATION;
>
> if (no_mailboxes)
> imx_dsp_rproc_mbox_init = imx_dsp_rproc_mbox_no_alloc;
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] remoteproc: imx_dsp_rproc: Wait for suspend ACK only if WAIT_FW_CONFIRMATION is set
2025-12-04 12:28 ` [PATCH v2 3/3] remoteproc: imx_dsp_rproc: Wait for suspend ACK only if WAIT_FW_CONFIRMATION is set Iuliana Prodan (OSS)
@ 2025-12-04 17:20 ` Frank Li
2025-12-09 14:11 ` Daniel Baluta
1 sibling, 0 replies; 9+ messages in thread
From: Frank Li @ 2025-12-04 17:20 UTC (permalink / raw)
To: Iuliana Prodan (OSS)
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
S.J. Wang, Fabio Estevam, Daniel Baluta, Iuliana Prodan, imx,
linux-remoteproc, linux-arm-kernel, linux-kernel,
Pengutronix Kernel Team
On Thu, Dec 04, 2025 at 02:28:25PM +0200, Iuliana Prodan (OSS) wrote:
> From: Iuliana Prodan <iuliana.prodan@nxp.com>
>
> The DSP suspend path currently waits unconditionally for a suspend ack
> from the firmware. This breaks firmwares that do not implement the
> mailbox-based CONFIRMATION handshake, as the DSP never responds and
> system suspend fails with -EBUSY.
>
> The driver already uses the WAIT_FW_CONFIRMATION flag to indicate that
> the firmware supports the CONFIRMATION handshake at boot. Apply the same
> logic during suspend: only send the suspend message and wait for the
> suspend ack when the firmware is expected to support it.
>
> Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Changes since v1:
> - Moved confirmation check earlier to avoid sending the message when
> FEATURE_SKIP_FW_CONFIRMATION is set, since RP_MBOX_SUSPEND_SYSTEM is
> not handled on the remote side.
> ---
> drivers/remoteproc/imx_dsp_rproc.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
> index 1f3a35756769..d03017d6b214 100644
> --- a/drivers/remoteproc/imx_dsp_rproc.c
> +++ b/drivers/remoteproc/imx_dsp_rproc.c
> @@ -1251,6 +1251,12 @@ static int imx_dsp_suspend(struct device *dev)
> goto out;
> }
>
> + /* No fw confirmation expected, so trigger PM runtime suspend */
> + if (!(priv->flags & WAIT_FW_CONFIRMATION)) {
> + dev_dbg(dev, "No FW_CONFIRMATION needed, suspend directly.\n");
> + goto out;
> + }
> +
> reinit_completion(&priv->pm_comp);
>
> /* Tell DSP that suspend is happening */
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized
2025-12-04 12:28 [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Iuliana Prodan (OSS)
2025-12-04 12:28 ` [PATCH v2 2/3] remoteproc: imx_dsp_rproc: Rename macro to reflect multiple contexts Iuliana Prodan (OSS)
2025-12-04 12:28 ` [PATCH v2 3/3] remoteproc: imx_dsp_rproc: Wait for suspend ACK only if WAIT_FW_CONFIRMATION is set Iuliana Prodan (OSS)
@ 2025-12-09 14:09 ` Daniel Baluta
2025-12-15 2:11 ` Mathieu Poirier
3 siblings, 0 replies; 9+ messages in thread
From: Daniel Baluta @ 2025-12-09 14:09 UTC (permalink / raw)
To: Iuliana Prodan (OSS)
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
S.J. Wang, Fabio Estevam, Daniel Baluta, Iuliana Prodan, imx,
linux-remoteproc, linux-arm-kernel, linux-kernel,
Pengutronix Kernel Team
On Thu, Dec 4, 2025 at 2:29 PM Iuliana Prodan (OSS)
<iuliana.prodan@oss.nxp.com> wrote:
>
> 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>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] remoteproc: imx_dsp_rproc: Rename macro to reflect multiple contexts
2025-12-04 12:28 ` [PATCH v2 2/3] remoteproc: imx_dsp_rproc: Rename macro to reflect multiple contexts Iuliana Prodan (OSS)
2025-12-04 17:17 ` Frank Li
@ 2025-12-09 14:10 ` Daniel Baluta
1 sibling, 0 replies; 9+ messages in thread
From: Daniel Baluta @ 2025-12-09 14:10 UTC (permalink / raw)
To: Iuliana Prodan (OSS)
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
S.J. Wang, Fabio Estevam, Daniel Baluta, Iuliana Prodan, imx,
linux-remoteproc, linux-arm-kernel, linux-kernel,
Pengutronix Kernel Team
On Thu, Dec 4, 2025 at 2:29 PM Iuliana Prodan (OSS)
<iuliana.prodan@oss.nxp.com> wrote:
>
> From: Iuliana Prodan <iuliana.prodan@nxp.com>
>
> Rename WAIT_FW_READY to WAIT_FW_CONFIRMATION and FEATURE_DONT_WAIT_FW_READY
> to FEATURE_SKIP_FW_CONFIRMATION. This way, the term CONFIRMATION covers:
> - waiting for firmware to confirm it is ready to start;
> - waiting for any other confirmation from firmware.
>
> Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] remoteproc: imx_dsp_rproc: Wait for suspend ACK only if WAIT_FW_CONFIRMATION is set
2025-12-04 12:28 ` [PATCH v2 3/3] remoteproc: imx_dsp_rproc: Wait for suspend ACK only if WAIT_FW_CONFIRMATION is set Iuliana Prodan (OSS)
2025-12-04 17:20 ` Frank Li
@ 2025-12-09 14:11 ` Daniel Baluta
1 sibling, 0 replies; 9+ messages in thread
From: Daniel Baluta @ 2025-12-09 14:11 UTC (permalink / raw)
To: Iuliana Prodan (OSS)
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
S.J. Wang, Fabio Estevam, Daniel Baluta, Iuliana Prodan, imx,
linux-remoteproc, linux-arm-kernel, linux-kernel,
Pengutronix Kernel Team
On Thu, Dec 4, 2025 at 2:29 PM Iuliana Prodan (OSS)
<iuliana.prodan@oss.nxp.com> wrote:
>
> From: Iuliana Prodan <iuliana.prodan@nxp.com>
>
> The DSP suspend path currently waits unconditionally for a suspend ack
> from the firmware. This breaks firmwares that do not implement the
> mailbox-based CONFIRMATION handshake, as the DSP never responds and
> system suspend fails with -EBUSY.
>
> The driver already uses the WAIT_FW_CONFIRMATION flag to indicate that
> the firmware supports the CONFIRMATION handshake at boot. Apply the same
> logic during suspend: only send the suspend message and wait for the
> suspend ack when the firmware is expected to support it.
>
> Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized
2025-12-04 12:28 [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Iuliana Prodan (OSS)
` (2 preceding siblings ...)
2025-12-09 14:09 ` [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Daniel Baluta
@ 2025-12-15 2:11 ` Mathieu Poirier
3 siblings, 0 replies; 9+ messages in thread
From: Mathieu Poirier @ 2025-12-15 2:11 UTC (permalink / raw)
To: Iuliana Prodan (OSS)
Cc: Bjorn Andersson, Shawn Guo, Sascha Hauer, S.J. Wang,
Fabio Estevam, Daniel Baluta, Iuliana Prodan, imx,
linux-remoteproc, linux-arm-kernel, linux-kernel,
Pengutronix Kernel Team
On Thu, Dec 04, 2025 at 02:28:23PM +0200, Iuliana Prodan (OSS) wrote:
> 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>
> ---
> Changes since v1:
> - Wrapped commit message to 75 characters
> - Changed dev_err to dev_dbg since this case is normal behavior
> ---
> drivers/remoteproc/imx_dsp_rproc.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
I have applied all 3 patches in this set. Next time, please consider adding a
cover letter.
Thanks,
Mathieu
> diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
> index 5130a35214c9..f51deaacc700 100644
> --- a/drivers/remoteproc/imx_dsp_rproc.c
> +++ b/drivers/remoteproc/imx_dsp_rproc.c
> @@ -1242,6 +1242,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_dbg(dev, "No initialized mbox tx channel, suspend directly.\n");
> + goto out;
> + }
> +
> reinit_completion(&priv->pm_comp);
>
> /* Tell DSP that suspend is happening */
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-12-15 2:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04 12:28 [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Iuliana Prodan (OSS)
2025-12-04 12:28 ` [PATCH v2 2/3] remoteproc: imx_dsp_rproc: Rename macro to reflect multiple contexts Iuliana Prodan (OSS)
2025-12-04 17:17 ` Frank Li
2025-12-09 14:10 ` Daniel Baluta
2025-12-04 12:28 ` [PATCH v2 3/3] remoteproc: imx_dsp_rproc: Wait for suspend ACK only if WAIT_FW_CONFIRMATION is set Iuliana Prodan (OSS)
2025-12-04 17:20 ` Frank Li
2025-12-09 14:11 ` Daniel Baluta
2025-12-09 14:09 ` [PATCH v2 1/3] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized Daniel Baluta
2025-12-15 2:11 ` Mathieu Poirier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).