Hi Gerd Am 18.05.20 um 10:23 schrieb Gerd Hoffmann: >>> $ git grep drm_gem_shmem_mmap >>> >>> We also need correct access from userspace, otherwise the gpu is going to >>> be sad. >> >> I've been thinking about this, and I think it means that we can never >> have cached mappings anywhere. Even if shmem supports it internally for >> most drivers, as soon as the page are exported, the importer could >> expect uncached memory. > > The importer should not expect anything but call dma-buf ops so the > exporter has a chance to handle this correctly. I have the following case in mind: Suppose the exporter maps cached pages and the importer expects uncached pages for DMA. There is map_dma_buf/unmap_dma_buf, which can implement a cache flush for the cached pages. Is it guaranteed that the importer calls this around each DMA operation? If it doesn't, it could miss later buffer updates from the exporter. And there's apparently no explicit flush op in dma_buf_ops. Best regards Thomas > > (Yes, we don't get this right everywhere, some drivers take the dma-bufs > list of pages and do their own thing ...). > > take care, > Gerd > > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/dri-devel > -- 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
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel