[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1cpYOK-0006EZ-No@rmk-PC.armlinux.org.uk>
Date: Sun, 19 Mar 2017 10:48:52 +0000
From: Russell King <rmk+kernel@...linux.org.uk>
To: Steve Longerbeam <steve_longerbeam@...tor.com>,
Steve Longerbeam <slongerbeam@...il.com>
Cc: sakari.ailus@...ux.intel.com, hverkuil@...all.nl,
linux-media@...r.kernel.org, kernel@...gutronix.de,
mchehab@...nel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, p.zabel@...gutronix.de
Subject: [PATCH 1/4] media: imx-media-csi: fix v4l2-compliance check
v4l2-compliance was failing with:
fail: v4l2-test-formats.cpp(1076): cap->timeperframe.numerator == 0 || cap->timeperframe.denominator == 0
test VIDIOC_G/S_PARM: FAIL
Fix this.
Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
---
drivers/staging/media/imx/imx-media-csi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index 0336891069dc..65346e789dd6 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -680,8 +680,10 @@ static const struct csi_skip_desc *csi_find_best_skip(struct v4l2_fract *in,
/* Default to 1:1 ratio */
if (out->numerator == 0 || out->denominator == 0 ||
- in->numerator == 0 || in->denominator == 0)
+ in->numerator == 0 || in->denominator == 0) {
+ *out = *in;
return best_skip;
+ }
want_us = div_u64((u64)USEC_PER_SEC * out->numerator, out->denominator);
--
2.7.4
Powered by blists - more mailing lists