Skip to content
Commit d9be3f21 authored by Loic Poulain's avatar Loic Poulain Committed by Kumar Gala
Browse files

ext: hal: nxp: mcux: csi: Fix double buffering capture



In case of double buffering (two capture buffers), the CSI is
frequently starved because of a lack of buffer in the active pool.

You can find below an example of double buffering scenario:

                FREE_BUF  ACTIVE_BUF
start:              0          2
frame0_complete:    0          1  (no buffer to load in active)
resubmit_frame0:    1          1
frame1_complete:    1          0  (CSI stopped, active buf = 0)
resubmit_frame1:    2          0
                    0    ->    2  (CSI restarted)

This patch solves this issue by loading buffer to active at submit
time.

                FREE_BUF  ACTIVE_BUF
start:              0          2
frame0_complete:    0          1
resubmit_frame0:    1          1
                    0    ->    2  (Direct load to active)
frame1_complete:    0          1
resubmit_frame1:    1          1
                    0    ->    2
...

Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
parent 27fe6180
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment