On Tue, 2017-10-31 at 17:09 +0530, Vinod Koul wrote: > On Mon, Oct 30, 2017 at 06:39:07PM +0530, Shevchenko, Andriy wrote: > > Per channel DMA parameters structure and sg_list (re-)split > > ----------------------------------------------------------- > > Potentially some of DMA controllers may have different configuration > > options on per channel basis. Inside struct device we have embedded > > struct dma_parms which provides two fields: 1) maximum segment size, > > and > > 2) alignment boundary. API to set and retrieve these parameters is > > bound to struct device. We might need something similar for struct > > dma_chan. > > Sorry am not sure I follow, which parameters are we talking about > here? Is > it for dma_slave_caps? Currently there is a struct device_dma_parameters in device.h which is embedded in struct device. Lars also pointed me to struct dma_slave_caps, so, my idea is to provide parameters based on channel, not an entire device. struct dma_slave_caps might be even more suitable for that. But the former one has been added back to 2008 by commit 6b7b65105522 ("iommu sg merging: add device_dma_parameters structure"). > > (That's why I stopped doing my patch series with sg_list split for > > DMA > > controller drivers) > > > > Some frameworks (SPI core, for example) are already using this to > > prepare sg_list accordingly. > > > > The benefit of the change is to decrease latency for DMA setup when > > sg_list is prepared without actual knowledge about DMA channel > > parameters. > > > > Alexey shared opinion that there is no rush to implement it because > > there is no example of such device in practice. > > > > Lars has different view on this, pointing to flexibility of the > > drivers > > (drivers know for sure all limitations and advantages of certain DMA > > controller) and necessity to do at least a check since not all > > subsystems are supporting mentioned API. -- Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html