aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2013-03-08 03:01:48 -0500
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:57:59 -0400
commitaaf181680f8180178ccac0b0871122b36cb006f0 (patch)
tree46625ab6a87096a19087370d78c27a57e9f26bed
parent18d29867fb35061552270cbac2ee9d833a612687 (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 abdb4369f6ebcd90656b5fc319ee79eeb3bec7c5)
-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 @@
1/* 1/*
2 * Copyright 2008-2013 Freescale Semiconductor, Inc. All Rights Reserved. 2 * Copyright 2008-2014 Freescale Semiconductor, Inc. All Rights Reserved.
3 */ 3 */
4 4
5/* 5/*
@@ -146,29 +146,30 @@ ipu_csi_init_interface(struct ipu_soc *ipu, uint16_t width, uint16_t height,
146 if (width == 720 && height == 625) { 146 if (width == 720 && height == 625) {
147 /* PAL case */ 147 /* PAL case */
148 /* 148 /*
149 * Field0BlankEnd = 0x7, Field0BlankStart = 0x3, 149 * Field0BlankEnd = 0x6, Field0BlankStart = 0x2,
150 * Field0ActiveEnd = 0x5, Field0ActiveStart = 0x1 150 * Field0ActiveEnd = 0x4, Field0ActiveStart = 0
151 */ 151 */
152 ipu_csi_write(ipu, csi, 0xD07DF, CSI_CCIR_CODE_1); 152 ipu_csi_write(ipu, csi, 0x40596, CSI_CCIR_CODE_1);
153 /* 153 /*
154 * Field1BlankEnd = 0x6, Field1BlankStart = 0x2, 154 * Field1BlankEnd = 0x7, Field1BlankStart = 0x3,
155 * Field1ActiveEnd = 0x4, Field1ActiveStart = 0 155 * Field1ActiveEnd = 0x5, Field1ActiveStart = 0x1
156 */ 156 */
157 ipu_csi_write(ipu, csi, 0x40596, CSI_CCIR_CODE_2); 157 ipu_csi_write(ipu, csi, 0xD07DF, CSI_CCIR_CODE_2);
158
158 ipu_csi_write(ipu, csi, 0xFF0000, CSI_CCIR_CODE_3); 159 ipu_csi_write(ipu, csi, 0xFF0000, CSI_CCIR_CODE_3);
159 160
160 } else if (width == 720 && height == 525) { 161 } else if (width == 720 && height == 525) {
161 /* NTSC case */ 162 /* NTSC case */
162 /* 163 /*
163 * Field1BlankEnd = 0x6, Field1BlankStart = 0x2,
164 * Field1ActiveEnd = 0x4, Field1ActiveStart = 0
165 */
166 ipu_csi_write(ipu, csi, 0x40596, CSI_CCIR_CODE_1);
167 /*
168 * Field0BlankEnd = 0x7, Field0BlankStart = 0x3, 164 * Field0BlankEnd = 0x7, Field0BlankStart = 0x3,
169 * Field0ActiveEnd = 0x5, Field0ActiveStart = 0x1 165 * Field0ActiveEnd = 0x5, Field0ActiveStart = 0x1
170 */ 166 */
171 ipu_csi_write(ipu, csi, 0xD07DF, CSI_CCIR_CODE_2); 167 ipu_csi_write(ipu, csi, 0xD07DF, CSI_CCIR_CODE_1);
168 /*
169 * Field1BlankEnd = 0x6, Field1BlankStart = 0x2,
170 * Field1ActiveEnd = 0x4, Field1ActiveStart = 0
171 */
172 ipu_csi_write(ipu, csi, 0x40596, CSI_CCIR_CODE_2);
172 ipu_csi_write(ipu, csi, 0xFF0000, CSI_CCIR_CODE_3); 173 ipu_csi_write(ipu, csi, 0xFF0000, CSI_CCIR_CODE_3);
173 } else { 174 } else {
174 dev_err(ipu->dev, "Unsupported CCIR656 interlaced " 175 dev_err(ipu->dev, "Unsupported CCIR656 interlaced "