summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/mt9m111.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2019-01-15 15:05:40 +0100
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-01-25 14:00:39 +0100
commit2e1566abe54b3ad3e5094c7b80883bc70eda6539 (patch)
tree7c1e22ef1897fc37fafd090ee8466b3e1d56d7cc /drivers/media/i2c/mt9m111.c
parentmedia: mt9m111: make SUBDEV_G_FMT ioctl work with SUBDEV_FORMAT_TRY (diff)
downloadlinux-2e1566abe54b3ad3e5094c7b80883bc70eda6539.tar.xz
linux-2e1566abe54b3ad3e5094c7b80883bc70eda6539.zip
media: mt9m111: 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. Cc: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Cc: Michael Grzeschik <m.grzeschik@pengutronix.de> Cc: Marco Felsch <m.felsch@pengutronix.de> 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/mt9m111.c')
-rw-r--r--drivers/media/i2c/mt9m111.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
index 63a5253a3376..9c92eca8020c 100644
--- a/drivers/media/i2c/mt9m111.c
+++ b/drivers/media/i2c/mt9m111.c
@@ -543,6 +543,9 @@ static int mt9m111_get_fmt(struct v4l2_subdev *sd,
mf->code = mt9m111->fmt->code;
mf->colorspace = mt9m111->fmt->colorspace;
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;
}
@@ -670,6 +673,10 @@ static int mt9m111_set_fmt(struct v4l2_subdev *sd,
mf->code = fmt->code;
mf->colorspace = fmt->colorspace;
+ mf->field = V4L2_FIELD_NONE;
+ mf->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;
+ mf->quantization = V4L2_QUANTIZATION_DEFAULT;
+ mf->xfer_func = V4L2_XFER_FUNC_DEFAULT;
if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
cfg->try_fmt = *mf;