mbox series

[v3,0/4] Correct dma pool for imx-sdma

Message ID 1541504525-25720-1-git-send-email-yibin.gong@nxp.com (mailing list archive)
Headers show
Series Correct dma pool for imx-sdma | expand

Message

Robin Gong Nov. 6, 2018, 3:40 a.m. UTC
This patch set to correct dma pool used in the commit fe5b85c656bc
("dmaengine: imx-sdma: alloclate bd memory from dma pool")
because all bds should be contiguous in memory in multi bds case
for sdma, but dma pool can't statify it and cause transfer failure
then.Thank Lucas for the making things on the right way.

This patch set is v3 based on Lucas's V1/V2, the main refine:
  --fix the issue I reported in V1 but Lucas workaround it by improper
    way in V2.
  --add vchan_synchronize() to kill tasklet in virt-dma internal.
  --refine name: use sdma_disable_channel_async instead of
    sdma_disable_channel_with_delay since no delay indeed for
    device_terminate_all.
Please refer to below link for more information:
https://patchwork.kernel.org/patch/10601111


Lucas Stach (4):
  Revert "dmaengine: imx-sdma: Use GFP_NOWAIT for dma allocations"
  Revert "dmaengine: imx-sdma: alloclate bd memory from dma pool"
  dmaengine: imx-sdma: implement channel termination via worker
  dmaengine: imx-sdma: use GFP_NOWAIT for dma descriptor allocations

 drivers/dma/imx-sdma.c | 69 ++++++++++++++++++++++++++++++++------------------
 1 file changed, 44 insertions(+), 25 deletions(-)

Comments

Lucas Stach Nov. 12, 2018, 3:56 p.m. UTC | #1
Hi Robin,

Am Dienstag, den 06.11.2018, 03:40 +0000 schrieb Robin Gong:
> This patch set to correct dma pool used in the commit fe5b85c656bc
> ("dmaengine: imx-sdma: alloclate bd memory from dma pool")
> because all bds should be contiguous in memory in multi bds case
> for sdma, but dma pool can't statify it and cause transfer failure
> then.Thank Lucas for the making things on the right way.
> 
> This patch set is v3 based on Lucas's V1/V2, the main refine:
>   --fix the issue I reported in V1 but Lucas workaround it by improper
>     way in V2.
>   --add vchan_synchronize() to kill tasklet in virt-dma internal.
>   --refine name: use sdma_disable_channel_async instead of
>     sdma_disable_channel_with_delay since no delay indeed for
>     device_terminate_all.
> Please refer to below link for more information:
> https://patchwork.kernel.org/patch/10601111

Thanks for taking care of those. I've tested them on my board and
things seem to work fine for all my use-cases.

I think those patches should get a CC to stable 4.19. I guess Vinod can
add this when applying the patchset.

Regards,
Lucas
Robin Gong Nov. 20, 2018, 9:08 a.m. UTC | #2
> -----Original Message-----
> From: Lucas Stach <l.stach@pengutronix.de>
> Sent: 2018年11月12日 23:56
> To: Robin Gong <yibin.gong@nxp.com>; vkoul@kernel.org
> Cc: dmaengine@vger.kernel.org; linux-kernel@vger.kernel.org; dl-linux-imx
> <linux-imx@nxp.com>
> Subject: Re: [PATCH v3 0/4] Correct dma pool for imx-sdma
> 
> Hi Robin,
> 
> Am Dienstag, den 06.11.2018, 03:40 +0000 schrieb Robin Gong:
> > This patch set to correct dma pool used in the commit fe5b85c656bc
> > ("dmaengine: imx-sdma: alloclate bd memory from dma pool") because all
> > bds should be contiguous in memory in multi bds case for sdma, but dma
> > pool can't statify it and cause transfer failure then.Thank Lucas for
> > the making things on the right way.
> >
> > This patch set is v3 based on Lucas's V1/V2, the main refine:
> >   --fix the issue I reported in V1 but Lucas workaround it by improper
> >     way in V2.
> >   --add vchan_synchronize() to kill tasklet in virt-dma internal.
> >   --refine name: use sdma_disable_channel_async instead of
> >     sdma_disable_channel_with_delay since no delay indeed for
> >     device_terminate_all.
> > Please refer to below link for more information:
> > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpat
> >
> chwork.kernel.org%2Fpatch%2F10601111&amp;data=02%7C01%7Cyibin.gong
> %40n
> >
> xp.com%7Ce8faea984db24513bca208d648b766fc%7C686ea1d3bc2b4c6fa92cd
> 99c5c
> >
> 301635%7C0%7C0%7C636776349873940077&amp;sdata=U6y3CMUmMfiIzBc
> Zm7jZmXTf
> > 4JBgOnBEiHhkY6ejzl8%3D&amp;reserved=0
> 
> Thanks for taking care of those. I've tested them on my board and things seem
> to work fine for all my use-cases.
> 
> I think those patches should get a CC to stable 4.19. I guess Vinod can add this
> when applying the patchset.
Yes, we'd better fix on 4.19. Hope Vinod could help us.
> 
> Regards,
> Lucas
Robin Gong Dec. 4, 2018, 8:11 a.m. UTC | #3
Hello Vinod,
	 This patch set test by Lucas and no any other comment received yet, do you have
comments and help to push it on 4.19 stable tree?
> -----Original Message-----
> From: Robin Gong
> Sent: 2018年11月20日 17:09
> To: 'Lucas Stach' <l.stach@pengutronix.de>; vkoul@kernel.org
> Cc: dmaengine@vger.kernel.org; linux-kernel@vger.kernel.org; dl-linux-imx
> <linux-imx@nxp.com>
> Subject: RE: [PATCH v3 0/4] Correct dma pool for imx-sdma
> 
> 
> 
> > -----Original Message-----
> > From: Lucas Stach <l.stach@pengutronix.de>
> > Sent: 2018年11月12日 23:56
> > To: Robin Gong <yibin.gong@nxp.com>; vkoul@kernel.org
> > Cc: dmaengine@vger.kernel.org; linux-kernel@vger.kernel.org;
> > dl-linux-imx <linux-imx@nxp.com>
> > Subject: Re: [PATCH v3 0/4] Correct dma pool for imx-sdma
> >
> > Hi Robin,
> >
> > Am Dienstag, den 06.11.2018, 03:40 +0000 schrieb Robin Gong:
> > > This patch set to correct dma pool used in the commit fe5b85c656bc
> > > ("dmaengine: imx-sdma: alloclate bd memory from dma pool") because
> > > all bds should be contiguous in memory in multi bds case for sdma,
> > > but dma pool can't statify it and cause transfer failure then.Thank
> > > Lucas for the making things on the right way.
> > >
> > > This patch set is v3 based on Lucas's V1/V2, the main refine:
> > >   --fix the issue I reported in V1 but Lucas workaround it by
> > > improper
> > >     way in V2.
> > >   --add vchan_synchronize() to kill tasklet in virt-dma internal.
> > >   --refine name: use sdma_disable_channel_async instead of
> > >     sdma_disable_channel_with_delay since no delay indeed for
> > >     device_terminate_all.
> > > Please refer to below link for more information:
> > > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fp
> > > at
> > >
> >
> chwork.kernel.org%2Fpatch%2F10601111&amp;data=02%7C01%7Cyibin.gong
> > %40n
> > >
> >
> xp.com%7Ce8faea984db24513bca208d648b766fc%7C686ea1d3bc2b4c6fa92cd
> > 99c5c
> > >
> >
> 301635%7C0%7C0%7C636776349873940077&amp;sdata=U6y3CMUmMfiIzBc
> > Zm7jZmXTf
> > > 4JBgOnBEiHhkY6ejzl8%3D&amp;reserved=0
> >
> > Thanks for taking care of those. I've tested them on my board and
> > things seem to work fine for all my use-cases.
> >
> > I think those patches should get a CC to stable 4.19. I guess Vinod
> > can add this when applying the patchset.
> Yes, we'd better fix on 4.19. Hope Vinod could help us.
> >
> > Regards,
> > Lucas
Vinod Koul Dec. 5, 2018, 8:23 a.m. UTC | #4
On 06-11-18, 03:40, Robin Gong wrote:
> This patch set to correct dma pool used in the commit fe5b85c656bc
> ("dmaengine: imx-sdma: alloclate bd memory from dma pool")
> because all bds should be contiguous in memory in multi bds case
> for sdma, but dma pool can't statify it and cause transfer failure
> then.Thank Lucas for the making things on the right way.
> 
> This patch set is v3 based on Lucas's V1/V2, the main refine:
>   --fix the issue I reported in V1 but Lucas workaround it by improper
>     way in V2.
>   --add vchan_synchronize() to kill tasklet in virt-dma internal.
>   --refine name: use sdma_disable_channel_async instead of
>     sdma_disable_channel_with_delay since no delay indeed for
>     device_terminate_all.
> Please refer to below link for more information:
> https://patchwork.kernel.org/patch/10601111

Applied all, thanks and CCed stable