Commit 67012d97 authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Mauro Carvalho Chehab

media: 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: default avatarAndrey Konovalov <andrey.konovalov@linaro.org>
Reviewed-by: default avatarJacopo Mondi <jacopo@jmondi.org>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 937da4fd
...@@ -469,6 +469,11 @@ s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul, ...@@ -469,6 +469,11 @@ s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul,
return -ENOENT; return -ENOENT;
freq = div_u64(v4l2_ctrl_g_ctrl_int64(ctrl) * mul, div); 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; return freq > 0 ? freq : -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment