MLK-19510: ISI: fix isi cann't restore to original size after resize
authorGuoniu.Zhou <guoniu.zhou@nxp.com>
Mon, 17 Sep 2018 03:33:22 +0000 (11:33 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
1. add CHNL_SCL_IMG_CFG register that is new added in QXP/QM B0
2. according to isi owner's comments, CHNL_SCL_IMG_CFG need to
equal to CHNL_IMG_CFG when scaling disabled and equal to scaled
image size when scaling enabled, so add configuration for this
register.
3. Becuse isi software reset can't reset isi register to default
, so it need to manual clear if there is no scaling.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
drivers/media/platform/imx8/mxc-isi-hw.h

index f9fe1e5..53be9da 100644 (file)
 /* Channel Chroma (V/Cr) Output Buffer 2 Address   */
 #define  CHNL_OUT_BUF2_ADDR_V          0x94
 
+/* Channel scale image config */
+#define  CHNL_SCL_IMG_CFG                                      0x98
+#define  CHNL_SCL_IMG_CFG_HEIGHT_OFFSET                16
+#define  CHNL_SCL_IMG_CFG_HEIGHT_MASK          0x1FFF0000
+#define  CHNL_SCL_IMG_CFG_WIDTH_OFFSET         0
+#define  CHNL_SCL_IMG_CFG_WIDTH_MASK           0x1FFF
+
 enum isi_csi_coeff {
        YUV2RGB = 0,
        RGB2YUV,