Linux Media Controller development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Rui Miguel Silva <rmfrfs@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Tim Harvey <tharvey@gateworks.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] media: imx: imx7-media-csi: Move stepwise framesize into a dedicated struct
Date: Tue, 25 Jul 2023 20:40:20 +0300	[thread overview]
Message-ID: <20230725174020.GH21640@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230720074129.3680269-1-alexander.stein@ew.tq-group.com>

Hi Alexander,

Thank you for the patch.

On Thu, Jul 20, 2023 at 09:41:28AM +0200, Alexander Stein wrote:
> This way these constraints can be reused later on.
> No functional change intended.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
>  drivers/media/platform/nxp/imx7-media-csi.c | 26 ++++++++++++---------
>  1 file changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c
> index 2f9302fc7570..73f8f2a35422 100644
> --- a/drivers/media/platform/nxp/imx7-media-csi.c
> +++ b/drivers/media/platform/nxp/imx7-media-csi.c
> @@ -260,6 +260,20 @@ imx7_csi_notifier_to_dev(struct v4l2_async_notifier *n)
>  	return container_of(n, struct imx7_csi, notifier);
>  }
>  
> +/*
> + * TODO: The constraints are hardware-specific and may depend on the
> + * pixel format. This should come from the driver using
> + * imx_media_capture.

Addressing this will not be possible with a single v4l2_frmsize_stepwise
instance, so I'd rather address the TODO first.

> + */
> +static const struct v4l2_frmsize_stepwise imx7_csi_frmsize_stepwise = {
> +	.min_width = 1,
> +	.min_height = 1,
> +	.max_width = 65535,
> +	.max_height = 65535,
> +	.step_width = 1,
> +	.step_height = 1,
> +};
> +
>  /* -----------------------------------------------------------------------------
>   * Hardware Configuration
>   */
> @@ -1082,18 +1096,8 @@ static int imx7_csi_video_enum_framesizes(struct file *file, void *fh,
>  	if (!cc)
>  		return -EINVAL;
>  
> -	/*
> -	 * TODO: The constraints are hardware-specific and may depend on the
> -	 * pixel format. This should come from the driver using
> -	 * imx_media_capture.
> -	 */
>  	fsize->type = V4L2_FRMSIZE_TYPE_CONTINUOUS;
> -	fsize->stepwise.min_width = 1;
> -	fsize->stepwise.max_width = 65535;
> -	fsize->stepwise.min_height = 1;
> -	fsize->stepwise.max_height = 65535;
> -	fsize->stepwise.step_width = 1;
> -	fsize->stepwise.step_height = 1;
> +	fsize->stepwise = imx7_csi_frmsize_stepwise;
>  
>  	return 0;
>  }

-- 
Regards,

Laurent Pinchart

      parent reply	other threads:[~2023-07-25 17:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20  7:41 [PATCH 1/2] media: imx: imx7-media-csi: Move stepwise framesize into a dedicated struct Alexander Stein
2023-07-20  7:41 ` [PATCH 2/2] media: imx: imx7-media-csi: Fix applying format constraints Alexander Stein
2023-07-20 10:19   ` Alexander Stein
2023-07-20 16:43   ` kernel test robot
2023-07-25 17:40 ` 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=20230725174020.GH21640@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rmfrfs@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tharvey@gateworks.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