diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2016-07-17 11:03:15 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-08-24 14:40:18 +0200 |
commit | 605a74e62809396cfcb786934f12be84a0da2282 (patch) | |
tree | d9ad723756aa9db8658f683fbcaa9d40f85b6f1e /drivers/media/pci/cobalt | |
parent | [media] ad9389b: Remove deprecated create_singlethread_workqueue (diff) | |
download | linux-605a74e62809396cfcb786934f12be84a0da2282.tar.xz linux-605a74e62809396cfcb786934f12be84a0da2282.zip |
[media] cobalt: support reduced fps
Add support for reduced fps (i.e. 59.94 Hz instead of 60 Hz) for the
HDMI output.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/cobalt')
-rw-r--r-- | drivers/media/pci/cobalt/cobalt-v4l2.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c index d05672fe9ff9..5c76637900d0 100644 --- a/drivers/media/pci/cobalt/cobalt-v4l2.c +++ b/drivers/media/pci/cobalt/cobalt-v4l2.c @@ -161,8 +161,11 @@ static void cobalt_enable_output(struct cobalt_stream *s) struct v4l2_subdev_format sd_fmt = { .which = V4L2_SUBDEV_FORMAT_ACTIVE, }; + u64 clk = bt->pixelclock; - if (!cobalt_cpld_set_freq(cobalt, bt->pixelclock)) { + if (bt->flags & V4L2_DV_FL_REDUCED_FPS) + clk = div_u64(clk * 1000ULL, 1001); + if (!cobalt_cpld_set_freq(cobalt, clk)) { cobalt_err("pixelclock out of range\n"); return; } @@ -644,7 +647,7 @@ static int cobalt_s_dv_timings(struct file *file, void *priv_fh, return 0; } - if (v4l2_match_dv_timings(timings, &s->timings, 0, false)) + if (v4l2_match_dv_timings(timings, &s->timings, 0, true)) return 0; if (vb2_is_busy(&s->q)) |