From: Alain Volmat <alain.volmat@foss.st.com>
To: Amelie Delaunay <amelie.delaunay@foss.st.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
<dmaengine@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dmaengine: stm32-dma: set dma_device max_sg_burst
Date: Mon, 17 Jan 2022 10:25:16 +0100 [thread overview]
Message-ID: <20220117092516.GA431169@gnbcxd0016.gnb.st.com> (raw)
In-Reply-To: <20220117091740.11064-1-amelie.delaunay@foss.st.com>
Hi,
thanks Amelie.
Tested-by: Alain Volmat <alain.volmat@foss.st.com>
Alain
On Mon, Jan 17, 2022 at 10:17:40AM +0100, Amelie Delaunay wrote:
> Some stm32-dma consumers [1] rather use dma_get_slave_caps() to get
> max_sg_burst of their DMA channel as dma_get_max_seg_size() is specific to
> the DMA controller.
> All stm32-dma channels have the same features so, don't need to implement
> device_caps ops. Let dma_get_slave_caps() relies on dma_device
> configuration.
> That's why this patch sets dma_device max_sg_burst to the maximum segment
> size, which is the maximum of data items that can be transferred without
> software intervention.
>
> [1] https://lore.kernel.org/lkml/20220110103739.118426-1-alain.volmat@foss.st.com/
> "media: stm32: dcmi: create a dma scatterlist based on DMA max_sg_burst value"
>
> Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
> ---
> drivers/dma/stm32-dma.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
> index 83a37a6955a3..d2365fab1b7a 100644
> --- a/drivers/dma/stm32-dma.c
> +++ b/drivers/dma/stm32-dma.c
> @@ -1389,6 +1389,7 @@ static int stm32_dma_probe(struct platform_device *pdev)
> dd->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
> dd->copy_align = DMAENGINE_ALIGN_32_BYTES;
> dd->max_burst = STM32_DMA_MAX_BURST;
> + dd->max_sg_burst = STM32_DMA_ALIGNED_MAX_DATA_ITEMS;
> dd->descriptor_reuse = true;
> dd->dev = &pdev->dev;
> INIT_LIST_HEAD(&dd->channels);
> --
> 2.25.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-01-17 9:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 9:17 [PATCH] dmaengine: stm32-dma: set dma_device max_sg_burst Amelie Delaunay
2022-01-17 9:25 ` Alain Volmat [this message]
2022-02-15 5:42 ` 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=20220117092516.GA431169@gnbcxd0016.gnb.st.com \
--to=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.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