media: mali-c55: Require an enabled link to start a video node
Subsystems (2)
PATCH 1/1 media: mali-c55: Require an enabled link to start a video node
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(-)
drivers/media/platform/arm/mali-c55/mali-c55-capture.c +1 -1
@@ -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;
drivers/media/platform/arm/mali-c55/mali-c55-params.c +1 -1
@@ -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;
drivers/media/platform/arm/mali-c55/mali-c55-stats.c +1 -1
@@ -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;
Signature · 1 line
2.55.0