| 16428e24 | 20-Aug-2025 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: mc: Improve unconnected pads debugging message in link exploration
When exploring links, a message is printed to indicate unconnected pads being added. The message prints the entity name only
media: mc: Improve unconnected pads debugging message in link exploration
When exploring links, a message is printed to indicate unconnected pads being added. The message prints the entity name only. Print the origin pad number as well to help with debugging pipeline start issues. While at it, get the entity name from origin->entity instead of local->entity. Both point to the same entity, but the former conveys the meaning better.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| b3decc5c | 15-Jan-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: mc: Expand MUST_CONNECT flag to always require an enabled link
The MEDIA_PAD_FL_MUST_CONNECT flag indicates that the pad requires an enabled link to stream, but only if it has any link at all
media: mc: Expand MUST_CONNECT flag to always require an enabled link
The MEDIA_PAD_FL_MUST_CONNECT flag indicates that the pad requires an enabled link to stream, but only if it has any link at all. This makes little sense, as if a pad is part of a pipeline, there are very few use cases for an active link to be mandatory only if links exist at all. A review of in-tree drivers confirms they all need an enabled link for pads marked with the MEDIA_PAD_FL_MUST_CONNECT flag.
Expand the scope of the flag by rejecting pads that have no links at all. This requires modifying the pipeline build code to add those pads to the pipeline.
Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| 9ec9109c | 14-Jan-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: mc: Rename pad variable to clarify intent
The pad local variable in the media_pipeline_explore_next_link() function is used to store the pad through which the entity has been reached. Rename
media: mc: Rename pad variable to clarify intent
The pad local variable in the media_pipeline_explore_next_link() function is used to store the pad through which the entity has been reached. Rename it to origin to reflect that and make the code easier to read. This will be even more important in subsequent commits when expanding the function with additional logic.
Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| baeddf94 | 14-Jan-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: mc: Add num_links flag to media_pad
Maintain a counter of the links connected to a pad in the media_pad structure. This helps checking if a pad is connected to anything, which will be used in
media: mc: Add num_links flag to media_pad
Maintain a counter of the links connected to a pad in the media_pad structure. This helps checking if a pad is connected to anything, which will be used in the pipeline building code.
Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| 422f7af7 | 14-Jan-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: mc: Fix flags handling when creating pad links
The media_create_pad_link() function doesn't correctly clear reject link type flags, nor does it set the DATA_LINK flag. It only works because t
media: mc: Fix flags handling when creating pad links
The media_create_pad_link() function doesn't correctly clear reject link type flags, nor does it set the DATA_LINK flag. It only works because the MEDIA_LNK_FL_DATA_LINK flag's value is 0.
Fix it by returning an error if any link type flag is set. This doesn't introduce any regression, as nobody calls the media_create_pad_link() function with link type flags (easily checked by grepping for the flag in the source code, there are very few hits).
Set the MEDIA_LNK_FL_DATA_LINK explicitly, which is a no-op that the compiler will optimize out, but is still useful to make the code more explicit and easier to understand.
Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| 78f0daa0 | 14-Jan-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: mc: Add local pad to pipeline regardless of the link state
When building pipelines by following links, the media_pipeline_explore_next_link() function only traverses enabled links. The remote
media: mc: Add local pad to pipeline regardless of the link state
When building pipelines by following links, the media_pipeline_explore_next_link() function only traverses enabled links. The remote pad of a disabled link is not added to the pipeline, and neither is the local pad. While the former is correct as disabled links should not be followed, not adding the local pad breaks processing of the MEDIA_PAD_FL_MUST_CONNECT flag.
The MEDIA_PAD_FL_MUST_CONNECT flag is checked in the __media_pipeline_start() function that iterates over all pads after populating the pipeline. If the pad is not present, the check gets skipped, rendering it useless.
Fix this by adding the local pad of all links regardless of their state, only skipping the remote pad for disabled links.
Cc: stable@vger.kernel.org # 6.1 Fixes: ae219872834a ("media: mc: entity: Rewrite media_pipeline_start()") Reported-by: Frieder Schrempf <frieder.schrempf@kontron.de> Closes: https://lore.kernel.org/linux-media/7658a15a-80c5-219f-2477-2a94ba6c6ba1@kontron.de Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|