From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-renesas-soc@vger.kernel.org,
Magnus Damm <magnus.damm@gmail.com>,
Gareth Williams <gareth.williams.jx@renesas.com>,
Phil Edworthy <phil.edworthy@renesas.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
linux-clk@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org, Viresh Kumar <vireshk@kernel.org>,
Vinod Koul <vkoul@kernel.org>,
dmaengine@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Milan Stevanovic <milan.stevanovic@se.com>,
Jimmy Lalande <jimmy.lalande@se.com>,
Pascal Eberhard <pascal.eberhard@se.com>,
Herve Codina <herve.codina@bootlin.com>,
Clement Leger <clement.leger@bootlin.com>
Subject: Re: [PATCH v4 7/9] dma: dw: Avoid partial transfers
Date: Fri, 11 Mar 2022 13:24:23 +0200 (EET) [thread overview]
Message-ID: <e53b98a5-fa32-97a4-7bf4-d46124c5ed@linux.intel.com> (raw)
In-Reply-To: <20220310194640.4bc6e604@xps13>
[-- Attachment #1: Type: text/plain, Size: 2977 bytes --]
On Thu, 10 Mar 2022, Miquel Raynal wrote:
> Hi Andy,
>
> andriy.shevchenko@linux.intel.com wrote on Thu, 10 Mar 2022 19:50:09
> +0200:
>
> > +Cc: Ilpo who is currently doing adjoining stuff.
Thanks for the head up. I was only aware of the ones on linux-serial.
> > Ilpo, this one affects Intel Bay Trail and Cherry Trail platforms.
> > Not sure if it's in scope of your interest right now, but it might
> > be useful to see how DMA <--> 8250 UART functioning.
> >
> > On Thu, Mar 10, 2022 at 04:57:53PM +0100, Miquel Raynal wrote:
> > > As investigated by Phil Edworthy <phil.edworthy@renesas.com> on RZN1 a
> >
> > Email can be dropped as you put it below, just (full) name is enough.
>
> Sure.
>
> > I'm wondering if Phil or anybody else who possess the hardware can
> > test / tested this.
>
> I have a board with an RZN1 SoC but I don't have exactly the same setup
> as Phil (I only have one port with DMA working, while he used two as a
> loopback device). I tried to reproduce the error with no luck so far. I
> however verified that there was apparently no performance hit
> whatsoever due to this change. IIRC Phil does not have the hardware
> anymore.
>
> > > while ago,
> > > pausing a partial transfer only causes data to be written to
> > > memory that is a multiple of the memory width setting.
This should be rephrased. As is it doesn't make sense.
--
i.
> >> Such a situation
> > > can happen eg. because of a char timeout interrupt on a UART. In this
> > > case, the current ->terminate_all() implementation does not always flush
> > > the remaining data as it should.
> > >
> > > In order to workaround this, a solutions is to resume and then pause
> > > again the transfer before termination. The resume call in practice
> > > actually flushes the remaining data.
> >
> > Perhaps Fixes tag?
>
> I don't know exactly what hardware can suffer from this, hence I
> decided not to add a Fixes tag given the fact that it was only observed
> on RZN1 (which was until now not yet supported upstream).
>
> > > Reported-by: Phil Edworthy <phil.edworthy@renesas.com>
> > > Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > > ---
> > > drivers/dma/dw/core.c | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
> > > index 7ab83fe601ed..2f6183177ba5 100644
> > > --- a/drivers/dma/dw/core.c
> > > +++ b/drivers/dma/dw/core.c
> > > @@ -862,6 +862,10 @@ static int dwc_terminate_all(struct dma_chan *chan)
> > >
> > > clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags);
> > >
> > > + /* Ensure the last byte(s) are drained before disabling the channel */
> > > + if (test_bit(DW_DMA_IS_PAUSED, &dwc->flags))
> > > + dwc_chan_resume(dwc, true);
> > > +
> > > dwc_chan_pause(dwc, true);
> > >
> > > dwc_chan_disable(dw, dwc);
> > > --
> > > 2.27.0
> > >
> >
>
>
> Thanks,
> Miquèl
>
next prev parent reply other threads:[~2022-03-11 11:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 15:57 [PATCH v4 0/9] RZN1 DMA support Miquel Raynal
2022-03-10 15:57 ` [PATCH v4 1/9] dt-bindings: dma: Introduce RZN1 dmamux bindings Miquel Raynal
2022-03-11 15:27 ` Rob Herring
2022-03-10 15:57 ` [PATCH v4 2/9] dt-bindings: clock: r9a06g032-sysctrl: Reference the DMAMUX subnode Miquel Raynal
2022-03-11 15:28 ` Rob Herring
2022-03-10 15:57 ` [PATCH v4 3/9] dt-bindings: dma: Introduce RZN1 DMA compatible Miquel Raynal
2022-03-10 15:57 ` [PATCH v4 4/9] soc: renesas: rzn1-sysc: Export function to set dmamux Miquel Raynal
2022-03-10 15:57 ` [PATCH v4 5/9] dma: dw: dmamux: Introduce RZN1 DMA router support Miquel Raynal
2022-03-10 17:44 ` Andy Shevchenko
2022-03-11 10:23 ` Vinod Koul
2022-03-10 15:57 ` [PATCH v4 6/9] dma: dw: Add RZN1 compatible Miquel Raynal
2022-03-10 15:57 ` [PATCH v4 7/9] dma: dw: Avoid partial transfers Miquel Raynal
2022-03-10 17:50 ` Andy Shevchenko
2022-03-10 18:46 ` Miquel Raynal
2022-03-11 11:24 ` Ilpo Järvinen [this message]
2022-03-10 15:57 ` [PATCH v4 8/9] ARM: dts: r9a06g032: Add the two DMA nodes Miquel Raynal
2022-03-10 15:57 ` [PATCH v4 9/9] ARM: dts: r9a06g032: Describe the DMA router Miquel Raynal
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=e53b98a5-fa32-97a4-7bf4-d46124c5ed@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=clement.leger@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=gareth.williams.jx@renesas.com \
--cc=geert@linux-m68k.org \
--cc=herve.codina@bootlin.com \
--cc=jimmy.lalande@se.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=milan.stevanovic@se.com \
--cc=miquel.raynal@bootlin.com \
--cc=mturquette@baylibre.com \
--cc=pascal.eberhard@se.com \
--cc=phil.edworthy@renesas.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vireshk@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).