diff mbox series

[v2,4/5] staging: media: starfive: Introduce streaming for ISP subdev

Message ID 20240718032834.53876-5-changhuang.liang@starfivetech.com (mailing list archive)
State New
Headers show
Series Add StarFive Camera Subsystem hibernation support | expand

Commit Message

Changhuang Liang July 18, 2024, 3:28 a.m. UTC
Use "streaming" to indicate whether the ISP is in the streaming state.

Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
---
 drivers/staging/media/starfive/camss/stf-isp.c | 6 +++++-
 drivers/staging/media/starfive/camss/stf-isp.h | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/staging/media/starfive/camss/stf-isp.c b/drivers/staging/media/starfive/camss/stf-isp.c
index 8c6388edf049..d71b95ebd3d3 100644
--- a/drivers/staging/media/starfive/camss/stf-isp.c
+++ b/drivers/staging/media/starfive/camss/stf-isp.c
@@ -77,8 +77,12 @@  static int isp_set_stream(struct v4l2_subdev *sd, int enable)
 
 	sd_state = v4l2_subdev_lock_and_get_active_state(sd);
 
-	if (enable)
+	if (enable) {
+		isp_dev->streaming = true;
 		stf_isp_stream_on(isp_dev, sd_state);
+	} else {
+		isp_dev->streaming = false;
+	}
 
 	v4l2_subdev_call(isp_dev->source_subdev, video, s_stream, enable);
 
diff --git a/drivers/staging/media/starfive/camss/stf-isp.h b/drivers/staging/media/starfive/camss/stf-isp.h
index 1a3e8cf7859c..85ca1c210639 100644
--- a/drivers/staging/media/starfive/camss/stf-isp.h
+++ b/drivers/staging/media/starfive/camss/stf-isp.h
@@ -414,6 +414,7 @@  struct stf_isp_dev {
 	unsigned int nformats;
 	struct v4l2_subdev *source_subdev;
 	const struct stf_isp_format *current_fmt;
+	bool streaming;
 };
 
 int stf_isp_reset(struct stf_isp_dev *isp_dev);