mirror of https://gitee.com/openkylin/linux.git
staging: drm/imx: Add 24-bit BGR support to DC
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
38fc7b311e
commit
0b186416c9
|
@ -91,6 +91,7 @@ enum ipu_dc_map {
|
|||
IPU_DC_MAP_RGB565,
|
||||
IPU_DC_MAP_GBR24, /* TVEv2 */
|
||||
IPU_DC_MAP_BGR666,
|
||||
IPU_DC_MAP_BGR24,
|
||||
};
|
||||
|
||||
struct ipu_dc {
|
||||
|
@ -152,6 +153,8 @@ static int ipu_pixfmt_to_map(u32 fmt)
|
|||
return IPU_DC_MAP_GBR24;
|
||||
case V4L2_PIX_FMT_BGR666:
|
||||
return IPU_DC_MAP_BGR666;
|
||||
case V4L2_PIX_FMT_BGR24:
|
||||
return IPU_DC_MAP_BGR24;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -395,6 +398,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev,
|
|||
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 */
|
||||
|
||||
/* bgr24 */
|
||||
ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24);
|
||||
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 2, 7, 0xff); /* red */
|
||||
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */
|
||||
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue