From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Kieran Bingham <kieran.bingham@ideasonboard.com>
Cc: Miguel Vadillo <miguel.vadillo@intel.com>,
linux-media@vger.kernel.org, antti.laakso@linux.intel.com,
mehdi.djait@linux.intel.com
Subject: Re: [PATCH 1/2] media: i2c: cvs: Add driver of Intel Computer Vision Sensing Controller(CVS)
Date: Thu, 7 May 2026 10:24:00 +0300 [thread overview]
Message-ID: <afw-ENbyknoFCLoE@kekkonen.localdomain> (raw)
In-Reply-To: <177805672969.3225262.17973373065597618604@ping.linuxembedded.co.uk>
Hi Kieran,
On Wed, May 06, 2026 at 09:38:49AM +0100, Kieran Bingham wrote:
> > + case MEDIA_BUS_FMT_SBGGR14_1X14:
> > + case MEDIA_BUS_FMT_SGBRG14_1X14:
> > + case MEDIA_BUS_FMT_SGRBG14_1X14:
> > + case MEDIA_BUS_FMT_SRGGB14_1X14:
> > + case MEDIA_BUS_FMT_SBGGR16_1X16:
> > + case MEDIA_BUS_FMT_SGBRG16_1X16:
> > + case MEDIA_BUS_FMT_SGRBG16_1X16:
> > + case MEDIA_BUS_FMT_SRGGB16_1X16:
> > + break;
>
> I've seen this on other pass through devices, and I wonder if really
> there's nothing to filter here - it could be anything. Or perhaps if we
> did need to ensure the driver only supported a specific bus type - that
> could be factored out.
I revall v4l2-compliance will complain if you don't limit to some set of
formats -- I think it tests for a single value which isn't a valid format.
I'd keep this list here for now but I think we should have such a list in
V4L2 core. Also the mux drivers could use it.
> > +/**
> > + * cvs_csi_get_mbus_config - Provide current CSI-2 bus configuration
> > + * @sd: Sub-device
> > + * @pad: Pad index
> > + * @cfg: Returned bus config
> > + *
> > + * Fills lane ordering and number of lanes; retrieves link frequency from
> > + * remote entity.
> > + *
> > + * Return: 0 on success or negative errno.
> > + */
> > +static int cvs_csi_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
> > + struct v4l2_mbus_config *cfg)
> > +{
> > + struct icvs *ctx = sd_to_csi(sd);
> > + s64 freq;
> > +
> > + cfg->type = V4L2_MBUS_CSI2_DPHY;
> > + for (unsigned int i = 0; i < V4L2_MBUS_CSI2_MAX_DATA_LANES; i++)
> > + cfg->bus.mipi_csi2.data_lanes[i] = i + 1;
> > + cfg->bus.mipi_csi2.num_data_lanes = ctx->nr_of_lanes;
> > +
> > + freq = v4l2_get_link_freq(ctx->remote, 0, 0);
> > + if (freq < 0)
> > + return -EINVAL;
> > +
> > + ctx->link_freq = freq;
> > + cfg->link_freq = freq;
> > +
> > + return 0;
> > +}
>
> So more of a question for linux-media community, I've seen this pattern
> a couple of times - should or could we consider a way to factor out a
> passthrough device which doesn't modify the stream(s) formats and is
> simply representing almost a connector type ?
The CVS in fact does have a CSI-2 receiver and a transmitter so I think it
should have its own sub-device. I understand some implementations also need
to have this configuration in order to operate and there's the privacy
control, too.
--
Regards,
Sakari Ailus
next prev parent reply other threads:[~2026-05-07 7:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 22:30 [PATCH 0/2] media: i2c: cvs: Add driver of Intel Computer Vision Sensing Controller(CVS) Miguel Vadillo
2026-05-05 22:30 ` [PATCH 1/2] " Miguel Vadillo
2026-05-06 8:38 ` Kieran Bingham
2026-05-06 21:34 ` Vadillo, Miguel
2026-05-07 7:24 ` Sakari Ailus [this message]
2026-05-05 22:30 ` [PATCH 2/2] media: pci: intel: Add CVS support for IPU bridge driver Miguel Vadillo
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=afw-ENbyknoFCLoE@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=antti.laakso@linux.intel.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=miguel.vadillo@intel.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