Hi Mark, Thanks for the feedback. > Subject: Re: [PATCH] spi: spi-rspi: Add force_dma variable to spi_ops > > On Sat, Jul 16, 2022 at 04:39:34PM +0100, Biju Das 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. > > So we need this for correctness until someone can figure out what goes > wrong :/ Yes, I am in touch with our HW engineers for the missing interrupt when we switch from DMA to interrupt mode. I will update you once, I receive the feedback from them. > > > 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%). > > How does that look for something doing lots of short transfers (like > register I/O for example), and what's the throughput like? DMA probably > is the most sensible default even so since the impact of doing PIO for > large transfers tends to be so bad, you have to be doing a *lot* of small > I/O before it gets to be a problem whereas basically any large transfer > will notice PIO. Basically, this performance measurement done by running LVGL on RZ/Five Connected to display module ili9341 by SPI interface. Currently we are switch to DMA mode for transfer length greater than 8 bytes. Since we have an issue with DMA to interrupt mode switching, initially we tried with PIO mode and fps was very low 1 fps. So we switched to DMA mode and it shoots up the fps to 65. Similar experiment done on RZ/G2UL connected to PMOD spi flash. In this case 1) The number of interrupts with PIO mode is 6 times greater than that of DMA. 2) The rd/wr test with DMA mode takes 3 minutes to finish whereas with PIO mode it takes 4 minutes to finish. > > > This patch introduces a variable force_dma to avoid switching between > > DMA to interrupt mode for RZ platforms. > > Not that it really matters but it's not a variable, it's a flag in the > device configuration. OK. > I'm wondering if we might want a way to override > this at runtime in case someone does have an application that suffers > badly from being forced into DMA (eg, some IIO thing), that could be done > incrementally though. OK. Sure. Cheers, Biju