summaryrefslogtreecommitdiff
path: root/drivers/staging/imx-drm/ipu-v3
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2013-04-22 23:19:31 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-23 10:38:49 -0700
commit7d0a66c0ccfd0ec23645ba2d92593c00d11bf936 (patch)
tree294dd48c6698e9ca884afd61ad00bedfd02b6d64 /drivers/staging/imx-drm/ipu-v3
parent5b9974b13e3648b6821a6d2aab408ce7cef60ce3 (diff)
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>
Diffstat (limited to 'drivers/staging/imx-drm/ipu-v3')
-rw-r--r--drivers/staging/imx-drm/ipu-v3/ipu-dc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
index 1cb0631de08d..59f03f9aefc3 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
@@ -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;
}