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