diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-11-29 08:33:41 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-03-12 17:40:55 -0400 |
commit | 93ff259846a774ff37dca54792c5a3a6425882c0 (patch) | |
tree | b5bbdb3005ec0dc57f674c1c88de5abede17c65f /drivers/video/sh_mipi_dsi.c | |
parent | 2d04559dc23bed905ed2904f2bbcbcc3f1a7fd91 (diff) |
fbdev: sh_mobile_lcdc: Rename (lcd|num)_cfg (lcd|num)_modes
The struct sh_mobile_lcdc_chan_cfg platform data contains a list of
video modes. Name the lcd_cfg and num_cfg fields to reflect that they
describe video modes.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/video/sh_mipi_dsi.c')
-rw-r--r-- | drivers/video/sh_mipi_dsi.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c index 5ff3742aeb08..42ad0f707e88 100644 --- a/drivers/video/sh_mipi_dsi.c +++ b/drivers/video/sh_mipi_dsi.c | |||
@@ -147,77 +147,77 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi, | |||
147 | pctype = 0; | 147 | pctype = 0; |
148 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24; | 148 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24; |
149 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; | 149 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; |
150 | linelength = ch->lcd_cfg[0].xres * 3; | 150 | linelength = ch->lcd_modes[0].xres * 3; |
151 | yuv = false; | 151 | yuv = false; |
152 | break; | 152 | break; |
153 | case MIPI_RGB565: | 153 | case MIPI_RGB565: |
154 | pctype = 1; | 154 | pctype = 1; |
155 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16; | 155 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16; |
156 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; | 156 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; |
157 | linelength = ch->lcd_cfg[0].xres * 2; | 157 | linelength = ch->lcd_modes[0].xres * 2; |
158 | yuv = false; | 158 | yuv = false; |
159 | break; | 159 | break; |
160 | case MIPI_RGB666_LP: | 160 | case MIPI_RGB666_LP: |
161 | pctype = 2; | 161 | pctype = 2; |
162 | datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18; | 162 | datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18; |
163 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; | 163 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; |
164 | linelength = ch->lcd_cfg[0].xres * 3; | 164 | linelength = ch->lcd_modes[0].xres * 3; |
165 | yuv = false; | 165 | yuv = false; |
166 | break; | 166 | break; |
167 | case MIPI_RGB666: | 167 | case MIPI_RGB666: |
168 | pctype = 3; | 168 | pctype = 3; |
169 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18; | 169 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18; |
170 | pixfmt = MIPI_DCS_PIXEL_FMT_18BIT; | 170 | pixfmt = MIPI_DCS_PIXEL_FMT_18BIT; |
171 | linelength = (ch->lcd_cfg[0].xres * 18 + 7) / 8; | 171 | linelength = (ch->lcd_modes[0].xres * 18 + 7) / 8; |
172 | yuv = false; | 172 | yuv = false; |
173 | break; | 173 | break; |
174 | case MIPI_BGR888: | 174 | case MIPI_BGR888: |
175 | pctype = 8; | 175 | pctype = 8; |
176 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24; | 176 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24; |
177 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; | 177 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; |
178 | linelength = ch->lcd_cfg[0].xres * 3; | 178 | linelength = ch->lcd_modes[0].xres * 3; |
179 | yuv = false; | 179 | yuv = false; |
180 | break; | 180 | break; |
181 | case MIPI_BGR565: | 181 | case MIPI_BGR565: |
182 | pctype = 9; | 182 | pctype = 9; |
183 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16; | 183 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16; |
184 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; | 184 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; |
185 | linelength = ch->lcd_cfg[0].xres * 2; | 185 | linelength = ch->lcd_modes[0].xres * 2; |
186 | yuv = false; | 186 | yuv = false; |
187 | break; | 187 | break; |
188 | case MIPI_BGR666_LP: | 188 | case MIPI_BGR666_LP: |
189 | pctype = 0xa; | 189 | pctype = 0xa; |
190 | datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18; | 190 | datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18; |
191 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; | 191 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; |
192 | linelength = ch->lcd_cfg[0].xres * 3; | 192 | linelength = ch->lcd_modes[0].xres * 3; |
193 | yuv = false; | 193 | yuv = false; |
194 | break; | 194 | break; |
195 | case MIPI_BGR666: | 195 | case MIPI_BGR666: |
196 | pctype = 0xb; | 196 | pctype = 0xb; |
197 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18; | 197 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18; |
198 | pixfmt = MIPI_DCS_PIXEL_FMT_18BIT; | 198 | pixfmt = MIPI_DCS_PIXEL_FMT_18BIT; |
199 | linelength = (ch->lcd_cfg[0].xres * 18 + 7) / 8; | 199 | linelength = (ch->lcd_modes[0].xres * 18 + 7) / 8; |
200 | yuv = false; | 200 | yuv = false; |
201 | break; | 201 | break; |
202 | case MIPI_YUYV: | 202 | case MIPI_YUYV: |
203 | pctype = 4; | 203 | pctype = 4; |
204 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16; | 204 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16; |
205 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; | 205 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; |
206 | linelength = ch->lcd_cfg[0].xres * 2; | 206 | linelength = ch->lcd_modes[0].xres * 2; |
207 | yuv = true; | 207 | yuv = true; |
208 | break; | 208 | break; |
209 | case MIPI_UYVY: | 209 | case MIPI_UYVY: |
210 | pctype = 5; | 210 | pctype = 5; |
211 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16; | 211 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16; |
212 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; | 212 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; |
213 | linelength = ch->lcd_cfg[0].xres * 2; | 213 | linelength = ch->lcd_modes[0].xres * 2; |
214 | yuv = true; | 214 | yuv = true; |
215 | break; | 215 | break; |
216 | case MIPI_YUV420_L: | 216 | case MIPI_YUV420_L: |
217 | pctype = 6; | 217 | pctype = 6; |
218 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12; | 218 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12; |
219 | pixfmt = MIPI_DCS_PIXEL_FMT_12BIT; | 219 | pixfmt = MIPI_DCS_PIXEL_FMT_12BIT; |
220 | linelength = (ch->lcd_cfg[0].xres * 12 + 7) / 8; | 220 | linelength = (ch->lcd_modes[0].xres * 12 + 7) / 8; |
221 | yuv = true; | 221 | yuv = true; |
222 | break; | 222 | break; |
223 | case MIPI_YUV420: | 223 | case MIPI_YUV420: |
@@ -225,7 +225,7 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi, | |||
225 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12; | 225 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12; |
226 | pixfmt = MIPI_DCS_PIXEL_FMT_12BIT; | 226 | pixfmt = MIPI_DCS_PIXEL_FMT_12BIT; |
227 | /* Length of U/V line */ | 227 | /* Length of U/V line */ |
228 | linelength = (ch->lcd_cfg[0].xres + 1) / 2; | 228 | linelength = (ch->lcd_modes[0].xres + 1) / 2; |
229 | yuv = true; | 229 | yuv = true; |
230 | break; | 230 | break; |
231 | default: | 231 | default: |
@@ -294,7 +294,7 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi, | |||
294 | */ | 294 | */ |
295 | iowrite32(0x00000006, mipi->linkbase + DTCTR); | 295 | iowrite32(0x00000006, mipi->linkbase + DTCTR); |
296 | /* VSYNC width = 2 (<< 17) */ | 296 | /* VSYNC width = 2 (<< 17) */ |
297 | iowrite32((ch->lcd_cfg[0].vsync_len << pdata->vsynw_offset) | | 297 | iowrite32((ch->lcd_modes[0].vsync_len << pdata->vsynw_offset) | |
298 | (pdata->clksrc << 16) | (pctype << 12) | datatype, | 298 | (pdata->clksrc << 16) | (pctype << 12) | datatype, |
299 | mipi->linkbase + VMCTR1); | 299 | mipi->linkbase + VMCTR1); |
300 | 300 | ||
@@ -328,7 +328,7 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi, | |||
328 | top = linelength << 16; /* RGBLEN */ | 328 | top = linelength << 16; /* RGBLEN */ |
329 | bottom = 0x00000001; | 329 | bottom = 0x00000001; |
330 | if (pdata->flags & SH_MIPI_DSI_HSABM) /* HSALEN */ | 330 | if (pdata->flags & SH_MIPI_DSI_HSABM) /* HSALEN */ |
331 | bottom = (pdata->lane * ch->lcd_cfg[0].hsync_len) - 10; | 331 | bottom = (pdata->lane * ch->lcd_modes[0].hsync_len) - 10; |
332 | iowrite32(top | bottom , mipi->linkbase + VMLEN1); | 332 | iowrite32(top | bottom , mipi->linkbase + VMLEN1); |
333 | 333 | ||
334 | /* | 334 | /* |
@@ -348,18 +348,18 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi, | |||
348 | div = 2; | 348 | div = 2; |
349 | 349 | ||
350 | if (pdata->flags & SH_MIPI_DSI_HFPBM) { /* HBPLEN */ | 350 | if (pdata->flags & SH_MIPI_DSI_HFPBM) { /* HBPLEN */ |
351 | top = ch->lcd_cfg[0].hsync_len + ch->lcd_cfg[0].left_margin; | 351 | top = ch->lcd_modes[0].hsync_len + ch->lcd_modes[0].left_margin; |
352 | top = ((pdata->lane * top / div) - 10) << 16; | 352 | top = ((pdata->lane * top / div) - 10) << 16; |
353 | } | 353 | } |
354 | if (pdata->flags & SH_MIPI_DSI_HBPBM) { /* HFPLEN */ | 354 | if (pdata->flags & SH_MIPI_DSI_HBPBM) { /* HFPLEN */ |
355 | bottom = ch->lcd_cfg[0].right_margin; | 355 | bottom = ch->lcd_modes[0].right_margin; |
356 | bottom = (pdata->lane * bottom / div) - 12; | 356 | bottom = (pdata->lane * bottom / div) - 12; |
357 | } | 357 | } |
358 | 358 | ||
359 | bpp = linelength / ch->lcd_cfg[0].xres; /* byte / pixel */ | 359 | bpp = linelength / ch->lcd_modes[0].xres; /* byte / pixel */ |
360 | if ((pdata->lane / div) > bpp) { | 360 | if ((pdata->lane / div) > bpp) { |
361 | tmp = ch->lcd_cfg[0].xres / bpp; /* output cycle */ | 361 | tmp = ch->lcd_modes[0].xres / bpp; /* output cycle */ |
362 | tmp = ch->lcd_cfg[0].xres - tmp; /* (input - output) cycle */ | 362 | tmp = ch->lcd_modes[0].xres - tmp; /* (input - output) cycle */ |
363 | delay = (pdata->lane * tmp); | 363 | delay = (pdata->lane * tmp); |
364 | } | 364 | } |
365 | 365 | ||