Re: [PATCH] media: qcom: camss: stop started subdevices when stream-on fails
From: bod
Date: Wed Nov 25 2026 - 10:49:16 EST
On 2026-11-06 16:32 +0000, Jizhou Tong wrote:
> Hi Loic, Qianhui,
>
> Thanks for the pointer. I have read v2 2/2 [1]; it covers the ordinary
> start-failure cleanup addressed by my patch, and sharing the traversal
> with stream-off makes sense.
>
> There is one remaining difference: camss_video_subdevs_set_stream()
> returns immediately on a disable error. If A and B start successfully,
> C fails to start, and stopping A then fails, B is never stopped. Normal
> stream-off also stops walking at that first error.
>
> I reproduced this with the actual helper and injected subdevice errors.
> The increment below keeps the first stop error and continues cleanup;
> start still returns immediately, and video_start_streaming() retains the
> original start error if cleanup also fails. It applies on top of your
> v2 2/2. With this covered, my earlier standalone patch can be superseded.
>
> The helper and the actual video start/stop functions pass 416 ASan/UBSan
> cases covering partial starts, multiple stop failures, ignored states
> and pipeline/format errors. With the unmodified helper, the stop-error
> case leaves B enabled. The ARM64 W=1 camss-video.o build passes. These are
> software tests; I have not replaced the running camera driver to test
> the combined change on hardware.
>
> Would you fold this into your next revision? I have left the multiple
> source-link question to the existing discussion with Bryan.
>
> [1]
> https://lore.kernel.org/all/20261031041154.308030-3-xiaqinghuan@xxxxxxxxxxxxxxxx/
>
> Signed-off-by: Jizhou Tong <fqwqf@xxxxxxxxx>
This is another valid/good fix missing Fixes: Cc: stable
If you roll a V2 with this change separated and a little less text on the
commit log that would be appreciated and applicable.
---
bod