From: Dan Carpenter <dan.carpenter@linaro.org>
To: Changhuang Liang <changhuang.liang@starfivetech.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Jack Zhu <jack.zhu@starfivetech.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: Re: [PATCH v1 4/7] staging: media: starfive: Add multi streams for ISP
Date: Wed, 6 Mar 2024 17:24:01 +0300 [thread overview]
Message-ID: <1efd7773-4b53-44dc-8885-4259b5823bb9@moroto.mountain> (raw)
In-Reply-To: <20240306093334.9321-5-changhuang.liang@starfivetech.com>
On Wed, Mar 06, 2024 at 01:33:31AM -0800, Changhuang Liang wrote:
> ISP support multi streams output. Add stream_count to save the number
> of stream on.
>
The ISP can support multiple output streams. Introduce stream_count to
store the number of streams. No functional change.
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
> ---
> .../staging/media/starfive/camss/stf-isp.c | 28 +++++++++++++------
> .../staging/media/starfive/camss/stf-isp.h | 1 +
> 2 files changed, 21 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/media/starfive/camss/stf-isp.c b/drivers/staging/media/starfive/camss/stf-isp.c
> index 9b5745669fa6..1bfd336b14a1 100644
> --- a/drivers/staging/media/starfive/camss/stf-isp.c
> +++ b/drivers/staging/media/starfive/camss/stf-isp.c
> @@ -92,15 +92,27 @@ static int isp_set_stream(struct v4l2_subdev *sd, int enable)
> src = stf_isp_g_index_by_mcode(fmt_t_src, fmt_src->code);
>
> if (enable) {
> - stf_isp_reset(isp_dev);
> - stf_isp_init_cfg(isp_dev);
> - stf_isp_settings(isp_dev, crop, fmt->code);
> - stf_isp_config_yuv_out_stride(isp_dev, crop->width,
> - fmt_t_src->fmts[src].bpp);
> - stf_isp_stream_set(isp_dev);
> - }
> + if (!isp_dev->stream_count) {
> + stf_isp_reset(isp_dev);
> + stf_isp_init_cfg(isp_dev);
> + stf_isp_settings(isp_dev, crop, fmt->code);
> + stf_isp_config_yuv_out_stride(isp_dev, crop->width,
> + fmt_t_src->fmts[src].bpp);
> + stf_isp_stream_set(isp_dev);
> +
> + v4l2_subdev_call(isp_dev->source_subdev, video,
> + s_stream, enable);
s/enable/true/
> + }
> +
> + isp_dev->stream_count++;
> + } else {
> + isp_dev->stream_count--;
>
> - v4l2_subdev_call(isp_dev->source_subdev, video, s_stream, enable);
> + if (!isp_dev->stream_count) {
> + v4l2_subdev_call(isp_dev->source_subdev, video,
> + s_stream, enable);
s/enable/false/
> + }
> + }
regards,
dan carpenter
next prev parent reply other threads:[~2024-03-06 14:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 9:33 [PATCH v1 0/7] Add ISP RAW for StarFive Changhuang Liang
2024-03-06 9:33 ` [PATCH v1 1/7] staging: media: starfive: Replaced current_fmt with get from sd_state Changhuang Liang
2024-03-06 14:23 ` Dan Carpenter
2024-03-07 1:58 ` 回复: " Changhuang Liang
2024-03-06 9:33 ` [PATCH v1 2/7] staging: media: starfive: Add raw pad for ISP Changhuang Liang
2024-03-06 14:23 ` Dan Carpenter
2024-03-07 2:06 ` 回复: " Changhuang Liang
2024-03-06 9:33 ` [PATCH v1 3/7] staging: media: starfive: Sink rectangle set to ISP source pad Changhuang Liang
2024-03-06 14:23 ` Dan Carpenter
2024-03-06 9:33 ` [PATCH v1 4/7] staging: media: starfive: Add multi streams for ISP Changhuang Liang
2024-03-06 14:24 ` Dan Carpenter [this message]
2024-03-06 9:33 ` [PATCH v1 5/7] staging: media: starfive: Add ISP raw video device Changhuang Liang
2024-03-06 14:26 ` Dan Carpenter
2024-03-07 2:13 ` 回复: " Changhuang Liang
2024-03-07 7:55 ` Dan Carpenter
2024-03-06 9:33 ` [PATCH v1 6/7] staging: media: starfive: Add raw output stride configure Changhuang Liang
2024-03-06 14:26 ` Dan Carpenter
2024-03-07 2:34 ` 回复: " Changhuang Liang
2024-03-06 9:33 ` [PATCH v1 7/7] admin-guide: media: Update documents for StarFive Camera Subsystem Changhuang Liang
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=1efd7773-4b53-44dc-8885-4259b5823bb9@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=changhuang.liang@starfivetech.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jack.zhu@starfivetech.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
/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®