<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/media/media-device.h, branch linux-4.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.15.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.15.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2017-08-08T10:02:22Z</updated>
<entry>
<title>media: media-device: remove driver_version</title>
<updated>2017-08-08T10:02:22Z</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2017-07-21T08:49:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2bd8682375f3a79e463d8840794d2872b02d755b'/>
<id>urn:sha1:2bd8682375f3a79e463d8840794d2872b02d755b</id>
<content type='text'>
Since the driver_version field in struct media_device is no longer
used, just remove it.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>media: media-device: set driver_version directly</title>
<updated>2017-08-08T10:00:07Z</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2017-07-21T10:48:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4c7089ee66026f38275d43e26d9da6e2945af6f9'/>
<id>urn:sha1:4c7089ee66026f38275d43e26d9da6e2945af6f9</id>
<content type='text'>
Don't use driver_version from struct media_device, just return
LINUX_VERSION_CODE as the other media subsystems do.

The driver_version field in struct media_device will be removed
in the following patches.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] media: Protect enable_source and disable_source handler code paths</title>
<updated>2017-02-03T09:39:35Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2016-11-29T23:59:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=90cd366bc61cd539c797b7ad957a9d749d97200f'/>
<id>urn:sha1:90cd366bc61cd539c797b7ad957a9d749d97200f</id>
<content type='text'>
Drivers might try to access and run enable_source and disable_source
handlers when the driver that implements these handlers is clearing
the handlers during its unregister.

Fix the following race condition:

process 1				process 2

request video streaming			unbind au0828
v4l2 checks if tuner is free
...					...

					au0828_unregister_media_device()
...					...
					(doesn't hold graph_mutex)
					mdev-&gt;enable_source = NULL;
if (mdev &amp;&amp; mdev-&gt;enable_source)	mdev-&gt;disable_source = NULL;
	mdev-&gt;enable_source()
(enable_source holds graph_mutex)

As shown above enable_source check is done without holding the graph_mutex.
If unbind happens to be in progress, au0828 could clear enable_source and
disable_source handlers leading to null pointer de-reference.

Fix it by protecting enable_source and disable_source set and clear and
protecting enable_source and disable_source handler access and the call
itself.

process 1				process 2

request video streaming			unbind au0828
v4l2 checks if tuner is free
...					...

					au0828_unregister_media_device()
...					...
					(hold graph_mutex while clearing)
					mdev-&gt;enable_source = NULL;
if (mdev)				mdev-&gt;disable_source = NULL;
(hold graph_mutex to check and
 call enable_source)
    if (mdev-&gt;enable_source)
	mdev-&gt;enable_source()

If graph_mutex is held to just heck for handler being null and needs to be
released before calling the handler, there will be another window for the
handlers to be cleared. Hence, enable_source and disable_source handlers
no longer hold the graph_mutex and expect callers to hold it to avoid
forcing them release the graph_mutex before calling the handlers.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] media: Rename graph and pipeline structs and functions</title>
<updated>2017-01-27T18:13:24Z</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2016-11-21T16:48:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=20b852273642f41ce5c97601acb89185cbcee772'/>
<id>urn:sha1:20b852273642f41ce5c97601acb89185cbcee772</id>
<content type='text'>
The media_entity_pipeline_start() and media_entity_pipeline_stop()
functions are renamed as media_pipeline_start() and media_pipeline_stop(),
respectively. The reason is two-fold: the pipeline struct is, rightly,
already called media_pipeline (rather than media_entity_pipeline) and what
this really is about is a pipeline. A pipeline consists of entities ---
and, well, other objects embedded in these entities.

As the pipeline object will be in the future moved from entities to pads
in order to support multiple pipelines through a single entity, do the
renaming now.

Similarly, functions operating on struct media_entity_graph as well as the
struct itself are renamed by dropping the "entity_" part from the prefix
of the function family and the data structure. The graph traversal which
is what the functions are about is not specifically about entities only
and will operate on pads for the same reason as the media pipeline.

The patch has been generated using the following command:

git grep -l media_entity |xargs perl -i -pe '
	s/media_entity_pipeline/media_pipeline/g;
	s/media_entity_graph/media_graph/g'

And a few manual edits related to line start alignment and line wrapping.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] media: Drop FSF's postal address from the source code files</title>
<updated>2017-01-27T13:38:09Z</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2016-10-28T11:31:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bcb63314e2c23f1ed622418b65f9409512659c73'/>
<id>urn:sha1:bcb63314e2c23f1ed622418b65f9409512659c73</id>
<content type='text'>
Drop the FSF's postal address from the source code files that typically
contain mostly the license text. Of the 628 removed instances, 578 are
outdated.

The patch has been created with the following command without manual edits:

git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \
	drivers/media/ include/media|while read i; do i=$i perl -e '
open(F,"&lt; $ENV{i}");
$a=join("", &lt;F&gt;);
$a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m
	&amp;&amp; $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m;
close(F);
open(F, "&gt; $ENV{i}");
print F $a;
close(F);'; done

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>[media] media: remove obsolete Media Device Managed resource interfaces</title>
<updated>2016-11-25T09:40:40Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2016-11-16T20:49:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8c2ebcf103b106bd8b9c5517bf72885d126d3d27'/>
<id>urn:sha1:8c2ebcf103b106bd8b9c5517bf72885d126d3d27</id>
<content type='text'>
Remove obsolete media_device_get_devres(), media_device_find_devres(),
and media_device_release_devres() interfaces. These interfaces are now
obsolete.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] media: Update documentation for media_entity_notify</title>
<updated>2016-11-23T15:45:13Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2016-03-14T22:24:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fc641261e1227ed7d083d55c8b47f3e9cd173681'/>
<id>urn:sha1:fc641261e1227ed7d083d55c8b47f3e9cd173681</id>
<content type='text'>
Update documentation for media_entity_notify to clearly state the usage
restrictions. This handler is intended for creating links between exiting
entities and should not used to create and register entities.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] media: Move media_device link_notify operation to an ops structure</title>
<updated>2016-09-09T14:20:09Z</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart+renesas@ideasonboard.com</email>
</author>
<published>2015-11-03T02:27:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=68429f50ab60074e58b98010103fcc5bac4afd54'/>
<id>urn:sha1:68429f50ab60074e58b98010103fcc5bac4afd54</id>
<content type='text'>
This will allow adding new operations without increasing the
media_device structure size for drivers that don't implement any media
device operation.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] docs-rst: improve the kAPI documentation for the mediactl</title>
<updated>2016-09-09T12:28:55Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2016-08-29T19:09:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=48a7c4bac94dfb367d1d64123b5182536912c03e'/>
<id>urn:sha1:48a7c4bac94dfb367d1d64123b5182536912c03e</id>
<content type='text'>
There are several issues on the documentation:
  - the media.h header were not properly referenced;
  - verbatim expressions were not properly marked as such;
  - struct member references were wrong;
  - some notes were not using the right markup;
  - a comment that were moved to the kernel-doc markup were
    duplicated as a comment inside the struct media_entity;
  - some args were not pointing to the struct they're using;
  - macros weren't documented.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] doc-rst: Fix conversion for MC core functions</title>
<updated>2016-07-17T17:02:44Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2016-07-17T12:18:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=74604b7390af3afb1bcb055b87787b5cfabd03a0'/>
<id>urn:sha1:74604b7390af3afb1bcb055b87787b5cfabd03a0</id>
<content type='text'>
There were lots of issues at the media controller side,
after the conversion:

- Some documentation at the header files weren't using the
  kernel-doc start block;

- Now, the C files with the exported symbols also need to be
  added. So, all headers need to be included twice: one to
  get the structs/enums/.. and another one for the functions;

- Notes should use the ReST tag, as kernel-doc doesn't
  recognizes it anymore;

- Identation needs to be fixed, as ReST uses it to identify
  when a format "tag" ends.

- Fix the cross-references at the media controller description.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
</feed>
