Linux Media Controller development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Arash Golgol <arash.golgol@gmail.com>
Cc: linux-media@vger.kernel.org, yong.deng@magewell.com,
	paulk@sys-base.io, mchehab@kernel.org, wens@kernel.org,
	jernej.skrabec@gmail.com, samuel@sholland.org,
	linux-sunxi@lists.linux.dev
Subject: Re: [PATCH v1 2/3] media: sun6i-csi: capture: Implement vidioc_enum_framesizes
Date: Thu, 7 May 2026 16:55:51 +0300	[thread overview]
Message-ID: <20260507135551.GG1938994@killaraus.ideasonboard.com> (raw)
In-Reply-To: <20260217064050.18388-3-arash.golgol@gmail.com>

On Tue, Feb 17, 2026 at 10:10:49AM +0330, Arash Golgol wrote:
> Report the stepwise frame size range supported by the CSI capture
> hardware for the pixel formats exposed by the driver.
> 
> The hardware does not perform scaling and accepts any even width and
> height within the reported limits.
> 
> Signed-off-by: Arash Golgol <arash.golgol@gmail.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  .../sunxi/sun6i-csi/sun6i_csi_capture.c       | 22 +++++++++++++++++++
>  1 file changed, 22 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 a21a146fb02a..dd06d4c116e0 100644
> --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c
> +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c
> @@ -738,6 +738,27 @@ static int sun6i_csi_capture_enum_fmt(struct file *file, void *priv,
>  	return 0;
>  }
>  
> +static int sun6i_csi_capture_enum_framesize(struct file *file, void *fh,
> +					     struct v4l2_frmsizeenum *fsize)
> +{
> +	if (fsize->index)
> +		return -EINVAL;
> +
> +	/* Only accept format in map table. */
> +	if (!sun6i_csi_capture_format_find(fsize->pixel_format))
> +		return -EINVAL;
> +
> +	fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE;
> +	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 = 2;
> +	fsize->stepwise.step_height = 2;
> +
> +	return 0;
> +}
> +
>  static int sun6i_csi_capture_g_fmt(struct file *file, void *priv,
>  				   struct v4l2_format *format)
>  {
> @@ -805,6 +826,7 @@ static const struct v4l2_ioctl_ops sun6i_csi_capture_ioctl_ops = {
>  	.vidioc_querycap		= sun6i_csi_capture_querycap,
>  
>  	.vidioc_enum_fmt_vid_cap	= sun6i_csi_capture_enum_fmt,
> +	.vidioc_enum_framesizes		= sun6i_csi_capture_enum_framesize,
>  	.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,

-- 
Regards,

Laurent Pinchart

  parent reply	other threads:[~2026-05-07 13:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17  6:40 [PATCH v1 0/3] media: sun6i-csi: Convert to active state and improve MC support Arash Golgol
2026-02-17  6:40 ` [PATCH v1 1/3] media: sun6i-csi: bridge: Use V4L2 subdev active state Arash Golgol
2026-05-07 11:55   ` Paul Kocialkowski
2026-05-07 13:55   ` Laurent Pinchart
2026-02-17  6:40 ` [PATCH v1 2/3] media: sun6i-csi: capture: Implement vidioc_enum_framesizes Arash Golgol
2026-05-07 11:56   ` Paul Kocialkowski
2026-05-07 13:55   ` Laurent Pinchart [this message]
2026-02-17  6:40 ` [PATCH v1 3/3] media: sun6i-csi: capture: Support MC-centric format enumeration Arash Golgol
2026-05-07 11:58   ` Paul Kocialkowski
2026-05-07 13:57     ` Laurent Pinchart
2026-04-24 13:55 ` [PATCH v1 0/3] media: sun6i-csi: Convert to active state and improve MC support arash golgol

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=20260507135551.GG1938994@killaraus.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=arash.golgol@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=paulk@sys-base.io \
    --cc=samuel@sholland.org \
    --cc=wens@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