]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: v4l2-common: Reduce warnings about missing V4L2_CID_LINK_FREQ control
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 8 May 2025 08:37:45 +0000 (10:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:00 +0000 (16:26 +0200)
[ Upstream commit 5a0abb8909b9dcf347fce1d201ac6686ac33fd64 ]

When operating a pipeline with a missing V4L2_CID_LINK_FREQ control this
two line warning is printed each time the pipeline is started. Reduce
this excessive logging by only warning once for the missing control.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/v4l2-core/v4l2-common.c

index 40f56e044640d75ae9d41475c39b6b7c8cf0e9ae..1c8d36684809d049fd26d6d696f32b28faa2c0bb 100644 (file)
@@ -475,10 +475,10 @@ s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul,
 
                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__);
+               pr_warn_once("%s: Link frequency estimated using pixel rate: result might be inaccurate\n",
+                            __func__);
+               pr_warn_once("%s: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver\n",
+                            __func__);
        }
 
        return freq > 0 ? freq : -EINVAL;