All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] Support for zerocopy to DMA buffers
@ 2010-03-17 22:53 Arnout Vandecappelle
  2010-03-17 22:53 ` [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen Arnout Vandecappelle
  2010-03-17 22:53 ` [PATCH 2/2] V4L/DVB: buf-dma-sg.c: support non-pageable user-allocated memory Arnout Vandecappelle
  0 siblings, 2 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2010-03-17 22:53 UTC (permalink / raw)
  To: linux-media, mchehab, arnout

 Hoi,

 [Please CC me, I'm not subscribed.]

 I'm implementing zerocopy transfer from a v4l2 camera to the DSP on an 
OMAP3 (based on earlier work by Stefan Kost [1][2]).  Therefore I'm using 
V4L2_MEMORY_USERPTR to pass in the memory area allocated by TI's DMAI 
driver.  However, this has flags VM_IO | VM_PFNMAP.  This means that it is 
not possible to do get_user_pages() on it - it's an area that is not 
pageable and possibly even doesn't pass the MMU.

 In order to support this kind of zerocopy construct, I propose to add 
checks for VM_IO | VM_PFNMAP and only get pages from areas that don't have 
these flags set.

 I also fixed another issue: it was assumed that dma->sglen == dma->nr_pages,
which is not true for the USERPTR memory.  Thanks to Sakari Ailus for
pointing out a bug I introduced there.

 Regards,
 Arnout

[1] https://bugzilla.gnome.org/show_bug.cgi?id=583890
[2] http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/6209


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Support for zerocopy to DSP on OMAP3
@ 2010-03-03 14:12 Arnout Vandecappelle
  2010-03-04 16:00 ` [PATCH 2/2] V4L/DVB: buf-dma-sg.c: support non-pageable user-allocated memory Arnout Vandecappelle
  0 siblings, 1 reply; 9+ messages in thread
From: Arnout Vandecappelle @ 2010-03-03 14:12 UTC (permalink / raw)
  To: linux-media

 Hoi,

 [Please CC me, I'm not subscribed.]

 I'm implementing zerocopy transfer from a v4l2 camera to the DSP on an 
OMAP3 (based on earlier work by Stefan Kost [1][2]).  Therefore I'm using 
V4L2_MEMORY_USERPTR to pass in the memory area allocated by TI's DMAI 
driver.  However, this has flags VM_IO | VM_PFNMAP.  This means that it is 
not possible to do get_user_pages() on it - it's an area that is not 
pageable and possibly even doesn't pass the MMU.

 In order to support this kind of zerocopy construct, I propose to add 
checks for VM_IO | VM_PFNMAP and only get pages from areas that don't have 
these flags set.

 If I get positive feedback on this, I'll supply a patch.


[1] https://bugzilla.gnome.org/show_bug.cgi?id=583890
[2] http://thread.gmane.org/gmane.linux.drivers.video-input-
infrastructure/6209

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  31BB CF53 8660 6F88 345D  54CC A836 5879 20D7 CF43

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

end of thread, other threads:[~2010-05-20 19:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-17 22:53 [PATCH v3] Support for zerocopy to DMA buffers Arnout Vandecappelle
2010-03-17 22:53 ` [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen Arnout Vandecappelle
2010-03-24  5:43   ` Sakari Ailus
2010-03-30 10:27     ` Arnout Vandecappelle
2010-03-17 22:53 ` [PATCH 2/2] V4L/DVB: buf-dma-sg.c: support non-pageable user-allocated memory Arnout Vandecappelle
2010-03-18 11:58   ` Aguirre, Sergio
2010-05-06  4:06   ` Mauro Carvalho Chehab
2010-05-20 19:22     ` Arnout Vandecappelle
  -- strict thread matches above, loose matches on Subject: below --
2010-03-03 14:12 Support for zerocopy to DSP on OMAP3 Arnout Vandecappelle
2010-03-04 16:00 ` [PATCH 2/2] V4L/DVB: buf-dma-sg.c: support non-pageable user-allocated memory Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.