linux/drivers/media/platform/ti-vpe
Nikhil Devshatwar 8c324ef0b4 media: ti-vpe: cal: Restrict DMA to avoid memory corruption
[ Upstream commit 6e72eab2e7 ]

When setting DMA for video capture from CSI channel, if the DMA size
is not given, it ends up writing as much data as sent by the camera.

This may lead to overwriting the buffers causing memory corruption.
Observed green lines on the default framebuffer.

Restrict the DMA to maximum height as specified in the S_FMT ioctl.

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:17:26 +02:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cal.c media: ti-vpe: cal: Restrict DMA to avoid memory corruption 2020-10-01 13:17:26 +02:00
cal_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
csc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
csc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sc_coeff.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vpdma.c media: ti-vpe: Add cleanup in vpdma_list_cleanup() 2019-08-26 10:42:29 -03:00
vpdma.h media: ti-vpe: vpe: fix a v4l2-compliance failure about invalid sizeimage 2019-12-31 16:44:03 +01:00
vpdma_priv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vpe.c media: ti-vpe: vpe: fix a v4l2-compliance failure about invalid sizeimage 2019-12-31 16:44:03 +01:00
vpe_regs.h media: use the BIT() macro 2019-08-26 14:08:50 -03:00