<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/media/video/cx88/cx88-mpeg.c, branch v3.10.3</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.10.3</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.10.3'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2012-08-15T19:36:22+00:00</updated>
<entry>
<title>[media] rename most media/video pci drivers to media/pci</title>
<updated>2012-08-15T19:36:22+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-08-14T15:13:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b285192a43f0432d82c2c10974204e78af0da596'/>
<id>urn:sha1:b285192a43f0432d82c2c10974204e78af0da596</id>
<content type='text'>
Rename all PCI drivers with their own directory under
drivers/media/video into drivers/media/pci and update the
building system.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] cx88: properly maintain decoder config when using MPEG encoder</title>
<updated>2011-07-27T20:56:00+00:00</updated>
<author>
<name>Devin Heitmueller</name>
<email>dheitmueller@kernellabs.com</email>
</author>
<published>2011-07-14T15:44:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=243bf1a24d991f57398aa9d24e408ca83abc6135'/>
<id>urn:sha1:243bf1a24d991f57398aa9d24e408ca83abc6135</id>
<content type='text'>
The cx88 driver would force core-&gt;input to always be zero when doing the
the request_acquire().  While it wasn't actually changing the input register
in the hardware, the driver makes decision based on the current input.  In
particular, it decides whether to do things like enabling the comb filter
when on a composite input but disabling it on s-video.  So for example, on
the HVR-1300, using the s-video input with the MPEG encoder would end up with
the video decoder core configured as though the input type were composite.

In short, the driver state did not match the hardware state.

This patch does two things:

1.  It forces the input to zero only if actually switching to DVB mode.  This
prevents the input from changing when the blackbird driver opens the device.

2.  Keep track of what the input was set to when switching to DVB, and reset
it back when done.  This eliminates a condition where for example the user
had the analog side of the board set to capture on the s-video input, then
he used DVB for a bit, then the analog input would unexpectedly be set to
the tuner input.

This work was sponsored by Anevia S.A.

Signed-off-by: Devin Heitmueller &lt;dheitmueller@kernellabs.com&gt;
Cc: Florent Audebert &lt;florent.audebert@anevia.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] Stop using linux/version.h on most video drivers</title>
<updated>2011-07-27T20:53:12+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2011-06-24T17:45:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1990d50b58bef127a647005fdcada6d07081d3ef'/>
<id>urn:sha1:1990d50b58bef127a647005fdcada6d07081d3ef</id>
<content type='text'>
All the modified drivers didn't have any version increment since
Jan, 1 2011. Several of them didn't have any version increment
for a long time, even having new features and important bug fixes
happening.

As we're now filling the QUERYCAP version with the current Kernel
Release, we don't need to maintain a per-driver version control
anymore. So, let's just use the default.

In order to preserve the Kernel module version history, a
KERNEL_VERSION() macro were added to all modified drivers, and
the extraver number were incremented.

I opted to preserve the per-driver version control to a few
pwc, pvrusb2, s2255, s5p-fimc and sh_vou.

A few drivers are still using the legacy way to handle ioctl's.
So, we can't do such change on them, otherwise, they'll break.
Those are: uvc, et61x251 and sn9c102.

The rationale is that the per-driver version control seems to be
actively maintained on those.

Yet, I think that the better for them would be to just use the
default version numbering, instead of doing that by themselves.

While here, removed a few uneeded include linux/version.h

Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] cx88: protect cx8802_devlist with a mutex</title>
<updated>2011-05-20T12:29:38+00:00</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2011-05-01T09:30:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=344d6c6ba6ba5c4fede2f07adbd26d53109a2dd8'/>
<id>urn:sha1:344d6c6ba6ba5c4fede2f07adbd26d53109a2dd8</id>
<content type='text'>
Add and use a mutex to protect the cx88-mpeg device list.  Previously
the BKL prevented races.

Based on work by Ben Hutchings &lt;ben@decadent.org.uk&gt;.

Tested-by: Andi Huber &lt;hobrom@gmx.at&gt;
Tested-by: Marlon de Boer &lt;marlon@hyves.nl&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] cx88: hold device lock during sub-driver initialization</title>
<updated>2011-05-20T12:29:37+00:00</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2011-05-01T09:29:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1d6213ab995c61f7d1d81cf6cf876acf15d6e714'/>
<id>urn:sha1:1d6213ab995c61f7d1d81cf6cf876acf15d6e714</id>
<content type='text'>
cx8802_blackbird_probe makes a device node for the mpeg sub-device
before it has been added to dev-&gt;drvlist.  If the device is opened
during that time, the open succeeds but request_acquire cannot be
called, so the reference count remains zero.  Later, when the device
is closed, the reference count becomes negative --- uh oh.

Close the race by holding core-&gt;lock during probe and not releasing
until the device is in drvlist and initialization finished.
Previously the BKL prevented this race.

Reported-by: Andreas Huber &lt;hobrom@gmx.at&gt;
Tested-by: Andi Huber &lt;hobrom@gmx.at&gt;
Tested-by: Marlon de Boer &lt;marlon@hyves.nl&gt;
Cc: stable@kernel.org
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] cx88: fix locking of sub-driver operations</title>
<updated>2011-05-20T12:29:36+00:00</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2011-05-01T09:29:37+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1fe70e963028f34ba5e32488a7870ff4b410b19b'/>
<id>urn:sha1:1fe70e963028f34ba5e32488a7870ff4b410b19b</id>
<content type='text'>
The BKL conversion of this driver seems to have gone wrong.
Loading the cx88-blackbird driver deadlocks.

The cause: mpeg_ops::open in the cx2388x blackbird driver acquires the
device lock and calls the sub-driver's request_acquire, which tries to
acquire the lock again.  Fix it by clarifying the semantics of
request_acquire, request_release, advise_acquire, and advise_release:
now all will rely on the caller to acquire the device lock.

Based on work by Ben Hutchings &lt;ben@decadent.org.uk&gt;.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=31962

Reported-by: Andi Huber &lt;hobrom@gmx.at&gt;
Tested-by: Andi Huber &lt;hobrom@gmx.at&gt;
Tested-by: Marlon de Boer &lt;marlon@hyves.nl&gt;
Cc: stable@kernel.org
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] cx88: protect per-device driver list with device lock</title>
<updated>2011-05-20T12:29:34+00:00</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2011-05-01T09:29:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8a317a8760cfffa8185b56ff59fb4b6c58488d79'/>
<id>urn:sha1:8a317a8760cfffa8185b56ff59fb4b6c58488d79</id>
<content type='text'>
The BKL conversion of this driver seems to have gone wrong.  Various
uses of the sub-device and driver lists appear to be subject to race
conditions.

In particular, some functions access drvlist without a relevant lock
held, which will race against removal of drivers.  Let's start with
that --- clean up by consistently protecting dev-&gt;drvlist with
dev-&gt;core-&gt;lock, noting driver functions that require the device lock
to be held or not to be held.

After this patch, there are still some races --- e.g.,
cx8802_blackbird_remove can run between the time the blackbird driver
is acquired and the time it is used in mpeg_release, and there's a
similar race in cx88_dvb_bus_ctrl.  Later patches will address the
remaining known races and the deadlock noticed by Andi.  This patch
just makes the semantics clearer in preparation for those later
changes.

Based on work by Ben Hutchings &lt;ben@decadent.org.uk&gt;.

Tested-by: Andi Huber &lt;hobrom@gmx.at&gt;
Tested-by: Marlon de Boer &lt;marlon@hyves.nl&gt;
Cc: stable@kernel.org
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] use pci_dev-&gt;revision</title>
<updated>2011-05-20T10:26:16+00:00</updated>
<author>
<name>BjÃ¸rn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2011-03-21T14:35:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=abd34d8d6b213c792c1a06fd75488595c5fb6d3f'/>
<id>urn:sha1:abd34d8d6b213c792c1a06fd75488595c5fb6d3f</id>
<content type='text'>
pci_setup_device() has saved the PCI revision in the pci_dev
struct since Linux 2.6.23.  Use it.

Cc: Auke Kok &lt;auke-jan.h.kok@intel.com&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>media/video: explicitly flush request_module work</title>
<updated>2010-12-24T15:14:20+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-12-24T15:14:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=707bcf326bd50c875d82bd2e7c31dcfb92b7e813'/>
<id>urn:sha1:707bcf326bd50c875d82bd2e7c31dcfb92b7e813</id>
<content type='text'>
Video drivers request submodules using a work during probe and calls
flush_scheduled_work() on exit to make sure the work is complete
before being unloaded.  This patch makes these drivers flush the work
directly instead of using flush_scheduled_work().

While at it, relocate request_submodules() call in saa7134_initdev()
right right before successful return as in other drivers to avoid
failing after the work is scheduled and returning failure without the
work still active.

This is in preparation for the deprecation of flush_scheduled_work().

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;
</content>
</entry>
<entry>
<title>V4L/DVB: drivers/media: Make static data tables and strings const</title>
<updated>2010-10-21T03:04:52+00:00</updated>
<author>
<name>lawrence rust</name>
<email>lawrence@softsystem.co.uk</email>
</author>
<published>2010-08-25T12:50:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2e4e98e788d8fbe30892bee3375067a4937155da'/>
<id>urn:sha1:2e4e98e788d8fbe30892bee3375067a4937155da</id>
<content type='text'>
Making static data const avoids allocation of additional r/w memory and
reduces initialisation time.  It also provides some additional opportunities
for compiler optimisations.

Signed-off-by: Lawrence Rust &lt;lvr@softsystem.co.uk&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
</feed>
