diff options
author | Hans Verkuil | 2016-01-13 11:44:41 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2016-02-01 08:01:42 -0200 |
commit | 8e20b80344148dd8b7ec23d546e931d54810a1b7 (patch) | |
tree | 2f54d0fdb107f049fcd350152dc7e70742a3e912 /drivers/media | |
parent | 949cf70636bfe12c160c36608d18c5f8d89d2940 (diff) |
[media] v4l2-dv-timings: skip standards check for V4L2_DV_BT_CAP_CUSTOM
Skip validating the standards field in v4l2_valid_dv_timings() if the
V4L2_DV_BT_CAP_CUSTOM capability is set, since that implies that
non-standard timings are allowed.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-dv-timings.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c index ec258b73001a..889de0a32152 100644 --- a/drivers/media/v4l2-core/v4l2-dv-timings.c +++ b/drivers/media/v4l2-core/v4l2-dv-timings.c @@ -165,7 +165,8 @@ bool v4l2_valid_dv_timings(const struct v4l2_dv_timings *t, bt->width > cap->max_width || bt->pixelclock < cap->min_pixelclock || bt->pixelclock > cap->max_pixelclock || - (cap->standards && bt->standards && + (!(caps & V4L2_DV_BT_CAP_CUSTOM) && + cap->standards && bt->standards && !(bt->standards & cap->standards)) || (bt->interlaced && !(caps & V4L2_DV_BT_CAP_INTERLACED)) || (!bt->interlaced && !(caps & V4L2_DV_BT_CAP_PROGRESSIVE))) |