media: rockchip: rkcif fix some errors, these errors may cause the sub-device call to fail

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I20b742c2c75324914bbb1a9405017c18900df121
This commit is contained in:
Zefa Chen
2021-11-24 20:03:00 +08:00
committed by Tao Huang
parent de253638e3
commit dc5d09618c
2 changed files with 3 additions and 0 deletions

View File

@@ -390,10 +390,12 @@ static int csi2_get_selection(struct v4l2_subdev *sd,
switch (sel->target) {
case V4L2_SEL_TGT_CROP_BOUNDS:
if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
sel->pad = 0;
ret = v4l2_subdev_call(sensor, pad, get_selection,
cfg, sel);
if (ret) {
fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
fmt.pad = 0;
ret = v4l2_subdev_call(sensor, pad, get_fmt, NULL, &fmt);
if (!ret) {
csi2->format_mbus = fmt.format;

View File

@@ -103,6 +103,7 @@ static int sditf_get_set_fmt(struct v4l2_subdev *sd,
if (cif_dev->terminal_sensor.sd) {
sditf_get_hdr_mode(priv);
fmt->which = V4L2_SUBDEV_FORMAT_ACTIVE;
fmt->pad = 0;
ret = v4l2_subdev_call(cif_dev->terminal_sensor.sd, pad, get_fmt, NULL, fmt);
if (ret) {
v4l2_err(&priv->sd,