Skip to contentSkip to conversation

v4l2-dv-timings: skip standards check for V4L2_DV_BT_CAP_CUSTOM

PATCH New Hans Verkuil 1 participant 1 message Jan 13, 2016 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/media/v4l2-core/v4l2-dv-timings.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/v4l2-core/v4l2-dv-timings.c +2 -1
index ec258b7..889de0a 100644
@@ -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)))
Signature · 1 line
2.7.0.rc3