summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/imx219.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-09-24 17:32:57 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-10-07 10:55:46 +0200
commit2ae504a561dbb31e5fb0a21f242f07e8c91cce61 (patch)
tree56f06bc5f2e4642a4d7ed9c8398520a6bf8ad770 /drivers/media/i2c/imx219.c
parentmedia: i2c: imx219: Merge format and binning setting functions (diff)
downloadlinux-2ae504a561dbb31e5fb0a21f242f07e8c91cce61.tar.xz
linux-2ae504a561dbb31e5fb0a21f242f07e8c91cce61.zip
media: i2c: imx219: Initialize ycbcr_enc
While the ycbcr_enc field doesn't apply to raw formats, leaving it uninitialized makes the driver behave in a less deterministic way. Fix it by picking the default value for the colorspace. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/i2c/imx219.c')
-rw-r--r--drivers/media/i2c/imx219.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index 140924445a61..2e1fbeef11a8 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -495,6 +495,7 @@ static void imx219_update_pad_format(struct imx219 *imx219,
fmt->height = mode->height;
fmt->field = V4L2_FIELD_NONE;
fmt->colorspace = V4L2_COLORSPACE_RAW;
+ fmt->ycbcr_enc = V4L2_YCBCR_ENC_601;
fmt->quantization = V4L2_QUANTIZATION_FULL_RANGE;
fmt->xfer_func = V4L2_XFER_FUNC_NONE;
}