On 5/17/2018 2:22 AM, Niklas Söderlund wrote:
When starting the VIN capture procedure we are not guaranteed that the
first buffer writing to is VnMB1 to which we assigned the first buffer
queued. This is problematic for two reasons. Buffers might not be
dequeued in the same order they where queued for capture. Future
features planed for the VIN driver is support for outputing frames in
SEQ_TB/BT format and to do that it's important that capture starts from
the first buffer slot, VnMB1.
We are guaranteed that capturing always happens in sequence (VnMB1 ->
VnMB2 -> VnMB3 -> VnMB1). So drop up to two frames when starting
capturing so that the driver always returns buffers in the same order
they are queued and prepare for SEQ_TB/BT output.
Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se>
drivers/media/platform/rcar-vin/rcar-dma.c | 16 +++++++++++++++-
drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++
2 files changed, 17 insertions(+), 1 deletion(-)