media: imx: imx7-media-csi: Clear all configurable CSICR18 fields
When configuring the CSI in imx7_csi_configure(), the CSICR18 is set through a read-modify-write cycle to avoid affecting fields whose usage isn't clear. The function then sets fields depending on whether the input is interlaced or progressive, and from the parallel input or the CSI-2 receiver. Those bits are only set and never cleared. For instance, when switching from a CSI-2 source to the parallel input, the BIT_DATA_FROM_MIPI will stay set. Fix this issue by first clearing all the fields we need to configure. Add BIT_CSI_HW_ENABLE to the set of fields being cleared, as the CSI needs to start in the disabled state. This allows dropping the call to imx7_csi_hw_disable() in imx7_csi_sw_reset(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Showing
Please register or sign in to comment