diff options
author | Ivaylo Petrov <ivpetrov@mm-sol.com> | 2011-09-12 05:54:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-11 15:01:20 -0400 |
commit | 73cdc79f9327c2112dff085a439f8302a2bec3ec (patch) | |
tree | fb14a267334bd053f0fa8d3aee37813a9ba1e5ca | |
parent | 0810fd9c53c5a9b988687c091136e4f7ae34266e (diff) |
[media] omap3isp: csi2: Add V4L2_MBUS_FMT_YUYV8_2X8 support
Tested with ov9740 and
struct isp_csi2_platform_data {
.interface = ISP_INTERFACE_CSI2A_PHY2,
.bus = {
.csi2 = {
.crc = 1,
.vpclk_div = 1,
}
},
}
Signed-off-by: Ivaylo Petrov <ivpetrov@mm-sol.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/omap3isp/ispcsi2.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/drivers/media/video/omap3isp/ispcsi2.c b/drivers/media/video/omap3isp/ispcsi2.c index a1724362b6d..6a3ff792af7 100644 --- a/drivers/media/video/omap3isp/ispcsi2.c +++ b/drivers/media/video/omap3isp/ispcsi2.c | |||
@@ -96,11 +96,12 @@ static const unsigned int csi2_input_fmts[] = { | |||
96 | V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8, | 96 | V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8, |
97 | V4L2_MBUS_FMT_SGBRG10_1X10, | 97 | V4L2_MBUS_FMT_SGBRG10_1X10, |
98 | V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8, | 98 | V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8, |
99 | V4L2_MBUS_FMT_YUYV8_2X8, | ||
99 | }; | 100 | }; |
100 | 101 | ||
101 | /* To set the format on the CSI2 requires a mapping function that takes | 102 | /* To set the format on the CSI2 requires a mapping function that takes |
102 | * the following inputs: | 103 | * the following inputs: |
103 | * - 2 different formats (at this time) | 104 | * - 3 different formats (at this time) |
104 | * - 2 destinations (mem, vp+mem) (vp only handled separately) | 105 | * - 2 destinations (mem, vp+mem) (vp only handled separately) |
105 | * - 2 decompression options (on, off) | 106 | * - 2 decompression options (on, off) |
106 | * - 2 isp revisions (certain format must be handled differently on OMAP3630) | 107 | * - 2 isp revisions (certain format must be handled differently on OMAP3630) |
@@ -108,7 +109,7 @@ static const unsigned int csi2_input_fmts[] = { | |||
108 | * Array indices as follows: [format][dest][decompr][is_3630] | 109 | * Array indices as follows: [format][dest][decompr][is_3630] |
109 | * Not all combinations are valid. 0 means invalid. | 110 | * Not all combinations are valid. 0 means invalid. |
110 | */ | 111 | */ |
111 | static const u16 __csi2_fmt_map[2][2][2][2] = { | 112 | static const u16 __csi2_fmt_map[3][2][2][2] = { |
112 | /* RAW10 formats */ | 113 | /* RAW10 formats */ |
113 | { | 114 | { |
114 | /* Output to memory */ | 115 | /* Output to memory */ |
@@ -147,6 +148,25 @@ static const u16 __csi2_fmt_map[2][2][2][2] = { | |||
147 | CSI2_USERDEF_8BIT_DATA1_DPCM10_VP }, | 148 | CSI2_USERDEF_8BIT_DATA1_DPCM10_VP }, |
148 | }, | 149 | }, |
149 | }, | 150 | }, |
151 | /* YUYV8 2X8 formats */ | ||
152 | { | ||
153 | /* Output to memory */ | ||
154 | { | ||
155 | /* No DPCM decompression */ | ||
156 | { CSI2_PIX_FMT_YUV422_8BIT, | ||
157 | CSI2_PIX_FMT_YUV422_8BIT }, | ||
158 | /* DPCM decompression */ | ||
159 | { 0, 0 }, | ||
160 | }, | ||
161 | /* Output to both */ | ||
162 | { | ||
163 | /* No DPCM decompression */ | ||
164 | { CSI2_PIX_FMT_YUV422_8BIT_VP, | ||
165 | CSI2_PIX_FMT_YUV422_8BIT_VP }, | ||
166 | /* DPCM decompression */ | ||
167 | { 0, 0 }, | ||
168 | }, | ||
169 | }, | ||
150 | }; | 170 | }; |
151 | 171 | ||
152 | /* | 172 | /* |
@@ -173,6 +193,9 @@ static u16 csi2_ctx_map_format(struct isp_csi2_device *csi2) | |||
173 | case V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8: | 193 | case V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8: |
174 | fmtidx = 1; | 194 | fmtidx = 1; |
175 | break; | 195 | break; |
196 | case V4L2_MBUS_FMT_YUYV8_2X8: | ||
197 | fmtidx = 2; | ||
198 | break; | ||
176 | default: | 199 | default: |
177 | WARN(1, KERN_ERR "CSI2: pixel format %08x unsupported!\n", | 200 | WARN(1, KERN_ERR "CSI2: pixel format %08x unsupported!\n", |
178 | fmt->code); | 201 | fmt->code); |