mirror of
https://github.com/torvalds/linux.git
synced 2026-11-10 17:11:02 +01:00
media: mali-c55: Ignore disconnected queues when checking readiness
mali_c55_pipeline_ready() waits for every video queue to enter its
start_streaming callback, regardless of whether its media link is enabled.
When libcamera uses the TPG, it disables the statistics and parameters
links and queues only image buffers. Although STREAMON succeeds on the
metadata nodes, videobuf2 never invokes their callbacks without queued
buffers. The ISP and TPG are therefore never enabled and capture hangs.
An unused full-resolution or downscaled output can similarly prevent the
pipeline from starting.
Only require queues connected through enabled media links to have started.
Use media_pad_remote_pad_first() to check the video node pads, retaining
the capability check before accessing the optional downscale device.
The shared readiness check also keeps stream-off consistent: the first
active queue to stop disables the ISP.
Fixes: d5f281f3dd ("media: mali-c55: Add Mali-C55 ISP driver")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
907273d00d
commit
9cfc1aca07
|
|
@ -510,11 +510,16 @@ bool mali_c55_pipeline_ready(struct mali_c55 *mali_c55)
|
|||
struct mali_c55_params *params = &mali_c55->params;
|
||||
struct mali_c55_stats *stats = &mali_c55->stats;
|
||||
|
||||
return vb2_start_streaming_called(&fr->queue) &&
|
||||
/* Only wait for queues connected through enabled media links. */
|
||||
return (!media_pad_remote_pad_first(&fr->pad) ||
|
||||
vb2_start_streaming_called(&fr->queue)) &&
|
||||
(!(mali_c55->capabilities & MALI_C55_GPS_DS_PIPE_FITTED) ||
|
||||
!media_pad_remote_pad_first(&ds->pad) ||
|
||||
vb2_start_streaming_called(&ds->queue)) &&
|
||||
vb2_start_streaming_called(¶ms->queue) &&
|
||||
vb2_start_streaming_called(&stats->queue);
|
||||
(!media_pad_remote_pad_first(¶ms->pad) ||
|
||||
vb2_start_streaming_called(¶ms->queue)) &&
|
||||
(!media_pad_remote_pad_first(&stats->pad) ||
|
||||
vb2_start_streaming_called(&stats->queue));
|
||||
}
|
||||
|
||||
static int mali_c55_check_hwcfg(struct mali_c55 *mali_c55)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user