43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
From e700cec742fc0a3b06b67fde1df2b5819c370e30 Mon Sep 17 00:00:00 2001
|
|
From: David Plowman <david.plowman@raspberrypi.com>
|
|
Date: Thu, 21 Oct 2021 14:47:20 +0100
|
|
Subject: [PATCH] media: i2c: ov9281: Sensor should report RAW color
|
|
space
|
|
|
|
Tested on Raspberry Pi running libcamera.
|
|
|
|
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
|
|
---
|
|
drivers/media/i2c/ov9281.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/media/i2c/ov9281.c
|
|
+++ b/drivers/media/i2c/ov9281.c
|
|
@@ -507,7 +507,7 @@ static int ov9281_set_fmt(struct v4l2_su
|
|
fmt->format.width = mode->width;
|
|
fmt->format.height = mode->height;
|
|
fmt->format.field = V4L2_FIELD_NONE;
|
|
- fmt->format.colorspace = V4L2_COLORSPACE_SRGB;
|
|
+ fmt->format.colorspace = V4L2_COLORSPACE_RAW;
|
|
fmt->format.ycbcr_enc =
|
|
V4L2_MAP_YCBCR_ENC_DEFAULT(fmt->format.colorspace);
|
|
fmt->format.quantization =
|
|
@@ -558,7 +558,7 @@ static int ov9281_get_fmt(struct v4l2_su
|
|
fmt->format.height = mode->height;
|
|
fmt->format.code = ov9281->code;
|
|
fmt->format.field = V4L2_FIELD_NONE;
|
|
- fmt->format.colorspace = V4L2_COLORSPACE_SRGB;
|
|
+ fmt->format.colorspace = V4L2_COLORSPACE_RAW;
|
|
fmt->format.ycbcr_enc =
|
|
V4L2_MAP_YCBCR_ENC_DEFAULT(fmt->format.colorspace);
|
|
fmt->format.quantization =
|
|
@@ -911,7 +911,7 @@ static int ov9281_open(struct v4l2_subde
|
|
try_fmt->height = def_mode->height;
|
|
try_fmt->code = MEDIA_BUS_FMT_Y10_1X10;
|
|
try_fmt->field = V4L2_FIELD_NONE;
|
|
- try_fmt->colorspace = V4L2_COLORSPACE_SRGB;
|
|
+ try_fmt->colorspace = V4L2_COLORSPACE_RAW;
|
|
try_fmt->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(try_fmt->colorspace);
|
|
try_fmt->quantization =
|
|
V4L2_MAP_QUANTIZATION_DEFAULT(true, try_fmt->colorspace,
|