From: Andrey Konovalov <andrey.konovalov@linaro.org>
To: junak.pub@gmail.com, robert.foss@linaro.org,
sakari.ailus@linux.intel.com
Cc: todor.too@gmail.com, agross@kernel.org,
bjorn.andersson@linaro.org, mchehab@kernel.org,
laurent.pinchart@ideasonboard.com, jacopo@jmondi.org,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Andrey Konovalov <andrey.konovalov@linaro.org>
Subject: [PATCH v3 1/3] v4l: common: v4l2_get_link_freq: add printing a warning
Date: Wed, 3 Mar 2021 20:42:48 +0300 [thread overview]
Message-ID: <20210303174250.11405-2-andrey.konovalov@linaro.org> (raw)
In-Reply-To: <20210303174250.11405-1-andrey.konovalov@linaro.org>
Print a warning if V4L2_CID_LINK_FREQ control is not implemented.
Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
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
next prev parent reply other threads:[~2021-03-03 20:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 17:42 [PATCH v3 0/3] media: qcom: camss: V4L2_CID_PIXEL_RATE/LINK_FREQ fixes Andrey Konovalov
2021-03-03 17:42 ` Andrey Konovalov [this message]
2021-03-03 17:42 ` [PATCH v3 2/3] media: camss: use v4l2_get_link_freq() to calculate the relevant clocks Andrey Konovalov
2021-03-03 17:42 ` [PATCH v3 3/3] media: qcom: camss: Fix overflows in clock rate calculations Andrey Konovalov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210303174250.11405-2-andrey.konovalov@linaro.org \
--to=andrey.konovalov@linaro.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=jacopo@jmondi.org \
--cc=junak.pub@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robert.foss@linaro.org \
--cc=sakari.ailus@linux.intel.com \
--cc=todor.too@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).