forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/i2c/imx323.c
....@@ -558,9 +558,7 @@
558558 struct imx323 *imx323 = to_imx323(sd);
559559 const struct imx323_mode *mode = imx323->cur_mode;
560560
561
- mutex_lock(&imx323->mutex);
562561 fi->interval = mode->max_fps;
563
- mutex_unlock(&imx323->mutex);
564562
565563 return 0;
566564 }
....@@ -706,7 +704,7 @@
706704 }
707705 #endif
708706
709
-static int imx323_g_mbus_config(struct v4l2_subdev *sd,
707
+static int imx323_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id,
710708 struct v4l2_mbus_config *config)
711709 {
712710 config->type = V4L2_MBUS_BT656;
....@@ -723,9 +721,7 @@
723721 if (fie->index >= ARRAY_SIZE(supported_modes))
724722 return -EINVAL;
725723
726
- if (fie->code != PIX_FORMAT)
727
- return -EINVAL;
728
-
724
+ fie->code = PIX_FORMAT;
729725 fie->width = supported_modes[fie->index].width;
730726 fie->height = supported_modes[fie->index].height;
731727 fie->interval = supported_modes[fie->index].max_fps;
....@@ -753,7 +749,6 @@
753749
754750 static const struct v4l2_subdev_video_ops imx323_video_ops = {
755751 .s_stream = imx323_s_stream,
756
- .g_mbus_config = imx323_g_mbus_config,
757752 .g_frame_interval = imx323_g_frame_interval,
758753 };
759754
....@@ -763,6 +758,7 @@
763758 .enum_frame_interval = imx323_enum_frame_interval,
764759 .get_fmt = imx323_get_fmt,
765760 .set_fmt = imx323_set_fmt,
761
+ .get_mbus_config = imx323_g_mbus_config,
766762 };
767763
768764 static const struct v4l2_subdev_ops imx323_subdev_ops = {