}
static void buffer_cb(struct vchiq_mmal_instance *instance,
-@@ -436,7 +436,7 @@ static int enable_camera(struct bm2835_m
+@@ -439,7 +439,7 @@ static int enable_camera(struct bm2835_m
if (!dev->camera_use_count) {
ret = vchiq_mmal_port_parameter_set(
dev->instance,
MMAL_PARAMETER_CAMERA_NUM, &dev->camera_num,
sizeof(dev->camera_num));
if (ret < 0) {
-@@ -447,7 +447,7 @@ static int enable_camera(struct bm2835_m
+@@ -450,7 +450,7 @@ static int enable_camera(struct bm2835_m
ret = vchiq_mmal_component_enable(
dev->instance,
if (ret < 0) {
v4l2_err(&dev->v4l2_dev,
"Failed enabling camera, ret %d\n", ret);
-@@ -479,7 +479,7 @@ static int disable_camera(struct bm2835_
+@@ -482,7 +482,7 @@ static int disable_camera(struct bm2835_
ret =
vchiq_mmal_component_disable(
dev->instance,
if (ret < 0) {
v4l2_err(&dev->v4l2_dev,
"Failed disabling camera, ret %d\n", ret);
-@@ -487,7 +487,7 @@ static int disable_camera(struct bm2835_
+@@ -490,7 +490,7 @@ static int disable_camera(struct bm2835_
}
vchiq_mmal_port_parameter_set(
dev->instance,
MMAL_PARAMETER_CAMERA_NUM, &i,
sizeof(i));
}
-@@ -539,7 +539,7 @@ static int start_streaming(struct vb2_qu
+@@ -542,7 +542,7 @@ static int start_streaming(struct vb2_qu
/* if the preview is not already running, wait for a few frames for AGC
* to settle down.
*/
msleep(300);
/* enable the connection from camera to encoder (if applicable) */
-@@ -762,9 +762,9 @@ static int vidioc_s_fmt_vid_overlay(stru
+@@ -775,9 +775,9 @@ static int vidioc_s_fmt_vid_overlay(stru
vidioc_try_fmt_vid_overlay(file, priv, f);
dev->overlay = f->fmt.win;
}
return 0;
-@@ -777,13 +777,13 @@ static int vidioc_overlay(struct file *f
+@@ -790,13 +790,13 @@ static int vidioc_overlay(struct file *f
struct vchiq_mmal_port *src;
struct vchiq_mmal_port *dst;
if (!on) {
/* disconnect preview ports and disable component */
-@@ -795,14 +795,14 @@ static int vidioc_overlay(struct file *f
+@@ -808,14 +808,14 @@ static int vidioc_overlay(struct file *f
if (ret >= 0)
ret = vchiq_mmal_component_disable(
dev->instance,
ret = vchiq_mmal_port_set_format(dev->instance, src);
if (ret < 0)
-@@ -819,7 +819,7 @@ static int vidioc_overlay(struct file *f
+@@ -832,7 +832,7 @@ static int vidioc_overlay(struct file *f
ret = vchiq_mmal_component_enable(
dev->instance,
if (ret < 0)
return ret;
-@@ -840,8 +840,8 @@ static int vidioc_g_fbuf(struct file *fi
+@@ -853,8 +853,8 @@ static int vidioc_g_fbuf(struct file *fi
*/
struct bm2835_mmal_dev *dev = video_drvdata(file);
struct vchiq_mmal_port *preview_port =
a->capability = V4L2_FBUF_CAP_EXTERNOVERLAY |
V4L2_FBUF_CAP_GLOBAL_ALPHA;
-@@ -1044,31 +1044,31 @@ static int mmal_setup_components(struct
+@@ -1057,31 +1057,31 @@ static int mmal_setup_components(struct
}
/* format dependent port setup */
switch (mfmt->mmal_component) {
break;
default:
break;
-@@ -1110,13 +1110,12 @@ static int mmal_setup_components(struct
+@@ -1123,13 +1123,12 @@ static int mmal_setup_components(struct
if (!ret
&& camera_port ==
/* Preview and encode ports need to match on resolution */
if (overlay_enabled) {
/* Need to disable the overlay before we can update
-@@ -1147,7 +1146,7 @@ static int mmal_setup_components(struct
+@@ -1160,7 +1159,7 @@ static int mmal_setup_components(struct
ret = vchiq_mmal_port_connect_tunnel(
dev->instance,
preview_port,
if (!ret)
ret = vchiq_mmal_port_enable(dev->instance,
preview_port,
-@@ -1201,11 +1200,11 @@ static int mmal_setup_components(struct
+@@ -1214,11 +1213,11 @@ static int mmal_setup_components(struct
port->format.encoding_variant = 0;
/* Set any encoding specific parameters */
switch (mfmt->mmal_component) {
/* Could set EXIF parameters here */
break;
default:
-@@ -1580,14 +1579,14 @@ static int mmal_init(struct bm2835_mmal_
+@@ -1593,14 +1592,14 @@ static int mmal_init(struct bm2835_mmal_
/* get the camera component ready */
ret = vchiq_mmal_component_init(dev->instance, "ril.camera",
ret = -EINVAL;
goto unreg_camera;
}
-@@ -1609,7 +1608,7 @@ static int mmal_init(struct bm2835_mmal_
+@@ -1622,7 +1621,7 @@ static int mmal_init(struct bm2835_mmal_
dev->rgb_bgr_swapped = true;
param_size = sizeof(supported_encodings);
ret = vchiq_mmal_port_parameter_get(dev->instance,
MMAL_PARAMETER_SUPPORTED_ENCODINGS,
&supported_encodings,
¶m_size);
-@@ -1630,7 +1629,7 @@ static int mmal_init(struct bm2835_mmal_
+@@ -1643,7 +1642,7 @@ static int mmal_init(struct bm2835_mmal_
}
}
}
format->encoding = MMAL_ENCODING_OPAQUE;
format->encoding_variant = MMAL_ENCODING_I420;
-@@ -1644,7 +1643,7 @@ static int mmal_init(struct bm2835_mmal_
+@@ -1657,7 +1656,7 @@ static int mmal_init(struct bm2835_mmal_
format->es->video.frame_rate.num = 0; /* Rely on fps_range */
format->es->video.frame_rate.den = 1;
format->encoding = MMAL_ENCODING_OPAQUE;
format->encoding_variant = MMAL_ENCODING_I420;
-@@ -1658,7 +1657,7 @@ static int mmal_init(struct bm2835_mmal_
+@@ -1671,7 +1670,7 @@ static int mmal_init(struct bm2835_mmal_
format->es->video.frame_rate.num = 0; /* Rely on fps_range */
format->es->video.frame_rate.den = 1;
format->encoding = MMAL_ENCODING_OPAQUE;
-@@ -1682,28 +1681,28 @@ static int mmal_init(struct bm2835_mmal_
+@@ -1695,28 +1694,28 @@ static int mmal_init(struct bm2835_mmal_
/* get the preview component ready */
ret = vchiq_mmal_component_init(
dev->instance, "ril.video_render",
1);
goto unreg_image_encoder;
}
-@@ -1711,21 +1710,21 @@ static int mmal_init(struct bm2835_mmal_
+@@ -1724,21 +1723,21 @@ static int mmal_init(struct bm2835_mmal_
/* get the video encoder component ready */
ret = vchiq_mmal_component_init(dev->instance, "ril.video_encode",
&dev->
encoder_port->format.encoding = MMAL_ENCODING_H264;
ret = vchiq_mmal_port_set_format(dev->instance,
encoder_port);
-@@ -1736,12 +1735,12 @@ static int mmal_init(struct bm2835_mmal_
+@@ -1749,12 +1748,12 @@ static int mmal_init(struct bm2835_mmal_
vchiq_mmal_port_parameter_set(
dev->instance,
MMAL_PARAMETER_MINIMISE_FRAGMENTATION,
&enable,
sizeof(enable));
-@@ -1759,23 +1758,23 @@ unreg_vid_encoder:
+@@ -1772,23 +1771,23 @@ unreg_vid_encoder:
pr_err("Cleanup: Destroy video encoder\n");
vchiq_mmal_component_finalise(
dev->instance,
unreg_mmal:
vchiq_mmal_finalise(dev->instance);
-@@ -1831,21 +1830,21 @@ static void bcm2835_cleanup_instance(str
+@@ -1844,21 +1843,21 @@ static void bcm2835_cleanup_instance(str
dev->capture.encode_component);
}
vchiq_mmal_component_disable(dev->instance,