linux-hardened/drivers/gpu/ipu-v3
Steve Longerbeam fc8c723852 media: gpu: ipu-csi: Swap fields according to input/output field types
The function ipu_csi_init_interface() was inverting the F-bit for
NTSC case, in the CCIR_CODE_1/2 registers. The result being that
for NTSC bottom-top field order, the CSI would swap fields and
capture in top-bottom order.

Instead, base field swap on the field order of the input to the CSI,
and the field order of the requested output. If the input/output
fields are sequential but different, swap fields, otherwise do
not swap. This requires passing both the input and output mbus
frame formats to ipu_csi_init_interface().

Move this code to a new private function ipu_csi_set_bt_interlaced_codes()
that programs the CCIR_CODE_1/2 registers for interlaced BT.656 (and
possibly interlaced BT.1120 in the future).

When detecting input video standard from the input frame width/height,
make sure to double height if input field type is alternate, since
in that case input height only includes lines for one field.

Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-01-16 14:11:42 -05:00
..
ipu-common.c drm/imx: ipu-v3 plane offset and IPU id fixes 2018-08-10 11:37:35 +10:00
ipu-cpmem.c gpu: ipu-v3: Add chroma plane offset overrides to ipu_cpmem_set_image() 2018-11-05 14:40:06 +01:00
ipu-csi.c media: gpu: ipu-csi: Swap fields according to input/output field types 2019-01-16 14:11:42 -05:00
ipu-dc.c gpu: ipu-v3: ipu-dc: Remove unused 'di' variable 2017-10-04 12:18:56 +02:00
ipu-di.c gpu: ipu-di: silence videomode logspam 2016-11-09 10:41:14 +01:00
ipu-dmfc.c gpu: ipu-v3: Do not wait for DMFC FIFO to clear when disabling DMFC channel 2016-08-29 12:45:05 +02:00
ipu-dp.c drm/imx: add deferred plane disabling 2017-03-15 15:42:29 +01:00
ipu-ic.c gpu: ipu-v3: ipu-ic: allow to manually set resize coefficients 2018-11-05 14:40:06 +01:00
ipu-image-convert.c gpu: ipu-v3: image-convert: allow three rows or columns 2018-11-05 14:40:08 +01:00
ipu-pre.c driver core: Rename flag AUTOREMOVE to AUTOREMOVE_CONSUMER 2018-07-09 12:14:31 +02:00
ipu-prg.c driver core: Rename flag AUTOREMOVE to AUTOREMOVE_CONSUMER 2018-07-09 12:14:31 +02:00
ipu-prv.h gpu: ipu-v3: pre: add tiled prefetch support 2017-12-19 12:49:11 +01:00
ipu-smfc.c IPUv3 fixes for v3.18 2014-10-07 14:31:14 +10:00
ipu-vdi.c gpu: ipu-v3: vdic: include AUTO field order bit in ipu_vdi_set_field_order 2017-06-08 08:57:20 +02:00
Kconfig gpu: ipu-v3: allow to build with COMPILE_TEST 2017-12-19 12:49:11 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00