diff options
author | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-07-10 18:51:59 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-08-10 08:58:39 +0300 |
commit | a267c23ac9f665f95cc6d35422fe33af4d2343fa (patch) | |
tree | 6ff9521a89b00ae926060b677f30fddf050388f1 /drivers/media/i2c/imx219.c | |
parent | 7e700847b1fecbaacfcd25107acb5c5b0301aa75 (diff) | |
download | linux-a267c23ac9f665f95cc6d35422fe33af4d2343fa.tar.xz |
media: i2c: imx219: Complete default format initialization
Complete the default format initialization in init_cfg() filling in
the fields for the colorspace configuration copied from
imx219_set_default_format().
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/i2c/imx219.c')
-rw-r--r-- | drivers/media/i2c/imx219.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c index 45b219321d98..cd43a897391c 100644 --- a/drivers/media/i2c/imx219.c +++ b/drivers/media/i2c/imx219.c @@ -714,6 +714,12 @@ static int imx219_init_cfg(struct v4l2_subdev *sd, format->code = imx219_get_format_code(imx219, MEDIA_BUS_FMT_SRGGB10_1X10); format->field = V4L2_FIELD_NONE; + format->colorspace = V4L2_COLORSPACE_SRGB; + format->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(format->colorspace); + format->quantization = V4L2_MAP_QUANTIZATION_DEFAULT(true, + format->colorspace, + format->ycbcr_enc); + format->xfer_func = V4L2_MAP_XFER_FUNC_DEFAULT(format->colorspace); /* Initialize crop rectangle. */ crop = v4l2_subdev_get_pad_crop(sd, state, 0); |