OSDN Git Service

media: sun4i-csi: Deal with DRAM offset
authorChen-Yu Tsai <wens@csie.org>
Sun, 15 Dec 2019 16:59:15 +0000 (17:59 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 4 Jan 2020 07:19:01 +0000 (08:19 +0100)
commit249b286171fa9c358e8d5c825b48c4ebea97c498
tree0fb7af1c1bb200f8161805a0bbf9cbd6d630bf8e
parent1948dcf0f928b8bcdca57ca3fba8545ba380fc29
media: sun4i-csi: Deal with DRAM offset

On Allwinner SoCs, some high memory bandwidth devices do DMA directly
over the memory bus (called MBUS), instead of the system bus. These
devices include the CSI camera sensor interface, video (codec) engine,
display subsystem, etc.. The memory bus has a different addressing
scheme without the DRAM starting offset.

Deal with this using the "interconnects" property from the device tree,
or if that is not available, set dev->dma_pfn_offset to PHYS_PFN_OFFSET.

Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c