]> git.ipfire.org Git - thirdparty/linux.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)
committerHans Verkuil <hverkuil@xs4all.nl>
Mon, 30 Jun 2025 06:47:40 +0000 (08:47 +0200)
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>
drivers/media/v4l2-core/v4l2-common.c

index bd160a8c9efedbcefc58b8ecc829e902f392e5c5..e1fc8fe43b74c2c664756a7b984e5c83da228912 100644 (file)
@@ -505,10 +505,10 @@ s64 __v4l2_get_link_freq_ctrl(struct v4l2_ctrl_handler *handler,
 
                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;