Skip to contentSkip to conversation

video: imx: Add BGR666 support for parallel display

PATCH Superseded Marek Vasut 2 participants 2 messages Apr 21, 2013 – Apr 22, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: imx: Add BGR666 support for parallel display

Support the BGR666 format on the IPUv3 parallel display.

Cc Greg Kroah-Hartman <[email protected]>
Cc Philipp Zabel <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Bill Pemberton <[email protected]>
---
 drivers/staging/imx-drm/ipu-v3/ipu-dc.c    |    9 +++++++++
 drivers/staging/imx-drm/parallel-display.c |    2 ++
 2 files changed, 11 insertions(+)
drivers/staging/imx-drm/ipu-v3/ipu-dc.c +9 -0
index 1cb0631..59f03f9 100644
@@ -90,6 +90,7 @@ enum ipu_dc_map {
 	IPU_DC_MAP_RGB24,
 	IPU_DC_MAP_RGB565,
 	IPU_DC_MAP_GBR24, /* TVEv2 */
+	IPU_DC_MAP_BGR666,
 };
 
 struct ipu_dc {
@@ -149,6 +150,8 @@ static int ipu_pixfmt_to_map(u32 fmt)
 		return IPU_DC_MAP_RGB565;
 	case IPU_PIX_FMT_GBR24:
 		return IPU_DC_MAP_GBR24;
+	case V4L2_PIX_FMT_BGR666:
+		return IPU_DC_MAP_BGR666;
 	default:
 		return -EINVAL;
 	}
@@ -385,6 +388,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev,
 	ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 1, 7, 0xff); /* blue */
 	ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 0, 23, 0xff); /* red */
 
+	/* bgr666 */
+	ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
+	ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */
+	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 */
+
 	return 0;
 }
 
drivers/staging/imx-drm/parallel-display.c +2 -0
index 2a25202..e7fba62 100644
@@ -230,6 +230,8 @@ static int imx_pd_probe(struct platform_device *pdev)
 			imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB24;
 		else if (!strcmp(fmt, "rgb565"))
 			imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB565;
+		else if (!strcmp(fmt, "bgr666"))
+			imxpd->interface_pix_fmt = V4L2_PIX_FMT_BGR666;
 	}
 
 	imxpd->dev = &pdev->dev;
Signature · 1 line
1.7.10.4
maintainer
#1 lore raw

PATCH 1/1 video: imx: Add BGR666 support for parallel display

Hi Marek,

Quoted 10 lines · Marek Vasut

Support the BGR666 format on the IPUv3 parallel display.

Cc Greg Kroah-Hartman <[email protected]>
Cc Philipp Zabel <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Bill Pemberton <[email protected]>
---
 drivers/staging/imx-drm/ipu-v3/ipu-dc.c    |    9 +++++++++
 drivers/staging/imx-drm/parallel-display.c |    2 ++

Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt is missing in the diffstat

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |