b3602204f9f69bb73236dacc9c0f6856708b97b5
[openwrt/staging/neocturne.git] /
1 From e700cec742fc0a3b06b67fde1df2b5819c370e30 Mon Sep 17 00:00:00 2001
2 From: David Plowman <david.plowman@raspberrypi.com>
3 Date: Thu, 21 Oct 2021 14:47:20 +0100
4 Subject: [PATCH] media: i2c: ov9281: Sensor should report RAW color
5 space
6
7 Tested on Raspberry Pi running libcamera.
8
9 Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
10 ---
11 drivers/media/i2c/ov9281.c | 6 +++---
12 1 file changed, 3 insertions(+), 3 deletions(-)
13
14 --- a/drivers/media/i2c/ov9281.c
15 +++ b/drivers/media/i2c/ov9281.c
16 @@ -507,7 +507,7 @@ static int ov9281_set_fmt(struct v4l2_su
17 fmt->format.width = mode->width;
18 fmt->format.height = mode->height;
19 fmt->format.field = V4L2_FIELD_NONE;
20 - fmt->format.colorspace = V4L2_COLORSPACE_SRGB;
21 + fmt->format.colorspace = V4L2_COLORSPACE_RAW;
22 fmt->format.ycbcr_enc =
23 V4L2_MAP_YCBCR_ENC_DEFAULT(fmt->format.colorspace);
24 fmt->format.quantization =
25 @@ -558,7 +558,7 @@ static int ov9281_get_fmt(struct v4l2_su
26 fmt->format.height = mode->height;
27 fmt->format.code = ov9281->code;
28 fmt->format.field = V4L2_FIELD_NONE;
29 - fmt->format.colorspace = V4L2_COLORSPACE_SRGB;
30 + fmt->format.colorspace = V4L2_COLORSPACE_RAW;
31 fmt->format.ycbcr_enc =
32 V4L2_MAP_YCBCR_ENC_DEFAULT(fmt->format.colorspace);
33 fmt->format.quantization =
34 @@ -911,7 +911,7 @@ static int ov9281_open(struct v4l2_subde
35 try_fmt->height = def_mode->height;
36 try_fmt->code = MEDIA_BUS_FMT_Y10_1X10;
37 try_fmt->field = V4L2_FIELD_NONE;
38 - try_fmt->colorspace = V4L2_COLORSPACE_SRGB;
39 + try_fmt->colorspace = V4L2_COLORSPACE_RAW;
40 try_fmt->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(try_fmt->colorspace);
41 try_fmt->quantization =
42 V4L2_MAP_QUANTIZATION_DEFAULT(true, try_fmt->colorspace,