]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: sun4i-csi: Deal with DRAM offset
authorChen-Yu Tsai <wens@csie.org>
Sun, 15 Dec 2019 16:59:15 +0000 (17:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:36:25 +0000 (08:36 +0100)
commitf5076ea1bc9dd4d4363206d9b0284cca4e3d740b
treeeb7803e75ec246f073de591ebd031a0f43b679ec
parentcb514c01f6e4c8839a85e93c5f8555980cd51c14
media: sun4i-csi: Deal with DRAM offset

[ Upstream commit 249b286171fa9c358e8d5c825b48c4ebea97c498 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c