Re: [PATCH] spi: spi-rspi: Add force_dma variable to spi_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Biju,

On Tue, Jul 19, 2022 at 10:29 AM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> > Subject: Re: [PATCH] spi: spi-rspi: Add force_dma variable to spi_ops
> > On Sat, Jul 16, 2022 at 5:39 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> > > On RZ/G2L SoCs switching from DMA to interrupt mode, causes timeout
> > > issue as we are not getting Rx interrupt even though SPRF bit is set
> > > in the status register.
> > >
> > > But there is no issue if we don't switch between interrupt to DMA mode
> > > or vice versa.
> > >
> > > Performance comparison between interrupt and DMA mode on RZ/Five SMARC
> > > platform connected to a display module shows that performance and CPU
> > > utilization is much better with DMA mode compared to interrupt mode
> > > (1->65 fps) and (98->8%).
> > >
> > > This patch introduces a variable force_dma to avoid switching between
> > > DMA to interrupt mode for RZ platforms.
> > >
> > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> >
> > Thanks for your patch!
> >
> > > @@ -1196,6 +1197,7 @@ static const struct spi_ops rspi_rz_ops = {
> > >         .flags =                SPI_CONTROLLER_MUST_RX |
> > SPI_CONTROLLER_MUST_TX,
> > >         .fifo_size =            8,      /* 8 for TX, 32 for RX */
> > >         .num_hw_ss =            1,
> > > +       .force_dma =            true,
> > >  };
> >
> > Do you know if this is needed on RZ/A series, too?
>
> I guess it is needed?? I may be wrong. I got a link from Chris [1]. As per this still
> We haven't found a solution. May be the priority is changed for this activity and
> no one looked after this.
>
> [1] https://lore.kernel.org/linux-renesas-soc/?q=spi-rspi+mixes+DMA+and+PIO+transfers+causing+PIO+transfer+to+fail

Daniel said he found the issue, i.e. the dmac driver never resetting
DMARS?

> > I knowupstream does not have DMA support for RZ/A yet, but the BSP has?
>
> RZ/G2L DMA driver is derived from RZ/A, with small changes it can support RZ/A.
> I am not sure is there any plan to upstream DMA support for RZ/A?
> I do not have RZ/A board.

I have, so it might happen, one day...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux