Due to changes in the core ivtv driver as of release 1.0, the osd_compat
module option has been rendered obsolete. This patch removes the option and
all code associated with it.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
improve GoTView PCI7135 remote control working under linux.
Acked-by: Hermann Pitton <hermann-pitton@arcor.de>
Acked-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Eugene M. Roginskii <roginovicci@nm.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
As for most of the users the 1.10 firmware is an improvement we should
use this firmware always now.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This is a minor change to help with tracking the viability of the
encoder chip within the PVR USB2 device.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Someone added a new case without adding a break to the one before it.
Thanks to Margus <b-berski at mbox200 dot swipnet dot se> for spotting this.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Coverity (CID 1929) spotted the following: if a transfer buffer
allocation fails, the last allocated urb is leaked (it hasn't been
stored in dev->urb[] yet so em28xx_uninit_isoc misses it). The patch
also includes a small typo fix.
Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
When the radio is active the video should be muted when a capture
starts. However, this was done at the wrong time and the mute settings
were overwritten when cx2341x_update was called.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If the ivtvfb module isn't loaded, the valid YUV output area should be set to
full-screen. This patch fixes the case where the valid output area was not
reset when the output broadcast format was changed from NTSC to PAL. This
resulted in output being limited to the top 480 lines of the display.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
When the ivtvfb module is loaded, the YUV output is relative to the
framebuffer output. When a virtual screen size is used, the output area for
the YUV may actually be off screen. To prevent the hardware from crashing,
the current driver will ignore an off-screen position and leave the output
visible at the last on-screen position. This may not be desirable, so this
patch will switch off the YUV output should the image move off-screen, and
re-enable it should the image move on-screen again.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Prevent unloading the framebuffer if it is still in use.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If you try to access the video device from within an udev rule,
then you get into a circular locking situation.
Changed the driver to postpone the registration of the devices until
everything else has been fully initialized, so that the newly created
device can be used immediately.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Resizing an MPEG 1 stream would cut off the right half of the
image due to a missing divide by 2 in VIDIOC_S_FMT.
Also did some minor cleanup in this part of the code.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch partially reverts a previous change that caused the
CX2341X_OSD_SET_PIXEL_FORMAT firmware calls to be skipped when the pixel
format of the framebuffer wasn't altered by FBIOPUT_VSCREENINFO.
Unfortunately, another firmware call on the PVR350 sometimes scrambles the
display when trying to adjust the framebuffer settings. This patch re-enables
the CX2341X_OSD_SET_PIXEL_FORMAT calls to try and prevent this from
occurring.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Trying to open the radio when a capture is in progress will make it
impossible to open the radio again since the radio stream wasn't released.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
When a cx8802 sub-driver was unregistered, the struct cx8802_driver, which was
kmalloc()ed by cx8802_register_driver(), was deleted from the list of drivers,
but never freed.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Less code and more efficient.
Got ride of a variable that counted the number of devices in
cx8802_unregister_driver() but was never used. Looked leftover from a
cut&paste.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
It was a struct cx8802_driver for no apparent reason. Nothing uses a
cx8802_driver in the cx8802_dev struct. The only field that was used was
devlist, a list_head.
The code in cx8802_remove() that removed any loaded sub-drivers was broken.
It would delete the current list entry, but didn't use list_for_each_safe. It
also called list_del() on the list _head_ inside the list_for_each loop? It
would crash if it was run, which I don't think can ever happen.
Since the cx8802 sub-drivers use the cx8802 driver, they have to be unloaded
first. So there isn't any way for a sub-driver to still be loaded when
cx8802_remove() is called... Except maybe with PCI hot-plug, if one removes
the PCI card while the drivers are loaded?
So I left some code in to handle that if it's actually possible. It will
remove the sub-drivers from the device cx8802_remove() was called on, and only
that device. If one has two DVB cards and unplugs one, there is no reason to
unload the DVB drivers for both cards. I have no way to test this, but it
can't be worse than what was there before.
cx8802_get_driver() is passed a cx8802_dev pointer and looks for the requested
driver on that device. It first loops over the cx8802 device list looking for
the device it was passed, which is pointless. It doesn't need to find the
device pointer in the list, as it already has the pointer.
The list_head in the cx8802_driver struct, which joins all the _drivers_
attached to a device, was named devlist. Changed that to drvlist, since the
devlist is used for a list of _devices_ in other cx8802 structs.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
card_priv was only used to store a pointer to the vp3054 state struct.
There's no need to use a void * since it doesn't have multiple types.
Make the field conditional on VP3045 support. It was already conditional on
DVB support, but it's only used if VP3045 support is on, so that makes for a
better option to check.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add some ifdefs around fields only used for blackbird support, similar to the
way the dvb fields are only included with dvb support.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
make tvaudio thread freezeable, and add proper support for that
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fixes few more problems I found in my saa7134 resume code:
* Race between IRQ handler and .suspend()/.resume() functions
* Removes timeout timers on active buffers - those
buffers will be recaptured after resume
* Adds suspend/resume for IR code - probably
necessary if using polling mode
* Adds #ifdef CONFIG_PM overs suspend code
* Runs a quirk in set_tvnorm in suspend/resume too
* Rearranges the order of calls in saa7134_resume to
be exactly as in saa7134_initdev thus the card is
initialized in exactly the same way
* Since DMA audio capture suspend/resume isn't yet supported,
avoid re-enabling it on resume for now
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
We shouldn't dereference "itv" when we know it's NULL...
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Initialize strength to zero.
Thanks to Adrian Bunk, who spotted this with the Coverity checker.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Both cx23885_initdev and cx23885_dev_setup free the device in their
error path so a failure in the latter causes a double-free. Since
cx23885_dev_setup is only called from cx23885_initdev, it should be safe
to remove its deallocation and leave the cleanup up to the allocating
function.
Coverity CID 1922.
Signed-off-by: Florin Malita <fmalita@gmail.com>
CC: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
As videobuf_cgmbuf is defined only if CONFIG_VIDEO_V4L1_COMPAT is enabled,
move the EXPORT_SYMBOL_GPL declaration inside the #ifdef block. Fixes
compilation for x86_64 defconfig.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
cinergyT2, remove bad usage of ERESTARTSYS
test of cinergyt2->disconnect_pending doesn't ensure pending signal and so
ERESTARTSYS would reach userspace, which is not permitted. Change it to
EAGAIN.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Remove the obsolete VIDIOC_G_MPEGCOMP and VIDIOC_S_MPEGCOMP ioctls from
the V4L2 API as per the removal schedule (October 2007).
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
struct video_device used to define a .hardware field. While
initialized on severl drivers, this field is never used inside V4L.
However, drivers using it need to include the old V4L1 header.
This seems to cause compilation troubles with some random configs.
Better just to remove it from all drivers.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Remove obsolete V4L v1 reference.
Thanks to Ingo Molnar for pointing this issue.
Signed-off-by: Pekka Seppänen <pexu@kapsi.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Lets mixer apps display a dB range for the volume control.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add two mute controls. One mutes everything, the other just mutes the analog
pass-through output.
Rename the existing volume control. The controls are now:
Playback Volume
Playback Switch
Capture Switch
These names might seem odd, but I believe they are more correct. The previous
"Capture Volume" control didn't actually effect the volume of the captured
audio. Instead it controls the volume of the analog pass-thought output. It
appears that pass-through controls like this are usually considered to be in
the playback direction, not capture. For example, "CAPTURE feedback Playback
Volume" is the name used for a control that appears to have the same effect in
the ca0106 driver. We only have one volume control, so we can omit the
"CAPTURE feedback" part.
If someone where to add PCM playback support to the driver, then this would be
the volume control.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- De-confuse the defines for the address-space-control-elements
and the segment/region table entries.
- Create out of line functions for page table allocation / freeing.
- Simplify get_shadow_xxx functions.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
The current tlb flushing code for page table entries violates the
s390 architecture in a small detail. The relevant section from the
principles of operation (SA22-7832-02 page 3-47):
"A valid table entry must not be changed while it is attached
to any CPU and may be used for translation by that CPU except to
(1) invalidate the entry by using INVALIDATE PAGE TABLE ENTRY or
INVALIDATE DAT TABLE ENTRY, (2) alter bits 56-63 of a page-table
entry, or (3) make a change by means of a COMPARE AND SWAP AND
PURGE instruction that purges the TLB."
That means if one thread of a multithreaded applciation uses a vma
while another thread does an unmap on it, the page table entries of
that vma needs to get removed with IPTE, IDTE or CSP. In some strange
and rare situations a cpu could check-stop (die) because a entry has
been pushed out of the TLB that is still needed to complete a
(milli-coded) instruction. I've never seen it happen with the current
code on any of the supported machines, so right now this is a
theoretical problem. But I want to fix it nevertheless, to avoid
headaches in the futures.
To get this implemented correctly without changing common code the
primitives ptep_get_and_clear, ptep_get_and_clear_full and
ptep_set_wrprotect need to use the IPTE instruction to invalidate the
pte before the new pte value gets stored. If IPTE is always used for
the three primitives three important operations will have a performace
hit: fork, mprotect and exit_mmap. Time for some workarounds:
* 1: ptep_get_and_clear_full is used in unmap_vmas to remove page
tables entries in a batched tlb gather operation. If the mmu_gather
context passed to unmap_vmas has been started with full_mm_flush==1
or if only one cpu is online or if the only user of a mm_struct is the
current process then the fullmm indication in the mmu_gather context is
set to one. All TLBs for mm_struct are flushed by the tlb_gather_mmu
call. No new TLBs can be created while the unmap is in progress. In
this case ptep_get_and_clear_full clears the ptes with a simple store.
* 2: ptep_get_and_clear is used in change_protection to clear the
ptes from the page tables before they are reentered with the new
access flags. At the end of the update flush_tlb_range clears the
remaining TLBs. In general the ptep_get_and_clear has to issue IPTE
for each pte and flush_tlb_range is a nop. But if there is only one
user of the mm_struct then ptep_get_and_clear uses simple stores
to do the update and flush_tlb_range will flush the TLBs.
* 3: Similar to 2, ptep_set_wrprotect is used in copy_page_range
for a fork to make all ptes of a cow mapping read-only. At the end of
of copy_page_range dup_mmap will flush the TLBs with a call to
flush_tlb_mm. Check for mm->mm_users and if there is only one user
avoid using IPTE in ptep_set_wrprotect and let flush_tlb_mm clear the
TLBs.
Overall for single threaded programs the tlb flush code now performs
better, for multi threaded programs it is slightly worse. In particular
exit_mmap() now does a single IDTE for the mm and then just frees every
page cache reference and every page table page directly without a delay
over the mmu_gather structure.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Currently the ccw method is used to ipl the DASD dump record under LPAR.
This mechanism is not reliable, which can cause dump failures. This fix
now uses the diag 308 ipl method for all machines, which have diag308
subcode 5 and 4 support.
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Convert struct class_device users under drivers/s390/char to use
struct device.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Commit fa1a8c23eb intended to
introduce uevent suppression for subchannels, but half of it was
lost somewhere. Now, we end up with two uevents for every registered
subchannel :( So we should better add the missing part from
http://marc.info/?l=linux-kernel&m=117515953113974&w=2.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
We already have a macro for that, so let's use it consistently...
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Add two new sysfs entries per cpu: idle_count and idle_time.
idle_count contains the number of times a cpu went into idle state.
idle_time contains the time a cpu spent in idle state in microseconds.
This can be used e.g. by powertop to tell how often idle state is
entered and left.
# cat /sys/devices/system/cpu/cpu0/idle_count
504
# cat /sys/devices/system/cpu/cpu0/idle_time
469734037 us
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
KVM clears it by itself now, and for s390 this is plain wrong.
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Better handle wrap-around cases when reading the APIC CCR
(current count register). Also, if ICR is 0, CCR should also
be 0... previously reading CCR before setting ICR would result
in a large kinda-random number.
Signed-off-by: Kevin Pedretti <kevin.pedretti@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
kvm_lapic_reset() was initializing apic->timer.divide_count to 0,
which could potentially lead to a divide by zero error in
apic_get_tmcct(). Any guest that reads the APIC's CCR (current count)
register before setting DCR (divide configuration) would trigger a divide
by zero exception in the host kernel, leading to a host-OS crash.
This patch results in apic->timer.divide_count being initialized to
2 at reset, eliminating the bug (DCR=0 at reset, meaning divide by 2).
Signed-off-by: Kevin Pedretti <kevin.pedretti@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>