From ebe60f5f718c67481e47c5c29c832ea7d378af86 Mon Sep 17 00:00:00 2001 From: Cho KyongHo Date: Wed, 27 Sep 2017 20:16:32 +0900 Subject: [PATCH] [COMMON] g2d: add support for BGR565 Change-Id: Iafdcfb030c01d770796548ef4d8c0a7488ebce93 Signed-off-by: Cho KyongHo --- drivers/gpu/exynos/g2d/g2d_command.c | 5 +++++ drivers/gpu/exynos/g2d/g2d_format.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/exynos/g2d/g2d_command.c b/drivers/gpu/exynos/g2d/g2d_command.c index a65ae54fe195..e18b020524b5 100644 --- a/drivers/gpu/exynos/g2d/g2d_command.c +++ b/drivers/gpu/exynos/g2d/g2d_command.c @@ -204,6 +204,11 @@ static const struct g2d_fmt g2d_formats[] = { .fmtvalue = G2D_FMT_RGB565, /* [15:0] RGB */ .bpp = { 16 }, .num_planes = 1, + }, { + .name = "BGR565", + .fmtvalue = G2D_FMT_BGR565, /* [15:0] BGR */ + .bpp = { 16 }, + .num_planes = 1, }, { .name = "NV12", .fmtvalue = G2D_FMT_NV12, diff --git a/drivers/gpu/exynos/g2d/g2d_format.h b/drivers/gpu/exynos/g2d/g2d_format.h index 7bffff0a4de0..2c1e0496ca98 100644 --- a/drivers/gpu/exynos/g2d/g2d_format.h +++ b/drivers/gpu/exynos/g2d/g2d_format.h @@ -54,6 +54,7 @@ #define G2D_FMT_ARGB4444 (G2D_DATAFMT_4444 | G2D_SWZ_ARGB) #define G2D_FMT_ARGB1555 (G2D_DATAFMT_1555 | G2D_SWZ_ARGB) #define G2D_FMT_RGB565 (G2D_DATAFMT_565 | G2D_SWZ_xRGB) +#define G2D_FMT_BGR565 (G2D_DATAFMT_565 | G2D_SWZ_xBGR) #define G2D_FMT_RGB888 (G2D_DATAFMT_888 | G2D_SWZ_xRGB) #define G2D_FMT_BGR888 (G2D_DATAFMT_888 | G2D_SWZ_BGR) #define G2D_FMT_NV12 (G2D_DATAFMT_YUV420SP | G2D_YUV_UV) -- 2.20.1