From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Tarang Raval <tarang.raval@siliconsignals.io>,
laurent.pinchart@ideasonboard.com
Cc: Tarang Raval <tarang.raval@siliconsignals.io>,
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: Tue, 16 Sep 2025 13:56:12 +0100 [thread overview]
Message-ID: <175802737238.1246375.11921455447379092868@ping.linuxembedded.co.uk> (raw)
In-Reply-To: <20250829101425.95442-1-tarang.raval@siliconsignals.io>
Quoting Tarang Raval (2025-08-29 11:14:24)
> 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
Tested here also on a debix board running v4l2-compliance before and
after.
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Kernel version: v6.17-rc3
> v4l2-compliance: 1.31.0-5387
>
> Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io>
> ---
> 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;
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2025-09-16 12:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 10:14 Tarang Raval
2025-09-10 9:55 ` Tarang Raval
2025-09-16 12:56 ` Kieran Bingham [this message]
2025-10-30 7:50 ` Tarang Raval
2025-11-05 18:21 ` Laurent Pinchart
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=175802737238.1246375.11921455447379092868@ping.linuxembedded.co.uk \
--to=kieran.bingham@ideasonboard.com \
--cc=dafna@fastmail.com \
--cc=heiko@sntech.de \
--cc=laurent.pinchart@ideasonboard.com \
--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
all inboxes | Powered by JetHome®