MLK-19158-3 gpu: imx: lcdif: fix output order for 16bpp BGR formats

The 16bpp BGR order pixel formats 'DRM_FORMAT_ABGR1555' and
'DRM_FORMAT_XBGR1555' also require to be re-ordered to RGB
order for display, just like the format 'DRM_FORMAT_BGR565'
does.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit f5cc4f4699570fe697d21cb47c54aa91b82c8458)
This commit is contained in:
Fancy Fang
2018-08-12 12:02:43 +08:00
committed by Jason Liu
parent a5940ee5db
commit f16eac4a32

View File

@ -317,7 +317,9 @@ int lcdif_set_pix_fmt(struct lcdif_soc *lcdif, u32 format)
ctrl1 |= CTRL1_SET_BYTE_PACKAGING(0xf);
/* 'BGR' order */
if (format == DRM_FORMAT_BGR565)
if (format == DRM_FORMAT_BGR565 ||
format == DRM_FORMAT_ABGR1555 ||
format == DRM_FORMAT_XBGR1555)
writel(CTRL2_ODD_LINE_PATTERN(0x5) |
CTRL2_EVEN_LINE_PATTERN(0x5),
lcdif->base + LCDIF_CTRL2 + REG_SET);