• Nikhil Devshatwar's avatar
    [media] media: ti-vpe: vpe: Do not perform job transaction atomically · 5dc07f20
    Nikhil Devshatwar authored
    Current VPE driver does not start the job until all the buffers for
    a transaction are queued. When running in multiple context, this might
    increase the processing latency.
    
    Alternate solution would be to try to continue the same context as long as
    buffers for the transaction are ready; else switch the context. This may
    increase number of context switches but it reduces latency significantly.
    
    In this approach, the job_ready always succeeds as long as there are
    buffers on the CAPTURE and OUTPUT stream. Processing may start immediately
    as the first 2 iterations don't need extra source buffers. Shift all the
    source buffers after each iteration and remove the oldest buffer.
    
    Also, with this removes the constraint of pre buffering 3 buffers before
    call to STREAMON in case of de-interlacing.
    Signed-off-by: default avatarNikhil Devshatwar <nikhil.nd@ti.com>
    Signed-off-by: default avatarBenoit Parrot <bparrot@ti.com>
    Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
    5dc07f20
vpe.c 58.6 KB