11 Dec, 2013
21 commits
-
Stop that, stop that! You're not going to do a song while I'm here.
Signed-off-by: Kees Cook
Signed-off-by: Mauro Carvalho Chehab -
When VPDMA fetches or writes to an image buffer, the line stride must be a
multiple of 16 bytes. If it isn't, VPDMA HW will write/fetch until the next
16 byte boundry. This causes VPE to work incorrectly for source or destination
widths which don't satisfy the above alignment requirement.
In order to prevent this, we now make sure that when we set pix format for the
input and output buffers, the VPE source and destination image line strides are
16 byte aligned. Also, the motion vector buffers for the de-interlacer are
allocated in such a way that it ensures the same alignment.Signed-off-by: Archit Taneja
Signed-off-by: Mauro Carvalho Chehab -
The data_type value to be programmed in the data descriptors to fetch/write a
UYVY buffer was not mentioned correctly in the older DRA7x documentation. This
caused VPE to fail with UYVY color formats.
Update the data_type value to fix functionality when UYVY format is used.Signed-off-by: Archit Taneja
Signed-off-by: Mauro Carvalho Chehab -
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.Signed-off-by: Jingoo Han
Signed-off-by: Mauro Carvalho Chehab -
The SpeedLink Vicious And Devine Laplace webcam is using an EM2765 bridge and
an OV2640 sensor. It has a built-in microphone (USB standard device class)
and provides 3 buttons (snapshot, illumination, mute) and 2 LEDs (capturing/mute
and illumination/flash). It is also equipped with an eeprom.
The device is available in two colors: white (1ae7:9003) and black (1ae7:9004).
For further details see http://linuxtv.org/wiki/index.php/VAD_Laplace.
Please note the following limitations that need to be addressed later:
- resolution limited to 640x480 (sensor supports 1600x1200)
- picture quality needs to be improved
- AV-mute button doesn't work yetSigned-off-by: Frank Schäfer
Signed-off-by: Mauro Carvalho Chehab -
The SpeedLink VAD Laplace webcam is equipped with an illumination button and
an illumination LED. When the button is pressed, the driver must toggle the
LED state via the corresponding GPO port.Signed-off-by: Frank Schäfer
Signed-off-by: Mauro Carvalho Chehab -
Introduce a LED role and store all LEDs in an array.
Also provide a helper function to retrieve a specific LED.Signed-off-by: Frank Schäfer
Signed-off-by: Mauro Carvalho Chehab -
So far, the driver only supports a snapshot button which is assigned to
register 0x0c bit 5. This special port has a built-in debouncing mechanism.
For buttons connected to ordinary GPI ports, this patch implements a software
debouncing mechanism.Signed-off-by: Frank Schäfer
Signed-off-by: Mauro Carvalho Chehab -
The current code supports only a single snapshot button assigned to
register 0x0c bit 5. But devices may be equipped with multiple buttons
with different functionalities and they can also be assigned to the
various GPI-ports.
Extend the em28xx-input code to handle multiple buttons assigned to different
GPI-ports / register addresses and bits.
Also make easier to extend the code with further button types.Signed-off-by: Frank Schäfer
Signed-off-by: Mauro Carvalho Chehab -
Some devices are equipped with a capturing status LED that needs to be
switched on/off explicitly via a GPO port.Signed-off-by: Frank Schäfer
Signed-off-by: Mauro Carvalho Chehab -
vs6624_read() is only called in the conditionally-compiled
vs6624_g_register() function. Make the former conditionally-compiled as
well to silence build warnings.Signed-off-by: Laurent Pinchart
Acked-by: Scott Jiang
Signed-off-by: Mauro Carvalho Chehab -
Too much noise, also does not cover every possible code paths.
Signed-off-by: Mauro Dreissig
Acked-by: Greg Kroah-Hartman
Signed-off-by: Mauro Carvalho Chehab -
As pointed out by sparse:
drivers/staging/media/as102/as102_fw.c:29:6: warning: symbol 'as102_st_fw1' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:30:6: warning: symbol 'as102_st_fw2' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:31:6: warning: symbol 'as102_dt_fw1' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:32:6: warning: symbol 'as102_dt_fw2' was not declared. Should it be static?
drivers/staging/media/as102/as102_usb_drv.c:194:25: warning: symbol 'as102_priv_ops' was not declared. Should it be static?
Also use the const qualifier on the firmware name strings.Signed-off-by: Mauro Dreissig
Acked-by: Greg Kroah-Hartman
Signed-off-by: Mauro Carvalho Chehab -
Add tracepoints to the QBUF and DQBUF ioctls to enable rudimentary
performance measurements using standard kernel tracers.[m.chehab@samsung.com: CodingStyle fixes (whitespacing)]
Signed-off-by: Wade FarnsworthSigned-off-by: Mauro Carvalho Chehab
-
We recently introduced some new error paths but the unlocks are missing.
Fixes: 0065a79a8698 ('[media] dw2102: Don't use dynamic static allocation')Signed-off-by: Dan Carpenter
Signed-off-by: Mauro Carvalho Chehab -
We recently introduced some new error paths which are missing their
unlocks.
Fixes: 64f7ef8afbf8 ('[media] cxusb: Don't use dynamic static allocation')Signed-off-by: Dan Carpenter
Signed-off-by: Mauro Carvalho Chehab -
It upsets static checkers when we don't check for allocation failure. I
moved the memset() of "tv" earlier so we don't use uninitialized data on
error.
Fixes: 1d212cf0c2d8 ('[media] cx18: struct i2c_client is too big for stack')Signed-off-by: Dan Carpenter
Acked-by: Andy Walls
Signed-off-by: Mauro Carvalho Chehab -
Add usb id of Hauppauge WinTV-HVR-930C HD to mceusb RC driver.
This device has no IR transmitter (according to eeprom content decoded
by tveeprom).
Set the rc mapping to Hauppauge, every key of the deliviered remote
control works correctly.[m.chehab@samsung.com: fix merge conflicts and unmangled whitespace]
Signed-off-by: Matthias SchwarzottSigned-off-by: Mauro Carvalho Chehab
-
We had set the pci drvdata in cx88_audio_initdev() as a type of
struct snd_card, so cx88_audio_finidev() should used it as the
same type too.Signed-off-by: Wei Yongjun
Signed-off-by: Mauro Carvalho Chehab -
Use RC Core instead of the legacy RC.
DVBWorld, TBS, TeVii, Prof hardware decode only NEC remotes (one byte code).
Geniatech hardware decode only RC5 (two bytes).
+ New keymap for Geniatech HDStar (SU3000).Signed-off-by: Evgeny Plehov
Signed-off-by: Mauro Carvalho Chehab -
Support for Geniatech T220 DVB-T/T2/C USB stick.
Signed-off-by: Evgeny Plehov
Signed-off-by: Mauro Carvalho Chehab
10 Dec, 2013
9 commits
-
We had set the i2c clientdata to &flash->subdev_led[LM3560_LED1]
after call lm3560_subdev_init(flash, LM3560_LED1, "lm3560-led1"),
but the container_of() in lm3560_remove() return the wrong pointer
to flash.(should be container_of(subdev, struct lm3560_flash,
subdev_led[LM3560_LED_MAX-1])
This patch fix to set i2c clientdata to flash so we can get flash
from clientdata directly.Signed-off-by: Wei Yongjun
Signed-off-by: Mauro Carvalho Chehab -
Add the missing unlock before return from function lm3560_set_ctrl()
in the error handling case.Signed-off-by: Wei Yongjun
Signed-off-by: Mauro Carvalho Chehab -
It is IT9135 dual design.
Thanks to Michael Piko for reporting that!Reported-by: Michael Piko
Signed-off-by: Antti Palosaari
Signed-off-by: Mauro Carvalho Chehab -
This helps increasing build testing coverage.
Cc: Guennadi Liakhovetski
Signed-off-by: Laurent Pinchart
Acked-by: Simon Horman
Signed-off-by: Mauro Carvalho Chehab -
This is similar to the Terratec H7. It works with the same az6007 firmware as
the former, however the drx-k firmware of the H7 will NOT work. Hence use
a different firmware name. The firmware does not need to exist as the one in
the eeprom is just fine as long as the h7 one doesn't get loaded, but maybe
some day someone wants to load it (the one from the h5 would work too).
Also since the config entry is now different anyway disable support for rc.
AFAIK the Technisat remote (TS35) is RC5 and the code (which a code comment
claims doesn't work anyway) only would handle NEC hence it's pointless creating
a device and polling it if we already know it can't work.
CI is untested.Originally based on idea found on
http://www.linuxtv.org/wiki/index.php/TechniSat_CableStar_Combo_HD_CI claiming
only id needs to be added (but failed to mention it only worked because the
driver couldn't find the h7 drx-k firmware...).Signed-off-by: Roland Scheidegger
Signed-off-by: Mauro Carvalho Chehab -
In case of error, the function devm_kzalloc() and devm_ioremap()
returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return
value check should be replaced with NULL test.Signed-off-by: Wei Yongjun
Reviewed-by: Archit Taneja
Signed-off-by: Mauro Carvalho Chehab -
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.Signed-off-by: Wei Yongjun
Reviewed-by: Archit Taneja
Signed-off-by: Mauro Carvalho Chehab -
module_platform_driver() makes the code simpler by eliminating
boilerplate code.Signed-off-by: Wei Yongjun
Signed-off-by: Mauro Carvalho Chehab -
As value can be initialized with a value lower than zero, change it
to int, to avoid those warnings:drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_rds_pi_read':
drivers/staging/media/bcm2048/radio-bcm2048.c:1989:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
struct bcm2048_device *bdev = dev_get_drvdata(dev); \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2070:1: note: in expansion of macro 'property_read'
property_read(rds_pi, unsigned int, "%x")
^
drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_fm_rds_flags_read':
drivers/staging/media/bcm2048/radio-bcm2048.c:1989:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
struct bcm2048_device *bdev = dev_get_drvdata(dev); \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2074:1: note: in expansion of macro 'property_read'
property_read(fm_rds_flags, unsigned int, "%u")
^
drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_region_bottom_frequency_read':
drivers/staging/media/bcm2048/radio-bcm2048.c:1989:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
struct bcm2048_device *bdev = dev_get_drvdata(dev); \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2077:1: note: in expansion of macro 'property_read'
property_read(region_bottom_frequency, unsigned int, "%u")
^
drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_region_top_frequency_read':
drivers/staging/media/bcm2048/radio-bcm2048.c:1989:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
struct bcm2048_device *bdev = dev_get_drvdata(dev); \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2078:1: note: in expansion of macro 'property_read'
property_read(region_top_frequency, unsigned int, "%u")Cc: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
09 Dec, 2013
10 commits
-
Memory exported via remap_pfn_range cannot be remapped via
get_user_pages.
Other videobuf2 methods (like the dma-contig) supports io memory.
This patch adds support for this kind of memory.
v2: Comments by Marek Szyprowski
-Use vb2_get_vma and vb2_put_vmaSigned-off-by: Ricardo Ribalda Delgado
Acked-by: Marek Szyprowski
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
vb2_fop_release does not hold the lock although it is modifying the
queue->owner field.
This could lead to race conditions on the vb2_perform_io function
when multiple applications are accessing the video device via
read/write API:
[ 308.297741] BUG: unable to handle kernel NULL pointer dereference at
0000000000000260
[ 308.297759] IP: [] vb2_perform_fileio+0x372/0x610
[videobuf2_core]
[ 308.297794] PGD 159719067 PUD 158119067 PMD 0
[ 308.297812] Oops: 0000 #1 SMP
[ 308.297826] Modules linked in: qt5023_video videobuf2_dma_sg
qtec_xform videobuf2_vmalloc videobuf2_memops videobuf2_core
qtec_white qtec_mem gpio_xilinx qtec_cmosis qtec_pcie fglrx(PO)
spi_xilinx spi_bitbang qt5023
[ 308.297888] CPU: 1 PID: 2189 Comm: java Tainted: P O 3.11.0-qtec-standard #1
[ 308.297919] Hardware name: QTechnology QT5022/QT5022, BIOS
PM_2.1.0.309 X64 05/23/2013
[ 308.297952] task: ffff8801564e1690 ti: ffff88014dc02000 task.ti:
ffff88014dc02000
[ 308.297962] RIP: 0010:[] []
vb2_perform_fileio+0x372/0x610 [videobuf2_core]
[ 308.297985] RSP: 0018:ffff88014dc03df8 EFLAGS: 00010202
[ 308.297995] RAX: 0000000000000000 RBX: ffff880158a23000 RCX: dead000000100100
[ 308.298003] RDX: 0000000000000000 RSI: dead000000200200 RDI: 0000000000000000
[ 308.298012] RBP: ffff88014dc03e58 R08: 0000000000000000 R09: 0000000000000001
[ 308.298020] R10: ffffea00051e8380 R11: ffff88014dc03fd8 R12: ffff880158a23070
[ 308.298029] R13: ffff8801549040b8 R14: 0000000000198000 R15: 0000000001887e60
[ 308.298040] FS: 00007f65130d5700(0000) GS:ffff88015ed00000(0000)
knlGS:0000000000000000
[ 308.298049] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 308.298057] CR2: 0000000000000260 CR3: 0000000159630000 CR4: 00000000000007e0
[ 308.298064] Stack:
[ 308.298071] ffff880156416c00 0000000000198000 0000000000000000
ffff880100000001
[ 308.298087] ffff88014dc03f50 00000000810a79ca 0002000000000001
ffff880154904718
[ 308.298101] ffff880156416c00 0000000000198000 ffff880154904338
ffff88014dc03f50
[ 308.298116] Call Trace:
[ 308.298143] [] vb2_read+0x14/0x20 [videobuf2_core]
[ 308.298198] [] vb2_fop_read+0xc4/0x120 [videobuf2_core]
[ 308.298252] [] v4l2_read+0x7e/0xc0
[ 308.298296] [] vfs_read+0xa9/0x160
[ 308.298312] [] SyS_read+0x52/0xb0
[ 308.298328] [] tracesys+0xd0/0xd5
[ 308.298335] Code: e5 d6 ff ff 83 3d be 24 00 00 04 89 c2 4c 8b 45 b0
44 8b 4d b8 0f 8f 20 02 00 00 85 d2 75 32 83 83 78 03 00 00 01 4b 8b
44 c5 48 88 60 02 00 00 85 c9 0f 84 b0 00 00 00 8b 40 58 89 c2 41
89
[ 308.298487] RIP [] vb2_perform_fileio+0x372/0x610
[videobuf2_core]
[ 308.298507] RSP
[ 308.298514] CR2: 0000000000000260
[ 308.298526] ---[ end trace e8f01717c96d1e41 ]---Signed-off-by: Ricardo Ribalda
Acked-by: Hans Verkuil
Acked-by: Sylwester Nawrocki
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
__qbuf_dmabuf checks whether size of provided dmabuf is large
enough, and it returns error without any log. So this patch adds
error log in the case.Signed-off-by: Seung-Woo Kim
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
According to the doc:
If VIDIOC_STREAMON is called when streaming is already in progress,
or if VIDIOC_STREAMOFF is called when streaming is already stopped,
then the ioctl does nothing and 0 is returned.
The current implementation was returning -EINVAL instead.Signed-off-by: Ricardo Ribalda Delgado
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
num_pages_from_user and buf->num_pages were swapped.
Signed-off-by: Ricardo Ribalda Delgado
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Correct reference of reading values. (rval -> reg_val)
Add the missing unlock before return from function lm3560_get_ctrl()
to avoid deadlock.
Thank you Dan Carpenter & Sakari.Signed-off-by: Daniel Jeong
Signed-off-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab -
internal_csi_format_idx and csi_format_idx are unsigned integers,
therefore they can never be nevative.
CC drivers/media/i2c/smiapp/smiapp-core.o
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers/media/i2c/smiapp/smiapp-core.c:29:
drivers/media/i2c/smiapp/smiapp-core.c: In function ‘smiapp_update_mbus_formats’:
include/linux/kernel.h:669:20: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
#define min(x, y) ({ \
^
include/linux/compiler.h:153:42: note: in definition of macro ‘unlikely’
# define unlikely(x) __builtin_expect(!!(x), 0)
^
drivers/media/i2c/smiapp/smiapp-core.c:402:2: note: in expansion of macro ‘BUG_ON’
BUG_ON(min(internal_csi_format_idx, csi_format_idx) < 0);
^
drivers/media/i2c/smiapp/smiapp-core.c:402:9: note: in expansion of macro ‘min’
BUG_ON(min(internal_csi_format_idx, csi_format_idx) < 0);
^Signed-off-by: Ricardo Ribalda Delgado
Signed-off-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab -
Describe the tasks to be done for this driver to be promoted to a
non-staging one.[m.chehab@samsung.com: Add a patch description; add a note about the
CodingStyle issues and make sure that the README lines are not bigger
than 80 cols.]
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add suport for Nokia N900 radio. This driver is far from being ready
to be added at the main tree, as it creates its own sysfs interface,
and violates lots of Coding Style rules, doing even evil things like
returning from a function inside a macro.So, it is being added at staging with the condition that it will be
soon be fixed.[m.chehab@samsung.com: added a description for the patch]
Signed-off-by: Eero Nurkkala
Signed-off-by: Nils Faerber
Signed-off-by: Joni Lapilainen
Signed-off-by: Pali Rohár
Signed-off-by: Hans Verkuil
[hans.verkuil@cisco.com: moved to staging, added slab.h include]Signed-off-by: Mauro Carvalho Chehab
-
This patch should fix/enhance the set_voltage function for
the cx24117 demodulator.Signed-off-by: Luis Alves
Signed-off-by: Michael Krufky
Signed-off-by: Mauro Carvalho Chehab