Linux kernel staging patches
 help / color / mirror / Atom feed
From: Changhuang Liang <changhuang.liang@starfivetech.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Maxime Ripard <mripard@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>,
	Jack Zhu <jack.zhu@starfivetech.com>,
	Keith Zhao <keith.zhao@starfivetech.com>,
	Changhuang Liang <changhuang.liang@starfivetech.com>,
	Jayshri Pawar <jpawar@cadence.com>, Jai Luthra <j-luthra@ti.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: [PATCH v2 4/5] staging: media: starfive: Introduce streaming for ISP subdev
Date: Wed, 17 Jul 2024 20:28:33 -0700	[thread overview]
Message-ID: <20240718032834.53876-5-changhuang.liang@starfivetech.com> (raw)
In-Reply-To: <20240718032834.53876-1-changhuang.liang@starfivetech.com>

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 --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);
-- 
2.25.1


  parent reply	other threads:[~2024-07-18  5:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18  3:28 [PATCH v2 0/5] Add StarFive Camera Subsystem hibernation support Changhuang Liang
2024-07-18  3:28 ` [PATCH v2 1/5] media: cadence: csi2rx: Support runtime PM Changhuang Liang
2024-07-18 14:24   ` Jacopo Mondi
2024-07-18 14:53   ` kernel test robot
2024-07-18  3:28 ` [PATCH v2 2/5] media: cadence: csi2rx: Add system PM support Changhuang Liang
2024-07-18 14:31   ` Jacopo Mondi
2024-07-19 10:28   ` Tomi Valkeinen
2024-07-22  2:17     ` 回复: " Changhuang Liang
2024-07-22  8:53       ` Tomi Valkeinen
2024-07-22 11:25         ` Laurent Pinchart
2024-07-18  3:28 ` [PATCH v2 3/5] staging: media: starfive: Extract the ISP stream on as a helper function Changhuang Liang
2024-07-18  3:28 ` Changhuang Liang [this message]
2024-07-18  3:28 ` [PATCH v2 5/5] staging: media: starfive: Add system PM support Changhuang Liang
2024-07-18 14:55   ` Jacopo Mondi
2024-07-19  2:08     ` 回复: " Changhuang Liang
2024-07-22  8:57       ` Jacopo Mondi
2024-07-22  9:25         ` 回复: " Changhuang Liang

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=20240718032834.53876-5-changhuang.liang@starfivetech.com \
    --to=changhuang.liang@starfivetech.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=j-luthra@ti.com \
    --cc=jack.zhu@starfivetech.com \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=jpawar@cadence.com \
    --cc=keith.zhao@starfivetech.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=tomi.valkeinen+renesas@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