linux/drivers/media/v4l2-core
Robin Murphy 4573027b67 media: videobuf-dma-sg: Fix dma_{sync,unmap}_sg() calls
This reverts commit fc7f8fd42c.

Whilst the rationale for the above commit was in general correct, i.e.
that users *consuming* the DMA addresses should rely on sglen rather
than num_pages, it has always been the case that the DMA API itself
still requires that dma_{sync,unmap}_sg() are called with the original
number of entries as passed to dma_map_sg(), not the number of mapped
entries it returned. Thus the particular changes made in that patch
were erroneous.

At worst this might lead to data loss at the tail end of mapped buffers
on non-coherent hardware, while at best it's an example of incorrect
DMA API usage which has proven to mislead readers.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-09 16:25:12 -04:00
..
Kconfig media: v4l2-core: get rid of videobuf-dvb 2018-05-04 10:57:31 -04:00
Makefile media: v4l2-core: get rid of videobuf-dvb 2018-05-04 10:57:31 -04:00
tuner-core.c media: add tuner standby op, use where needed 2018-03-21 12:05:39 -04:00
v4l2-async.c media: v4l2-async: simplify v4l2_async_subdev structure 2017-12-29 07:14:28 -05:00
v4l2-clk.c media: Convert to using %pOF instead of full_name 2017-08-20 08:20:20 -04:00
v4l2-common.c media: v4l: common: Remove v4l2_find_nearest_format 2018-03-21 11:21:33 -04:00
v4l2-compat-ioctl32.c media: v4l2-compat-ioctl32: better document the code 2018-04-20 08:24:13 -04:00
v4l2-ctrls.c media: v4l2: Add v4l2 control IDs for HEVC encoder 2018-03-22 06:32:15 -04:00
v4l2-dev.c media: v4l2-core: Rename array 'video_driver' to 'video_drivers' 2018-05-09 15:57:30 -04:00
v4l2-device.c [media] v4l: Allow calling v4l2_device_register_subdev_nodes() multiple times 2017-03-22 11:21:43 -03:00
v4l2-dv-timings.c media: v4l2-dv-timings: add v4l2_hdmi_colorimetry() 2018-02-22 12:41:09 -05:00
v4l2-event.c [media] v4l2-core: Use kvmalloc() for potentially big allocations 2017-06-20 09:11:48 -03:00
v4l2-fh.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
v4l2-flash-led-class.c media: v4l2-flash-led-class: Create separate sub-devices for indicators 2017-08-26 20:26:35 -04:00
v4l2-fwnode.c media: v4l2-fwnode: simplify v4l2_fwnode_reference_parse_int_props() 2018-04-17 05:49:58 -04:00
v4l2-ioctl.c media: v4l2-ioctl: rename a temp var that stores _IOC_SIZE(cmd) 2018-03-26 06:58:47 -04:00
v4l2-mc.c media: v4l2-core: v4l2-mc: Add SPDX license identifier 2018-02-26 07:42:03 -05:00
v4l2-mem2mem.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
v4l2-subdev.c media: v4l2-subdev: implement VIDIOC_DBG_G_CHIP_INFO ioctl 2018-02-26 09:33:39 -05:00
v4l2-trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
videobuf-core.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
videobuf-dma-contig.c [media] videobuf-dma-contig: set vm_pgoff to be zero to pass the sanity check in vm_iomap_memory() 2014-10-24 09:32:41 -02:00
videobuf-dma-sg.c media: videobuf-dma-sg: Fix dma_{sync,unmap}_sg() calls 2018-05-09 16:25:12 -04:00
videobuf-vmalloc.c [media] Revert "[media] videobuf_vm_{open,close} race fixes" 2014-02-04 06:29:46 -02:00