From b36ca8daa3ae8ceb2291ecc27b78723d9970c987 Mon Sep 17 00:00:00 2001 From: Shubham Chandra Date: Fri, 27 Jun 2025 21:54:39 +0000 Subject: [PATCH] media: camera: modify error log to info log v4l2-compliance has a negative test for image size, resulting in an error log. Modify this error log to info to avoid reporting kernel error/warning failure. Bug 5143480 Change-Id: I5ec459f97c5b09e130293b59c19c1eb3ea9a53ee Signed-off-by: Shubham Chandra Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3396425 (cherry picked from commit bac969836ec107b17489a782103517684691fddc) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3395179 (cherry picked from commit 97058881b98459a100562cc41a148d7e3240059b) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3415602 Reviewed-by: Narendra Kondapalli Reviewed-by: svcacv Reviewed-by: Nithin Varghese GVS: buildbot_gerritrpt Reviewed-by: Ankur Pawar --- drivers/media/platform/tegra/camera/vi/channel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/tegra/camera/vi/channel.c b/drivers/media/platform/tegra/camera/vi/channel.c index 8a325f1f..e818f61e 100644 --- a/drivers/media/platform/tegra/camera/vi/channel.c +++ b/drivers/media/platform/tegra/camera/vi/channel.c @@ -703,11 +703,12 @@ tegra_channel_queue_setup(struct vb2_queue *vq, * of the requested image size. Although this did not harm the * flow, according to "v4l2-compliance", we need to check if * the requested size is invalid. + * Printing this error as info, to avoid kernel error/warning failure. */ if (*nplanes) { if (sizes[0] < chan->format.sizeimage) { - pr_err("%s: sizes[0] = %d chan->format.sizeimage = %d ...\n" - ,__func__,sizes[0],chan->format.sizeimage); + pr_info("%s: sizes[0] = %d, chan->format.sizeimage = %d, for num_planes = %d ...\n" + , __func__, sizes[0], chan->format.sizeimage, *nplanes); return -EINVAL; } } else {