From: Laurent Pinchart Date: Sun, 24 Sep 2023 15:32:57 +0000 (+0300) Subject: media: i2c: imx219: Initialize ycbcr_enc X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2ae504a561dbb31e5fb0a21f242f07e8c91cce61;p=linux.git 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 Reviewed-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c index 140924445a61c..2e1fbeef11a88 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; }