summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugues Fruchet2018-02-08 13:22:14 +0100
committerMauro Carvalho Chehab2018-02-23 09:14:12 +0100
commit3b498424002755b06a86d56acf9e4c8e5e5085ff (patch)
treed15f7dfa67057ce5d8a90242ce60cc3fa3e12600
parentmedia: ov5640: fix virtual_channel parameter permissions (diff)
downloadkernel-qcow2-linux-3b498424002755b06a86d56acf9e4c8e5e5085ff.tar.gz
kernel-qcow2-linux-3b498424002755b06a86d56acf9e4c8e5e5085ff.tar.xz
kernel-qcow2-linux-3b498424002755b06a86d56acf9e4c8e5e5085ff.zip
media: ov5640: fix framerate update
After a framerate update through s_frame_interval(), the new framerate was not taken into account when streaming, but was taken into account on next session. This was due to sensor->current_mode not updated accordingly to new framerate setting in ov5640_s_frame_interval(). Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/media/i2c/ov5640.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 3e7b43ce2b7a..03940f0cdfa6 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -2374,6 +2374,8 @@ static int ov5640_s_frame_interval(struct v4l2_subdev *sd,
sensor->current_fr = frame_rate;
sensor->frame_interval = fi->interval;
+ sensor->current_mode = ov5640_find_mode(sensor, frame_rate, mode->width,
+ mode->height, true);
sensor->pending_mode_change = true;
out:
mutex_unlock(&sensor->lock);