From: Cosmin Tanislav <demonsingur@gmail.com>
Cc: "Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Julien Massot" <julien.massot@collabora.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.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>,
"Cosmin Tanislav" <demonsingur@gmail.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: [PATCH v2 2/3] media: use v4l2_subdev_routing_xlate_streams()
Date: Thu, 20 Feb 2025 11:20:34 +0200 [thread overview]
Message-ID: <20250220092036.6757-3-demonsingur@gmail.com> (raw)
In-Reply-To: <20250220092036.6757-1-demonsingur@gmail.com>
Replace current usages of v4l2_subdev_state_xlate_streams() with
v4l2_subdev_routing_xlate_streams() in preperations for the removal of
v4l2_subdev_state_xlate_streams().
Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
---
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 +-
6 files changed, 45 insertions(+), 38 deletions(-)
diff --git a/drivers/media/i2c/ds90ub913.c b/drivers/media/i2c/ds90ub913.c
index fd2d2d5272bfb..b8dfcf730baa2 100644
--- a/drivers/media/i2c/ds90ub913.c
+++ b/drivers/media/i2c/ds90ub913.c
@@ -252,9 +252,10 @@ static int ub913_enable_streams(struct v4l2_subdev *sd,
u64 sink_streams;
int ret;
- sink_streams = v4l2_subdev_state_xlate_streams(state, UB913_PAD_SOURCE,
- UB913_PAD_SINK,
- &streams_mask);
+ sink_streams = v4l2_subdev_routing_xlate_streams(&state->routing,
+ UB913_PAD_SOURCE,
+ UB913_PAD_SINK,
+ &streams_mask);
ret = v4l2_subdev_enable_streams(priv->source_sd, priv->source_sd_pad,
sink_streams);
@@ -274,9 +275,10 @@ static int ub913_disable_streams(struct v4l2_subdev *sd,
u64 sink_streams;
int ret;
- sink_streams = v4l2_subdev_state_xlate_streams(state, UB913_PAD_SOURCE,
- UB913_PAD_SINK,
- &streams_mask);
+ sink_streams = v4l2_subdev_routing_xlate_streams(&state->routing,
+ UB913_PAD_SOURCE,
+ UB913_PAD_SINK,
+ &streams_mask);
ret = v4l2_subdev_disable_streams(priv->source_sd, priv->source_sd_pad,
sink_streams);
diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c
index 46569381b332d..c239ede968423 100644
--- a/drivers/media/i2c/ds90ub953.c
+++ b/drivers/media/i2c/ds90ub953.c
@@ -683,9 +683,10 @@ static int ub953_enable_streams(struct v4l2_subdev *sd,
u64 sink_streams;
int ret;
- sink_streams = v4l2_subdev_state_xlate_streams(state, UB953_PAD_SOURCE,
- UB953_PAD_SINK,
- &streams_mask);
+ sink_streams = v4l2_subdev_routing_xlate_streams(&state->routing,
+ UB953_PAD_SOURCE,
+ UB953_PAD_SINK,
+ &streams_mask);
ret = v4l2_subdev_enable_streams(priv->source_sd, priv->source_sd_pad,
sink_streams);
@@ -705,9 +706,10 @@ static int ub953_disable_streams(struct v4l2_subdev *sd,
u64 sink_streams;
int ret;
- sink_streams = v4l2_subdev_state_xlate_streams(state, UB953_PAD_SOURCE,
- UB953_PAD_SINK,
- &streams_mask);
+ sink_streams = v4l2_subdev_routing_xlate_streams(&state->routing,
+ UB953_PAD_SOURCE,
+ UB953_PAD_SINK,
+ &streams_mask);
ret = v4l2_subdev_disable_streams(priv->source_sd, priv->source_sd_pad,
sink_streams);
diff --git a/drivers/media/i2c/max96714.c b/drivers/media/i2c/max96714.c
index 159753b13777c..c982bca708ff5 100644
--- a/drivers/media/i2c/max96714.c
+++ b/drivers/media/i2c/max96714.c
@@ -272,10 +272,10 @@ static int max96714_enable_streams(struct v4l2_subdev *sd,
}
sink_streams =
- v4l2_subdev_state_xlate_streams(state,
- MAX96714_PAD_SOURCE,
- MAX96714_PAD_SINK,
- &streams_mask);
+ v4l2_subdev_routing_xlate_streams(&state->routing,
+ MAX96714_PAD_SOURCE,
+ MAX96714_PAD_SINK,
+ &streams_mask);
ret = v4l2_subdev_enable_streams(priv->rxport.source.sd,
priv->rxport.source.pad,
@@ -306,10 +306,10 @@ static int max96714_disable_streams(struct v4l2_subdev *sd,
int ret;
sink_streams =
- v4l2_subdev_state_xlate_streams(state,
- MAX96714_PAD_SOURCE,
- MAX96714_PAD_SINK,
- &streams_mask);
+ v4l2_subdev_routing_xlate_streams(&state->routing,
+ MAX96714_PAD_SOURCE,
+ MAX96714_PAD_SINK,
+ &streams_mask);
ret = v4l2_subdev_disable_streams(priv->rxport.source.sd,
priv->rxport.source.pad,
diff --git a/drivers/media/i2c/max96717.c b/drivers/media/i2c/max96717.c
index 9259d58ba734e..e18b07b3259c1 100644
--- a/drivers/media/i2c/max96717.c
+++ b/drivers/media/i2c/max96717.c
@@ -446,9 +446,10 @@ static int max96717_set_fmt(struct v4l2_subdev *sd,
stream_source_mask = BIT(format->stream);
- return v4l2_subdev_state_xlate_streams(state, MAX96717_PAD_SOURCE,
- MAX96717_PAD_SINK,
- &stream_source_mask);
+ return v4l2_subdev_routing_xlate_streams(&state->routing,
+ MAX96717_PAD_SOURCE,
+ MAX96717_PAD_SINK,
+ &stream_source_mask);
}
static int max96717_init_state(struct v4l2_subdev *sd,
@@ -508,10 +509,10 @@ static int max96717_enable_streams(struct v4l2_subdev *sd,
if (!priv->pattern) {
sink_streams =
- v4l2_subdev_state_xlate_streams(state,
- MAX96717_PAD_SOURCE,
- MAX96717_PAD_SINK,
- &streams_mask);
+ v4l2_subdev_routing_xlate_streams(&state->routing,
+ MAX96717_PAD_SOURCE,
+ MAX96717_PAD_SINK,
+ &streams_mask);
ret = v4l2_subdev_enable_streams(priv->source_sd,
priv->source_sd_pad,
@@ -551,10 +552,10 @@ static int max96717_disable_streams(struct v4l2_subdev *sd,
int ret;
sink_streams =
- v4l2_subdev_state_xlate_streams(state,
- MAX96717_PAD_SOURCE,
- MAX96717_PAD_SINK,
- &streams_mask);
+ v4l2_subdev_routing_xlate_streams(&state->routing,
+ MAX96717_PAD_SOURCE,
+ MAX96717_PAD_SINK,
+ &streams_mask);
ret = v4l2_subdev_disable_streams(priv->source_sd,
priv->source_sd_pad,
diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
index da8581a37e220..31fcf1695cb7c 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
@@ -354,9 +354,10 @@ static int ipu6_isys_csi2_enable_streams(struct v4l2_subdev *sd,
remote_pad = media_pad_remote_pad_first(&sd->entity.pads[CSI2_PAD_SINK]);
remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);
- sink_streams = v4l2_subdev_state_xlate_streams(state, CSI2_PAD_SRC,
- CSI2_PAD_SINK,
- &streams_mask);
+ sink_streams = v4l2_subdev_routing_xlate_streams(&state->routing,
+ CSI2_PAD_SRC,
+ CSI2_PAD_SINK,
+ &streams_mask);
ret = ipu6_isys_csi2_calc_timing(csi2, &timing, CSI2_ACCINV);
if (ret)
@@ -384,9 +385,10 @@ static int ipu6_isys_csi2_disable_streams(struct v4l2_subdev *sd,
struct media_pad *remote_pad;
u64 sink_streams;
- sink_streams = v4l2_subdev_state_xlate_streams(state, CSI2_PAD_SRC,
- CSI2_PAD_SINK,
- &streams_mask);
+ sink_streams = v4l2_subdev_routing_xlate_streams(&state->routing,
+ CSI2_PAD_SRC,
+ CSI2_PAD_SINK,
+ &streams_mask);
remote_pad = media_pad_remote_pad_first(&sd->entity.pads[CSI2_PAD_SINK]);
remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
index 93a55c97cd173..8f61145435e32 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
@@ -141,7 +141,7 @@ mxc_isi_crossbar_xlate_streams(struct mxc_isi_crossbar *xbar,
* routing table are guaranteed to have the same sink pad.
*
* TODO: This is likely worth a helper function, it could perhaps be
- * supported by v4l2_subdev_state_xlate_streams() with pad1 set to -1.
+ * supported by v4l2_subdev_routing_xlate_streams() with pad1 set to -1.
*/
for_each_active_route(&state->routing, route) {
if (route->source_pad != source_pad ||
--
2.48.1
next prev parent reply other threads:[~2025-02-20 9:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 9:20 [PATCH v2 0/3] media: add v4l2_subdev_state_xlate_streams() 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 ` Cosmin Tanislav [this message]
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
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=20250220092036.6757-3-demonsingur@gmail.com \
--to=demonsingur@gmail.com \
--cc=bingbu.cao@intel.com \
--cc=festevam@gmail.com \
--cc=hverkuil@xs4all.nl \
--cc=imx@lists.linux.dev \
--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=sakari.ailus@linux.intel.com \
--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