Hi Am 14.05.20 um 22:36 schrieb Rob Herring: > On Thu, May 14, 2020 at 7:40 AM Daniel Vetter wrote: >> >> On Wed, May 13, 2020 at 05:03:11PM +0200, Thomas Zimmermann wrote: >>> SHMEM-buffer backing storage is allocated from system memory; which is >>> typically cachable. Currently, only virtio uses cachable mappings; udl >>> uses its own vmap/mmap implementation for cachable mappings. Other >>> drivers default to writecombine mappings. >> >> I'm pretty sure this breaks all these drivers. quick grep on a few >> functions says this is used by lima, panfrost, v3d. And they definitely >> need uncached/wc stuff afaiui. Or I'm completely missing something? > OK. I think I'll just make a patch that adds a .gem_create_object helper that sets the map_cached flag. So drivers can opt-in. > Yes, that would be my guess. DMA is usually non-coherent on Arm. Can one of you give me some pointer to what you're looking at? For example, I grepped for use of vmap within lima and only found [1]. That's a for memcpy with no DMA involved. There's got to be something I'm missing. Best regards Thomas [1] https://cgit.freedesktop.org/drm/drm-tip/tree/drivers/gpu/drm/lima/lima_sched.c#n391 > > Rob > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer