Age | Commit message (Collapse) | Author | Files | Lines |
|
struct v4l2
Move some temporary capture tracking date to the em28xx_v4l2 struct,
as those info are used only by em28xx v4l2 submodule.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Move camera sensor resolution and xtal out of em28xx common struct,
as thore are used only by the em28xx v4l2 submodule.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
struct v4l2
The video progressive data fields belong to analog TV. Move them out
of the common em28xx struct.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The analog format struct belongs to analog TV. Move it out of the
common em28xx struct.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
TV norm is specific to analog TV reception. move it out of the common
em28xx struct.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The video input mode and control data also belong only to the
analog side. move them to struct em28xx_v4l.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
em28xx to struct v4l2
The em28xx scaler data are used only for analog video. Move them to
struct em28xx_v4l2.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The video and VBI-specific VB2 queue and mutexes are used only by
the v4l2 sub-driver. Move them to the V4L2 struct, preventing
wasting memory if this sub-driver is not used.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
There are 3 struct video_device at the em28xx common struct,
for video, VBI and radio. They all are used only by the V4L2 driver.
So, move them to the v4l2-specific struct.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The current clock definition applies only to the V4L2 side of the
driver. Move its struct pointer to the v4l2_dev, where it belongs.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
em28xx to struct v4l2
Controls are only applicable to V4L2 module. Move the corresponding
data structs to the proper place.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
That reduces a little bit the memory footprint when em28xx-video
is not loaded.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
v4l2_ctrl_handler in em28xx_v4l2_init()
The local var hdl is already pointing to &dev->ctrl_handler.
Use it, instead of dereferencing it all the time.
Code cleanup. No functional changes.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
struct
Just a cleanup. No functional changes.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
It is no longer needed since nobody is calling i2c_get_adapdata() anymore.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Mikhail Domrachev <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The message logged by v4l_print_cropcap should be a single line withouti
linebreaks, just like all the other v4l_print_<ioctl> functions.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
tcm825x.c:
changed printk to pr_info
Signed-off-by: Vitaly Osipov <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
tcm825x.c:
fixing ERROR: Macros with complex values should be enclosed in parenthesis
Signed-off-by: Vitaly Osipov <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The second argument should be physical address rather than virtual address.
Signed-off-by: Ma Haijun <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
When ivtv PCM device is accessed at the state where no firmware is
loaded, it oopses like:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000050
IP: [<ffffffffa049a881>] try_mailbox.isra.0+0x11/0x50 [ivtv]
Call Trace:
[<ffffffffa049aa20>] ivtv_api_call+0x160/0x6b0 [ivtv]
[<ffffffffa049af86>] ivtv_api+0x16/0x40 [ivtv]
[<ffffffffa049b10c>] ivtv_vapi+0xac/0xc0 [ivtv]
[<ffffffffa049d40d>] ivtv_start_v4l2_encode_stream+0x19d/0x630 [ivtv]
[<ffffffffa0530653>] snd_ivtv_pcm_capture_open+0x173/0x1c0 [ivtv_alsa]
[<ffffffffa04526f1>] snd_pcm_open_substream+0x51/0x100 [snd_pcm]
[<ffffffffa0452853>] snd_pcm_open+0xb3/0x260 [snd_pcm]
[<ffffffffa0452a37>] snd_pcm_capture_open+0x37/0x50 [snd_pcm]
[<ffffffffa033f557>] snd_open+0xa7/0x1e0 [snd]
[<ffffffff8118a628>] chrdev_open+0x88/0x1d0
[<ffffffff811840be>] do_dentry_open+0x1de/0x270
[<ffffffff81193a73>] do_last+0x1c3/0xec0
[<ffffffff81194826>] path_openat+0xb6/0x670
[<ffffffff81195b65>] do_filp_open+0x35/0x80
[<ffffffff81185449>] do_sys_open+0x129/0x210
[<ffffffff815b782d>] system_call_fastpath+0x1a/0x1f
This patch adds the check of firmware at PCM open callback like other
open callbacks of this driver.
Bugzilla: https://apibugzilla.novell.com/show_bug.cgi?id=875440
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
This will help to debug driver, allows us to see the full name of
the device through /proc/interrupts.
CPU0
...
69: 0 mxc-avic 53 10023000.coda
...
Signed-off-by: Alexander Shiyan <[email protected]>
Acked-by: Philipp Zabel <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
back fails
this patch adds support to release the buffer by calling
vb2_buffer_done(), with state marked as VB2_BUF_STATE_QUEUED
if start_streaming() call back fails.
Signed-off-by: Lad, Prabhakar <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
smatch says:
drivers/media/usb/s2255/s2255drv.c:2246 s2255_probe() warn:
possible memory leak of 'dev'
Signed-off-by: Daeseok Youn <[email protected]>
Acked-by: Sakari Ailus <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
This patch moves data allocated using kzalloc to managed data allocated
using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
functions.The label err_register is removed as it is no longer required.
The following Coccinelle semantic patch was used for making the change:
@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
.probe = probefn,
.remove = removefn,
};
@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
<+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Saraogi <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Fix format string mismatch in bw-qcam.c
Signed-off-by: Masanari Iida <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
vb2_get_vma() copy the content of the vma to a new structure but set
some of its pointers to NULL.
One of this pointer is used by follow_pte() called by follow_pfn()
on io memory.
This can lead to a NULL pointer derreference.
The version of vma that has not been cleared must be used.
[ 406.143320] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
[ 406.143427] IP: [<ffffffff8115204c>] follow_pfn+0x2c/0x70
[ 406.143491] PGD 6c3f0067 PUD 6c3ef067 PMD 0
[ 406.143546] Oops: 0000 [#1] SMP
[ 406.143587] Modules linked in: qtec_mem qt5023_video qtec_testgen qtec_xform videobuf2_core gpio_xilinx videobuf2_vmalloc videobuf2_dma_sg qtec_cmosis videobuf2_memops qtec_pcie qtec_white fglrx(PO) qt5023 spi_xilinx spi_bitbang
[ 406.143852] CPU: 0 PID: 299 Comm: tracker Tainted: P O 3.13.0-qtec-standard #10
[ 406.143927] Hardware name: QTechnology QT5022/QT5022, BIOS PM_2.1.0.309 X64 04/04/2013
[ 406.144000] task: ffff880085c82d60 ti: ffff880085abe000 task.ti: ffff880085abe000
[ 406.144067] RIP: 0010:[<ffffffff8115204c>] [<ffffffff8115204c>] follow_pfn+0x2c/0x70
[ 406.144145] RSP: 0018:ffff880085abf888 EFLAGS: 00010296
[ 406.144195] RAX: 0000000000000000 RBX: ffff880085abf8e0 RCX: ffff880085abf888
[ 406.144260] RDX: ffff880085abf890 RSI: 00007fc52e173000 RDI: ffff8800863cbe40
[ 406.144325] RBP: ffff880085abf8a8 R08: 0000000000000018 R09: ffff8800863cbf00
[ 406.144388] R10: ffff880086703b80 R11: 00000000000001e0 R12: 0000000000018000
[ 406.144452] R13: 0000000000000000 R14: ffffea0000000000 R15: ffff88015922fea0
[ 406.144517] FS: 00007fc536e7c740(0000) GS:ffff88015ec00000(0000) knlGS:0000000000000000
[ 406.144591] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 406.144644] CR2: 0000000000000040 CR3: 0000000066c9d000 CR4: 00000000000007f0
[ 406.144708] Stack:
[ 406.144731] 0000000000018000 00007fc52e18b000 0000000000000000 00007fc52e173000
[ 406.144813] ffff880085abf918 ffffffffa083b2fd ffff880085ab1ba8 0000000000000000
[ 406.144894] 0000000000000000 0000000100000000 ffff880085abf928 ffff880159a20800
[ 406.144976] Call Trace:
[ 406.145011] [<ffffffffa083b2fd>] vb2_dma_sg_get_userptr+0x14d/0x310 [videobuf2_dma_sg]
[ 406.145089] [<ffffffffa08507df>] __qbuf_userptr+0xbf/0x3e0 [videobuf2_core]
[ 406.147229] [<ffffffffa0041454>] ? mc_heap_lock_memory+0x1f4/0x490 [fglrx]
[ 406.149234] [<ffffffff813428f3>] ? cpumask_next_and+0x23/0x50
[ 406.151223] [<ffffffff810b2e38>] ? enqueue_task_fair+0x658/0xde0
[ 406.153199] [<ffffffff81061888>] ? native_smp_send_reschedule+0x48/0x60
[ 406.155184] [<ffffffff815836b9>] ? get_ctrl+0xa9/0xd0
[ 406.157161] [<ffffffff8116f4e4>] ? __kmalloc+0x1a4/0x1b0
[ 406.159135] [<ffffffffa0850b9c>] ? __vb2_queue_alloc+0x9c/0x4a0 [videobuf2_core]
[ 406.161130] [<ffffffffa0852d08>] __buf_prepare+0x1a8/0x210 [videobuf2_core]
[ 406.163171] [<ffffffffa0854c57>] __vb2_qbuf+0x27/0xcc [videobuf2_core]
[ 406.165229] [<ffffffffa0851dfd>] vb2_queue_or_prepare_buf+0x1ed/0x270 [videobuf2_core]
[ 406.167325] [<ffffffffa0854c30>] ? vb2_ioctl_querybuf+0x30/0x30 [videobuf2_core]
[ 406.169419] [<ffffffffa0851e9c>] vb2_qbuf+0x1c/0x20 [videobuf2_core]
[ 406.171508] [<ffffffffa0851ef8>] vb2_ioctl_qbuf+0x58/0x70 [videobuf2_core]
[ 406.173604] [<ffffffff8157d3a8>] v4l_qbuf+0x48/0x60
[ 406.175681] [<ffffffff8157b29c>] __video_do_ioctl+0x2bc/0x340
[ 406.177779] [<ffffffff8116f43c>] ? __kmalloc+0xfc/0x1b0
[ 406.179883] [<ffffffff8157cd0e>] ? video_usercopy+0x7e/0x470
[ 406.181961] [<ffffffff8157ce81>] video_usercopy+0x1f1/0x470
[ 406.184021] [<ffffffff8157afe0>] ? v4l_printk_ioctl+0xb0/0xb0
[ 406.186085] [<ffffffff810ae1ed>] ? account_system_time+0x8d/0x190
[ 406.188149] [<ffffffff8157d115>] video_ioctl2+0x15/0x20
[ 406.190216] [<ffffffff815781b3>] v4l2_ioctl+0x123/0x160
[ 406.192251] [<ffffffff810ce415>] ? rcu_eqs_enter+0x65/0xa0
[ 406.194256] [<ffffffff81186b28>] do_vfs_ioctl+0x88/0x560
[ 406.196258] [<ffffffff810ae145>] ? account_user_time+0x95/0xb0
[ 406.198262] [<ffffffff810ae6a4>] ? vtime_account_user+0x44/0x70
[ 406.200215] [<ffffffff81187091>] SyS_ioctl+0x91/0xb0
[ 406.202107] [<ffffffff817be109>] tracesys+0xd0/0xd5
[ 406.203946] Code: 66 66 66 90 48 f7 47 50 00 44 00 00 b8 ea ff ff ff 74 52 55 48 89 e5 53 48 89 d3 48 8d 4d e0 48 8d 55 e8 48 83 ec 18 48 8b 47 40 <48> 8b 78 40 e8 8b fe ff ff 85 c0 75 27 48 8b 55 e8 48 b9 00 f0
[ 406.208011] RIP [<ffffffff8115204c>] follow_pfn+0x2c/0x70
[ 406.209908] RSP <ffff880085abf888>
[ 406.211760] CR2: 0000000000000040
[ 406.213676] ---[ end trace 996d9f64e6739a04 ]---
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Acked-by: Marek Szyprowski <[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]>
|
|
This patch fixes an off by one check in bcm2048_set_region().
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Pali Rohár <[email protected]>
Signed-off-by: Pavel Machek <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Cc: [email protected]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
using it
Function del_timer() does not guarantee that timer was really deleted.
If the timer handler is beeing executed at the moment, the function
does nothing. So, we have a race between del_timer() and kfree(), and
it's possible to use already freed memory in the handler.
Signed-off-by: Kirill Tkhai <[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]>
|
|
The else statement here is not aligned with the correct if statement.
I think the code works as intended and it's just the indenting which is
wrong. Also kernel style says we should use curly braces here so I have
added those.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
devm_ioremap_resource() returns a pointer to the remapped memory or
an ERR_PTR() encoded error code on failure. Fix the checks inside
csc_create() and sc_create() accordingly.
Cc: Archit Taneja <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Tested-by: Archit Taneja<[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
em28xx_compression_disable() is a single line function which is called only one
time and this call also isn't needed.
Register 0x26 is always configured as part of the scaler configuration, which
in turn is always done when the resolution changes. And the initial resolution
setting is applied at first device open.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Just driver cleanup. No functional changes.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
No functional changes.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Allow the system to merge CPU wakeups by specifying different minimum
and maximum usleep values.
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Instead of implementing usleep_range-based poll loops manually (and
slightly differently), create a generic iss_poll_wait_timeout() macro
and use it through the driver.
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The error was reported by checkpatch.pl. Fix it.
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Now that the VIDEO_OMAP4_DEBUG Kconfig option has been removed in favour
of dynamic printk, the DEBUG macro isn't defined anymore. Don't check
for it to guard IRQ debugging messages compilation, as they're already
guarded by the ISS_ISR_DEBUG macro.
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The option was supposed to control the definition of the DEBUG macro in
the Makefile but has been left unused by mistake. Given that debugging
should be enabled using dynamic printk, remote the Kconfig option.
[Reworked the commit message]
Signed-off-by: Paul Bolle <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Prepare for supporting systems using the Device tree. Should the resources
not be available at the time of driver probe(), the EPROBE_DEFER error code
must be also returned from its probe function.
Signed-off-by: Sakari Ailus <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Do not use our special value, SMIAPP_NO_XSHUTDOWN.
Signed-off-by: Sakari Ailus <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Rename "VANA" regulator as "vana".
Signed-off-by: Sakari Ailus <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The "best" value was unsigned however, leading to signed-to-unsigned
comparison and wrong results. Possibly only on a newer GCC. Fix this by
making the best value signed as well.
Signed-off-by: Sakari Ailus <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Some of the limits are used before the limits quirk is called. Move the call
immediately after obtaining the limits.
Signed-off-by: Sakari Ailus <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
This makes constructing quirks easier.
Signed-off-by: Sakari Ailus <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
timestamps in v4l2 buffers returned to userspace are updated in
uvc_video_clock_update() which uses timestamps fetched from
uvc_video_clock_decode() by calling unconditionally ktime_get_ts().
Hence setting the module clock param to realtime has no effect before
this patch.
This has been tested with ffmpeg:
ffmpeg -y -f v4l2 -input_format yuyv422 -video_size 640x480 -framerate 30 -i /dev/video0 \
-f alsa -acodec pcm_s16le -ar 16000 -ac 1 -i default \
-c:v libx264 -preset ultrafast \
-c:a libfdk_aac \
out.mkv
and inspecting the v4l2 input starting timestamp.
Cc: Stable <[email protected]>
Signed-off-by: Olivier Langlois <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Set error bit for incomplete buffers when end of buffer is detected by
FID toggling (for example when last transaction with EOF is lost).
This prevents passing incomplete buffers to the userspace.
Signed-off-by: Anton Leontiev <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|