From 78bc155d2fd404977a2d3006fa2ea39907815e67 Mon Sep 17 00:00:00 2001 From: Alain Volmat Date: Fri, 21 Aug 2026 08:38:09 +0200 Subject: media: stm32: dcmipp: introduce a dcmipp global media_pipeline With the introduction of stm32mp25 containing several capture devices, it becomes necessary to share the media_pipeline structure among all capture devices since subdev pads can be shared between several capture devices. Signed-off-by: Alain Volmat Signed-off-by: Hans Verkuil --- drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c | 3 +-- drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c index f6011b42203c..53341b798457 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c +++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c @@ -125,7 +125,6 @@ struct dcmipp_bytecap_device { /* mutex used as vdev and queue lock */ struct mutex lock; u32 sequence; - struct media_pipeline pipe; struct v4l2_subdev *s_subdev; u32 s_subdev_pad_nb; @@ -410,7 +409,7 @@ static int dcmipp_bytecap_start_streaming(struct vb2_queue *vq, goto err_buffer_done; } - ret = media_pipeline_start(entity->pads, &vcap->pipe); + ret = media_pipeline_start(entity->pads, &vcap->ved.dcmipp->pipe); if (ret) { dev_dbg(vcap->dev, "%s: Failed to start streaming, media pipeline start error (%d)\n", __func__, ret); diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h index b491ce00c656..9ec6d589b503 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h +++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h @@ -73,6 +73,7 @@ struct dcmipp_device { /* The Associated media_device parent */ struct media_device mdev; + struct media_pipeline pipe; /* Internal v4l2 parent device*/ struct v4l2_device v4l2_dev; -- cgit v1.2.3