Re: [PATCH v3 0/2] [media] videobuf2-dc: Add support for cacheable MMAP

From: Marek Szyprowski
Date: Mon Jul 03 2017 - 05:27:47 EST


Hi All,

On 2016-10-26 10:52, Thierry Escande wrote:
This series adds support for cacheable MMAP in DMA coherent allocator.

The first patch moves the vb2_dc_get_base_sgt() function above mmap
callbacks for calls introduced by the second patch. This avoids a
forward declaration.

I'm sorry for late review. Sylwester kicked me for pending v4l2/vb2 patches
and I've just found this thread in my TODO folder.

The main question here if we want to merge incomplete solution or not. As
for now, there is no support in ARM/ARM64 for NON_CONSISTENT attribute.
Also none of the v4l2 drivers use it. Sadly support for NON_CONSISTENT
attribute is not fully implemented nor even defined in mainline.

I know that it works fine for some vendor kernel trees, but supporting it in
mainline was a bit controversial. There is no proper way to sync cache for such
buffers. Calling dma_sync_sg worked so far, but it has to be first agreed as
a proper DMA API.

Changes in v2:
- Put function move in a separate patch
- Added comments

Changes in v3:
- Remove redundant test on NO_KERNEL_MAPPING DMA attribute in mmap()

Heng-Ruey Hsu (1):
[media] videobuf2-dc: Support cacheable MMAP

Thierry Escande (1):
[media] videobuf2-dc: Move vb2_dc_get_base_sgt() above mmap callbacks

drivers/media/v4l2-core/videobuf2-dma-contig.c | 60 ++++++++++++++++----------
1 file changed, 38 insertions(+), 22 deletions(-)


Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland