1 From 6af6b6388de431727161a40770f69c028bff5eb3 Mon Sep 17 00:00:00 2001
2 From: David Plowman <david.plowman@raspberrypi.com>
3 Date: Thu, 21 Oct 2021 14:41:55 +0100
4 Subject: [PATCH] media: i2c: imx219: Sensor should report RAW color
7 Tested on Raspberry Pi running libcamera.
9 Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
11 drivers/media/i2c/imx219.c | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
14 --- a/drivers/media/i2c/imx219.c
15 +++ b/drivers/media/i2c/imx219.c
16 @@ -674,7 +674,7 @@ static void imx219_set_default_format(st
19 fmt->code = MEDIA_BUS_FMT_SRGGB10_1X10;
20 - fmt->colorspace = V4L2_COLORSPACE_SRGB;
21 + fmt->colorspace = V4L2_COLORSPACE_RAW;
22 fmt->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(fmt->colorspace);
23 fmt->quantization = V4L2_MAP_QUANTIZATION_DEFAULT(true,
25 @@ -844,7 +844,7 @@ static int imx219_enum_frame_size(struct
27 static void imx219_reset_colorspace(struct v4l2_mbus_framefmt *fmt)
29 - fmt->colorspace = V4L2_COLORSPACE_SRGB;
30 + fmt->colorspace = V4L2_COLORSPACE_RAW;
31 fmt->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(fmt->colorspace);
32 fmt->quantization = V4L2_MAP_QUANTIZATION_DEFAULT(true,