videobuf2: replace a layering violation with dma_map_resource
authorChristoph Hellwig <hch@lst.de>
Fri, 4 Jan 2019 09:42:49 +0000 (10:42 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 1 Feb 2019 08:56:41 +0000 (09:56 +0100)
commit55ea54441fb3b6532d5d32417911ff5a10750903
treeae854b693fa98dc3397bbfe5519792277c326862
parent645386dfe6307dbb28f10a4513792a59beda0efa
videobuf2: replace a layering violation with dma_map_resource

vb2_dc_get_userptr pokes into arm direct mapping details to get the
resemblance of a dma address for a a physical address that does is
not backed by a page struct.  Not only is this not portable to other
architectures with dma direct mapping offsets, but also not to uses
of IOMMUs of any kind.  Switch to the proper dma_map_resource /
dma_unmap_resource interface instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/media/common/videobuf2/videobuf2-dma-contig.c