dmaengine Archive on
 help / color / Atom feed
From: Vinod Koul <>
To: Serge Semin <>
Cc: Viresh Kumar <>,
	Andy Shevchenko <>,
	Serge Semin <>,
	Alexey Malahov <>,
	Pavel Parkhomenko <>,
	Peter Ujfalusi <>,
	Andy Shevchenko <>,
	Rob Herring <>,,,
Subject: Re: [PATCH v8 00/10] dmaengine: dw: Take Baikal-T1 SoC DW DMAC peculiarities into account
Date: Mon, 27 Jul 2020 14:31:14 +0530
Message-ID: <20200727090114.GM12965@vkoul-mobl> (raw)
In-Reply-To: <>

On 23-07-20, 03:58, Serge Semin wrote:
> In the previous patchset I've written the next message:
> > Folks, note I've removed the next patches from the series:
> > [PATCH v7 04/11] dmaengine: Introduce max SG list entries capability
> > [PATCH v7 11/11] dmaengine: dw: Initialize max_sg_nents capability
> > It turns out the problem with the asynchronous handling of Tx- and Rx-
> > SPI transfers interrupts is more complex than I expected. So in order to
> > solve the problem it isn't enough to split the SG list entries submission
> > up based on the max_sg_nents capability setting (though the synchronous
> > one-by-one SG list entries handling does fix a part of the problem). So
> > if and when I get to find a comprehensive solution for it I'll submit a
> > new series with fixups. Until then please consider to merge the patchset
> > in without those patches.
> Those patches are returned back to the series. I've found a solution, which
> fixes the problem for our hardware. A new patchset with several fixes for the
> DW DMAC driver will be sent shortly after this one is merged in. Note the same
> concerns the DW APB SPI driver. So please review and merge in as soon as
> possible.
> Regarding the patchset. Baikal-T1 SoC has an DW DMAC on-board to provide a
> Mem-to-Mem, low-speed peripherals Dev-to-Mem and Mem-to-Dev functionality.
> Mostly it's compatible with currently implemented in the kernel DW DMAC
> driver, but there are some peculiarities which must be taken into account
> in order to have the device fully supported.
> First of all traditionally we replaced the legacy plain text-based dt-binding
> file with yaml-based one. Secondly Baikal-T1 DW DMA Controller provides eight
> channels, which alas have different max burst length configuration.
> In particular first two channels may burst up to 128 bits (16 bytes) at a time
> while the rest of them just up to 32 bits. We must make sure that the DMA
> subsystem doesn't set values exceeding these limitations otherwise the
> controller will hang up. In third currently we discovered the problem in using
> the DW APB SPI driver together with DW DMAC. The problem happens if there is no
> natively implemented multi-block LLP transfers support and the SPI-transfer
> length exceeds the max lock size. In this case due to asynchronous handling of
> Tx- and Rx- SPI transfers interrupt we might end up with DW APB SSI Rx FIFO
> overflow. So if DW APB SSI (or any other DMAC service consumer) intends to use
> the DMAC to asynchronously execute the transfers we'd have to at least warn
> the user of the possible errors. In forth it's worth to set the DMA device max
> segment size with max block size config specific to the DW DMA controller. It
> shall help the DMA clients to create size-optimized SG-list items for the
> controller. This in turn will cause less dw_desc allocations, less LLP
> reinitializations, better DMA device performance.
> Finally there is a bug in the algorithm of the nollp flag detection.
> In particular even if DW DMAC parameters state the multi-block transfers
> support there is still HC_LLP (hardcode LLP) flag, which if set makes expected
> by the driver true multi-block LLP functionality unusable. This happens cause'
> if HC_LLP flag is set the LLP registers will be hardcoded to zero so the
> contiguous multi-block transfers will be only supported. We must take the
> flag into account when detecting the LLP support otherwise the driver just
> won't work correctly.

Applied all, thanks

  parent reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23  0:58 Serge Semin
2020-07-23  0:58 ` [PATCH v8 01/10] dt-bindings: dma: dw: Convert DW DMAC to DT binding Serge Semin
2020-07-23  0:58 ` [PATCH v8 02/10] dt-bindings: dma: dw: Add max burst transaction length property Serge Semin
2020-07-23  0:58 ` [PATCH v8 03/10] dmaengine: Introduce min burst length capability Serge Semin
2020-07-23  0:58 ` [PATCH v8 04/10] dmaengine: Introduce max SG burst capability Serge Semin
2020-07-23  0:58 ` [PATCH v8 05/10] dmaengine: Introduce DMA-device device_caps callback Serge Semin
2020-07-23  0:58 ` [PATCH v8 06/10] dmaengine: dw: Take HC_LLP flag into account for noLLP auto-config Serge Semin
2020-07-23  0:58 ` [PATCH v8 07/10] dmaengine: dw: Set DMA device max segment size parameter Serge Semin
2020-07-23  0:58 ` [PATCH v8 08/10] dmaengine: dw: Initialize min and max burst DMA device capability Serge Semin
2020-07-23  0:58 ` [PATCH v8 09/10] dmaengine: dw: Introduce max burst length hw config Serge Semin
2020-07-23  0:58 ` [PATCH v8 10/10] dmaengine: dw: Initialize max_sg_burst capability Serge Semin
2020-07-27  9:01 ` Vinod Koul [this message]
2020-07-27 20:55   ` [PATCH v8 00/10] dmaengine: dw: Take Baikal-T1 SoC DW DMAC peculiarities into account Serge Semin

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:

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

  git send-email \
    --in-reply-to=20200727090114.GM12965@vkoul-mobl \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

dmaengine Archive on

Archives are clonable:
	git clone --mirror dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ \
	public-inbox-index dmaengine

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone