2ea4abd11249ca643ed954f0505125aebf24b347
[openwrt/staging/ansuel.git] /
1 From 2affda8d2b172aa0fd22778983d983fc9522e621 Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Thu, 16 Nov 2023 14:29:47 +0000
4 Subject: [PATCH] drivers: media: pisp_be: Add mono and 48-bit RGB pixel format
5 support
6
7 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
8 ---
9 .../raspberrypi/pisp_be/pisp_be_formats.h | 45 +++++++++++++++++++
10 1 file changed, 45 insertions(+)
11
12 --- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h
13 +++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h
14 @@ -234,6 +234,24 @@ static const struct pisp_be_format suppo
15 .colorspace_mask = V4L2_COLORSPACE_MASK_ALL_SRGB,
16 .colorspace_default = V4L2_COLORSPACE_SRGB,
17 },
18 + {
19 + .fourcc = V4L2_PIX_FMT_RGB48,
20 + .align = 64,
21 + .bit_depth = 48,
22 + .plane_factor = { P3(1.0) },
23 + .num_planes = 1,
24 + .colorspace_mask = V4L2_COLORSPACE_MASK_ALL_SRGB,
25 + .colorspace_default = V4L2_COLORSPACE_SRGB,
26 + },
27 + {
28 + .fourcc = V4L2_PIX_FMT_BGR48,
29 + .align = 64,
30 + .bit_depth = 48,
31 + .plane_factor = { P3(1.0) },
32 + .num_planes = 1,
33 + .colorspace_mask = V4L2_COLORSPACE_MASK_ALL_SRGB,
34 + .colorspace_default = V4L2_COLORSPACE_SRGB,
35 + },
36 /* Bayer formats - 8-bit */
37 {
38 .fourcc = V4L2_PIX_FMT_SRGGB8,
39 @@ -457,6 +475,33 @@ static const struct pisp_be_format suppo
40 .colorspace_mask = V4L2_COLORSPACE_MASK_RAW,
41 .colorspace_default = V4L2_COLORSPACE_RAW,
42 },
43 + /* Greyscale Formats */
44 + {
45 + .fourcc = V4L2_PIX_FMT_GREY,
46 + .bit_depth = 8,
47 + .align = 32,
48 + .num_planes = 1,
49 + .colorspace_mask = V4L2_COLORSPACE_MASK_RAW,
50 + .colorspace_default = V4L2_COLORSPACE_RAW,
51 + },
52 + {
53 + .fourcc = V4L2_PIX_FMT_Y16,
54 + .bit_depth = 16,
55 + .align = 32,
56 + .plane_factor = { P3(1.0) },
57 + .num_planes = 1,
58 + .colorspace_mask = V4L2_COLORSPACE_MASK_RAW,
59 + .colorspace_default = V4L2_COLORSPACE_RAW,
60 + },
61 + {
62 + .fourcc = V4L2_PIX_FMT_PISP_COMP1_MONO,
63 + .bit_depth = 8,
64 + .align = 32,
65 + .plane_factor = { P3(1.0) },
66 + .num_planes = 1,
67 + .colorspace_mask = V4L2_COLORSPACE_MASK_RAW,
68 + .colorspace_default = V4L2_COLORSPACE_RAW,
69 + },
70 /* Opaque BE format for HW verification. */
71 {
72 .fourcc = V4L2_PIX_FMT_RPI_BE,