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>
This commit is contained in:
parent
8e2b2033db
commit
675f928055
1 changed files with 0 additions and 18 deletions
|
@ -131,10 +131,8 @@ static int sh_mipi_setup(struct sh_mipi *mipi, const struct fb_videomode *mode)
|
||||||
{
|
{
|
||||||
void __iomem *base = mipi->base;
|
void __iomem *base = mipi->base;
|
||||||
struct sh_mipi_dsi_info *pdata = mipi->pdev->dev.platform_data;
|
struct sh_mipi_dsi_info *pdata = mipi->pdev->dev.platform_data;
|
||||||
struct sh_mobile_lcdc_chan_cfg *ch = pdata->lcd_chan;
|
|
||||||
u32 pctype, datatype, pixfmt, linelength, vmctr2;
|
u32 pctype, datatype, pixfmt, linelength, vmctr2;
|
||||||
u32 tmp, top, bottom, delay, div;
|
u32 tmp, top, bottom, delay, div;
|
||||||
bool yuv;
|
|
||||||
int bpp;
|
int bpp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -148,77 +146,66 @@ static int sh_mipi_setup(struct sh_mipi *mipi, const struct fb_videomode *mode)
|
||||||
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24;
|
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
|
||||||
linelength = mode->xres * 3;
|
linelength = mode->xres * 3;
|
||||||
yuv = false;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_RGB565:
|
case MIPI_RGB565:
|
||||||
pctype = 1;
|
pctype = 1;
|
||||||
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16;
|
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
|
||||||
linelength = mode->xres * 2;
|
linelength = mode->xres * 2;
|
||||||
yuv = false;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_RGB666_LP:
|
case MIPI_RGB666_LP:
|
||||||
pctype = 2;
|
pctype = 2;
|
||||||
datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18;
|
datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
|
||||||
linelength = mode->xres * 3;
|
linelength = mode->xres * 3;
|
||||||
yuv = false;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_RGB666:
|
case MIPI_RGB666:
|
||||||
pctype = 3;
|
pctype = 3;
|
||||||
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18;
|
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_18BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_18BIT;
|
||||||
linelength = (mode->xres * 18 + 7) / 8;
|
linelength = (mode->xres * 18 + 7) / 8;
|
||||||
yuv = false;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_BGR888:
|
case MIPI_BGR888:
|
||||||
pctype = 8;
|
pctype = 8;
|
||||||
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24;
|
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
|
||||||
linelength = mode->xres * 3;
|
linelength = mode->xres * 3;
|
||||||
yuv = false;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_BGR565:
|
case MIPI_BGR565:
|
||||||
pctype = 9;
|
pctype = 9;
|
||||||
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16;
|
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
|
||||||
linelength = mode->xres * 2;
|
linelength = mode->xres * 2;
|
||||||
yuv = false;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_BGR666_LP:
|
case MIPI_BGR666_LP:
|
||||||
pctype = 0xa;
|
pctype = 0xa;
|
||||||
datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18;
|
datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_24BIT;
|
||||||
linelength = mode->xres * 3;
|
linelength = mode->xres * 3;
|
||||||
yuv = false;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_BGR666:
|
case MIPI_BGR666:
|
||||||
pctype = 0xb;
|
pctype = 0xb;
|
||||||
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18;
|
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_18BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_18BIT;
|
||||||
linelength = (mode->xres * 18 + 7) / 8;
|
linelength = (mode->xres * 18 + 7) / 8;
|
||||||
yuv = false;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_YUYV:
|
case MIPI_YUYV:
|
||||||
pctype = 4;
|
pctype = 4;
|
||||||
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16;
|
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
|
||||||
linelength = mode->xres * 2;
|
linelength = mode->xres * 2;
|
||||||
yuv = true;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_UYVY:
|
case MIPI_UYVY:
|
||||||
pctype = 5;
|
pctype = 5;
|
||||||
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16;
|
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_16BIT;
|
||||||
linelength = mode->xres * 2;
|
linelength = mode->xres * 2;
|
||||||
yuv = true;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_YUV420_L:
|
case MIPI_YUV420_L:
|
||||||
pctype = 6;
|
pctype = 6;
|
||||||
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12;
|
datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12;
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_12BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_12BIT;
|
||||||
linelength = (mode->xres * 12 + 7) / 8;
|
linelength = (mode->xres * 12 + 7) / 8;
|
||||||
yuv = true;
|
|
||||||
break;
|
break;
|
||||||
case MIPI_YUV420:
|
case MIPI_YUV420:
|
||||||
pctype = 7;
|
pctype = 7;
|
||||||
|
@ -226,16 +213,11 @@ static int sh_mipi_setup(struct sh_mipi *mipi, const struct fb_videomode *mode)
|
||||||
pixfmt = MIPI_DCS_PIXEL_FMT_12BIT;
|
pixfmt = MIPI_DCS_PIXEL_FMT_12BIT;
|
||||||
/* Length of U/V line */
|
/* Length of U/V line */
|
||||||
linelength = (mode->xres + 1) / 2;
|
linelength = (mode->xres + 1) / 2;
|
||||||
yuv = true;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((yuv && ch->interface_type != YUV422) ||
|
|
||||||
(!yuv && ch->interface_type != RGB24))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
if (!pdata->lane)
|
if (!pdata->lane)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue