Commit 7d0a66c0ccfd0ec23645ba2d92593c00d11bf936

Authored by Marek Vasut
Committed by Greg Kroah-Hartman
1 parent 5b9974b13e

staging: video: imx: Add BGR666 support for parallel display

Support the BGR666 format on the IPUv3 parallel display.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 3 changed files with 12 additions and 1 deletions Side-by-side Diff

Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
... ... @@ -26,7 +26,7 @@
26 26 - crtc: the crtc this display is connected to, see below
27 27 Optional properties:
28 28 - interface_pix_fmt: How this display is connected to the
29   - crtc. Currently supported types: "rgb24", "rgb565"
  29 + crtc. Currently supported types: "rgb24", "rgb565", "bgr666"
30 30 - edid: verbatim EDID data block describing attached display.
31 31 - ddc: phandle describing the i2c bus handling the display data
32 32 channel
drivers/staging/imx-drm/ipu-v3/ipu-dc.c
... ... @@ -90,6 +90,7 @@
90 90 IPU_DC_MAP_RGB24,
91 91 IPU_DC_MAP_RGB565,
92 92 IPU_DC_MAP_GBR24, /* TVEv2 */
  93 + IPU_DC_MAP_BGR666,
93 94 };
94 95  
95 96 struct ipu_dc {
... ... @@ -149,6 +150,8 @@
149 150 return IPU_DC_MAP_RGB565;
150 151 case IPU_PIX_FMT_GBR24:
151 152 return IPU_DC_MAP_GBR24;
  153 + case V4L2_PIX_FMT_BGR666:
  154 + return IPU_DC_MAP_BGR666;
152 155 default:
153 156 return -EINVAL;
154 157 }
... ... @@ -384,6 +387,12 @@
384 387 ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 2, 15, 0xff); /* green */
385 388 ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 1, 7, 0xff); /* blue */
386 389 ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 0, 23, 0xff); /* red */
  390 +
  391 + /* bgr666 */
  392 + ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
  393 + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */
  394 + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */
  395 + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */
387 396  
388 397 return 0;
389 398 }
drivers/staging/imx-drm/parallel-display.c
... ... @@ -230,6 +230,8 @@
230 230 imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB24;
231 231 else if (!strcmp(fmt, "rgb565"))
232 232 imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB565;
  233 + else if (!strcmp(fmt, "bgr666"))
  234 + imxpd->interface_pix_fmt = V4L2_PIX_FMT_BGR666;
233 235 }
234 236  
235 237 imxpd->dev = &pdev->dev;