linux/drivers/media
Jim Quinlan e0d072782c dma-mapping: introduce DMA range map, supplanting dma_pfn_offset
The new field 'dma_range_map' in struct device is used to facilitate the
use of single or multiple offsets between mapping regions of cpu addrs and
dma addrs.  It subsumes the role of "dev->dma_pfn_offset" which was only
capable of holding a single uniform offset and had no region bounds
checking.

The function of_dma_get_range() has been modified so that it takes a single
argument -- the device node -- and returns a map, NULL, or an error code.
The map is an array that holds the information regarding the DMA regions.
Each range entry contains the address offset, the cpu_start address, the
dma_start address, and the size of the region.

of_dma_configure() is the typical manner to set range offsets but there are
a number of ad hoc assignments to "dev->dma_pfn_offset" in the kernel
driver code.  These cases now invoke the function
dma_direct_set_offset(dev, cpu_addr, dma_addr, size).

Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
[hch: various interface cleanups]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Tested-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
2020-09-17 18:43:56 +02:00
..
cec cec-api: prevent leaking memory through hole in structure 2020-07-19 07:43:14 +02:00
common treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dvb-core treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dvb-frontends treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
firewire media: firewire: Using uninitialized values in node_probe() 2020-07-04 11:57:10 +02:00
i2c media: i2c: Add RDACM20 driver 2020-07-19 14:15:42 +02:00
mc media: media-request: Fix crash if memory allocation fails 2020-06-23 15:19:37 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
platform dma-mapping: introduce DMA range map, supplanting dma_pfn_offset 2020-09-17 18:43:56 +02:00
radio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
spi media: i2c/Kconfig: use sub-menus for I2C support 2020-04-16 10:34:40 +02:00
test-drivers media: vimc: Add a control to display info on test image 2020-07-19 13:39:22 +02:00
tuners treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
usb media: dib0700: Fix identation issue in dib8096_set_param_override() 2020-08-27 15:36:28 -05:00
v4l2-core treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Kconfig media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00
Makefile media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00