forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/i2c/ar0230.c
....@@ -141,9 +141,9 @@
141141 static const struct regval ar0230_regs[] = {
142142 #ifdef USE_HDR_MODE
143143 {0x301A, 0x0001},
144
- {REG_DELAY, 2000},
144
+ {REG_DELAY, 20000},
145145 {0x301A, 0x10D8},
146
- {REG_DELAY, 2000},
146
+ {REG_DELAY, 20000},
147147 {0x3088, 0x8000},
148148 {0x3086, 0x4558},
149149 {0x3086, 0x729B},
....@@ -1144,9 +1144,7 @@
11441144 struct ar0230 *ar0230 = to_ar0230(sd);
11451145 const struct ar0230_mode *mode = ar0230->cur_mode;
11461146
1147
- mutex_lock(&ar0230->mutex);
11481147 fi->interval = mode->max_fps;
1149
- mutex_unlock(&ar0230->mutex);
11501148
11511149 return 0;
11521150 }
....@@ -1292,7 +1290,7 @@
12921290 }
12931291 #endif
12941292
1295
-static int ar0230_g_mbus_config(struct v4l2_subdev *sd,
1293
+static int ar0230_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad_id,
12961294 struct v4l2_mbus_config *config)
12971295 {
12981296 config->type = V4L2_MBUS_PARALLEL;
....@@ -1309,9 +1307,7 @@
13091307 if (fie->index >= ARRAY_SIZE(supported_modes))
13101308 return -EINVAL;
13111309
1312
- if (fie->code != PIX_FORMAT)
1313
- return -EINVAL;
1314
-
1310
+ fie->code = PIX_FORMAT;
13151311 fie->width = supported_modes[fie->index].width;
13161312 fie->height = supported_modes[fie->index].height;
13171313 fie->interval = supported_modes[fie->index].max_fps;
....@@ -1339,7 +1335,6 @@
13391335
13401336 static const struct v4l2_subdev_video_ops ar0230_video_ops = {
13411337 .s_stream = ar0230_s_stream,
1342
- .g_mbus_config = ar0230_g_mbus_config,
13431338 .g_frame_interval = ar0230_g_frame_interval,
13441339 };
13451340
....@@ -1349,6 +1344,7 @@
13491344 .enum_frame_interval = ar0230_enum_frame_interval,
13501345 .get_fmt = ar0230_get_fmt,
13511346 .set_fmt = ar0230_set_fmt,
1347
+ .get_mbus_config = ar0230_g_mbus_config,
13521348 };
13531349
13541350 static const struct v4l2_subdev_ops ar0230_subdev_ops = {