OSDN Git Service

media: rcar-vin: enable field toggle after a set number of lines for Gen3
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tue, 24 Apr 2018 23:56:52 +0000 (19:56 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Sat, 5 May 2018 14:28:17 +0000 (10:28 -0400)
commit015060cb7795eac34454696cc9c9f8b76926a401
treecc735986d5d6705debd1c45bb9d5708274287200
parent01d72e9d06082666c34ec4b033f61007e47490d9
media: rcar-vin: enable field toggle after a set number of lines for Gen3

The VIN Gen3 hardware don't have Line Post-Clip capabilities as VIN Gen2
hardware have. To protect against writing outside the capture window
enable field toggle after a set number of lines have been captured.

Capturing outside the allocated capture buffer where observed on R-Car
Gen3 Salvator-XS H3 from the CVBS input if the standard is
misconfigured. That is if a PAL source is connected to the system but
the adv748x standard is set to NTSC. In this case the format reported by
the adv748x is 720x480 and that is what is used for the media pipeline.
The PAL source generates frames in the format of 720x576 and the field
is not toggled until the VSYNC is detected and at that time data have
already been written outside the allocated capture buffer.

With this change the capture in the situation described above results in
garbage frames but that is far better then writing outside the capture
buffer.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/rcar-vin/rcar-dma.c