On 16/03/2020 14:37, Laurent Pinchart wrote:
On Fri, Mar 13, 2020 at 01:41:16PM +0200, Tomi Valkeinen wrote:
CAL_CSI2_CTX register has LINES field, which, according to the
documentation, should be programmed to the number of lines transmitted
by the camera. If the number of lines is unknown, it can be set to 0.
The driver sets the field to 0 for some reason, even if we know the
number of lines.
This patch sets the number of lines properly, which will allow the HW to
discard extra lines (if the sensor would send such for some reason),
and, according to documentation: "This leads to regular video timings
and avoids potential artifacts".
And possibly buffer overflows !
There's a register in the DMA block which defines the max number of lines the DMA will transfer. So
overflow should not be possible even without this patch.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki