Re: [PATCH v2] media: mali-c55: Require an enabled link to start a video node
From: Jacopo Mondi
Date: Tue Nov 10 2026 - 04:20:11 EST
Hi David
please don't cut out context from replies, especially if they're not
super long.
On Mon, Nov 09, 2026 at 07:57:31PM +0000, David CARLIER wrote:
> Hi Jacopo,
>
> On Mon, Nov 09, 2026 at 04:52:50PM +0100, Jacopo Mondi wrote:
> > Can you elaborate on how this could happen ?
> >
> > How can streaming start if you VIDIOC_STREAMON() on a capture device
> > without an enabled link to the resizer subdev ?
>
> video_device_pipeline_alloc_start() only walks enabled links, so with
> the link disabled the pipeline is the video node pad alone. Nothing in
> it fails validation, as the only -ENOLINK check in
> __media_pipeline_start() is for MUST_CONNECT pads. start_streaming()
> then enables cap_dev->rsz directly rather than through the graph.
What does it mean "rather than through the graph" ?
enable_streams() is propagated by drivers along the pipeline by design
> So with the ds link disabled: STREAMON ds, then fr, params and stats
> (the last one starts the ISP), then STREAMOFF ds.
> mali_c55_pipeline_ready() skips ds and returns true, so the ISP is
> stopped under fr.
so a STREAMOFF on a disconnected capture node could potentially stop
the other. Feels like mali_c55_pipeline_ready() is not the right
function to use, but if we mandate that a capture node has to be
connected if STREAMON is called on it, then we're safe ?
>
> > Why not the resizer ?
>
> The ISP to resizer links are immutable and enabled, so the sink pads
> are always connected. Flagging the resizer source pad would break the
> valid case instead: starting fr walks through the ISP into resizer ds
Is this a typo ? From FR we can't go to the DS resizer.
> and its source pad via the internal route, so fr only capture with ds
> disabled would fail with -ENOLINK. The video node pad is where the walk
> starts and what pipeline_ready() checks, so the flag goes there.
Anyway, yes, there is a single link between the resizer's source pad
and the capture device, if the SINK pad of the capture device is
marked as MUST_CONNECT then the link between the two is enabled.
>
> Cheers.