summaryrefslogtreecommitdiff
path: root/drivers/gpu/imx
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@nxp.com>2018-08-12 12:02:43 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit1f2313c2e1e71ab62f554f1104104e2b3610de41 (patch)
treee920f1fef551fa7b0c605328d36cf2bbeb88b729 /drivers/gpu/imx
parentae403ad28228445497a993d6f6a5e2c4a1e15c0e (diff)
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>
Diffstat (limited to 'drivers/gpu/imx')
-rw-r--r--drivers/gpu/imx/lcdif/lcdif-common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/imx/lcdif/lcdif-common.c b/drivers/gpu/imx/lcdif/lcdif-common.c
index 21044e9475ab..06abc666ad52 100644
--- a/drivers/gpu/imx/lcdif/lcdif-common.c
+++ b/drivers/gpu/imx/lcdif/lcdif-common.c
@@ -316,7 +316,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);