mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
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:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user