From: Changhuang Liang <changhuang.liang@starfivetech.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Jack Zhu <jack.zhu@starfivetech.com>,
Changhuang Liang <changhuang.liang@starfivetech.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: [PATCH v2 7/8] staging: media: starfive: Move the struct media_pipeline position
Date: Wed, 10 Apr 2024 02:10:25 -0700 [thread overview]
Message-ID: <20240410091026.50272-8-changhuang.liang@starfivetech.com> (raw)
In-Reply-To: <20240410091026.50272-1-changhuang.liang@starfivetech.com>
Different video capture devices have different media pipeline. The
media pipeline cannot be shared between the "struct stfcamss". Move
it into "struct stfcamss_video" so that each video capture device
has its own independent media pipeline.
Fixes: bba185d141b1 ("media: staging: media: starfive: camss: Add core driver")
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
---
drivers/staging/media/starfive/camss/stf-camss.h | 1 -
drivers/staging/media/starfive/camss/stf-video.c | 2 +-
drivers/staging/media/starfive/camss/stf-video.h | 1 +
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/starfive/camss/stf-camss.h b/drivers/staging/media/starfive/camss/stf-camss.h
index 6b9215c92cfa..5fbac7e97eaf 100644
--- a/drivers/staging/media/starfive/camss/stf-camss.h
+++ b/drivers/staging/media/starfive/camss/stf-camss.h
@@ -52,7 +52,6 @@ struct stf_isr_data {
struct stfcamss {
struct v4l2_device v4l2_dev;
struct media_device media_dev;
- struct media_pipeline pipe;
struct device *dev;
struct stf_isp_dev isp_dev;
unsigned int isp_stream;
diff --git a/drivers/staging/media/starfive/camss/stf-video.c b/drivers/staging/media/starfive/camss/stf-video.c
index 69e3e4f9e56b..61d9d42fc5a0 100644
--- a/drivers/staging/media/starfive/camss/stf-video.c
+++ b/drivers/staging/media/starfive/camss/stf-video.c
@@ -280,7 +280,7 @@ static int video_start_streaming(struct vb2_queue *q, unsigned int count)
struct video_device *vdev = &video->vdev;
int ret;
- ret = video_device_pipeline_start(vdev, &video->stfcamss->pipe);
+ ret = video_device_pipeline_start(vdev, &video->pipe);
if (ret < 0) {
dev_err(video->stfcamss->dev,
"Failed to media_pipeline_start: %d\n", ret);
diff --git a/drivers/staging/media/starfive/camss/stf-video.h b/drivers/staging/media/starfive/camss/stf-video.h
index ea7ec92c3ff5..0699c1716c2f 100644
--- a/drivers/staging/media/starfive/camss/stf-video.h
+++ b/drivers/staging/media/starfive/camss/stf-video.h
@@ -68,6 +68,7 @@ struct stfcamss_video {
struct vb2_queue vb2_q;
struct video_device vdev;
struct media_pad pad;
+ struct media_pipeline pipe;
struct v4l2_format active_fmt;
enum v4l2_buf_type type;
const struct stfcamss_video_ops *ops;
--
2.25.1
next prev parent reply other threads:[~2024-04-10 9:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 9:10 [PATCH v2 0/8] Add ISP Bayer for StarFive Changhuang Liang
2024-04-10 9:10 ` [PATCH v2 1/8] staging: media: starfive: Get rid of current_fmt Changhuang Liang
2024-04-10 9:10 ` [PATCH v2 2/8] staging: media: starfive: Add bayer pad for ISP Changhuang Liang
2024-04-10 9:10 ` [PATCH v2 3/8] staging: media: starfive: Use PAD_SINK instead of PAD_SRC for crop Changhuang Liang
2024-04-10 9:10 ` [PATCH v2 4/8] staging: media: starfive: Introduce isp_stream Changhuang Liang
2024-04-10 9:10 ` [PATCH v2 5/8] staging: media: starfive: Add ISP bayer video device Changhuang Liang
2024-04-10 9:10 ` [PATCH v2 6/8] staging: media: starfive: Fix bayer output stride configuration Changhuang Liang
2024-04-10 9:10 ` Changhuang Liang [this message]
2024-04-10 9:10 ` [PATCH v2 8/8] admin-guide: media: Update documents for StarFive Camera Subsystem 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=20240410091026.50272-8-changhuang.liang@starfivetech.com \
--to=changhuang.liang@starfivetech.com \
--cc=bryan.odonoghue@linaro.org \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jack.zhu@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 \
/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
all inboxes | Powered by JetHome®