<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/media/mc/mc-entity.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/media/mc/mc-entity.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/media/mc/mc-entity.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-24T06:59:09Z</updated>
<entry>
<title>media: entity: Add support for ancillary links</title>
<updated>2022-04-24T06:59:09Z</updated>
<author>
<name>Daniel Scally</name>
<email>djrscally@gmail.com</email>
</author>
<published>2022-03-02T22:03:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=012c87f7696f3191f340d9bd6b4476d8d3bb25ad'/>
<id>urn:sha1:012c87f7696f3191f340d9bd6b4476d8d3bb25ad</id>
<content type='text'>
Add functions to create ancillary links, so that they don't need to
be manually created by users.

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;djrscally@gmail.com&gt;
Reviewed-by: Jean-Michel Hautbois &lt;jeanmichel.hautbois@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: entity: Add link_type_name() helper</title>
<updated>2022-04-24T06:58:44Z</updated>
<author>
<name>Daniel Scally</name>
<email>djrscally@gmail.com</email>
</author>
<published>2022-03-02T22:03:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9d0c23bfe7083f182194ca235156a4098aa59344'/>
<id>urn:sha1:9d0c23bfe7083f182194ca235156a4098aa59344</id>
<content type='text'>
Now we have three types of media link, printing the right name during
debug output is slightly more complicated. Add a helper function to
make it easier.

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;djrscally@gmail.com&gt;
Reviewed-by: Jean-Michel Hautbois &lt;jeanmichel.hautbois@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: entity: Skip non-data links in graph iteration</title>
<updated>2022-04-24T06:57:21Z</updated>
<author>
<name>Daniel Scally</name>
<email>djrscally@gmail.com</email>
</author>
<published>2022-03-02T22:03:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=af3ed78ecbf367008ae4852cd676a75ce71db35f'/>
<id>urn:sha1:af3ed78ecbf367008ae4852cd676a75ce71db35f</id>
<content type='text'>
When iterating over the media graph, don't follow links that are not
data links.

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;djrscally@gmail.com&gt;
Reviewed-by: Jean-Michel Hautbois &lt;jeanmichel.hautbois@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: entity: skip non-data link when removing reverse links</title>
<updated>2022-04-24T06:56:44Z</updated>
<author>
<name>Yunke Cao</name>
<email>yunkec@google.com</email>
</author>
<published>2022-04-12T06:23:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6008dea1c70e1a7df05c5e1bccd48e51ea29e670'/>
<id>urn:sha1:6008dea1c70e1a7df05c5e1bccd48e51ea29e670</id>
<content type='text'>
The original implementation removes reverse links for any input link and
assumes the presense of sink/source.
It fails when the link is a not a data link.
media_entity_remove_links when there's an ancillary link can also fail.

We only need to remove reverse links for a data link.

Signed-off-by: Yunke Cao &lt;yunkec@google.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: media-entity: Simplify media_pipeline_start()</title>
<updated>2022-03-03T22:27:06Z</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2022-01-13T15:00:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3056a8e936bb090865402bfe6f3a730a28790033'/>
<id>urn:sha1:3056a8e936bb090865402bfe6f3a730a28790033</id>
<content type='text'>
The media_pipeline_start() function has two purposes: it constructs a
pipeline by recording the entities that are part of it, gathered from a
graph walk, and validate the media links. The pipeline pointer is stored
in the media_entity structure as part of this process, and the entity's
stream count is increased, to record that the entity is streaming.

When multiple video nodes are present in a pipeline,
media_pipeline_start() is typically called on all of them, with the same
pipeline pointer. This is taken into account in media_pipeline_start()
by skipping validation for entities that are already part of the
pipeline, while returning an error if an entity is part of a different
pipeline.

It turns out that this process is overly complicated. When
media_pipeline_start() is called for the first time, it constructs the
full pipeline, adding all entities and validating all the links.
Subsequent calls to media_pipeline_start() are then nearly no-ops, they
only increase the stream count on the pipeline and on all entities.

The media_entity stream_count field is used for two purposes: checking
if the entity is streaming, and detecting when a call to
media_pipeline_stop() balances needs to reset the entity pipe pointer to
NULL. The former can easily be replaced by a check of the pipe pointer.

Simplify media_pipeline_start() by avoiding the pipeline walk on all
calls but the first one, and drop the media_entity stream_count field.
media_pipeline_stop() is updated accordingly.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
[Sakari Ailus: Drop redundant '!= NULL' as discussed]
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>media: media-entity: Add media_pad_is_streaming() helper function</title>
<updated>2022-03-03T22:27:06Z</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2022-01-13T15:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f17bc788f7b97c36b8f3fbef14555a2a16ee3f69'/>
<id>urn:sha1:f17bc788f7b97c36b8f3fbef14555a2a16ee3f69</id>
<content type='text'>
Add a function to test if a pad is part of a pipeline currently
streaming, and use it through drivers to replace direct access to the
stream_count field. This will help reworking pipeline start/stop without
disturbing drivers.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>media: mc: mc-entity.c: Use bitmap_zalloc() when applicable</title>
<updated>2021-12-14T14:09:14Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-12-01T22:19:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ce560ee5c51d32b450ac453fceeee58a2683019b'/>
<id>urn:sha1:ce560ee5c51d32b450ac453fceeee58a2683019b</id>
<content type='text'>
'ent_enum-&gt;bmap' is a bitmap. So use 'bitmap_zalloc()' to simplify
code, improve the semantic and avoid some open-coded arithmetic in
allocator arguments.

Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.

While at it, remove a useless 'bitmap_zero()'.

Link: https://lore.kernel.org/linux-media/b11f646dda189f490c06bf671f64a2cc0af4d45c.1638397089.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Kieran Bingham &lt;kieran.bingham+renesas@ideasonboard.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mc: drop an unused debug function</title>
<updated>2021-11-29T09:15:04Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2021-11-22T08:42:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a057d92a36faabb66a0305d3e4c17d7a98166932'/>
<id>urn:sha1:a057d92a36faabb66a0305d3e4c17d7a98166932</id>
<content type='text'>
The gobj_type() function translates the media object type into
a name, being useful for debugging purposes. It is currently
not used. So, drop it.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mc: mc-entity.c: Fix typo</title>
<updated>2021-05-19T07:51:39Z</updated>
<author>
<name>Sebastian Fricke</name>
<email>sebastian.fricke@posteo.net</email>
</author>
<published>2021-04-17T13:34:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b07006ff9365ddfc184e1836cd1f75355c6bb740'/>
<id>urn:sha1:b07006ff9365ddfc184e1836cd1f75355c6bb740</id>
<content type='text'>
s/entity in the other end/entity at the other end/

[hverkuil: also remove the spurious space after 'link']

Signed-off-by: Sebastian Fricke &lt;sebastian.fricke@posteo.net&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: entity: Add lockdep check to media graph walk</title>
<updated>2021-04-06T12:35:14Z</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2021-03-12T09:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4ebddb7c17c4549f04741c7faf8e4ced62391d20'/>
<id>urn:sha1:4ebddb7c17c4549f04741c7faf8e4ced62391d20</id>
<content type='text'>
It was always assumed that walking the media graph would require holding
the media_device graph_mutex but this was not documented nor checked for.

Add a lockdep check to graph walk init and iter, and document the need for
acquiring the graph_mutex.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
</feed>
