]> git.ipfire.org Git - thirdparty/openwrt.git/blob
e8bae67b2e90c95886ca7ae161851f24d5c9920c
[thirdparty/openwrt.git] /
1 From 5c522d33c5e30f423100a52972ffbeac7581e7f3 Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Thu, 26 Oct 2023 08:55:24 +0100
4 Subject: [PATCH 0693/1085] drivers: media: pisp_be: Add back
5 V4L2_PIX_FMT_RPI_BE format
6
7 Add the opaque V4L2_PIX_FMT_RPI_BE format back to the format list as it
8 is needed for the verification test suite. Also set the default format
9 to YUV420 non-multiplanar.
10
11 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
12 ---
13 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c | 9 ++++++---
14 .../media/platform/raspberrypi/pisp_be/pisp_be_formats.h | 5 +++++
15 2 files changed, 11 insertions(+), 3 deletions(-)
16
17 --- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
18 +++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
19 @@ -1230,8 +1230,11 @@ static int try_format(struct v4l2_format
20 return verify_be_pix_format(f, node);
21
22 fmt = find_format(pixfmt);
23 - if (!fmt)
24 - fmt = find_format(V4L2_PIX_FMT_YUV420M);
25 + if (!fmt) {
26 + dev_dbg(pispbe->dev, "%s: [%s] Format not found, defaulting to YUV420\n",
27 + __func__, NODE_NAME(node));
28 + fmt = find_format(V4L2_PIX_FMT_YUV420);
29 + }
30
31 f->fmt.pix_mp.pixelformat = fmt->fourcc;
32 f->fmt.pix_mp.num_planes = fmt->num_planes;
33 @@ -1576,7 +1579,7 @@ static void node_set_default_format(stru
34 } else {
35 struct v4l2_format f = {0};
36
37 - f.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_YUV420M;
38 + f.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_YUV420;
39 f.fmt.pix_mp.width = 1920;
40 f.fmt.pix_mp.height = 1080;
41 f.type = node->buf_type;
42 --- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h
43 +++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be_formats.h
44 @@ -457,6 +457,11 @@ static const struct pisp_be_format suppo
45 .colorspace_mask = V4L2_COLORSPACE_MASK_RAW,
46 .colorspace_default = V4L2_COLORSPACE_RAW,
47 },
48 + /* Opaque BE format for HW verification. */
49 + {
50 + .fourcc = V4L2_PIX_FMT_RPI_BE,
51 + .align = 32,
52 + },
53 };
54
55 static const struct pisp_be_format meta_out_supported_formats[] = {