Hello everyone,
This patchset adds support for DMABUF [2] importing to V4L2 stack.
The support for DMABUF exporting was moved to separate patchset
due to dependency on patches for DMA mapping redesign by
Marek Szyprowski [4].
v4:
- rebased on mainline 3.4-rc2
- included missing importing support for s5p-fimc and s5p-tv
- added patch for changing map/unmap for importers
- fixes to Documentation part
- coding style fixes
- pairing {map/unmap}_dmabuf in vb2-core
- fixing variable types and semantic of arguments in videobufb2-dma-contig.c
v3:
- rebased on mainline 3.4-rc1
- split 'code refactor' patch to multiple smaller patches
- squashed fixes to Sumit's patches
- patchset is no longer dependant on 'DMA mapping redesign'
- separated path for handling IO and non-IO mappings
- add documentation for DMABUF importing to V4L
- removed all DMABUF exporter related code
- removed usage of dma_get_pages extension
v2:
- extended VIDIOC_EXPBUF argument from integer memoffset to struct
v4l2_exportbuffer
- added patch that breaks DMABUF spec on (un)map_atachment callcacks but allows
to work with existing implementation of DMABUF prime in DRM
- all dma-contig code refactoring patches were squashed
- bugfixes
v1: List of changes since [1].
- support for DMA api extension dma_get_pages, the function is used to retrieve
pages used to create DMA mapping.
- small fixes/code cleanup to videobuf2
- added prepare and finish callbacks to vb2 allocators, it is used keep
consistency between dma-cpu acess to the memory (by Marek Szyprowski)
- support for exporting of DMABUF buffer in V4L2 and Videobuf2, originated from
[3].
- support for dma-buf exporting in vb2-dma-contig allocator
- support for DMABUF for s5p-tv and s5p-fimc (capture interface) drivers,
originated from [3]
- changed handling for userptr buffers (by Marek Szyprowski, Andrzej
Pietrasiewicz)
- let mmap method to use dma_mmap_writecombine call (by Marek Szyprowski)
[1] http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/4296…
[2] https://lkml.org/lkml/2011/12/26/29
[3] http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/3635…
[4] http://thread.gmane.org/gmane.linux.kernel.cross-arch/12819
Andrzej Pietrasiewicz (1):
v4l: vb2-dma-contig: add support for scatterlist in userptr mode
Laurent Pinchart (2):
v4l: vb2-dma-contig: Shorten vb2_dma_contig prefix to vb2_dc
v4l: vb2-dma-contig: Reorder functions
Marek Szyprowski (2):
v4l: vb2: add prepare/finish callbacks to allocators
v4l: vb2-dma-contig: add prepare/finish to dma-contig allocator
Sumit Semwal (4):
v4l: Add DMABUF as a memory type
v4l: vb2: add support for shared buffer (dma_buf)
v4l: vb: remove warnings about MEMORY_DMABUF
v4l: vb2-dma-contig: add support for dma_buf importing
Tomasz Stanislawski (5):
Documentation: media: description of DMABUF importing in V4L2
v4l: vb2-dma-contig: Remove unneeded allocation context structure
v4l: vb2-dma-contig: change map/unmap behaviour for importers
v4l: s5p-tv: mixer: support for dmabuf importing
v4l: fimc: support for dmabuf importing
Documentation/DocBook/media/v4l/compat.xml | 4 +
Documentation/DocBook/media/v4l/io.xml | 179 +++++++
.../DocBook/media/v4l/vidioc-create-bufs.xml | 1 +
Documentation/DocBook/media/v4l/vidioc-qbuf.xml | 15 +
Documentation/DocBook/media/v4l/vidioc-reqbufs.xml | 47 +-
drivers/media/video/Kconfig | 1 +
drivers/media/video/s5p-fimc/fimc-capture.c | 2 +-
drivers/media/video/s5p-tv/Kconfig | 1 +
drivers/media/video/s5p-tv/mixer_video.c | 2 +-
drivers/media/video/videobuf-core.c | 4 +
drivers/media/video/videobuf2-core.c | 207 +++++++-
drivers/media/video/videobuf2-dma-contig.c | 553 +++++++++++++++++---
include/linux/videodev2.h | 7 +
include/media/videobuf2-core.h | 34 ++
14 files changed, 956 insertions(+), 101 deletions(-)
--
1.7.5.4
Hello,
Linux v3.4-rc2, which include dma-mapping preparation patches, has been
released two days ago, now it's time for the next spin of ARM
dma-mapping redesign patches. This version includes various fixes posted
separately to v7, mainly related to incorrect io address space bitmap
setup and a major issue with broken mmap for memory which comes from
dma_declare_coherent(). The patches have been also rebased onto Linux
v3.4-rc2 which comes with dma_map_ops related changes.
The code has been tested on Samsung Exynos4 'UniversalC210' and NURI
boards with IOMMU driver posted by KyongHo Cho, I will put separate
branch which shows how to integrate this driver with this patchset.
The patches are also available on my git repository at:
git://git.linaro.org/people/mszyprowski/linux-dma-mapping.git 3.4-rc2-arm-dma-v8
History of the development:
v1: (initial version of the DMA-mapping redesign patches):
http://www.spinics.net/lists/linux-mm/msg21241.html
v2:
http://lists.linaro.org/pipermail/linaro-mm-sig/2011-September/000571.htmlhttp://lists.linaro.org/pipermail/linaro-mm-sig/2011-September/000577.html
v3:
http://www.spinics.net/lists/linux-mm/msg25490.html
v4 and v5:
http://www.spinics.net/lists/arm-kernel/msg151147.htmlhttp://www.spinics.net/lists/arm-kernel/msg154889.html
v6:
http://www.spinics.net/lists/linux-mm/msg29903.html
v7:
http://www.spinics.net/lists/arm-kernel/msg162149.html
Best regards
Marek Szyprowski
Samsung Poland R&D Center
Patch summary:
Marek Szyprowski (10):
common: add dma_mmap_from_coherent() function
ARM: dma-mapping: use pr_* instread of printk
ARM: dma-mapping: introduce ARM_DMA_ERROR constant
ARM: dma-mapping: remove offset parameter to prepare for generic
dma_ops
ARM: dma-mapping: use asm-generic/dma-mapping-common.h
ARM: dma-mapping: implement dma sg methods on top of any generic dma
ops
ARM: dma-mapping: move all dma bounce code to separate dma ops
structure
ARM: dma-mapping: remove redundant code and cleanup
ARM: dma-mapping: use alloc, mmap, free from dma_ops
ARM: dma-mapping: add support for IOMMU mapper
arch/arm/Kconfig | 9 +
arch/arm/common/dmabounce.c | 84 +++-
arch/arm/include/asm/device.h | 4 +
arch/arm/include/asm/dma-iommu.h | 34 ++
arch/arm/include/asm/dma-mapping.h | 407 ++++-----------
arch/arm/mm/dma-mapping.c | 1019 ++++++++++++++++++++++++++++++------
arch/arm/mm/vmregion.h | 2 +-
drivers/base/dma-coherent.c | 42 ++
include/asm-generic/dma-coherent.h | 4 +-
9 files changed, 1138 insertions(+), 467 deletions(-)
create mode 100644 arch/arm/include/asm/dma-iommu.h
--
1.7.1.569.g6f426
Hello everyone,
This patchset adds support for DMABUF [2] importing to V4L2 stack. It was
updated after Laurent Pinchart's review. The support for DMABUF exporting was
moved to separate patchset due to dependency on patches for DMA mapping
redesign by Marek Szyprowski [4].
v3:
- rebased on mainline 3.4-rc1
- split 'code refactor' patch to multiple smaller patches
- squashed fixes to Sumit's patches
- patchset is no longer dependant on 'DMA mapping redesign'
- separated path for handling IO and non-IO mappings
- add documentation for DMABUF importing to V4L
- removed all DMABUF exporter related code
- removed usage of dma_get_pages extension
v2:
- extended VIDIOC_EXPBUF argument from integer memoffset to struct
v4l2_exportbuffer
- added patch that breaks DMABUF spec on (un)map_atachment callcacks but allows
to work with existing implementation of DMABUF prime in DRM
- all dma-contig code refactoring patches were squashed
- bugfixes
v1: List of changes since [1].
- support for DMA api extension dma_get_pages, the function is used to retrieve
pages used to create DMA mapping.
- small fixes/code cleanup to videobuf2
- added prepare and finish callbacks to vb2 allocators, it is used keep
consistency between dma-cpu acess to the memory (by Marek Szyprowski)
- support for exporting of DMABUF buffer in V4L2 and Videobuf2, originated from
[3].
- support for dma-buf exporting in vb2-dma-contig allocator
- support for DMABUF for s5p-tv and s5p-fimc (capture interface) drivers,
originated from [3]
- changed handling for userptr buffers (by Marek Szyprowski, Andrzej
Pietrasiewicz)
- let mmap method to use dma_mmap_writecombine call (by Marek Szyprowski)
[1] http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/4296…
[2] https://lkml.org/lkml/2011/12/26/29
[3] http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/3635…
[4] http://thread.gmane.org/gmane.linux.kernel.cross-arch/12819
Andrzej Pietrasiewicz (1):
v4l: vb2-dma-contig: add support for scatterlist in userptr mode
Laurent Pinchart (2):
v4l: vb2-dma-contig: Shorten vb2_dma_contig prefix to vb2_dc
v4l: vb2-dma-contig: Reorder functions
Marek Szyprowski (2):
v4l: vb2: add prepare/finish callbacks to allocators
v4l: vb2-dma-contig: add prepare/finish to dma-contig allocator
Sumit Semwal (4):
v4l: Add DMABUF as a memory type
v4l: vb2: add support for shared buffer (dma_buf)
v4l: vb: remove warnings about MEMORY_DMABUF
v4l: vb2: Add dma-contig allocator as dma_buf user
Tomasz Stanislawski (2):
Documentation: media: description of DMABUF importing in V4L2
v4l: vb2-dma-contig: Remove unneeded allocation context structure
Documentation/DocBook/media/v4l/compat.xml | 4 +
Documentation/DocBook/media/v4l/io.xml | 177 +++++++
.../DocBook/media/v4l/vidioc-create-bufs.xml | 1 +
Documentation/DocBook/media/v4l/vidioc-qbuf.xml | 15 +
Documentation/DocBook/media/v4l/vidioc-reqbufs.xml | 8 +-
drivers/media/video/videobuf-core.c | 4 +
drivers/media/video/videobuf2-core.c | 195 +++++++-
drivers/media/video/videobuf2-dma-contig.c | 536 +++++++++++++++++---
include/linux/videodev2.h | 8 +
include/media/videobuf2-core.h | 38 ++
10 files changed, 910 insertions(+), 76 deletions(-)
--
1.7.5.4
I'm interested in CMA scheme or preserved memory allocation of ION
(ION_HEAP_TYPE_CARVEOUT heap type)
I knew many SoC vendors (TI, nvidia, qualcom) already used similar
approaches for multimedia processing in the past.
However, reservation of physical memory should waste memory and limit
available system memory, so now they use an IOMMU to support a contiguous
virtual address region.
In addition to, ICS (Ice Cream Sandwitch) support overlay UI layer
requiring lots of contiguous memory allocation area.
Now I'm suggesting an idea to use lots of contiguous memory allocation area
without IOMMU.
So ION_HEAP_TYPE_CARVEOUT heap type of ION is one of my considerations, but
you know that it might exhaust much physical memory. However, I think
physical memory wasting problem can be solved in the virtualized system.
In case of virtualized environment, physical memory is intermediate
physical memory instead of real physical memory, so a preserved carveout
heap does not exhaust real physical memory any more. In addition to, if
virtual address and intermediate physical address are 32 and 40bits
respectively, virtual memory is not exhausted neither.
How do you think about my suggestion?
From: Prathyush K <prathyush.k(a)samsung.com>
With these set of patches, the Exynos5 DRM module will be able to
allocate, export and map non-contiguous memory for GEM objects using the
dma-mapping IOMMU framework.
These patches are based on the following references:
1> Exynos 5 SYSMMU driver by Kyongho Cho
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-December/078636.…
2> DMA-MAPPING IOMMU framework by Marek Szyprowski
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-June/053636.html
3> DRM-PRIME by Dave Airlie
http://patches.linaro.org/7480/
4> DRM Exynos DMABUF module by Inki Dae
http://git.infradead.org/users/kmpark/linux-2.6-samsung/commit/
d59d3e521d8a9d27e7b329f89f24a8473f32f50c/
5> Support for dma_get_pages by Tomasz Stanislawski
http://patchwork.linuxtv.org/patch/9639/
The updated GEM framework by Inki Dae is not considered for this patch set.
IOMMU mapping is created for exynos-drm-device initially.
Allocation of GEM objects happens through dma_alloc_writecombine which
inturn calls arm_iommu_alloc_attrs. This will allocate a non-contig set of
pages, allocate a iova and map all the pages.
The following changes are done to support non-contiguous memory for GEM objects
[PATCH 1/4]:
drm/exynos: DMABUF: Added support for exporting non-contig buffers.
This patch is for creating and mapping a SGT in map_dma_buf by
retrieving the pages by calling dma_get_pages.
[PATCH 2/4]:
drm/exynos: Mapping of gem objects uses dma_mmap_writecombine.
This patch is for mapping the non-contiguous GEM objects to user
space by calling dma_mmap_writecombine.
[PATCH 3/4]:
drm/Exynos: Added 'disable' function to Exynos drm crtc module.
This patch is required for safe release of DRM. If a FB of a CRTC
is released, the driver tries to disable the CRTC if that is
supported by the CRTC. This patch adds Exynos DRM CRTC disable
functionality.
[PATCH 4/4]:
drm: Releasing FBs before releasing GEM objects during drm_release.
This patch is required for safe release of DRM. During drm release,
all the FBs and GEM objects are released. A gem object which is used
as a FB must not be freed first before releasing the FB. This patch
modifies the drm release function to first release the FBs and then
release the GEMs.
drivers/gpu/drm/drm_fops.c | 6 +-
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 +++
drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 98 +++++++++++++++++++++++-----
drivers/gpu/drm/exynos/exynos_drm_gem.c | 70 +++++++++-----------
4 files changed, 128 insertions(+), 57 deletions(-)
Hi!
This is an example of the IOMMU aware DMA-mapping implementation usage
on a Samsung Exynos4 based NURI board. The ARM DMA-mapping IOMMU aware
implementation is available in the [1] thread:
This patch essentially registers DMA-mmaping/IOMMU support for FIMC and
MFC devices and performs some tweaks in clocks hierarchy to get SYSMMU
driver working correctly.
The drivers have been tested with mainline V4L2 drivers for FIMC and MFC
hardware.
For easier testing I've created a separate kernel branch with all
required prerequisite patches. It is based on lastest kgene/for-next
branch and is available on my git repository:
git://git.linaro.org/people/mszyprowski/linux-dma-mapping.git 3.4-rc2-arm-dma-v8-samsung
This patch requires the following items:
1. ARM DMA-mapping patches [1]
2. Exynos SYSMMU driver v12 [2]
3. Exynos SYSMMU driver runtime pm fixes
4. Exynos4 gen_pd power domain driver fixes
Runtime pm and power domain patches are required on Samsung Nuri board,
but might be optional on boards where bootloader doesn't disable all
devices on boot.
[1] http://www.spinics.net/lists/linux-arch/msg17331.html
[2] https://lkml.org/lkml/2012/3/15/51
Best regards
Marek Szyprowski
Samsung Poland R&D Center
Patch summary:
Marek Szyprowski (1):
ARM: Exynos4: integrate SYSMMU driver with DMA-mapping interface
arch/arm/mach-exynos/Kconfig | 1 +
arch/arm/mach-exynos/clock-exynos4.c | 64 +++++++++++++++-------------
arch/arm/mach-exynos/dev-sysmmu.c | 44 +++++++++++++++++++
arch/arm/mach-exynos/include/mach/sysmmu.h | 3 +
drivers/iommu/Kconfig | 1 +
5 files changed, 84 insertions(+), 29 deletions(-)
--
1.7.1.569.g6f426
Hello everyone,
The patcheset adds support for DMABUF [1] importing to vmalloc allocator in
videobuf2 stack. This is an incremental patch to 'Integration of videobuf2
with dmabuf' patchset [2]. This patch makes use of vmap extension for dmabuf
proposed by Dave Airlie [3].
The vmap was preferred over the kmap extension. The reason is that VIVI driver
requires the memory to be mapped into a contiguous block of virtual memory
accessible by kernel. The workaround could be mapping all pages into kernel
memory but the dmabuf-kmap interface does guarantee that consecutive pages are
mapped into consecutive addresses.
[1] https://lkml.org/lkml/2011/12/26/29
[2] http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/46586
[3] http://cgit.freedesktop.org/~airlied/linux/commit/?h=drm-dmabuf2&id=c481a54…
Dave Airlie (1):
dma-buf: add vmap interface
Tomasz Stanislawski (2):
v4l: vb2-vmalloc: add support for dmabuf importing
v4l: vivi: support for dmabuf importing
drivers/base/dma-buf.c | 29 ++++++++++++++++
drivers/media/video/Kconfig | 1 +
drivers/media/video/videobuf2-vmalloc.c | 56 +++++++++++++++++++++++++++++++
drivers/media/video/vivi.c | 2 +-
include/linux/dma-buf.h | 16 +++++++++
5 files changed, 103 insertions(+), 1 deletions(-)
--
1.7.5.4
Hello,
This is yet another update on my works DMA-mapping framework redesign
for ARM architecture. It includes a few minor cleanup and fixes reported
by Konrad Rzeszutek Wilk and Krishna Reddy.
This version uses vmalloc for allocating page pointers array if it is
larger than PAGE_SIZE. The chained allocation which fits inside a set of
PAGE_SIZE units will be added later, once the base patches are merged.
Like the previous version, this patchset is also based on the generic,
cross-arch dma-mapping redesign patches posted in the "[PATCH 00/14]
DMA-mapping framework redesign preparation" thread:
http://www.spinics.net/lists/linux-sh/msg09777.html
All patches have been now rebased onto v3.3-rc5 kernel.
All the code has been tested on Samsung Exynos4 'UniversalC210' board
with IOMMU driver posted by KyongHo Cho.
History of the development:
v1: (initial version of the DMA-mapping redesign patches):
http://www.spinics.net/lists/linux-mm/msg21241.html
v2:
http://lists.linaro.org/pipermail/linaro-mm-sig/2011-September/000571.htmlhttp://lists.linaro.org/pipermail/linaro-mm-sig/2011-September/000577.html
v3:
http://www.spinics.net/lists/linux-mm/msg25490.html
v4 and v5:
http://www.spinics.net/lists/arm-kernel/msg151147.htmlhttp://www.spinics.net/lists/arm-kernel/msg154889.html
v6:
http://www.spinics.net/lists/linux-mm/msg29903.html
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
Patch summary:
Marek Szyprowski (9):
ARM: dma-mapping: introduce ARM_DMA_ERROR constant
ARM: dma-mapping: use pr_* instread of printk
ARM: dma-mapping: remove offset parameter to prepare for generic
dma_ops
ARM: dma-mapping: use asm-generic/dma-mapping-common.h
ARM: dma-mapping: implement dma sg methods on top of any generic dma
ops
ARM: dma-mapping: move all dma bounce code to separate dma ops
structure
ARM: dma-mapping: remove redundant code and cleanup
ARM: dma-mapping: use alloc, mmap, free from dma_ops
ARM: dma-mapping: add support for IOMMU mapper
arch/arm/Kconfig | 9 +
arch/arm/common/dmabounce.c | 84 +++-
arch/arm/include/asm/device.h | 4 +
arch/arm/include/asm/dma-iommu.h | 34 ++
arch/arm/include/asm/dma-mapping.h | 407 ++++-----------
arch/arm/mm/dma-mapping.c | 1013 ++++++++++++++++++++++++++++++------
arch/arm/mm/vmregion.h | 2 +-
7 files changed, 1088 insertions(+), 465 deletions(-)
create mode 100644 arch/arm/include/asm/dma-iommu.h
--
1.7.1.569.g6f426
Hi Linus,
I would like to ask again for pulling the dma-mapping framework updates for v3.4.
The following changes since commit c16fa4f2ad19908a47c63d8fa436a1178438c7e7:
Linux 3.3 (2012-03-18 16:15:34 -0700)
with the top-most commit 64d70fe5d3640e1a89790ed21120921278f8cb86
common: DMA-mapping: add NON-CONSISTENT attribute
from the git repository at:
git://git.linaro.org/people/mszyprowski/linux-dma-mapping.git for-linus
This is an updated version of the patches which have been earlier rejected,
see the following thread:
https://lkml.org/lkml/2012/3/20/29
I hope I've fixed the issues pointed there:
- collected a few more acks from arch maintainers,
- resolved signed-off-by weirdness,
- removed dependences between the patches.
Short summary for the whole series:
A few limitations have been identified in the current dma-mapping design and
its implementations for various architectures. There exist more than one function
for allocating and freeing the buffers: currently these 3 are used dma_{alloc,
free}_coherent, dma_{alloc,free}_writecombine, dma_{alloc,free}_noncoherent.
For most of the systems these calls are almost equivalent and can be interchanged.
For others, especially the truly non-coherent ones (like ARM), the difference can
be easily noticed in overall driver performance. Sadly not all architectures
provide implementations for all of them, so the drivers might need to be adapted
and cannot be easily shared between different architectures. The provided patches
unify all these functions and hide the differences under the already existing
dma attributes concept. The thread with more references is available here:
http://www.spinics.net/lists/linux-sh/msg09777.html
These patches are also a prerequisite for unifying DMA-mapping implementation
on ARM architecture with the common one provided by dma_map_ops structure and
extending it with IOMMU support. More information is available in the following
thread: http://thread.gmane.org/gmane.linux.kernel.cross-arch/12819
More works on dma-mapping framework are planned, especially in the area of buffer
sharing and managing the shared mappings (together with the recently introduced
dma_buf interface: commit d15bd7ee445d0702ad801fdaece348fdb79e6581 "dma-buf:
Introduce dma buffer sharing mechanism").
The patches in the current set introduce a new alloc/free methods (with
support for memory attributes) in dma_map_ops structure, which will
later replace dma_alloc_coherent and dma_alloc_writecombine functions.
Thanks!
Best regards
Marek Szyprowski
Samsung Poland R&D Center
Patch summary:
Andrzej Pietrasiewicz (8):
X86 & IA64: adapt for dma_map_ops changes
MIPS: adapt for dma_map_ops changes
PowerPC: adapt for dma_map_ops changes
SPARC: adapt for dma_map_ops changes
Alpha: adapt for dma_map_ops changes
SH: adapt for dma_map_ops changes
Microblaze: adapt for dma_map_ops changes
Unicore32: adapt for dma_map_ops changes
Marek Szyprowski (6):
common: dma-mapping: introduce generic alloc() and free() methods
Hexagon: adapt for dma_map_ops changes
common: dma-mapping: remove old alloc_coherent and free_coherent methods
common: dma-mapping: introduce mmap method
common: DMA-mapping: add WRITE_COMBINE attribute
common: DMA-mapping: add NON-CONSISTENT attribute
Documentation/DMA-attributes.txt | 18 ++++++++++++++++++
arch/alpha/include/asm/dma-mapping.h | 18 ++++++++++++------
arch/alpha/kernel/pci-noop.c | 10 ++++++----
arch/alpha/kernel/pci_iommu.c | 10 ++++++----
arch/hexagon/include/asm/dma-mapping.h | 18 ++++++++++++------
arch/hexagon/kernel/dma.c | 9 +++++----
arch/ia64/hp/common/sba_iommu.c | 11 ++++++-----
arch/ia64/include/asm/dma-mapping.h | 18 ++++++++++++------
arch/ia64/kernel/pci-swiotlb.c | 14 +++++++++++---
arch/ia64/sn/pci/pci_dma.c | 9 +++++----
arch/microblaze/include/asm/dma-mapping.h | 18 ++++++++++++------
arch/microblaze/kernel/dma.c | 10 ++++++----
arch/mips/cavium-octeon/dma-octeon.c | 12 ++++++------
arch/mips/include/asm/dma-mapping.h | 18 ++++++++++++------
arch/mips/mm/dma-default.c | 8 ++++----
arch/powerpc/include/asm/dma-mapping.h | 24 ++++++++++++++++--------
arch/powerpc/kernel/dma-iommu.c | 10 ++++++----
arch/powerpc/kernel/dma-swiotlb.c | 4 ++--
arch/powerpc/kernel/dma.c | 10 ++++++----
arch/powerpc/kernel/ibmebus.c | 10 ++++++----
arch/powerpc/kernel/vio.c | 14 ++++++++------
arch/powerpc/platforms/cell/iommu.c | 16 +++++++++-------
arch/powerpc/platforms/ps3/system-bus.c | 13 +++++++------
arch/sh/include/asm/dma-mapping.h | 28 ++++++++++++++++++----------
arch/sh/kernel/dma-nommu.c | 4 ++--
arch/sh/mm/consistent.c | 6 ++++--
arch/sparc/include/asm/dma-mapping.h | 18 ++++++++++++------
arch/sparc/kernel/iommu.c | 10 ++++++----
arch/sparc/kernel/ioport.c | 18 ++++++++++--------
arch/sparc/kernel/pci_sun4v.c | 9 +++++----
arch/unicore32/include/asm/dma-mapping.h | 18 ++++++++++++------
arch/unicore32/mm/dma-swiotlb.c | 18 ++++++++++++++++--
arch/x86/include/asm/dma-mapping.h | 26 ++++++++++++++++----------
arch/x86/kernel/amd_gart_64.c | 11 ++++++-----
arch/x86/kernel/pci-calgary_64.c | 9 +++++----
arch/x86/kernel/pci-dma.c | 3 ++-
arch/x86/kernel/pci-nommu.c | 6 +++---
arch/x86/kernel/pci-swiotlb.c | 17 +++++++++++++----
arch/x86/xen/pci-swiotlb-xen.c | 4 ++--
drivers/iommu/amd_iommu.c | 10 ++++++----
drivers/iommu/intel-iommu.c | 9 +++++----
drivers/xen/swiotlb-xen.c | 5 +++--
include/linux/dma-attrs.h | 2 ++
include/linux/dma-mapping.h | 13 +++++++++----
include/xen/swiotlb-xen.h | 6 ++++--
45 files changed, 354 insertions(+), 198 deletions(-)
Hello everyone,
This patchset is an incremental patch to patchset created by Sumit Semwal [1].
The patches are dedicated to help find a better solution for support of buffer
sharing by V4L2 API. It is expected to start discussion on the final
installment for dma-buf in vb2-dma-contig allocator. Current version of the
patches contain little documentation. It is going to be fixed after achieving
consensus about design for buffer exporting. Moreover the API between vb2-core
and the allocator should be revised.
The patches were successfully tested to cooperate with EXYNOS DRM driver using
DMABUF mechanism.
Please note, that the amount of changes to vb2-dma-contig.c was significant
making the difference patch very difficult to read.
The patchset makes use of dma_get_pages extension for DMA API, which is posted
on a top of dma-mapping patches by Marek Szyprowski [4] [5].
The tree, that contains all needed patches, can be found here [6].
v2:
- extended VIDIOC_EXPBUF argument from integer memoffset to struct
v4l2_exportbuffer
- added patch that breaks DMABUF spec on (un)map_atachment callcacks but allows
to work with existing implementation of DMABUF prime in DRM
- all dma-contig code refactoring patches were squashed
- bugfixes
v1: List of changes since [1].
- support for DMA api extension dma_get_pages, the function is used to retrieve
pages used to create DMA mapping.
- small fixes/code cleanup to videobuf2
- added prepare and finish callbacks to vb2 allocators, it is used keep
consistency between dma-cpu acess to the memory (by Marek Szyprowski)
- support for exporting of DMABUF buffer in V4L2 and Videobuf2, originated from
[3].
- support for dma-buf exporting in vb2-dma-contig allocator
- support for DMABUF for s5p-tv and s5p-fimc (capture interface) drivers,
originated from [3]
- changed handling for userptr buffers (by Marek Szyprowski, Andrzej
Pietrasiewicz)
- let mmap method to use dma_mmap_writecombine call (by Marek Szyprowski)
[1] http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/4296…
[2] https://lkml.org/lkml/2011/12/26/29
[3] http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/3635…
[4] http://thread.gmane.org/gmane.linux.kernel.cross-arch/12819
[5] http://git.infradead.org/users/kmpark/linux-2.6-samsung/shortlog/refs/heads…
[6] http://git.infradead.org/users/kmpark/linux-2.6-samsung/shortlog/refs/heads…
Sumit Semwal (1):
v4l: vb2: Add dma-contig allocator as dma_buf user
Tomasz Stanislawski (8):
v4l: vb2: fixes for DMABUF support
v4l: vb2-dma-contig: update and code refactoring
v4l: add buffer exporting via dmabuf
v4l: vb2: add buffer exporting via dmabuf
v4l: vb2-dma-contig: add support for DMABUF exporting
v4l: vb2-dma-contig: change map/unmap behaviour
v4l: fimc: integrate capture i-face with dmabuf
v4l: s5p-tv: mixer: integrate with dmabuf
drivers/media/video/Kconfig | 1 +
drivers/media/video/s5p-fimc/fimc-capture.c | 11 +-
drivers/media/video/s5p-tv/Kconfig | 1 +
drivers/media/video/s5p-tv/mixer_video.c | 12 +-
drivers/media/video/v4l2-compat-ioctl32.c | 1 +
drivers/media/video/v4l2-ioctl.c | 11 +
drivers/media/video/videobuf2-core.c | 88 +++-
drivers/media/video/videobuf2-dma-contig.c | 717 ++++++++++++++++++++++++---
include/linux/videodev2.h | 20 +
include/media/v4l2-ioctl.h | 2 +
include/media/videobuf2-core.h | 8 +-
11 files changed, 779 insertions(+), 93 deletions(-)
--
1.7.5.4