• Niklas Söderlund's avatar
    media: rcar-vin: enable field toggle after a set number of lines for Gen3 · 015060cb
    Niklas Söderlund authored
    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: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
    Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
    015060cb
rcar-dma.c 37.1 KB