<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From fa426d8007bf462ad9423b49f01e6106865caca5 Mon Sep 17 00:00:00 2001
From: David Plowman &lt;david.plowman@raspberrypi.com&gt;
Date: Thu, 21 Oct 2021 14:41:55 +0100
Subject: [PATCH] media: i2c: imx219: Sensor should report RAW color
 space

Tested on Raspberry Pi running libcamera.

Signed-off-by: David Plowman &lt;david.plowman@raspberrypi.com&gt;
---
 drivers/media/i2c/imx219.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -584,7 +584,7 @@ static void imx219_set_default_format(st
 
 	fmt = &amp;imx219-&gt;fmt;
 	fmt-&gt;code = MEDIA_BUS_FMT_SRGGB10_1X10;
-	fmt-&gt;colorspace = V4L2_COLORSPACE_SRGB;
+	fmt-&gt;colorspace = V4L2_COLORSPACE_RAW;
 	fmt-&gt;ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(fmt-&gt;colorspace);
 	fmt-&gt;quantization = V4L2_MAP_QUANTIZATION_DEFAULT(true,
 							  fmt-&gt;colorspace,
@@ -754,7 +754,7 @@ static int imx219_enum_frame_size(struct
 
 static void imx219_reset_colorspace(struct v4l2_mbus_framefmt *fmt)
 {
-	fmt-&gt;colorspace = V4L2_COLORSPACE_SRGB;
+	fmt-&gt;colorspace = V4L2_COLORSPACE_RAW;
 	fmt-&gt;ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(fmt-&gt;colorspace);
 	fmt-&gt;quantization = V4L2_MAP_QUANTIZATION_DEFAULT(true,
 							  fmt-&gt;colorspace,
</pre></body></html>