In my setup with a sensor delivering 352x288 images I tried with PFS=0x6 and BPP=16 and configured FW=264 and FH=288.
The stride parameter SL is set to 527 bytes (352 * 12 / 8 - 1). Additionally NPB=3 setting was needed to get a whole frame in an
image. Unfortunately it didn't work, I got images like below (after converting the V4L2 buffer data to a grey-scale bitmap) :

As you can see, the half of the columns is missing and many pixels are corrupted. I always tried in Non-Gated mode since the
reference manual states that with MIPI sensors the Non-Gated mode should be used.
Then I did some experiments and also configured Gated mode in the CSI2IPU_SW_RST register (CLK_SEL bit cleared).
In Gated mode and with BPP=16, NPB=15, FW=264 and FH=288 the image data looks a little better, but the vertical sync
doesn't work and I get two image halves in a single frame:

After many experiments and configuring CSI0_SENS_FRM_WIDTH=351, CSI0_SENS_FRM_HEIGHT=575,
CSI0_ACT_FRM_WIDTH=351, CSI0_ACT_FRM_HEIGHT=575 I get a whole frame, but there are still some
corrupted lines in the resulting image:

What could be the reason for this corruption pattern?
Must Non-Gated mode really be used when capturing from MIPI sensor (as stated in the manual)?