[PATCH 15/74] media: qcom: camss: csid: Configure the stream on every s_stream
From: bod
Date: Mon Oct 05 2026 - 13:24:25 EST
From: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
csid_set_stream() only calls configure_stream() when need_vc_update is
set, and need_vc_update is only set at power on and on a CSID link
change. Stopping and restarting a stream while the pipeline stays
powered, as userspace does when it keeps the video node open across
STREAMOFF and STREAMON, therefore breaks the CSID in two ways:
- STREAMOFF does not stop the CSID: the paths it enabled keep running
after the VFE has stopped.
- The following STREAMON does not configure the CSID: a format set
between the two streams is never programmed, and the CSID runs with
the previous stream's configuration.
need_vc_update was added so that several video nodes streaming through
one CSID would configure it only once. Its counterpart in
video_stop_streaming() was removed by commit 25f18cb1b673 ("media: qcom:
camss: Remove use_count guard in stop_streaming"). Drop the rest of it and
configure the stream on every s_stream.
Fixes: 3c4ed72a16bc ("media: camss: sm8250: Virtual channels for CSID")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
---
drivers/media/platform/qcom/camss/camss-csid.c | 9 +--------
drivers/media/platform/qcom/camss/camss-csid.h | 1 -
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c
index 48459b46a981b..645e02ad6b9b1 100644
--- a/drivers/media/platform/qcom/camss/camss-csid.c
+++ b/drivers/media/platform/qcom/camss/camss-csid.c
@@ -721,8 +721,6 @@ static int csid_set_power(struct v4l2_subdev *sd, int on)
return ret;
}
- csid->phy.need_vc_update = true;
-
enable_irq(csid->irq);
ret = csid->res->hw_ops->reset(csid);
@@ -777,10 +775,7 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable)
return -ENOLINK;
}
- if (csid->phy.need_vc_update) {
- csid->res->hw_ops->configure_stream(csid, enable);
- csid->phy.need_vc_update = false;
- }
+ csid->res->hw_ops->configure_stream(csid, enable);
return 0;
}
@@ -1306,8 +1301,6 @@ static int csid_link_setup(struct media_entity *entity,
else
csid->phy.en_vc &= ~BIT(local->index - 1);
- csid->phy.need_vc_update = true;
-
dev_dbg(dev, "%s: Enabled CSID virtual channels mask 0x%x\n",
__func__, csid->phy.en_vc);
}
diff --git a/drivers/media/platform/qcom/camss/camss-csid.h b/drivers/media/platform/qcom/camss/camss-csid.h
index 5296b10f6bac8..53f43ae7b9327 100644
--- a/drivers/media/platform/qcom/camss/camss-csid.h
+++ b/drivers/media/platform/qcom/camss/camss-csid.h
@@ -69,7 +69,6 @@ struct csid_phy_config {
u8 lane_cnt;
u32 lane_assign;
u32 en_vc;
- u8 need_vc_update;
};
struct csid_device;
--
2.55.0