mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
media: nxp: imx8-isi: Add stream ID validation for crossbar routing
Add validation to enforce hardware constraints that were previously missing in the crossbar routing configuration: - SOURCE stream must be 0 (ISI pipes are hardcoded to stream 0) This check complements the existing memory input validation and ensures that all routing configurations respect hardware limitations. Signed-off-by: Guoniu Zhou <guoniu.zhou@oss.nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patch.msgid.link/20260720-isi-v2-2-45845bc5d4fa@oss.nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
795bd28635
commit
162a2a2de6
|
|
@ -106,8 +106,20 @@ static int __mxc_isi_crossbar_set_routing(struct v4l2_subdev *sd,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* The memory input can be routed to the first pipeline only. */
|
||||
/*
|
||||
* Validate routes against hardware constraints:
|
||||
* - SOURCE stream must be 0 (pipes are hardcoded to stream 0)
|
||||
* - Memory input can only route to the first pipeline
|
||||
*/
|
||||
for_each_active_route(routing, route) {
|
||||
if (route->source_stream != 0) {
|
||||
dev_dbg(xbar->isi->dev,
|
||||
"route to pipe %u must use source_stream=0, got %u\n",
|
||||
route->source_pad - xbar->num_sinks,
|
||||
route->source_stream);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
if (route->sink_pad == xbar->num_sinks - 1 &&
|
||||
route->source_pad != xbar->num_sinks) {
|
||||
dev_dbg(xbar->isi->dev,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user