From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: adam@piggz.co.uk, linux-media@vger.kernel.org,
yong.deng@magewell.com, mchehab@kernel.org,
linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 3/3] media: sun6i-csi: implement vidioc_enum_framesizes
Date: Wed, 22 Feb 2023 11:43:06 +0100 [thread overview]
Message-ID: <Y/XxuqtQ+RiANngZ@aptenodytes> (raw)
In-Reply-To: <Y7iwR3W5RiQ2K+Ip@pendragon.ideasonboard.com>
[-- Attachment #1: Type: text/plain, Size: 3042 bytes --]
Hi,
On Sat 07 Jan 23, 01:35, Laurent Pinchart wrote:
> Hi Adam,
>
> Thank you for the patch.
>
> On Fri, Jan 06, 2023 at 07:40:38PM +0000, adam@piggz.co.uk wrote:
> > From: Adam Pigg <adam@piggz.co.uk>
> >
> > Create sun6i_csi_capture_enum_framesizes which defines the min
> > and max frame sizes
>
> With the commit message updated (see review of 1/3),
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
I'm always a bit confused regarding how such an ioctl's behavior should depend
on the attached subdev. Is it well-defined behavior that this here is only
about the receiver part and has nothing to do with what the connected sensor?
> > Signed-off-by: Adam Pigg <adam@piggz.co.uk>
> > ---
> > .../sunxi/sun6i-csi/sun6i_csi_capture.c | 24 +++++++++++++++++++
> > 1 file changed, 24 insertions(+)
> >
> > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c
> > index 54beba4d2b2f..2be761e6b650 100644
> > --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c
> > +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c
> > @@ -739,6 +739,29 @@ static int sun6i_csi_capture_try_fmt(struct file *file, void *private,
> > return 0;
> > }
> >
> > +static int sun6i_csi_capture_enum_framesizes(struct file *file, void *fh,
> > + struct v4l2_frmsizeenum *fsize)
A cosmetic/consistency suggestion would be to name this variable "frmsize" to
reuse part of the name of the structure, which is what I've done in other places
of the driver.
Cheers,
Paul
> > +{
> > + const struct sun6i_csi_capture_format *format;
> > +
> > + if (fsize->index > 0)
> > + return -EINVAL;
> > +
> > + format = sun6i_csi_capture_format_find(fsize->pixel_format);
> > + if (!format)
> > + return -EINVAL;
> > +
> > + fsize->type = V4L2_FRMSIZE_TYPE_CONTINUOUS;
> > + fsize->stepwise.min_width = SUN6I_CSI_CAPTURE_WIDTH_MIN;
> > + fsize->stepwise.max_width = SUN6I_CSI_CAPTURE_WIDTH_MAX;
> > + fsize->stepwise.min_height = SUN6I_CSI_CAPTURE_HEIGHT_MIN;
> > + fsize->stepwise.max_height = SUN6I_CSI_CAPTURE_HEIGHT_MAX;
> > + fsize->stepwise.step_width = 1;
> > + fsize->stepwise.step_height = 1;
> > +
> > + return 0;
> > +}
> > +
> > static int sun6i_csi_capture_enum_input(struct file *file, void *private,
> > struct v4l2_input *input)
> > {
> > @@ -775,6 +798,7 @@ static const struct v4l2_ioctl_ops sun6i_csi_capture_ioctl_ops = {
> > .vidioc_g_fmt_vid_cap = sun6i_csi_capture_g_fmt,
> > .vidioc_s_fmt_vid_cap = sun6i_csi_capture_s_fmt,
> > .vidioc_try_fmt_vid_cap = sun6i_csi_capture_try_fmt,
> > + .vidioc_enum_framesizes = sun6i_csi_capture_enum_framesizes,
> >
> > .vidioc_enum_input = sun6i_csi_capture_enum_input,
> > .vidioc_g_input = sun6i_csi_capture_g_input,
>
> --
> Regards,
>
> Laurent Pinchart
--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-02-22 10:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 19:40 [PATCH 0/3] suns6-csi changes to support libcamera adam
2023-01-06 19:40 ` [PATCH 1/3] media: sun6i-csi: merge sun6i_csi_formats and sun6i_csi_formats_match adam
2023-01-06 23:31 ` Laurent Pinchart
2023-01-08 18:23 ` Adam Pigg
2023-01-08 20:26 ` Laurent Pinchart
2023-02-17 18:20 ` Laurent Pinchart
2023-02-22 10:39 ` Paul Kocialkowski
2023-03-21 17:50 ` Adam Pigg
2023-03-23 12:55 ` Paul Kocialkowski
2023-03-25 23:17 ` Laurent Pinchart
2023-01-06 19:40 ` [PATCH 2/3] media: sun6i-csi: implement V4L2_CAP_IO_MC adam
2023-01-06 23:34 ` Laurent Pinchart
2023-01-06 19:40 ` [PATCH 3/3] media: sun6i-csi: implement vidioc_enum_framesizes adam
2023-01-06 23:35 ` Laurent Pinchart
2023-02-22 10:43 ` Paul Kocialkowski [this message]
2023-03-25 23:12 ` Laurent Pinchart
2023-01-06 23:10 ` [PATCH 0/3] suns6-csi changes to support libcamera piggz1
2023-01-07 8:43 ` Adam Pigg
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=Y/XxuqtQ+RiANngZ@aptenodytes \
--to=paul.kocialkowski@bootlin.com \
--cc=adam@piggz.co.uk \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=yong.deng@magewell.com \
/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