Hi Hans, Hans Verkuil wrote: > On 09/11/2015 01:50 PM, Sakari Ailus wrote: >> The struct vb2_dc_buf contains two struct sg_table fields: sgt_base and >> dma_sgt. The former is used by DMA-BUF buffers whereas the latter is used >> by USERPTR. >> >> Unify the two, leaving dma_sgt. >> >> MMAP buffers do not need cache flushing since they have been allocated >> using dma_alloc_coherent(). > > I would have to see this again after it is rebased on 4.3-rc1. That will contain > Jan Kara's vb2 changes which might well affect this patch. Ok. I'll do that. > > Are there use-cases where we want to allocate non-coherent memory? I know we > don't support this today, but is this something we might want in the future? Yes. Not all hardware supports coherent memory access, not even on x86. Or coherent memory (sometimes uncached!) may be slower than non-coherent access, including the time it takes to flush the cache first. -- Kind regards, Sakari Ailus sakari.ailus@xxxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html