[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240823144747.GN26098@pendragon.ideasonboard.com>
Date: Fri, 23 Aug 2024 17:47:47 +0300
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Changhuang Liang <changhuang.liang@...rfivetech.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Jack Zhu <jack.zhu@...rfivetech.com>,
Keith Zhao <keith.zhao@...rfivetech.com>,
Dan Carpenter <dan.carpenter@...aro.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-staging@...ts.linux.dev
Subject: Re: [v3] staging: media: starfive: Add the dynamic resolution support
Hi Changhuang,
Thank you for the patch.
On Tue, Aug 20, 2024 at 04:20:02AM -0700, Changhuang Liang wrote:
> Add the dynamic resolution support for video "capture_raw" device.
> Otherwise it will capture the wrong image data if the width is
> not 1920.
>
> Fixes: e080f339c80a ("media: staging: media: starfive: camss: Add capture driver")
> Signed-off-by: Changhuang Liang <changhuang.liang@...rfivetech.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> ---
> Hi
>
> v2 forgot to synchronous description with v1. Now send a new version 3.
>
> Best Regards
> Changhuang
> ---
> drivers/staging/media/starfive/camss/stf-capture.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/starfive/camss/stf-capture.c b/drivers/staging/media/starfive/camss/stf-capture.c
> index ec5169e7b391..e15d2e97eb0b 100644
> --- a/drivers/staging/media/starfive/camss/stf-capture.c
> +++ b/drivers/staging/media/starfive/camss/stf-capture.c
> @@ -180,6 +180,8 @@ static void stf_channel_set(struct stfcamss_video *video)
> u32 val;
>
> if (cap->type == STF_CAPTURE_RAW) {
> + const struct v4l2_pix_format *pix = &video->active_fmt.fmt.pix;
> +
> val = stf_syscon_reg_read(stfcamss, VIN_CHANNEL_SEL_EN);
> val &= ~U0_VIN_CHANNEL_SEL_MASK;
> val |= CHANNEL(0);
> @@ -193,7 +195,7 @@ static void stf_channel_set(struct stfcamss_video *video)
> val |= PIXEL_HEIGH_BIT_SEL(0);
>
> val &= ~U0_VIN_PIX_CNT_END_MASK;
> - val |= PIX_CNT_END(IMAGE_MAX_WIDTH / 4 - 1);
> + val |= PIX_CNT_END(pix->width / 4 - 1);
>
> stf_syscon_reg_write(stfcamss, VIN_INRT_PIX_CFG, val);
> } else if (cap->type == STF_CAPTURE_YUV) {
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists