[media] media: vb2 dma-contig: Fully cache synchronise buffers in prepare and finish
[media] media: vb2 dma-contig: Fully cache synchronise buffers in prepare and finish

In videobuf2 dma-contig memory type the prepare and finish ops, instead of
passing the number of entries in the original scatterlist as the "nents"
parameter to dma_sync_sg_for_device() and dma_sync_sg_for_cpu(), the value
returned by dma_map_sg() was used. Albeit this has been suggested in
comments of some implementations (which have since been corrected), this
is wrong.

Fixes: 199d101efdba ("v4l: vb2-dma-contig: add prepare/finish to dma-contig allocator")

Cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org # for v3.8 and up
Signed-off-by: Tiffany Lin <f67ebac65f82621ab64bb70f51fe3c9b506304a9@mediatek.com>
Signed-off-by: Sakari Ailus <8d98c2be02a446df653daa2c00496b87f3f016e4@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <ad86ba2154032c9f55743a190faa2459a9d61d42@osg.samsung.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs