linux-stable/drivers/media
Benoit Parrot 5f9f2fb7c4 media: ti-vpe: cal: Fix ths_term/ths_settle parameters
The current method to calculate the ddr clk period is wrong.
Therefore the ths_term calculation is incorrect.
Also it was wrongly assumed that the ths_settle parameter
was based on the control clock instead of the pixel clock.

Since the DPHY can tolerate quite a bit a of variation,
capture was still mostly working with the 2 tested modes
when the pixel clock was close to the control clock
(i.e. 96 Mhz). But it would quickly stops working when
using different modes or when customers used different
sensors altogether.

Calculating the DDRClk period needs to take into account
the pixel bit width and the number of active data lanes.

Based on the latest technical reference manual these
parameters should now be calculated as follows:

THS_TERM: Programmed value = floor(20 ns/DDRClk period)
THS_SETTLE: Programmed value = floor(105 ns/DDRClk period) + 4

Also originally 'depth' was used to represent the number of
bits a pixel would use once stored in memory (i.e. the
container size). To accurately calculate the THS_* parameters
we need to use the actual number of bits per pixels coming
in from the sensor. So we are renaming 'depth' to 'bpp' (bits
per pixels) and update the format table to show the actual
number of bits per pixel being received.

The "container" size will be derived from the "bpp" value.

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>
2019-12-09 11:27:25 +01:00
..
cec drm main pull for 5.5-rc1 2019-11-27 17:45:48 -08:00
common media: siano: Use the correct style for SPDX License Identifier 2019-11-10 17:46:45 +01:00
dvb-core media: dvb-core: fix a memory leak bug 2019-08-21 18:39:54 -03:00
dvb-frontends media: cxd2841er: avoid too many status inquires 2019-10-16 12:24:30 -03:00
firewire media: firewire: Make structure fdtv_ca constant 2019-08-21 18:39:55 -03:00
i2c media: i2c: Use the correct style for SPDX License Identifier 2019-11-10 17:47:14 +01:00
mc media: mc-device.c: fix memleak in media_device_register_entity 2019-10-01 12:26:35 -03:00
mmc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci media updates for v5.5-rc1 2019-11-26 20:11:43 -08:00
platform media: ti-vpe: cal: Fix ths_term/ths_settle parameters 2019-12-09 11:27:25 +01:00
radio media: si470x-i2c: add missed operations in remove 2019-11-10 07:28:15 +01:00
rc compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
spi media: Clarify how menus are hidden by SUBDRV_AUTOSELECT 2019-08-19 12:00:29 -03:00
tuners media: tuners: Use the correct style for SPDX License Identifier 2019-10-24 18:57:55 -03:00
usb USB patches for 5.5-rc1 2019-11-27 10:46:34 -08:00
v4l2-core media: v4l2-ctrl: Lock main_hdl on operations of requests_queued. 2019-11-10 07:29:10 +01:00
Kconfig media: Clarify how menus are hidden by SUBDRV_AUTOSELECT 2019-08-19 12:00:29 -03:00
Makefile media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00