Re: [PATCH 1/8] media: qcom: camss: Add streams API support for CSIPHY
From: Bryan O'Donoghue
Date: Sun Oct 11 2026 - 18:40:08 EST
On 11/09/2026 07:22, Gjorgji.Rosikopulos.gjorgji.rosikopulos@xxxxxxxxxxxxxxxx wrote:
From: Gjorgji Rosikopulos <gjorgji.rosikopulos@xxxxxxxxxxxxxxxx>+ static const struct v4l2_subdev_core_ops csiphy_core_ops = {
Add the V4L2 subdev streams API to the CSIPHY driver: a passthrough
routing table (one VC per stream) and NO_STREAM_MIX routing validation.
enable/disable_streams pad ops track active streams per pad via a
per-pad enabled_streams[] bitmask, so that multiple source-pad
consumers can share a single propagated sink stream without redundant
or colliding propagation to the sensor. The shared D-PHY lanes are
enabled once, on the transition from no active streams to at least
one, and disabled once all streams have gone idle.
This is opt-in per CSIPHY instance via the new streams_enable resource
flag; no platform sets it yet, so CSIPHYs continue to use the legacy
non-streams subdev ops unchanged.
Signed-off-by: Gjorgji Rosikopulos <gjorgji.rosikopulos@xxxxxxxxxxxxxxxx>
+ .s_power = csiphy_set_power,
++>>>>>>> media: qcom: camss: Add streams API support for CSIPHY
};
static const struct v4l2_subdev_video_ops csiphy_video_ops = {
@@@ -932,17 -981,17 +1133,30 @@@ int msm_csiphy_register_entity(struct c
{
struct v4l2_subdev *sd = &csiphy->subdev;
struct media_pad *pads = csiphy->pads;
++<<<<<<< HEAD
+ struct camss *camss = csiphy->camss;
+ struct device *dev = camss->dev;
+ int ret;
+
+ if (camss->legacy_phy)
+ v4l2_subdev_init(sd, &csiphy_v4l2_ops_legacy);
+ else
+ v4l2_subdev_init(sd, &csiphy_v4l2_ops);
+
+ sd->internal_ops = &csiphy_v4l2_internal_ops;
++=======
+ struct device *dev = csiphy->camss->dev;
+ bool streams_api = csiphy->res->streams_enable;
+ int ret;
+
+ v4l2_subdev_init(sd, streams_api ? &csiphy_streams_v4l2_ops
+ : &csiphy_v4l2_ops);
+ sd->internal_ops = streams_api ? &csiphy_streams_internal_ops
+ : &csiphy_v4l2_internal_ops;
++>>>>>>> media: qcom: camss: Add streams API support for CSIPHY
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
+ if (streams_api)
+ sd->flags |= V4L2_SUBDEV_FL_STREAMS;
snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d",
MSM_CSIPHY_NAME, csiphy->id);
sd->grp_id = CSIPHY_GRP_ID;
@@@ -968,22 -1025,16 +1190,35 @@@
ret = v4l2_device_register_subdev(v4l2_dev, sd);
if (ret < 0) {
dev_err(dev, "Failed to register subdev: %d\n", ret);
++<<<<<<< HEAD
+ goto media_entity_err;
+ }
+
+ if (!IS_ERR(csiphy->phy)) {
+ ret = phy_init(csiphy->phy);
+ if (ret) {
+ dev_err(dev, "%s init fail %d\n", csiphy->name, ret);
+ v4l2_device_unregister_subdev(sd);
+ goto media_entity_err;
+ }
+ }
+
+ return 0;
+
+media_entity_err:
+ media_entity_cleanup(&sd->entity);
++=======
+ goto err_v4l2_subdev_cleanup;
+ }
+
+ return 0;
+
+ err_v4l2_subdev_cleanup:
+ v4l2_subdev_cleanup(sd);
+ err_media_entity_cleanup:
+ media_entity_cleanup(&sd->entity);
+
++>>>>>>> media: qcom: camss: Add streams API support for CSIPHY