summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2013-03-08 16:01:48 +0800
committerLiu Ying <Ying.Liu@freescale.com>2014-03-17 11:30:48 +0800
commitef93b0d9ccf7674b87217c050655951f58aafd8b (patch)
tree5a4ba41500e25ca131798e269a3916a8c7cab580
parent073ced1fe402a801e74879bd24d60151dce925a5 (diff)
ENGR00243315-1 IPUv3 CSI:Correct CCIR code1/2 for PAL and NTSC
We reversed CCIR code1/2 setting before, which may brings captured frame quality issue(jaggy edge can be seen). This patch revert that change. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit a4c2228f5428af02b9be87114d096340f9b58083)
-rw-r--r--drivers/mxc/ipu3/ipu_capture.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/mxc/ipu3/ipu_capture.c b/drivers/mxc/ipu3/ipu_capture.c
index a14b0eae7fb6..d2563a4f2928 100644
--- a/drivers/mxc/ipu3/ipu_capture.c
+++ b/drivers/mxc/ipu3/ipu_capture.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008-2014 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -146,29 +146,30 @@ ipu_csi_init_interface(struct ipu_soc *ipu, uint16_t width, uint16_t height,
if (width == 720 && height == 625) {
/* PAL case */
/*
- * Field0BlankEnd = 0x7, Field0BlankStart = 0x3,
- * Field0ActiveEnd = 0x5, Field0ActiveStart = 0x1
+ * Field0BlankEnd = 0x6, Field0BlankStart = 0x2,
+ * Field0ActiveEnd = 0x4, Field0ActiveStart = 0
*/
- ipu_csi_write(ipu, csi, 0xD07DF, CSI_CCIR_CODE_1);
+ ipu_csi_write(ipu, csi, 0x40596, CSI_CCIR_CODE_1);
/*
- * Field1BlankEnd = 0x6, Field1BlankStart = 0x2,
- * Field1ActiveEnd = 0x4, Field1ActiveStart = 0
+ * Field1BlankEnd = 0x7, Field1BlankStart = 0x3,
+ * Field1ActiveEnd = 0x5, Field1ActiveStart = 0x1
*/
- ipu_csi_write(ipu, csi, 0x40596, CSI_CCIR_CODE_2);
+ ipu_csi_write(ipu, csi, 0xD07DF, CSI_CCIR_CODE_2);
+
ipu_csi_write(ipu, csi, 0xFF0000, CSI_CCIR_CODE_3);
} else if (width == 720 && height == 525) {
/* NTSC case */
/*
- * Field1BlankEnd = 0x6, Field1BlankStart = 0x2,
- * Field1ActiveEnd = 0x4, Field1ActiveStart = 0
- */
- ipu_csi_write(ipu, csi, 0x40596, CSI_CCIR_CODE_1);
- /*
* Field0BlankEnd = 0x7, Field0BlankStart = 0x3,
* Field0ActiveEnd = 0x5, Field0ActiveStart = 0x1
*/
- ipu_csi_write(ipu, csi, 0xD07DF, CSI_CCIR_CODE_2);
+ ipu_csi_write(ipu, csi, 0xD07DF, CSI_CCIR_CODE_1);
+ /*
+ * Field1BlankEnd = 0x6, Field1BlankStart = 0x2,
+ * Field1ActiveEnd = 0x4, Field1ActiveStart = 0
+ */
+ ipu_csi_write(ipu, csi, 0x40596, CSI_CCIR_CODE_2);
ipu_csi_write(ipu, csi, 0xFF0000, CSI_CCIR_CODE_3);
} else {
dev_err(ipu->dev, "Unsupported CCIR656 interlaced "