[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240410091026.50272-8-changhuang.liang@starfivetech.com>
Date: Wed, 10 Apr 2024 02:10:25 -0700
From: Changhuang Liang <changhuang.liang@...rfivetech.com>
To: Mauro Carvalho Chehab <mchehab@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Hans Verkuil <hverkuil-cisco@...all.nl>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Jack Zhu <jack.zhu@...rfivetech.com>,
Changhuang Liang <changhuang.liang@...rfivetech.com>,
Dan Carpenter <dan.carpenter@...aro.org>,
linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-staging@...ts.linux.dev
Subject: [PATCH v2 7/8] staging: media: starfive: Move the struct media_pipeline position
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@...rfivetech.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
Powered by blists - more mailing lists