All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Peng Fan <peng.fan@nxp.com>
Cc: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	"andersson@kernel.org" <andersson@kernel.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"linux-remoteproc@vger.kernel.org"
	<linux-remoteproc@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH V2 0/2] remoteproc: imx: add start up delay
Date: Fri, 4 Nov 2022 09:33:03 -0600	[thread overview]
Message-ID: <20221104153303.GB1873068@p14s> (raw)
In-Reply-To: <DU0PR04MB94170F02CF6BD02D7869A75388389@DU0PR04MB9417.eurprd04.prod.outlook.com>

On Thu, Nov 03, 2022 at 05:08:15AM +0000, Peng Fan wrote:
> > Subject: Re: [PATCH V2 0/2] remoteproc: imx: add start up delay
> > 
> > On Wed, 2 Nov 2022 at 05:23, Peng Fan (OSS) <peng.fan@oss.nxp.com>
> > wrote:
> > >
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > V2:
> > >  Rebased on linux-next
> > >
> > > V1:
> > >
> > >
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore
> > > .kernel.org%2Flkml%2F20220609123500.3492475-1-
> > peng.fan%40oss.nxp.com%2
> > >
> > F&amp;data=05%7C01%7Cpeng.fan%40nxp.com%7Cf14584bdef9349e744ca
> > 08dabcf7
> > >
> > e1be%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63803007007
> > 2451509%7
> > >
> > CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJ
> > BTiI6Ik1
> > >
> > haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=Ck73gkOPpNVT
> > kcZL8olCZP8B
> > > %2BrIpZHV48uZBl2R8HdM%3D&amp;reserved=0
> > >
> > > There is case that after remoteproc start remote processor[M4], the M4
> > > runs slow and before M4 finish its own rpmsg framework initialization,
> > > linux sends out vring kick message, then M4 firmware drops the kick
> > > message. Some NXP released Cortex-M[x] images has such limitation that
> > > it requires linux sends out vring kick message after M4 firmware
> > > finish its rpmsg framework initialization.
> > >
> > > The best case is to use a method to let M4 notify Linux that M4 has
> > > finished initialization, but we could not patch released firmware,
> > > then update driver to detect notification.
> > >
> > > So add delay before linux send out vring kick message. It is not good
> > > to use a fixed time delay in driver, so I choose to get that from
> > > device tree.
> > >
> > 
> > From where I stand this is a hack to hide the lack of motivation to enact the
> > real solution that is outlined above.  I also wonder how these problems
> > were not caught during the testing phase.  Either find a way to upgrade your
> > firmware or keep this in your internal tree.
> In the beginning, i.mx not migrated to use remoteproc, i.MX release only support
> uboot kick Cortex-M core and use downstream imx_rpmsg driver to
> communicate with remote core. There is no runtime stop/start.
> 
> After migrated to remoteproc, we do see some issue, but old firmware was
> there.

You could also attach() to that remote processor, if the HW supports it.  But my
position remains the same - either find a way to work with this situation that
is not a hack or keep this patch in your internal tree.

> 
> Thanks,
> Peng.
> 
> > 
> > > Peng Fan (2):
> > >   dt-bindings: remoteproc: imx_rproc: add fsl,startup-delay-ms
> > >   remoteproc: imx_rproc: delay after kick remote processor
> > >
> > >  .../devicetree/bindings/remoteproc/fsl,imx-rproc.yaml    | 4 ++++
> > >  drivers/remoteproc/imx_rproc.c                           | 9 +++++++++
> > >  2 files changed, 13 insertions(+)
> > >
> > > --
> > > 2.37.1
> > >

WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Peng Fan <peng.fan@nxp.com>
Cc: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	"andersson@kernel.org" <andersson@kernel.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"linux-remoteproc@vger.kernel.org"
	<linux-remoteproc@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH V2 0/2] remoteproc: imx: add start up delay
Date: Fri, 4 Nov 2022 09:33:03 -0600	[thread overview]
Message-ID: <20221104153303.GB1873068@p14s> (raw)
In-Reply-To: <DU0PR04MB94170F02CF6BD02D7869A75388389@DU0PR04MB9417.eurprd04.prod.outlook.com>

On Thu, Nov 03, 2022 at 05:08:15AM +0000, Peng Fan wrote:
> > Subject: Re: [PATCH V2 0/2] remoteproc: imx: add start up delay
> > 
> > On Wed, 2 Nov 2022 at 05:23, Peng Fan (OSS) <peng.fan@oss.nxp.com>
> > wrote:
> > >
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > V2:
> > >  Rebased on linux-next
> > >
> > > V1:
> > >
> > >
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore
> > > .kernel.org%2Flkml%2F20220609123500.3492475-1-
> > peng.fan%40oss.nxp.com%2
> > >
> > F&amp;data=05%7C01%7Cpeng.fan%40nxp.com%7Cf14584bdef9349e744ca
> > 08dabcf7
> > >
> > e1be%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63803007007
> > 2451509%7
> > >
> > CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJ
> > BTiI6Ik1
> > >
> > haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=Ck73gkOPpNVT
> > kcZL8olCZP8B
> > > %2BrIpZHV48uZBl2R8HdM%3D&amp;reserved=0
> > >
> > > There is case that after remoteproc start remote processor[M4], the M4
> > > runs slow and before M4 finish its own rpmsg framework initialization,
> > > linux sends out vring kick message, then M4 firmware drops the kick
> > > message. Some NXP released Cortex-M[x] images has such limitation that
> > > it requires linux sends out vring kick message after M4 firmware
> > > finish its rpmsg framework initialization.
> > >
> > > The best case is to use a method to let M4 notify Linux that M4 has
> > > finished initialization, but we could not patch released firmware,
> > > then update driver to detect notification.
> > >
> > > So add delay before linux send out vring kick message. It is not good
> > > to use a fixed time delay in driver, so I choose to get that from
> > > device tree.
> > >
> > 
> > From where I stand this is a hack to hide the lack of motivation to enact the
> > real solution that is outlined above.  I also wonder how these problems
> > were not caught during the testing phase.  Either find a way to upgrade your
> > firmware or keep this in your internal tree.
> In the beginning, i.mx not migrated to use remoteproc, i.MX release only support
> uboot kick Cortex-M core and use downstream imx_rpmsg driver to
> communicate with remote core. There is no runtime stop/start.
> 
> After migrated to remoteproc, we do see some issue, but old firmware was
> there.

You could also attach() to that remote processor, if the HW supports it.  But my
position remains the same - either find a way to work with this situation that
is not a hack or keep this patch in your internal tree.

> 
> Thanks,
> Peng.
> 
> > 
> > > Peng Fan (2):
> > >   dt-bindings: remoteproc: imx_rproc: add fsl,startup-delay-ms
> > >   remoteproc: imx_rproc: delay after kick remote processor
> > >
> > >  .../devicetree/bindings/remoteproc/fsl,imx-rproc.yaml    | 4 ++++
> > >  drivers/remoteproc/imx_rproc.c                           | 9 +++++++++
> > >  2 files changed, 13 insertions(+)
> > >
> > > --
> > > 2.37.1
> > >

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-11-04 15:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 11:24 [PATCH V2 0/2] remoteproc: imx: add start up delay Peng Fan (OSS)
2022-11-02 11:24 ` Peng Fan (OSS)
2022-11-02 11:24 ` [PATCH V2 1/2] dt-bindings: remoteproc: imx_rproc: add fsl,startup-delay-ms Peng Fan (OSS)
2022-11-02 11:24   ` Peng Fan (OSS)
2022-11-02 19:01   ` Krzysztof Kozlowski
2022-11-02 19:01     ` Krzysztof Kozlowski
2022-11-02 11:24 ` [PATCH V2 2/2] remoteproc: imx_rproc: delay after kick remote processor Peng Fan (OSS)
2022-11-02 11:24   ` Peng Fan (OSS)
2022-11-02 17:29 ` [PATCH V2 0/2] remoteproc: imx: add start up delay Mathieu Poirier
2022-11-02 17:29   ` Mathieu Poirier
2022-11-03  5:08   ` Peng Fan
2022-11-03  5:08     ` Peng Fan
2022-11-04 15:33     ` Mathieu Poirier [this message]
2022-11-04 15:33       ` Mathieu Poirier

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=20221104153303.GB1873068@p14s \
    --to=mathieu.poirier@linaro.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.