From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tarang Raval <tarang.raval@siliconsignals.io>
Cc: Dafna Hirschfeld <dafna@fastmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: rkisp1: Fix enum_framesizes accepting invalid pixel formats
Date: Wed, 5 Nov 2025 20:21:59 +0200 [thread overview]
Message-ID: <20251105182159.GE6046@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20250829101425.95442-1-tarang.raval@siliconsignals.io>
Hi Tarang,
Thank you for the patch.
On Fri, Aug 29, 2025 at 03:44:24PM +0530, Tarang Raval wrote:
> Reject unsupported pixel formats in rkisp1_enum_framesizes() to
> fix v4l2-compliance failure.
>
> v4l2-compliance test failure:
>
> fail: ../utils/v4l2-compliance/v4l2-test-formats.cpp(403): Accepted framesize for invalid format
> test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
>
> Tested on: Debix i.MX8MP Model A
> Kernel version: v6.17-rc3
> v4l2-compliance: 1.31.0-5387
>
> Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io>
I've tested this with libcamera, so
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
> index 6dcefd144d5a..107937b77153 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
> @@ -1383,6 +1383,9 @@ static int rkisp1_enum_framesizes(struct file *file, void *fh,
> };
> struct rkisp1_capture *cap = video_drvdata(file);
>
> + if (!rkisp1_find_fmt_cfg(cap, fsize->pixel_format))
> + return -EINVAL;
> +
> if (fsize->index != 0)
> return -EINVAL;
>
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2025-11-05 18:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 10:14 [PATCH] media: rkisp1: Fix enum_framesizes accepting invalid pixel formats Tarang Raval
2025-09-10 9:55 ` Tarang Raval
2025-09-16 12:56 ` Kieran Bingham
2025-10-30 7:50 ` Tarang Raval
2025-11-05 18:21 ` Laurent Pinchart [this message]
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=20251105182159.GE6046@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=dafna@fastmail.com \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=tarang.raval@siliconsignals.io \
/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).