From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: kieran.bingham@ideasonboard.com
Cc: linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-renesas-soc@vger.kernel.org,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Jacopo Mondi <jacopo+renesas@jmondi.org>,
Benoit Parrot <bparrot@ti.com>,
Maxime Ripard <maxime.ripard@free-electrons.com>
Subject: Re: [PATCH/RFC v2 09/15] adv748x: csi2: add module param for virtual channel
Date: Mon, 18 Dec 2017 23:44:48 +0100 [thread overview]
Message-ID: <20171218224448.GC32148@bigcity.dyn.berto.se> (raw)
In-Reply-To: <9eca77d9-641e-ed01-9f2a-0013aa6540d9@ideasonboard.com>
Hi Kieran,
Thanks for your comments.
On 2017-12-14 22:19:59 +0000, Kieran Bingham wrote:
> Hi Niklas,
>
> On 14/12/17 19:08, Niklas Söderlund wrote:
> > The hardware can output on any of the 4 (0-3) Virtual Channels of the
> > CSI-2 bus. Add a module parameter each for TXA and TXB to allow the user
> > to specify which channel should be used.
>
> This patch only configures the channel at initialisation time, (which is a valid
> thing to do here at the moment I think) - but will we expect to provide
> functionality to change the virtual channel later ?
I had no plan to add such functionality. But I would be open to
suggesters on where to add such a control. I thought about this when
working with this patch-set and I can think of three other places to
control this.
1. A debugfs file
2. A configfs file
3. Define 4 streams in the frame descriptor for the source pad, one for
each CSI-2 VC. Then use the new G/S_ROUTE ioctls to control which
stream of the source the sink is connected to.
I thought option 1 and 2 was not the correct place for such a control.
And option 3 would make the control of the VC output depending on this
patch-set and all its dependencies. And since my use-case for this was
patch is to test this patch-set it seemed silly at the time :-) But the
more I think of this might be the best way forward for this type of
things, what do you think?
>
> Do we need to communicate the virtual channel in use across the media pad links
> somehow? (or does that already happen?)
Yes, this is part of this patch-set and its dependencies. The frame
descriptor contains information about stream to CSI-2 virtual channel
(and data type) mapping. While the G/S_ROUTE operations contains the
controls and information on which stream of a multiplexed pad is routed
to which 'normal' pad.
>
> Perhaps the commit message could be clear on the fact that this only sets the
> channels initialisation value - and that modifying the module parameter after
> module load will have no effect?
Is this not true for all module parameters, they only have an effect at
module load time? Can you even modify them after module load?
>
> Regards
>
> Kieran
>
>
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> >
> > ---
> > drivers/media/i2c/adv748x/adv748x-core.c | 10 ++++++++++
> > drivers/media/i2c/adv748x/adv748x-csi2.c | 2 +-
> > drivers/media/i2c/adv748x/adv748x.h | 1 +
> > 3 files changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
> > index fd92c9e4b519d2c5..3cad52532ead2e34 100644
> > --- a/drivers/media/i2c/adv748x/adv748x-core.c
> > +++ b/drivers/media/i2c/adv748x/adv748x-core.c
> > @@ -31,6 +31,9 @@
> >
> > #include "adv748x.h"
> >
> > +static unsigned int txavc;
> > +static unsigned int txbvc;
> > +
> > /* -----------------------------------------------------------------------------
> > * Register manipulation
> > */
> > @@ -747,6 +750,7 @@ static int adv748x_probe(struct i2c_client *client,
> > }
> >
> > /* Initialise TXA */
> > + state->txa.vc = txavc;
> > ret = adv748x_csi2_init(state, &state->txa);
> > if (ret) {
> > adv_err(state, "Failed to probe TXA");
> > @@ -754,6 +758,7 @@ static int adv748x_probe(struct i2c_client *client,
> > }
> >
> > /* Initialise TXB */
> > + state->txb.vc = txbvc;
> > ret = adv748x_csi2_init(state, &state->txb);
> > if (ret) {
> > adv_err(state, "Failed to probe TXB");
> > @@ -824,6 +829,11 @@ static struct i2c_driver adv748x_driver = {
> >
> > module_i2c_driver(adv748x_driver);
> >
> > +module_param(txavc, uint, 0644);
> > +MODULE_PARM_DESC(txavc, "Virtual Channel for TXA");
> > +module_param(txbvc, uint, 0644);
> > +MODULE_PARM_DESC(txbvc, "Virtual Channel for TXB");
> > +
> > MODULE_AUTHOR("Kieran Bingham <kieran.bingham@ideasonboard.com>");
> > MODULE_DESCRIPTION("ADV748X video decoder");
> > MODULE_LICENSE("GPL v2");
> > diff --git a/drivers/media/i2c/adv748x/adv748x-csi2.c b/drivers/media/i2c/adv748x/adv748x-csi2.c
> > index 820b44ed56a8679f..2a5dff8c571013bf 100644
> > --- a/drivers/media/i2c/adv748x/adv748x-csi2.c
> > +++ b/drivers/media/i2c/adv748x/adv748x-csi2.c
> > @@ -281,7 +281,7 @@ int adv748x_csi2_init(struct adv748x_state *state, struct adv748x_csi2 *tx)
> > }
> >
> > /* Initialise the virtual channel */
> > - adv748x_csi2_set_virtual_channel(tx, 0);
> > + adv748x_csi2_set_virtual_channel(tx, tx->vc);
> >
> > adv748x_subdev_init(&tx->sd, state, &adv748x_csi2_ops,
> > MEDIA_ENT_F_UNKNOWN,
> > diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h
> > index 6789e2f3bc8c2b49..f6e40ee3924e8f12 100644
> > --- a/drivers/media/i2c/adv748x/adv748x.h
> > +++ b/drivers/media/i2c/adv748x/adv748x.h
> > @@ -92,6 +92,7 @@ enum adv748x_csi2_pads {
> >
> > struct adv748x_csi2 {
> > struct adv748x_state *state;
> > + unsigned int vc;
> > struct v4l2_mbus_framefmt format;
> > unsigned int page;
> >
> >
--
Regards,
Niklas Söderlund
next prev parent reply other threads:[~2017-12-18 22:44 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 19:08 [PATCH/RFC v2 00/15] Add multiplexed pad streaming support Niklas Söderlund
2017-12-14 19:08 ` [PATCH/RFC v2 01/15] v4l2-subdev.h: add pad and stream aware s_stream Niklas Söderlund
2017-12-15 11:51 ` Sakari Ailus
2017-12-18 23:06 ` Niklas Söderlund
2017-12-14 19:08 ` [PATCH/RFC v2 02/15] rcar-vin: use pad as the starting point for a pipeline Niklas Söderlund
2017-12-15 11:54 ` Sakari Ailus
2017-12-18 23:08 ` Niklas Söderlund
2017-12-27 15:28 ` Sakari Ailus
2017-12-14 19:08 ` [PATCH/RFC v2 03/15] rcar-vin: use the pad and stream aware s_stream Niklas Söderlund
2017-12-15 12:07 ` Sakari Ailus
2017-12-18 23:24 ` Niklas Söderlund
2017-12-14 19:08 ` [PATCH/RFC v2 04/15] rcar-csi2: switch to " Niklas Söderlund
2017-12-14 19:08 ` [PATCH/RFC v2 05/15] rcar-csi2: count usage for each source pad Niklas Söderlund
2017-12-15 12:25 ` Sakari Ailus
2017-12-18 23:38 ` Niklas Söderlund
2017-12-29 11:23 ` Sakari Ailus
2017-12-14 19:08 ` [PATCH/RFC v2 06/15] rcar-csi2: use frame description information when propagating .s_stream() Niklas Söderlund
2017-12-15 13:19 ` Sakari Ailus
2017-12-18 23:59 ` Niklas Söderlund
2017-12-14 19:08 ` [PATCH/RFC v2 07/15] rcar-csi2: use frame description information to configure CSI-2 bus Niklas Söderlund
2017-12-15 14:15 ` jacopo mondi
2017-12-19 0:05 ` Niklas Söderlund
2017-12-14 19:08 ` [PATCH/RFC v2 08/15] rcar-csi2: add get_routing support Niklas Söderlund
2017-12-14 19:08 ` [PATCH/RFC v2 09/15] adv748x: csi2: add module param for virtual channel Niklas Söderlund
2017-12-14 22:19 ` Kieran Bingham
2017-12-18 22:44 ` Niklas Söderlund [this message]
2017-12-14 19:08 ` [PATCH/RFC v2 10/15] adv748x: csi2: add translation from pixelcode to CSI-2 datatype Niklas Söderlund
2017-12-14 22:25 ` Kieran Bingham
2017-12-15 14:37 ` jacopo mondi
2017-12-14 19:08 ` [PATCH/RFC v2 11/15] adv748x: csi2: implement get_frame_desc Niklas Söderlund
2017-12-14 19:08 ` [PATCH/RFC v2 12/15] adv748x: csi2: switch to pad and stream aware s_stream Niklas Söderlund
2017-12-14 23:12 ` Kieran Bingham
2017-12-14 19:08 ` [PATCH/RFC v2 13/15] adv748x: csi2: only allow formats on sink pads Niklas Söderlund
2017-12-14 23:16 ` Kieran Bingham
2017-12-18 22:25 ` Niklas Söderlund
2017-12-14 19:08 ` [PATCH/RFC v2 14/15] adv748x: csi2: add get_routing support Niklas Söderlund
2017-12-14 23:27 ` Kieran Bingham
2017-12-18 22:58 ` Niklas Söderlund
2017-12-14 19:08 ` [PATCH/RFC v2 15/15] adv748x: afe: add routing support Niklas Söderlund
2017-12-14 22:56 ` Kieran Bingham
2017-12-14 22:59 ` Kieran Bingham
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=20171218224448.GC32148@bigcity.dyn.berto.se \
--to=niklas.soderlund@ragnatech.se \
--cc=bparrot@ti.com \
--cc=jacopo+renesas@jmondi.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=sakari.ailus@linux.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