mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Cosmin Tanislav <demonsingur@gmail.com>
Cc: "Jacopo Mondi" <jacopo.mondi@ideasonboard.com>,
	"Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Julien Massot" <julien.massot@collabora.com>,
	"Bingbu Cao" <bingbu.cao@intel.com>,
	"Tianshu Qiu" <tian.shu.qiu@intel.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Hans Verkuil" <hverkuil@xs4all.nl>,
	"Umang Jain" <umang.jain@ideasonboard.com>,
	"Paweł Anikiel" <panikiel@google.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 0/3] media: add v4l2_subdev_state_xlate_streams()
Date: Thu, 20 Feb 2025 14:16:51 +0000	[thread overview]
Message-ID: <Z7c5U6u5rr0-X0aK@kekkonen.localdomain> (raw)
In-Reply-To: <c94580f0-3ab0-4a19-a996-9bb37e23dd39@gmail.com>

Hi Cosmin,

On Thu, Feb 20, 2025 at 03:01:41PM +0200, Cosmin Tanislav wrote:
> 
> 
> On 2/20/25 1:38 PM, Jacopo Mondi wrote:
> > Hi Cosmin
> > 
> > On Thu, Feb 20, 2025 at 11:20:32AM +0200, Cosmin Tanislav wrote:
> > > Currently, the v4l2_subdev_state_xlate_streams() function is used
> > > to translate streams from one pad to another.
> > > This function takes the entire subdev state as argument, but only makes
> > > use of the routing.
> > 
> > Correct, but is this a problem ?
> > 
> 
> No, it's not a problem.

I think I have a slight preference to keep the pattern of referring to the
state as other functions do.

I wonder what Laurent and Hans think, too.

> 
> > Is this the first step for a larger rework or is this a drive-by
> > beautification ?
> > 
> 
> Mostly a drive-by beautification to avoid passing the whole state around
> where we only need the routing. I'm planning to submit drivers for more
> GMSL2/3 chips and we're using this just to not pass the whole state
> around. I think I can just use v4l2_subdev_state_xlate_streams(),
> but I had these patches in my tree and it would have been good to get
> them upstream, in preparations for submitting the GMSL2/3 drivers.
> 
> > I'm asking because (and I know it's hard to strike a balance) this
> > kind of changes tend to make back-porting a more painful, and if
> > only justified by "it looks better" I would be a bit hesitant in
> > taking them.
> > 
> > 
> > > 
> > > Introduce a v4l2_subdev_routing_xlate_streams() function which can be
> > > used without the entire subdev state, to avoid passing the entire state
> > > around when not needed.
> > > 
> > > Convert all usages of v4l2_subdev_state_xlate_streams() to
> > > v4l2_subdev_routing_xlate_streams().
> > > 
> > > Remove v4l2_subdev_state_xlate_streams().
> > > 
> > > V2:
> > >    * Fix description of parameters
> > > 
> > > Cosmin Tanislav (3):
> > >    media: v4l: subdev: add v4l2_subdev_routing_xlate_streams()
> > >    media: use v4l2_subdev_routing_xlate_streams()
> > >    media: v4l: subdev: remove v4l2_subdev_state_xlate_streams()
> > > 
> > >   drivers/media/i2c/ds90ub913.c                 | 14 ++++++-----
> > >   drivers/media/i2c/ds90ub953.c                 | 14 ++++++-----
> > >   drivers/media/i2c/max96714.c                  | 16 ++++++-------
> > >   drivers/media/i2c/max96717.c                  | 23 ++++++++++---------
> > >   drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c | 14 ++++++-----
> > >   .../platform/nxp/imx8-isi/imx8-isi-crossbar.c |  2 +-
> > >   drivers/media/v4l2-core/v4l2-subdev.c         |  7 +++---
> > >   include/media/v4l2-subdev.h                   | 10 ++++----
> > >   8 files changed, 53 insertions(+), 47 deletions(-)
> > > 
> > > --
> > > 2.48.1
> > > 
> > > 
> 

-- 
Regards,

Sakari Ailus

  reply	other threads:[~2025-02-20 14:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20  9:20 Cosmin Tanislav
2025-02-20  9:20 ` [PATCH v2 1/3] media: v4l: subdev: add v4l2_subdev_routing_xlate_streams() Cosmin Tanislav
2025-02-20  9:20 ` [PATCH v2 2/3] media: use v4l2_subdev_routing_xlate_streams() Cosmin Tanislav
2025-02-20  9:20 ` [PATCH v2 3/3] media: v4l: subdev: remove v4l2_subdev_state_xlate_streams() Cosmin Tanislav
2025-02-20 11:38 ` [PATCH v2 0/3] media: add v4l2_subdev_state_xlate_streams() Jacopo Mondi
2025-02-20 13:01   ` Cosmin Tanislav
2025-02-20 14:16     ` Sakari Ailus [this message]
2025-02-20 14:39       ` Laurent Pinchart
2025-02-20 16:53         ` Cosmin Tanislav

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=Z7c5U6u5rr0-X0aK@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=demonsingur@gmail.com \
    --cc=festevam@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=imx@lists.linux.dev \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=julien.massot@collabora.com \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=panikiel@google.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tian.shu.qiu@intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=umang.jain@ideasonboard.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

all inboxes | Powered by JetHome®