Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Iuliana Prodan <iuliana.prodan@nxp.com>
To: Bjorn Andersson <andersson@kernel.org>,
	"Iuliana Prodan (OSS)" <iuliana.prodan@oss.nxp.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	"S.J. Wang" <shengjiu.wang@nxp.com>,
	Fabio Estevam <festevam@gmail.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	imx@lists.linux.dev, linux-remoteproc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: [PATCH 1/2] remoteproc: imx_dsp_rproc: Skip RP_MBOX_SUSPEND_SYSTEM when mailbox TX channel is uninitialized
Date: Wed, 3 Dec 2025 19:35:27 +0200	[thread overview]
Message-ID: <36564f56-eb61-449d-a90b-980304b0f5ea@nxp.com> (raw)
In-Reply-To: <mkgc3gpgzvdvotzw4752om5ascwxpscocaj2x5urzaa7ss4iys@rsqb3ebrexw7>

On 11/26/2025 10:14 PM, Bjorn Andersson wrote:
> On Tue, Nov 25, 2025 at 02:49:02PM +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.
> 
> Please use the allotted 75 characters of width for your commit message.
> 
Right, will do in v2.

>>
>> 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");
> 
> 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?
There's no error here; it's just a use case.
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
>>


      reply	other threads:[~2025-12-03 17:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36564f56-eb61-449d-a90b-980304b0f5ea@nxp.com \
    --to=iuliana.prodan@nxp.com \
    --cc=andersson@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=iuliana.prodan@oss.nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=shengjiu.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox