[media] vb2: use dma_map_sg_attrs to prevent unnecessary sync
authorHans Verkuil <hans.verkuil@cisco.com>
Tue, 18 Nov 2014 12:51:08 +0000 (09:51 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 25 Nov 2014 11:09:19 +0000 (09:09 -0200)
commit251a79f8f5adfd816de4e052b5e3619a5a1d0910
treea0fbe2c43a495a274de4c083c42a7cc8dc99055b
parentf5294f455afd30bdc90f31d6d0101bb773e9ddba
[media] vb2: use dma_map_sg_attrs to prevent unnecessary sync

By default dma_map_sg syncs the mapped buffer to the device. But
buf_prepare expects a buffer syncs for the cpu and the buffer
will be synced to the device in the prepare memop.

The reverse is true for dma_unmap_sg, buf_finish and the finish
memop.

To prevent unnecessary syncs we ask dma_(un)map_sg to skip the
sync.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/videobuf2-dma-contig.c
drivers/media/v4l2-core/videobuf2-dma-sg.c