CHROMIUM: [media] videobuf2-dc: Let drivers specify DMA attrs
authorTomasz Figa <tfiga@chromium.org>
Mon, 13 Apr 2015 05:34:06 +0000 (14:34 +0900)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 30 Jun 2016 11:46:20 +0000 (19:46 +0800)
commit9fe7d77e2283f86201817076bb190781dc03b4d0
tree5649eacbeb9918fbb867a5540f89382f1339b78b
parent3acde7a6c7d65c82ee8570d3a4c3e3f762fe4cdd
CHROMIUM: [media] videobuf2-dc: Let drivers specify DMA attrs

DMA allocations might be subject to certain reqiurements specific to the
hardware using the buffers, such as availability of kernel mapping (for
contents fix-ups in the driver). The only entity that knows them is the
driver, so it must share this knowledge with vb2-dc.

This patch extends the alloc_ctx initialization interface to let the
driver specify DMA attrs, which are then stored inside the allocation
context and will be used for all allocations with that context.

As a side effect, all dma_*_coherent() calls are turned into
dma_*_attrs() calls, because the attributes need to be carried over
through all DMA operations.

BUG=chrome-os-partner:38873
TEST=compile

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/265363
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Change-Id: I0e6c040cf820c194b6ca6f3e6355217496bd1532
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
drivers/media/v4l2-core/videobuf2-dma-contig.c
include/media/videobuf2-dma-contig.h