0171cdf8214d87606762260cae58aace59402625
[openwrt/staging/blogic.git] /
1 From 560f3a9051578499e72ce4b1beaedd007ff46f96 Mon Sep 17 00:00:00 2001
2 From: Benoit Parrot <bparrot@ti.com>
3 Date: Mon, 7 Oct 2019 12:10:08 -0300
4 Subject: [PATCH] media: v4l2-common: add RGB565 and RGB55 to
5 v4l2_format_info
6
7 Commit b373f84d77e1c409aacb4ff5bb5726c45fc8b166 upstream.
8
9 Add RGB565 and RGB555 to the v4l2_format_info table.
10
11 Signed-off-by: Benoit Parrot <bparrot@ti.com>
12 Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
13 Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
14 ---
15 drivers/media/v4l2-core/v4l2-common.c | 2 ++
16 1 file changed, 2 insertions(+)
17
18 --- a/drivers/media/v4l2-core/v4l2-common.c
19 +++ b/drivers/media/v4l2-core/v4l2-common.c
20 @@ -251,6 +251,8 @@ const struct v4l2_format_info *v4l2_form
21 { .format = V4L2_PIX_FMT_ABGR32, .pixel_enc = V4L2_PIXEL_ENC_RGB, .mem_planes = 1, .comp_planes = 1, .bpp = { 4, 0, 0, 0 }, .hdiv = 1, .vdiv = 1 },
22 { .format = V4L2_PIX_FMT_BGRA32, .pixel_enc = V4L2_PIXEL_ENC_RGB, .mem_planes = 1, .comp_planes = 1, .bpp = { 4, 0, 0, 0 }, .hdiv = 1, .vdiv = 1 },
23 { .format = V4L2_PIX_FMT_GREY, .pixel_enc = V4L2_PIXEL_ENC_RGB, .mem_planes = 1, .comp_planes = 1, .bpp = { 1, 0, 0, 0 }, .hdiv = 1, .vdiv = 1 },
24 + { .format = V4L2_PIX_FMT_RGB565, .pixel_enc = V4L2_PIXEL_ENC_RGB, .mem_planes = 1, .comp_planes = 1, .bpp = { 2, 0, 0, 0 }, .hdiv = 1, .vdiv = 1 },
25 + { .format = V4L2_PIX_FMT_RGB555, .pixel_enc = V4L2_PIXEL_ENC_RGB, .mem_planes = 1, .comp_planes = 1, .bpp = { 2, 0, 0, 0 }, .hdiv = 1, .vdiv = 1 },
26
27 /* YUV packed formats */
28 { .format = V4L2_PIX_FMT_YUYV, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 2, 0, 0, 0 }, .hdiv = 2, .vdiv = 1 },