diff options
| author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2012-08-14 06:21:17 -0400 |
|---|---|---|
| committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2012-11-21 09:50:01 -0500 |
| commit | 675f9280552c1a8f6e3b2bc2582325f5a9e192d2 (patch) | |
| tree | 1c30adbf8160516bfddd015a472ac292008e6ec9 | |
| parent | 8e2b2033db37ff4cec8caca3d0ef815e9aa84153 (diff) | |
fbdev: sh_mipi_dsi: Remove last reference to LCDC platform data
The format check that references LCDC platform data isn't needed, as the
mismatch between LCDC and MIPI-DSI platform it detects would result in a
badly displayed image, which isn't worse than a complete failure to
setup the transmitter.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
| -rw-r--r-- | drivers/video/sh_mipi_dsi.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c index f88b2040eb5..f4962292792 100644 --- a/drivers/video/sh_mipi_dsi.c +++ b/drivers/video/sh_mipi_dsi.c | |||
| @@ -131,10 +131,8 @@ static int sh_mipi_setup(struct sh_mipi *mipi, const struct fb_videomode *mode) | |||
| 131 | { | 131 | { |
| 132 | void __iomem *base = mipi->base; | 132 | void __iomem *base = mipi->base; |
| 133 | struct sh_mipi_dsi_info *pdata = mipi->pdev->dev.platform_data; | 133 | struct sh_mipi_dsi_info *pdata = mipi->pdev->dev.platform_data; |
| 134 | struct sh_mobile_lcdc_chan_cfg *ch = pdata->lcd_chan; | ||
| 135 | u32 pctype, datatype, pixfmt, linelength, vmctr2; | 134 | u32 pctype, datatype, pixfmt, linelength, vmctr2; |
| 136 | u32 tmp, top, bottom, delay, div; | 135 | u32 tmp, top, bottom, delay, div; |
| 137 | bool yuv; | ||
| 138 | int bpp; | 136 | int bpp; |
| 139 | 137 | ||
| 140 | /* | 138 | /* |
| @@ -148,77 +146,66 @@ static int sh_mipi_setup(struct sh_mipi *mipi, const struct fb_videomode *mode) | |||
| 148 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24; | 146 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24; |
| 149 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; | 147 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; |
| 150 | linelength = mode->xres * 3; | 148 | linelength = mode->xres * 3; |
| 151 | yuv = false; | ||
| 152 | break; | 149 | break; |
| 153 | case MIPI_RGB565: | 150 | case MIPI_RGB565: |
| 154 | pctype = 1; | 151 | pctype = 1; |
| 155 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16; | 152 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16; |
| 156 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; | 153 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; |
| 157 | linelength = mode->xres * 2; | 154 | linelength = mode->xres * 2; |
| 158 | yuv = false; | ||
| 159 | break; | 155 | break; |
| 160 | case MIPI_RGB666_LP: | 156 | case MIPI_RGB666_LP: |
| 161 | pctype = 2; | 157 | pctype = 2; |
| 162 | datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18; | 158 | datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18; |
| 163 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; | 159 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; |
| 164 | linelength = mode->xres * 3; | 160 | linelength = mode->xres * 3; |
| 165 | yuv = false; | ||
| 166 | break; | 161 | break; |
| 167 | case MIPI_RGB666: | 162 | case MIPI_RGB666: |
| 168 | pctype = 3; | 163 | pctype = 3; |
| 169 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18; | 164 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18; |
| 170 | pixfmt = MIPI_DCS_PIXEL_FMT_18BIT; | 165 | pixfmt = MIPI_DCS_PIXEL_FMT_18BIT; |
| 171 | linelength = (mode->xres * 18 + 7) / 8; | 166 | linelength = (mode->xres * 18 + 7) / 8; |
| 172 | yuv = false; | ||
| 173 | break; | 167 | break; |
| 174 | case MIPI_BGR888: | 168 | case MIPI_BGR888: |
| 175 | pctype = 8; | 169 | pctype = 8; |
| 176 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24; | 170 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24; |
| 177 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; | 171 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; |
| 178 | linelength = mode->xres * 3; | 172 | linelength = mode->xres * 3; |
| 179 | yuv = false; | ||
| 180 | break; | 173 | break; |
| 181 | case MIPI_BGR565: | 174 | case MIPI_BGR565: |
| 182 | pctype = 9; | 175 | pctype = 9; |
| 183 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16; | 176 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16; |
| 184 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; | 177 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; |
| 185 | linelength = mode->xres * 2; | 178 | linelength = mode->xres * 2; |
| 186 | yuv = false; | ||
| 187 | break; | 179 | break; |
| 188 | case MIPI_BGR666_LP: | 180 | case MIPI_BGR666_LP: |
| 189 | pctype = 0xa; | 181 | pctype = 0xa; |
| 190 | datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18; | 182 | datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18; |
| 191 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; | 183 | pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; |
| 192 | linelength = mode->xres * 3; | 184 | linelength = mode->xres * 3; |
| 193 | yuv = false; | ||
| 194 | break; | 185 | break; |
| 195 | case MIPI_BGR666: | 186 | case MIPI_BGR666: |
| 196 | pctype = 0xb; | 187 | pctype = 0xb; |
| 197 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18; | 188 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18; |
| 198 | pixfmt = MIPI_DCS_PIXEL_FMT_18BIT; | 189 | pixfmt = MIPI_DCS_PIXEL_FMT_18BIT; |
| 199 | linelength = (mode->xres * 18 + 7) / 8; | 190 | linelength = (mode->xres * 18 + 7) / 8; |
| 200 | yuv = false; | ||
| 201 | break; | 191 | break; |
| 202 | case MIPI_YUYV: | 192 | case MIPI_YUYV: |
| 203 | pctype = 4; | 193 | pctype = 4; |
| 204 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16; | 194 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16; |
| 205 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; | 195 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; |
| 206 | linelength = mode->xres * 2; | 196 | linelength = mode->xres * 2; |
| 207 | yuv = true; | ||
| 208 | break; | 197 | break; |
| 209 | case MIPI_UYVY: | 198 | case MIPI_UYVY: |
| 210 | pctype = 5; | 199 | pctype = 5; |
| 211 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16; | 200 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16; |
| 212 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; | 201 | pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; |
| 213 | linelength = mode->xres * 2; | 202 | linelength = mode->xres * 2; |
| 214 | yuv = true; | ||
| 215 | break; | 203 | break; |
| 216 | case MIPI_YUV420_L: | 204 | case MIPI_YUV420_L: |
| 217 | pctype = 6; | 205 | pctype = 6; |
| 218 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12; | 206 | datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12; |
| 219 | pixfmt = MIPI_DCS_PIXEL_FMT_12BIT; | 207 | pixfmt = MIPI_DCS_PIXEL_FMT_12BIT; |
| 220 | linelength = (mode->xres * 12 + 7) / 8; | 208 | linelength = (mode->xres * 12 + 7) / 8; |
| 221 | yuv = true; | ||
| 222 | break; | 209 | break; |
| 223 | case MIPI_YUV420: | 210 | case MIPI_YUV420: |
| 224 | pctype = 7; | 211 | pctype = 7; |
| @@ -226,16 +213,11 @@ static int sh_mipi_setup(struct sh_mipi *mipi, const struct fb_videomode *mode) | |||
| 226 | pixfmt = MIPI_DCS_PIXEL_FMT_12BIT; | 213 | pixfmt = MIPI_DCS_PIXEL_FMT_12BIT; |
| 227 | /* Length of U/V line */ | 214 | /* Length of U/V line */ |
| 228 | linelength = (mode->xres + 1) / 2; | 215 | linelength = (mode->xres + 1) / 2; |
| 229 | yuv = true; | ||
| 230 | break; | 216 | break; |
| 231 | default: | 217 | default: |
| 232 | return -EINVAL; | 218 | return -EINVAL; |
| 233 | } | 219 | } |
| 234 | 220 | ||
| 235 | if ((yuv && ch->interface_type != YUV422) || | ||
| 236 | (!yuv && ch->interface_type != RGB24)) | ||
| 237 | return -EINVAL; | ||
| 238 | |||
| 239 | if (!pdata->lane) | 221 | if (!pdata->lane) |
| 240 | return -EINVAL; | 222 | return -EINVAL; |
| 241 | 223 | ||
