summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2018-12-09 06:20:33 +0100
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-01-16 18:45:51 +0100
commitbd0405f929ce4c8b8bd0feca0a8efe144345306b (patch)
tree79ab26c24dfe116fb368ab79f861b2aa435fccb8 /drivers/media/i2c
parentmedia: ov2640: make VIDIOC_SUBDEV_G_FMT ioctl work with V4L2_SUBDEV_FORMAT_TRY (diff)
downloadlinux-bd0405f929ce4c8b8bd0feca0a8efe144345306b.tar.xz
linux-bd0405f929ce4c8b8bd0feca0a8efe144345306b.zip
media: ov2640: set all mbus format field when G_FMT and S_FMT ioctls
This driver doesn't set all members of mbus format field when the VIDIOC_SUBDEV_{S,G}_FMT ioctls are called. This is detected by v4l2-compliance. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ov2640.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c
index d3f10d92fcc0..37e7c986af86 100644
--- a/drivers/media/i2c/ov2640.c
+++ b/drivers/media/i2c/ov2640.c
@@ -941,6 +941,9 @@ static int ov2640_get_fmt(struct v4l2_subdev *sd,
mf->code = priv->cfmt_code;
mf->colorspace = V4L2_COLORSPACE_SRGB;
mf->field = V4L2_FIELD_NONE;
+ mf->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;
+ mf->quantization = V4L2_QUANTIZATION_DEFAULT;
+ mf->xfer_func = V4L2_XFER_FUNC_DEFAULT;
return 0;
}
@@ -967,6 +970,9 @@ static int ov2640_set_fmt(struct v4l2_subdev *sd,
mf->field = V4L2_FIELD_NONE;
mf->colorspace = V4L2_COLORSPACE_SRGB;
+ mf->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;
+ mf->quantization = V4L2_QUANTIZATION_DEFAULT;
+ mf->xfer_func = V4L2_XFER_FUNC_DEFAULT;
switch (mf->code) {
case MEDIA_BUS_FMT_RGB565_2X8_BE: