Hi! I've now added user-buffers to TTM.
User-buffers are areas of client virtual memory that are temporarily bound to GPU virtual memory and they can typically be used for fast download-from-screen or zero copy texturing / Xv upload. Currently there's no copy-on-write functionality. That would be desirable for repeated data transfer to GPU, but it requires modifying VMAs that don't belong to the dri file-descriptor. I'm not quite sure how to implement that at this point. User-buffers require that the TTM backend supports cache-coherent (snooped) binding. That's a bit unusual but is probably a bit more common with PCIE hardware. We should probably also make them available for SG-operations. Perhaps using an SG memory type which is a special case of local memory. Validating for SG memory would mean setting up an SG list. User buffers cannot be shareable, they cannot be remapped to obtain a new virtual adress, and they cannot be validated to a fixed memory type. If the TTM backend doesn't support binding of non-DMA32 pages, it should fail if it encounters such a page, and it's up to the client to handle the failure. Mapping / Unmapping of a user buffer only handles syncing with the GPU. For SG-operations we should probably implement the dma_map_sg and dma_unmap_sg functionality. That would require the buffer to be mapped before CPU access so we can call dma_sync_sg_for_cpu() during mapping and it would then not be suitable for sub-allocator use. I can't see us using user buffers for sub-allocators anyway. /Thomas ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
