Skip to content

Commit

Permalink
media: ov2640: set all mbus format field when G_FMT and S_FMT ioctls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akinobu Mita authored and Mauro Carvalho Chehab committed Jan 16, 2019
1 parent 8d3b307 commit bd0405f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/media/i2c/ov2640.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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:
Expand Down

0 comments on commit bd0405f

Please sign in to comment.