From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jai Luthra <jai.luthra@ideasonboard.com>
Cc: Rishikesh Donadkar <r-donadkar@ti.com>,
jai.luthra@linux.dev, mripard@kernel.org,
y-abhilashchandra@ti.com, devarsht@ti.com, s-jain1@ti.com,
vigneshr@ti.com, mchehab@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, p.zabel@pengutronix.de, conor+dt@kernel.org,
sakari.ailus@linux.intel.com, hverkuil-cisco@xs4all.nl,
tomi.valkeinen@ideasonboard.com,
changhuang.liang@starfivetech.com, jack.zhu@starfivetech.com,
sjoerd@collabora.com, dan.carpenter@linaro.org,
hverkuil+cisco@kernel.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v9 08/19] media: staging: starfive: Move to enabel-disable streams in starfive drivers
Date: Wed, 14 Jan 2026 15:05:22 +0200 [thread overview]
Message-ID: <20260114130522.GE25101@pendragon.ideasonboard.com> (raw)
In-Reply-To: <176839508123.9154.16324392708272572564@freya>
On Wed, Jan 14, 2026 at 06:21:21PM +0530, Jai Luthra wrote:
> Hi Rishikesh,
>
> Thanks for the patch.
We should actually drop the driver. Starfive has confirmed they don't
plan to develop it further, so it shouldn't stay in staging.
> > Subject: [PATCH v9 08/19] media: staging: starfive: Move to enabel-disable streams in starfive drivers
>
> s/enabel/enable
>
> Quoting Rishikesh Donadkar (2025-12-30 14:02:09)
> > The enable_streams() API in v4l2 supports passing a bitmask to enable
> > each pad/stream combination individually on any media subdev. Use this
> > API instead of s_stream() API in the starfive drivers
>
> nit: I think the description can be explicit that this driver does not
> support "multiple streams" (at least right now), but just switching to the
> new API while ignoring the passed streams mask.
>
> >
> > Signed-off-by: Rishikesh Donadkar <r-donadkar@ti.com>
> > ---
> > .../staging/media/starfive/camss/stf-isp.c | 43 ++++++++++++-------
> > .../staging/media/starfive/camss/stf-video.c | 4 +-
> > 2 files changed, 30 insertions(+), 17 deletions(-)
> >
> > diff --git a/drivers/staging/media/starfive/camss/stf-isp.c b/drivers/staging/media/starfive/camss/stf-isp.c
> > index df7a903fbb1b0..4930ffb0e07a6 100644
> > --- a/drivers/staging/media/starfive/camss/stf-isp.c
> > +++ b/drivers/staging/media/starfive/camss/stf-isp.c
> > @@ -55,27 +55,43 @@ int stf_isp_init(struct stfcamss *stfcamss)
> > return 0;
> > }
> >
> > -static int isp_set_stream(struct v4l2_subdev *sd, int enable)
> > +static int isp_sd_enable_stream(struct v4l2_subdev *sd,
> > + struct v4l2_subdev_state *state,
> > + u32 pad, u64 streams_mask)
> > {
> > struct stf_isp_dev *isp_dev = v4l2_get_subdevdata(sd);
> > struct v4l2_subdev_state *sd_state;
> > struct v4l2_mbus_framefmt *fmt;
> > struct v4l2_rect *crop;
> > + int ret;
> >
> > - sd_state = v4l2_subdev_lock_and_get_active_state(sd);
> > + sd_state = v4l2_subdev_get_locked_active_state(sd);
> > fmt = v4l2_subdev_state_get_format(sd_state, STF_ISP_PAD_SINK);
> > crop = v4l2_subdev_state_get_crop(sd_state, STF_ISP_PAD_SRC);
> >
> > - if (enable) {
> > - stf_isp_reset(isp_dev);
> > - stf_isp_init_cfg(isp_dev);
> > - stf_isp_settings(isp_dev, crop, fmt->code);
> > - stf_isp_stream_set(isp_dev);
> > - }
> > + stf_isp_reset(isp_dev);
> > + stf_isp_init_cfg(isp_dev);
> > + stf_isp_settings(isp_dev, crop, fmt->code);
> > + stf_isp_stream_set(isp_dev);
> > +
> > + ret = v4l2_subdev_enable_streams(isp_dev->source_subdev, 1, BIT(0));
>
> Given you have a streams_mask argument in this function now, it might be
> cleaner to use it here (and let stf-video populate it with BIT(0)).
>
> > + if (ret)
> > + return ret;
> > +
> > + return 0;
> > +}
> >
> > - v4l2_subdev_call(isp_dev->source_subdev, video, s_stream, enable);
> > +static int isp_sd_disable_stream(struct v4l2_subdev *sd,
> > + struct v4l2_subdev_state *state,
> > + u32 pad, u64 streams_mask)
> > +{
> > + struct stf_isp_dev *isp_dev = v4l2_get_subdevdata(sd);
> > + int ret;
> > +
> > + ret = v4l2_subdev_disable_streams(isp_dev->source_subdev, 1, BIT(0));
>
> Same here.
>
> > + if (ret)
> > + return ret;
> >
> > - v4l2_subdev_unlock_state(sd_state);
> > return 0;
> > }
> >
> > @@ -300,20 +316,17 @@ static int isp_init_formats(struct v4l2_subdev *sd,
> > return isp_set_format(sd, sd_state, &format);
> > }
> >
> > -static const struct v4l2_subdev_video_ops isp_video_ops = {
> > - .s_stream = isp_set_stream,
> > -};
> > -
> > static const struct v4l2_subdev_pad_ops isp_pad_ops = {
> > .enum_mbus_code = isp_enum_mbus_code,
> > .get_fmt = v4l2_subdev_get_fmt,
> > .set_fmt = isp_set_format,
> > .get_selection = isp_get_selection,
> > .set_selection = isp_set_selection,
> > + .enable_streams = isp_sd_enable_stream,
> > + .disable_streams = isp_sd_disable_stream,
> > };
> >
> > static const struct v4l2_subdev_ops isp_v4l2_ops = {
> > - .video = &isp_video_ops,
> > .pad = &isp_pad_ops,
> > };
> >
> > diff --git a/drivers/staging/media/starfive/camss/stf-video.c b/drivers/staging/media/starfive/camss/stf-video.c
> > index a0420eb6a0aa0..2db29bf8bdef8 100644
> > --- a/drivers/staging/media/starfive/camss/stf-video.c
> > +++ b/drivers/staging/media/starfive/camss/stf-video.c
> > @@ -287,7 +287,7 @@ static int video_start_streaming(struct vb2_queue *q, unsigned int count)
> >
> > video->ops->start_streaming(video);
> >
> > - ret = v4l2_subdev_call(video->source_subdev, video, s_stream, true);
> > + ret = v4l2_subdev_enable_streams(video->source_subdev, 1, BIT(0));
>
> Now that I think of it, it was not necessary to implement enable / disable
> API for the ISP subdev driver given v4l2_subdev_*_streams falls back on
> s_stream. But it's anyway good to move drivers, so I guess it's alright.
>
> > if (ret) {
> > dev_err(video->stfcamss->dev, "stream on failed\n");
> > goto err_pm_put;
> > @@ -311,7 +311,7 @@ static void video_stop_streaming(struct vb2_queue *q)
> >
> > video->ops->stop_streaming(video);
> >
> > - v4l2_subdev_call(video->source_subdev, video, s_stream, false);
> > + v4l2_subdev_disable_streams(video->source_subdev, 1, BIT(0));
> >
> > pm_runtime_put(video->stfcamss->dev);
> >
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2026-01-14 13:05 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 8:32 [PATCH v9 00/19] media: cadence,ti: CSI2RX Multistream Support Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 01/19] media: ti: j721e-csi2rx: Remove word size alignment on frame width Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 02/19] dt-bindings: media: ti,j721e-csi2rx-shim: Support 32 dma chans Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 03/19] media: ti: j721e-csi2rx: separate out device and context Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 04/19] media: ti: j721e-csi2rx: prepare SHIM code for multiple contexts Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 05/19] media: ti: j721e-csi2rx: allocate DMA channel based on context index Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 06/19] media: ti: j721e-csi2rx: add a subdev for the core device Rishikesh Donadkar
2026-01-14 15:21 ` Tomi Valkeinen
2026-01-15 6:36 ` Jai Luthra
2026-01-15 12:56 ` Tomi Valkeinen
2026-01-20 23:25 ` Laurent Pinchart
2026-01-21 7:38 ` Tomi Valkeinen
2026-01-21 10:52 ` Laurent Pinchart
2026-01-22 6:53 ` Jai Luthra
2026-01-22 9:53 ` Laurent Pinchart
2026-02-28 17:49 ` Jai Luthra
2026-01-21 9:10 ` Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 07/19] media: cadence: csi2rx: Move to .enable/disable_streams API Rishikesh Donadkar
2026-01-14 15:25 ` Tomi Valkeinen
2025-12-30 8:32 ` [PATCH v9 08/19] media: staging: starfive: Move to enabel-disable streams in starfive drivers Rishikesh Donadkar
2026-01-14 12:51 ` Jai Luthra
2026-01-14 13:05 ` Laurent Pinchart [this message]
2025-12-30 8:32 ` [PATCH v9 09/19] media: ti: j721e-csi2rx: get number of contexts from device tree Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 10/19] media: cadence: csi2rx: add get_frame_desc wrapper Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 11/19] media: ti: j721e-csi2rx: add support for processing virtual channels Rishikesh Donadkar
2026-01-14 15:31 ` Tomi Valkeinen
2026-01-16 10:28 ` Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 12/19] media: cadence: csi2rx: add multistream support Rishikesh Donadkar
2026-01-15 12:01 ` Tomi Valkeinen
2026-01-16 11:04 ` Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 13/19] media: ti: j721e-csi2rx: " Rishikesh Donadkar
2026-01-15 12:27 ` Tomi Valkeinen
2026-01-20 8:48 ` Rishikesh Donadkar
2026-01-15 12:28 ` Tomi Valkeinen
2026-01-20 8:52 ` Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 14/19] media: ti: j721e-csi2rx: Submit all available buffers Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 15/19] media: ti: j721e-csi2rx: Change the drain architecture for multistream Rishikesh Donadkar
2026-01-15 12:37 ` Tomi Valkeinen
2026-01-15 16:02 ` Jai Luthra
2026-01-16 10:11 ` Vignesh Raghavendra
2026-01-19 5:08 ` Rishikesh Donadkar
2026-01-19 5:04 ` Rishikesh Donadkar
2025-12-30 8:32 ` [PATCH v9 16/19] media: ti: j721e-csi2rx: Return the partial frame as error Rishikesh Donadkar
2026-01-06 11:15 ` Jai Luthra
2026-01-08 5:37 ` Rishikesh Donadkar
2026-01-15 12:39 ` Tomi Valkeinen
2025-12-30 8:32 ` [PATCH v9 17/19] media: cadence: csi2rx: Support runtime PM Rishikesh Donadkar
2026-01-14 17:04 ` Tomi Valkeinen
2025-12-30 8:32 ` [PATCH v9 18/19] media: ti: j721e-csi2rx: Support runtime suspend Rishikesh Donadkar
2026-01-15 12:46 ` Tomi Valkeinen
2026-01-19 6:04 ` Jai Luthra
2025-12-30 8:32 ` [PATCH v9 19/19] media: ti: j721e-csi2rx: Support system suspend using pm_notifier Rishikesh Donadkar
2026-01-15 12:50 ` Tomi Valkeinen
2026-01-19 5:25 ` Rishikesh Donadkar
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=20260114130522.GE25101@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=changhuang.liang@starfivetech.com \
--cc=conor+dt@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=devarsht@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil+cisco@kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jack.zhu@starfivetech.com \
--cc=jai.luthra@ideasonboard.com \
--cc=jai.luthra@linux.dev \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=r-donadkar@ti.com \
--cc=robh@kernel.org \
--cc=s-jain1@ti.com \
--cc=sakari.ailus@linux.intel.com \
--cc=sjoerd@collabora.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=vigneshr@ti.com \
--cc=y-abhilashchandra@ti.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