From ad8632d09cba546015c44a7ac247041b6390687d Mon Sep 17 00:00:00 2001 From: "Guoniu.Zhou" Date: Mon, 17 Sep 2018 11:33:22 +0800 Subject: [PATCH] MLK-19510: ISI: fix isi cann't restore to original size after resize 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 --- drivers/media/platform/imx8/mxc-isi-hw.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/platform/imx8/mxc-isi-hw.h b/drivers/media/platform/imx8/mxc-isi-hw.h index f9fe1e5f5576..53be9da38836 100644 --- a/drivers/media/platform/imx8/mxc-isi-hw.h +++ b/drivers/media/platform/imx8/mxc-isi-hw.h @@ -447,6 +447,13 @@ /* 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, -- 2.17.1