dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* dma-buf non-coherent mmap
@ 2013-10-31 17:00 Thomas Hellstrom
  2013-10-31 17:52 ` Rob Clark
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Hellstrom @ 2013-10-31 17:00 UTC (permalink / raw)
  To: dri-devel@lists.freedesktop.org, linaro-mm-sig, Daniel Vetter

Hi!

I'm just looking over what's needed to implement drm Prime / dma-buf 
exports + imports in the vmwgfx driver. It seems like most dma-bufs ops 
are quite straightforward to implement except user-space mmap().

The reason being that vmwgfx dma-bufs will be using completely 
non-coherent memory, whenever there needs to be CPU accesses.

The accelerated contents resides in an opaque structure on the device 
into which we can DMA to and from, so for mmap to work we need to zap 
ptes and DMA to the device when doing something accelerated, and on the 
first page-fault DMA data back and wait for idle if the device did a 
write to the dma-buf.

Now this shouldn't really be a problem if dma-bufs were only used for 
cross-device sharing, but since people apparently want to use dma-buf 
file handles to share CPU data between processes it really becomes a 
serious problem.

Needless to say we'd want to limit the size of the DMAs, and have mmap 
users request regions for read, and mark regions dirty for write, 
something similar to gallium's texture transfer objects.

Any ideas?

/Thomas

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-11-04 10:48 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-31 17:00 dma-buf non-coherent mmap Thomas Hellstrom
2013-10-31 17:52 ` Rob Clark
2013-10-31 20:40   ` Thomas Hellstrom
2013-10-31 20:48     ` Dave Airlie
2013-10-31 21:07       ` Thomas Hellstrom
2013-10-31 23:00         ` Daniel Vetter
2013-11-01  0:17           ` Jakob Bornecrantz
2013-11-01  0:25             ` Rob Clark
2013-11-01  0:37               ` Jakob Bornecrantz
2013-11-01  0:57                 ` Rob Clark
2013-11-01 10:03                   ` Lucas Stach
2013-11-01 10:17                     ` Daniel Vetter
2013-11-01 13:22                       ` Rob Clark
2013-11-01 13:32                         ` Lucas Stach
2013-11-04  7:53                           ` Thomas Hellstrom
2013-11-04 10:22                             ` Lucas Stach
2013-11-04 10:48                               ` Thomas Hellstrom
2013-11-01 13:54                       ` Thomas Hellstrom
2013-10-31 21:10     ` Rob Clark
2013-10-31 21:38       ` Thomas Hellstrom
2013-10-31 22:43         ` [Linaro-mm-sig] " Benjamin Gaignard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).