OpenCloudOS-Kernel/drivers/media/platform/omap
Hans Verkuil d555c34338 omap-dma/omap_vout_vrfb: fix off-by-one fi value
The OMAP 4 TRM specifies that when using double-index addressing
the address increases by the ES plus the EI value minus 1 within
a frame. When a full frame is transferred, the address increases
by the ES plus the frame index (FI) value minus 1.

The omap-dma code didn't account for the 'minus 1' in the FI register.
To get correct addressing, add 1 to the src_icg value.

This was found when testing a hacked version of the media m2m-deinterlace.c
driver on a Pandaboard.

The only other source that uses this feature is omap_vout_vrfb.c,
and that adds a + 1 when setting the dst_icg. This is a workaround
for the broken omap-dma.c behavior. So remove the workaround at the
same time that we fix omap-dma.c.

I tested the omap_vout driver with a Beagle XM board to check that
the '+ 1' in omap_vout_vrfb.c was indeed a workaround for the omap-dma
bug.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Link: https://lore.kernel.org/r/952e7f51-f208-9333-6f58-b7ed20d2ea0b@xs4all.nl
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2019-08-09 16:33:41 +05:30
..
Kconfig Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
omap_vout.c media: omap_vout: potential buffer overflow in vidioc_dqbuf() 2019-05-08 13:58:49 -04:00
omap_vout_vrfb.c omap-dma/omap_vout_vrfb: fix off-by-one fi value 2019-08-09 16:33:41 +05:30
omap_vout_vrfb.h [media] media: omap/omap_vout: fix type of input members to omap_vout_setup_vrfb_bufs() 2015-03-03 11:22:58 -03:00
omap_voutdef.h media: platform: fix several typos 2019-03-01 09:35:21 -05:00
omap_voutlib.c [media] omap_vout: Switch to use the video/omapfb_dss.h header file 2016-06-03 16:06:39 +03:00
omap_voutlib.h [media] omap_vout: use omapdss's version instead of cpu_is_* 2012-11-29 19:09:16 +02:00