diff options
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp_v4l2.c')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c index 506f04ca92b1..3a2e15605919 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c @@ -933,12 +933,18 @@ v4l2_device_failed: static void atomisp_init_sensor(struct atomisp_input_subdev *input) { + struct v4l2_subdev_mbus_code_enum mbus_code_enum = { }; struct v4l2_subdev_state sd_state = { .pads = &input->pad_cfg, }; struct v4l2_subdev_selection sel = { }; int err; + mbus_code_enum.which = V4L2_SUBDEV_FORMAT_ACTIVE; + err = v4l2_subdev_call(input->camera, pad, enum_mbus_code, NULL, &mbus_code_enum); + if (!err) + input->code = mbus_code_enum.code; + sel.which = V4L2_SUBDEV_FORMAT_ACTIVE; sel.target = V4L2_SEL_TGT_NATIVE_SIZE; err = v4l2_subdev_call(input->camera, pad, get_selection, NULL, &sel); |