Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Rather than guess which driver supports core priority handling, require drivers
that do to explicitly set the V4L2_FL_USE_FH_PRIO flag in video_device.
Updated the core prio handling accordingly and set the flag in the three
drivers that do.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
ivtv-ioctl cast the 'void *fh' directly to 'ivtv_open_id *'. This should be
done properly with a contained_of since the 'void *fh' is really a
'struct v4l2_fh *'.
It worked because the v4l2_fh field is also the first field in the ivtv_open_id
struct, but it is not clean code.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Use core-assisted locking so .ioctl can be replaced by .unlocked_ioctl.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The video_device struct has proper ref counting and its release function
will be called when the last user releases it. But no such support was
available for struct v4l2_device. This made it hard to determine when a
USB driver can release the device if it has multiple device nodes.
With one device node it is easy of course, since when the device node is
released, the whole device can be released.
This patch adds refcounting to v4l2_device. When registering device nodes
the v4l2_device refcount will be increased, when releasing device nodes
it will be decreased. The (optional) release function will be called when
the last device node was released.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
VIDIOC_S/G_PRIORITY handling is now done by the v4l2 core framework.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Drivers that use v4l2_fh can now use the core framework support of g/s_priority.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Several drivers need to do something when the first filehandle is opened
or the last filehandle is closed. Most implement some use count mechanism,
but if they use v4l2_fh, then you can also just check if this is the only
filehandle for the device node. A simple helper function can do this.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Add two new functions: v4l2_fh_open allocates and initializes a struct v4l2_fh
based on a struct file pointer and v4l2_fh_release releases and frees a struct
v4l2_fh.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Integrate the v4l2_prio_state into the core, ready for use.
One struct v4l2_prio_state is added to v4l2_device and a pointer
to a prio state is added to video_device.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
We are going to move priority handling into the v4l2 core. As a consequence
the v4l2_prio helper functions need to be moved into the core videodev
module as well to prevent circular dependencies.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
On my AverMedia AverTV Studio 507, key up events are no longer sent after
a suspend-to-disk/resume cycle, resulting in "stuck" keys.
Apparently, for key up events to be generated, a certain GPIO pin must be set.
Currently it's set in saa7134_input_init1(), but that function is not called
on device resume. I suggest that code be moved to __saa7134_ir_start(), which
is called both on init and resume.
Signed-off-by: Vadim Solomin <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The CellsCoeffs arrays are [3][6][5] not [2][6][5].
Signed-off-by: Dan Carpenter <[email protected]>
Cc: Igor M. Liplianin <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
We use err to store negative error codes so it should be signed. And
if we return an error from stv0367_get_tuner_freq() that needs to be
handled properly as well. (param->frequency is a u32).
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The code that checks the OLPC serial port is never built at the moment,
because CONFIG_OLPC_XO_1_5 doesn't exist and probably won't be added.
Fix it so that it gets compiled in, only executes on OLPC laptops, and
move the check into the probe routine.
The compiler is smart enough to eliminate this code when CONFIG_OLPC=n
(due to machine_is_olpc() always returning false).
Signed-off-by: Daniel Drake <[email protected]>
Acked-by: Jonathan Corbet <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
These bubble button remote controls appear to be generic from China.
These are the three variants known to be supplied with DM04/QQBOX DVB-S
They could well be supplied with other devices from the region.
Signed-off-by: Malcolm Priestley <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Use 32 bit decoding to add support for more than one variant of remote
control.
Signed-off-by: Malcolm Priestley <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
DM04 LME2510(C) Sharp BS2F7HZ0194 Firmware Information
Signed-off-by: Malcolm Priestley <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Old versions of these boxes have the BS2F7HZ0194 tuner module on
both the LME2510 and LME2510C.
Firmware dvb-usb-lme2510-s0194.fw and/or dvb-usb-lme2510c-s0194.fw
files are required.
See Documentation/dvb/lmedm04.txt
Signed-off-by: Malcolm Priestley <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
in pd_vidioc_s_fmt
Error path in file drivers/media/video/tlg2300/pd-video.c:
1. First mutex_unlock on &pd->lock in line 767 (in function that
called from line 805)
2. Second in line 806
805 pd_vidioc_s_fmt(pd, &f->fmt.pix);
806 mutex_unlock(&pd->lock);
Found by Linux Device Drivers Verification Project
Signed-off-by: Alexander Strakh <[email protected]>
Acked-by: Huang Shijie <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
wl1273_device->work is unused. Remove it along with the spurious
flush_scheduled_work() call in wl1273_fm_module_exit().
Signed-off-by: Tejun Heo <[email protected]>
Cc: Matti Aaltonen <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
On Thu, 17 Feb 2011, Matthias Schwarzott wrote:
> On Sunday 06 February 2011, Jesper Juhl wrote:
> > If the memory allocation to 'state' succeeds but we jump to the 'error'
> > label before 'state' is assigned to fe->tuner_priv, then the call to
> > 'zl10036_release(fe)' at the 'error:' label will not free 'state', but
> > only what was previously assigned to 'tuner_priv', thus leaking the memory
> > allocated to 'state'.
> > There are may ways to fix this, including assigning the allocated memory
> > directly to 'fe->tuner_priv', but I did not go for that since the
> > additional pointer derefs are more expensive than the local variable, so I
> > just added a 'kfree(state)' call. I guess the call to 'zl10036_release'
> > might not even be needed in this case, but I wasn't sure, so I left it in.
> >
> Yeah, that call to zl10036_release can be completely eleminated.
> Another thing is: jumping to the error label only makes sense when memory was
> already allocated. So the jump in line 471 can be replaced by "return NULL",
> as the other error handling before allocation:
> if (NULL == config) {
> printk(KERN_ERR "%s: no config specified", __func__);
> goto error;
> }
>
> I suggest to improve the patch to clean the code up when changing that.
>
> But I am fine with commiting this patch also if you do not want to change it.
>
Thank you for your feedback. It makes a lot of sense.
Changing it is not a problem :)
How about the updated patch below?
If the memory allocation to 'state' succeeds but we jump to the 'error'
label before 'state' is assigned to fe->tuner_priv, then the call to
'zl10036_release(fe)' at the 'error:' label will not free 'state', but
only what was previously assigned to 'tuner_priv', thus leaking the memory
allocated to 'state'.
This patch fixes the leak and also does not jump to 'error:' before mem
has been allocated but instead just returns. Also some small style
cleanups.
Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: Matthias Schwarzott <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
mem->dma_handle is a dma address obtained by dma_alloc_coherent which
needn't be a physical address in presence of IOMMU, as
a hardware IOMMU can (and most likely) will return a bus address where
physical != bus address.
So ensure we are remapping (remap_pfn_range) the right page in
__videobuf_mmap_mapper by using virt_to_phys(mem->vaddr) and not
mem->dma_handle.
While at it, use PFN_DOWN instead of explicit shift.
[[email protected]: Fix compilation breakage due to the lack of a comma]
Signed-off-by: Jiri Slaby <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Commit 4057ac6ca9a77c4275b34b5925ab5c99557913b1
V4L/DVB (13505): uvcvideo: Refactor chain scan
broke output terminals parsing. Fix it.
Signed-off-by: Laurent Pinchart <[email protected]>
Cc: [email protected]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The scheme used to index format in uvc_fixup_video_ctrl() is not robust:
format index is based on descriptor ordering, which does not necessarily
match bFormatIndex ordering. Searching for first matching format will
prevent uvc_fixup_video_ctrl() from using the wrong format/frame to make
adjustments.
Signed-off-by: Stephan Lachowsky <[email protected]>
Cc: [email protected]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Fix vb2 not handling return value from start_streaming() callback.
Signed-off-by: Pawel Osciak <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
poll() should be returning poll-specific error values, not E* errors.
Signed-off-by: Pawel Osciak <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Pawel Osciak <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Multi-planar API was added to 2.6.39 version of Video for Linux 2 API.
Signed-off-by: Pawel Osciak <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Split FW download packages smarter way and bug free. Implementation is
based of Andrea Merello's example he provided for tda18218 driver.
Count remaining FW bytes down in loop instead of division and modulo
combination used earlier.
Thanks to: Andrea Merello <[email protected]>
Signed-off-by: Antti Palosaari <[email protected]>
Cc: Andrea Merello <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Quick test shows that FW must be running before other checks
so make it happen earlier.
Signed-off-by: Antti Palosaari <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Split FW download packages smarter way and bug free. Implementation is
based of Andrea Merello's example he provided for tda18218 driver.
Count remaining FW bytes down in loop instead of division and modulo
combination used earlier.
Thanks-to: Andrea Merello <[email protected]>
Signed-off-by: Antti Palosaari <[email protected]>
Cc: Andrea Merello <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Map rc-terratec-slim-2 for TerraTec Cinergy T Stick RC device.
Signed-off-by: Antti Palosaari <[email protected]>
Cc: Martin Groszhauser <[email protected]>
Cc: TerraTux <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Remote used for TerraTec Cinergy T Stick RC.
Keytable from Martin Groszhauser <[email protected]>
Signed-off-by: Antti Palosaari <[email protected]>
Cc: Martin Groszhauser <[email protected]>
Cc: TerraTux <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Antti Palosaari <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Patch from Ian Armstrong.
I've encountered a couple of problems with the current af9015 driver as
supplied with the 2.6.37 kernel, that the attached patch appears to fix. (I've
generated this patch against the current v4l-dvb git).
Some key-presses are lost. A key-press is only generated upon 'valid' data
(buf[14] == (u8) ~buf[15]), but the buffer is wiped before this check.
Sometimes the 15th byte has not been set at the time of read, so the data
isn't valid & ignored. On the next poll the 15th byte has been set, but the
rest of the data was wiped previously, so the data is still invalid & the key
is lost.
Weird repeat error, where an old key press is sometimes repeated in error. ie.
button sequence '1 (pause) 2 (pause) 3 (pause) 4' generates output like '1
(pause) 2 (pause) 23 (pause) 4'. The current driver zeroes the data for the
key pushed, but sometimes this data is already zero but with other bytes set
suggesting a repeat code. This results in the last key being incorrectly
repeated.
This patch attempts to reduce the risk of a missed key-press & also stop the
random repeat of an old key-press when a new key is pressed.
Signed-off-by: Ian Armstrong <[email protected]>
Signed-off-by: Antti Palosaari <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
[[email protected]: Fix a few CodingStyle issues]
Tested-by: Kjell Claesson <[email protected]>
Tested-by: Hans de Goede <[email protected]>
Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
- change copyright and erroneous comment
- small code optimization
- have constant the device template
Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
- update copyright and module author
- set the sensor table as constant
Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|