[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210218171640.18764-1-andrey.konovalov@linaro.org>
Date: Thu, 18 Feb 2021 20:16:40 +0300
From: Andrey Konovalov <andrey.konovalov@...aro.org>
To: junak.pub@...il.com, robert.foss@...aro.org,
sakari.ailus@...ux.intel.com
Cc: todor.too@...il.com, agross@...nel.org, bjorn.andersson@...aro.org,
mchehab@...nel.org, laurent.pinchart@...asonboard.com,
jacopo@...ndi.org, linux-media@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
Andrey Konovalov <andrey.konovalov@...aro.org>
Subject: [PATCH v2.1 1/3] v4l: common: v4l2_get_link_freq: add printing a warning
Print a warning if V4L2_CID_LINK_FREQ control is not implemented.
Signed-off-by: Andrey Konovalov <andrey.konovalov@...aro.org>
Reviewed-by: Jacopo Mondi <jacopo@...ndi.org>
---
drivers/media/v4l2-core/v4l2-common.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c
index 133d20e40f82..04af03285a20 100644
--- a/drivers/media/v4l2-core/v4l2-common.c
+++ b/drivers/media/v4l2-core/v4l2-common.c
@@ -469,6 +469,11 @@ s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul,
return -ENOENT;
freq = div_u64(v4l2_ctrl_g_ctrl_int64(ctrl) * mul, div);
+
+ pr_warn("%s: Link frequency estimated using pixel rate: result might be inaccurate\n",
+ __func__);
+ pr_warn("%s: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver\n",
+ __func__);
}
return freq > 0 ? freq : -EINVAL;
--
2.17.1
Powered by blists - more mailing lists