Skip to content

Commit 9e74d29

Browse files
esmilgregkh
authored andcommitted
staging: imx-drm: add LVDS666 support for parallel display
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d63bc1f commit 9e74d29

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Required properties:
6161
Optional properties:
6262
- interface_pix_fmt: How this display is connected to the
6363
display interface. Currently supported types: "rgb24", "rgb565", "bgr666"
64+
and "lvds666".
6465
- edid: verbatim EDID data block describing attached display.
6566
- ddc: phandle describing the i2c bus handling the display data
6667
channel

drivers/staging/imx-drm/ipu-v3/ipu-dc.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ enum ipu_dc_map {
9191
IPU_DC_MAP_RGB565,
9292
IPU_DC_MAP_GBR24, /* TVEv2 */
9393
IPU_DC_MAP_BGR666,
94+
IPU_DC_MAP_LVDS666,
9495
IPU_DC_MAP_BGR24,
9596
};
9697

@@ -153,6 +154,8 @@ static int ipu_pixfmt_to_map(u32 fmt)
153154
return IPU_DC_MAP_GBR24;
154155
case V4L2_PIX_FMT_BGR666:
155156
return IPU_DC_MAP_BGR666;
157+
case v4l2_fourcc('L', 'V', 'D', '6'):
158+
return IPU_DC_MAP_LVDS666;
156159
case V4L2_PIX_FMT_BGR24:
157160
return IPU_DC_MAP_BGR24;
158161
default:
@@ -398,6 +401,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev,
398401
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */
399402
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */
400403

404+
/* lvds666 */
405+
ipu_dc_map_clear(priv, IPU_DC_MAP_LVDS666);
406+
ipu_dc_map_config(priv, IPU_DC_MAP_LVDS666, 0, 5, 0xfc); /* blue */
407+
ipu_dc_map_config(priv, IPU_DC_MAP_LVDS666, 1, 13, 0xfc); /* green */
408+
ipu_dc_map_config(priv, IPU_DC_MAP_LVDS666, 2, 21, 0xfc); /* red */
409+
401410
/* bgr24 */
402411
ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24);
403412
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 2, 7, 0xff); /* red */

drivers/staging/imx-drm/parallel-display.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
219219
imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB565;
220220
else if (!strcmp(fmt, "bgr666"))
221221
imxpd->interface_pix_fmt = V4L2_PIX_FMT_BGR666;
222+
else if (!strcmp(fmt, "lvds666"))
223+
imxpd->interface_pix_fmt = v4l2_fourcc('L', 'V', 'D', '6');
222224
}
223225

224226
panel_node = of_parse_phandle(np, "fsl,panel", 0);

0 commit comments

Comments
 (0)