From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Tony Lindgren <tony@atomide.com>, Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-omap@vger.kernel.org, Aaro Koskinen <aaro.koskinen@iki.fi>,
Adam Ford <aford173@gmail.com>,
Andreas Kemnade <andreas@kemnade.info>
Subject: Re: [PATCH] dmaengine: ti: omap-dma: Skip pointless cpu_pm context restore on errors
Date: Tue, 18 May 2021 14:36:29 +0300 [thread overview]
Message-ID: <fa4e06c9-4296-1fb2-278e-23b493d220cc@gmail.com> (raw)
In-Reply-To: <20210518074347.16908-1-tony@atomide.com>
On 18/05/2021 10:43, Tony Lindgren wrote:
> There's no need to restore DMA context on CPU_CLUSTER_PM_ENTER_FAILED as
> the DMA context won't be lost on errors.
>
> Note that this does not cause invalid context restore as we already check
> for busy DMA with omap_dma_busy() in CPU_CLUSTER_PM_ENTER, and block any
> deeper idle states for the SoC by returning NOTIFY_BAD if busy.
>
> If other drivers block deeper idle states with cpu_pm, we now just do a
> pointless restore, but only if dma was not busy on CPU_CLUSTER_PM_ENTER.
>
> Let's update the CPU_CLUSTER_PM_ENTER_FAILED handling for correctness,
> and add a comment.
Make sense,
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
> Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
> Cc: Adam Ford <aford173@gmail.com>
> Cc: Andreas Kemnade <andreas@kemnade.info>
> Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> drivers/dma/ti/omap-dma.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c
> --- a/drivers/dma/ti/omap-dma.c
> +++ b/drivers/dma/ti/omap-dma.c
> @@ -1608,7 +1608,8 @@ static int omap_dma_context_notifier(struct notifier_block *nb,
> return NOTIFY_BAD;
> omap_dma_context_save(od);
> break;
> - case CPU_CLUSTER_PM_ENTER_FAILED:
> + case CPU_CLUSTER_PM_ENTER_FAILED: /* No need to restore context */
> + break;
> case CPU_CLUSTER_PM_EXIT:
> omap_dma_context_restore(od);
> break;
>
--
Péter
next prev parent reply other threads:[~2021-05-18 11:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 7:43 [PATCH] dmaengine: ti: omap-dma: Skip pointless cpu_pm context restore on errors Tony Lindgren
2021-05-18 11:36 ` Péter Ujfalusi [this message]
2021-05-31 4:32 ` Vinod Koul
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=fa4e06c9-4296-1fb2-278e-23b493d220cc@gmail.com \
--to=peter.ujfalusi@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=aford173@gmail.com \
--cc=andreas@kemnade.info \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=vkoul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox