staging: imx-drm: add LVDS666 support for parallel display
authorEmil Renner Berthing <kernel@esmil.dk>
Sat, 29 Mar 2014 12:57:44 +0000 (13:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2014 23:11:03 +0000 (16:11 -0700)
Support the LVDS666 format on the IPUv3 parallel display.
This makes the screen work on my Hercules eCAFE Slim HD.

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
drivers/staging/imx-drm/ipu-v3/ipu-dc.c
drivers/staging/imx-drm/parallel-display.c

index 3be5ce7a965447fa4129c0bc82cc6ade0863ace3..e75f0e549fff7cfe767786a83c57da5b5a4fe5b1 100644 (file)
@@ -61,6 +61,7 @@ Required properties:
 Optional properties:
 - interface_pix_fmt: How this display is connected to the
   display interface. Currently supported types: "rgb24", "rgb565", "bgr666"
+  and "lvds666".
 - edid: verbatim EDID data block describing attached display.
 - ddc: phandle describing the i2c bus handling the display data
   channel
index d5de8bb5c803f87b84dbfea1a2aaac5843f3661a..07514dc1f66fe8f62e30f24526fd06ccff3d1d8c 100644 (file)
@@ -91,6 +91,7 @@ enum ipu_dc_map {
        IPU_DC_MAP_RGB565,
        IPU_DC_MAP_GBR24, /* TVEv2 */
        IPU_DC_MAP_BGR666,
+       IPU_DC_MAP_LVDS666,
        IPU_DC_MAP_BGR24,
 };
 
@@ -153,6 +154,8 @@ static int ipu_pixfmt_to_map(u32 fmt)
                return IPU_DC_MAP_GBR24;
        case V4L2_PIX_FMT_BGR666:
                return IPU_DC_MAP_BGR666;
+       case v4l2_fourcc('L', 'V', 'D', '6'):
+               return IPU_DC_MAP_LVDS666;
        case V4L2_PIX_FMT_BGR24:
                return IPU_DC_MAP_BGR24;
        default:
@@ -398,6 +401,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev,
        ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */
        ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */
 
+       /* lvds666 */
+       ipu_dc_map_clear(priv, IPU_DC_MAP_LVDS666);
+       ipu_dc_map_config(priv, IPU_DC_MAP_LVDS666, 0, 5, 0xfc); /* blue */
+       ipu_dc_map_config(priv, IPU_DC_MAP_LVDS666, 1, 13, 0xfc); /* green */
+       ipu_dc_map_config(priv, IPU_DC_MAP_LVDS666, 2, 21, 0xfc); /* red */
+
        /* bgr24 */
        ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24);
        ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 2, 7, 0xff); /* red */
index c60b6c645f42000df73f7ee4ba198cca6c65d27f..eaf4dda1a0c442ce53acfe01f181892d7bed4253 100644 (file)
@@ -219,6 +219,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
                        imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB565;
                else if (!strcmp(fmt, "bgr666"))
                        imxpd->interface_pix_fmt = V4L2_PIX_FMT_BGR666;
+               else if (!strcmp(fmt, "lvds666"))
+                       imxpd->interface_pix_fmt = v4l2_fourcc('L', 'V', 'D', '6');
        }
 
        panel_node = of_parse_phandle(np, "fsl,panel", 0);