From: David Carlier <devnexen@gmail.com>
To: jacopo.mondi@ideasonboard.com, dan.scally@ideasonboard.com
Cc: nayden.kanchev@arm.com, mchehab@kernel.org,
hverkuil+cisco@kernel.org, linusw@kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
David Carlier <devnexen@gmail.com>
Subject: [PATCH] media: mali-c55: Require an enabled link to start a video node
Date: Thu, 5 Nov 2026 22:23:31 +0000 [thread overview]
Message-ID: <20261105222403.186948-1-devnexen@gmail.com> (raw)
mali_c55_pipeline_ready() skips queues whose link is disabled, but such
a queue can still start streaming on its own, as the video node pads
lack MEDIA_PAD_FL_MUST_CONNECT. Stopping it later sees a ready pipeline
and disables the ISP under the connected queues still capturing.
Mark the video node pads MUST_CONNECT so that starting a disconnected
node fails with -ENOLINK.
Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
---
Build tested only (W=1, checkpatch --strict clean). Not tested on
hardware, and no reproducer was run; the STREAMON/STREAMOFF sequence
on a disconnected stats node is from code reading.
drivers/media/platform/arm/mali-c55/mali-c55-capture.c | 2 +-
drivers/media/platform/arm/mali-c55/mali-c55-params.c | 2 +-
drivers/media/platform/arm/mali-c55/mali-c55-stats.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-capture.c b/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
index ff01553026fb..2dbce550d089 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
@@ -855,7 +855,7 @@ static int mali_c55_register_cap_dev(struct mali_c55 *mali_c55,
goto err_destroy_mutex;
}
- cap_dev->pad.flags = MEDIA_PAD_FL_SINK;
+ cap_dev->pad.flags = MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_MUST_CONNECT;
ret = media_entity_pads_init(&cap_dev->vdev.entity, 1, &cap_dev->pad);
if (ret)
goto err_destroy_mutex;
diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-params.c b/drivers/media/platform/arm/mali-c55/mali-c55-params.c
index 16e895e3488e..0888dc4a340e 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-params.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-params.c
@@ -1014,7 +1014,7 @@ int mali_c55_register_params(struct mali_c55 *mali_c55)
INIT_LIST_HEAD(¶ms->buffers.queue);
spin_lock_init(¶ms->buffers.lock);
- params->pad.flags = MEDIA_PAD_FL_SOURCE;
+ params->pad.flags = MEDIA_PAD_FL_SOURCE | MEDIA_PAD_FL_MUST_CONNECT;
ret = media_entity_pads_init(¶ms->vdev.entity, 1, ¶ms->pad);
if (ret)
goto err_destroy_mutex;
diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-stats.c b/drivers/media/platform/arm/mali-c55/mali-c55-stats.c
index a9c28b090b2a..a9172781925c 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-stats.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-stats.c
@@ -275,7 +275,7 @@ int mali_c55_register_stats(struct mali_c55 *mali_c55)
INIT_LIST_HEAD(&stats->buffers.queue);
spin_lock_init(&stats->buffers.lock);
- stats->pad.flags = MEDIA_PAD_FL_SINK;
+ stats->pad.flags = MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_MUST_CONNECT;
ret = media_entity_pads_init(&stats->vdev.entity, 1, &stats->pad);
if (ret)
goto err_destroy_mutex;
--
2.55.0
reply other threads:[~2026-11-05 22:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261105222403.186948-1-devnexen@gmail.com \
--to=devnexen@gmail.com \
--cc=dan.scally@ideasonboard.com \
--cc=hverkuil+cisco@kernel.org \
--cc=jacopo.mondi@ideasonboard.com \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nayden.kanchev@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.