]> git.baikalelectronics.ru Git - kernel.git/commit
[media] videobuf2-dma-sg: Allocate pages as contiguous as possible
authorRicardo Ribalda <ricardo.ribalda@gmail.com>
Fri, 2 Aug 2013 13:19:59 +0000 (10:19 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 26 Sep 2013 10:33:01 +0000 (07:33 -0300)
commitdc2e7a9b95b261eb80fb28232d7d7b998ca4b7ec
treea64d32ebea478de89333920d23ac67474be3580e
parent44a7dc7abe4a5d47923b3bb557c6516fdd7125a8
[media] videobuf2-dma-sg: Allocate pages as contiguous as possible

Most DMA engines have limitations regarding the number of DMA segments
(sg-buffers) that they can handle. Videobuffers can easily spread
through hundreds of pages.
In the previous aproach, the pages were allocated individually, this
could led to the creation houndreds of dma segments (sg-buffers) that
could not be handled by some DMA engines.
This patch tries to minimize the number of DMA segments by using
alloc_pages. In the worst case it will behave as before, but most
of the times it will reduce the number of dma segments

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/videobuf2-dma-sg.c