You need to sign in or sign up before continuing.
提交 7d0a66c0 编写于 作者: M Marek Vasut 提交者: Greg Kroah-Hartman

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

Support the BGR666 format on the IPUv3 parallel display.
Signed-off-by: NMarek 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: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5b9974b1
...@@ -26,7 +26,7 @@ Required properties: ...@@ -26,7 +26,7 @@ Required properties:
- crtc: the crtc this display is connected to, see below - crtc: the crtc this display is connected to, see below
Optional properties: Optional properties:
- interface_pix_fmt: How this display is connected to the - interface_pix_fmt: How this display is connected to the
crtc. Currently supported types: "rgb24", "rgb565" crtc. Currently supported types: "rgb24", "rgb565", "bgr666"
- edid: verbatim EDID data block describing attached display. - edid: verbatim EDID data block describing attached display.
- ddc: phandle describing the i2c bus handling the display data - ddc: phandle describing the i2c bus handling the display data
channel channel
......
...@@ -90,6 +90,7 @@ enum ipu_dc_map { ...@@ -90,6 +90,7 @@ enum ipu_dc_map {
IPU_DC_MAP_RGB24, IPU_DC_MAP_RGB24,
IPU_DC_MAP_RGB565, IPU_DC_MAP_RGB565,
IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_GBR24, /* TVEv2 */
IPU_DC_MAP_BGR666,
}; };
struct ipu_dc { struct ipu_dc {
...@@ -149,6 +150,8 @@ static int ipu_pixfmt_to_map(u32 fmt) ...@@ -149,6 +150,8 @@ static int ipu_pixfmt_to_map(u32 fmt)
return IPU_DC_MAP_RGB565; return IPU_DC_MAP_RGB565;
case IPU_PIX_FMT_GBR24: case IPU_PIX_FMT_GBR24:
return IPU_DC_MAP_GBR24; return IPU_DC_MAP_GBR24;
case V4L2_PIX_FMT_BGR666:
return IPU_DC_MAP_BGR666;
default: default:
return -EINVAL; return -EINVAL;
} }
...@@ -385,6 +388,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ...@@ -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, 1, 7, 0xff); /* blue */
ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 0, 23, 0xff); /* red */ 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; return 0;
} }
......
...@@ -230,6 +230,8 @@ static int imx_pd_probe(struct platform_device *pdev) ...@@ -230,6 +230,8 @@ static int imx_pd_probe(struct platform_device *pdev)
imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB24; imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB24;
else if (!strcmp(fmt, "rgb565")) else if (!strcmp(fmt, "rgb565"))
imxpd->interface_pix_fmt = V4L2_PIX_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; imxpd->dev = &pdev->dev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册