Archit Taneja [Wed, 16 Oct 2013 05:36:47 +0000 (02:36 -0300)]
[media] v4l: ti-vpe: Add VPE mem to mem driver
VPE is a block which consists of a single memory to memory path which
can perform chrominance up/down sampling, de-interlacing, scaling, and
color space conversion of raster or tiled YUV420 coplanar, YUV422
coplanar or YUV422 interleaved video formats.
We create a mem2mem driver based primarily on the mem2mem-testdev
example. The de-interlacer, scaler and color space converter are all
bypassed for now to keep the driver simple. Chroma up/down sampler
blocks are implemented, so conversion beteen different YUV formats is
possible.
Each mem2mem context allocates a buffer for VPE MMR values which it will
use when it gets access to the VPE HW via the mem2mem queue, it also
allocates a VPDMA descriptor list to which configuration and data
descriptors are added.
Based on the information received via v4l2 ioctls for the source and
destination queues, the driver configures the values for the MMRs, and
stores them in the buffer. There are also some VPDMA parameters like
frame start and line mode which needs to be configured, these are
configured by direct register writes via the VPDMA helper functions.
The driver's device_run() mem2mem op will add each descriptor based on
how the source and destination queues are set up for the given ctx, once
the list is prepared, it's submitted to VPDMA, these descriptors when
parsed by VPDMA will upload MMR registers, start DMA of video buffers on
the various input and output clients/ports.
When the list is parsed completely(and the DMAs on all the output ports
done), an interrupt is generated which we use to notify that the source
and destination buffers are done. The rest of the driver is quite
similar to other mem2mem drivers, we use the multiplane v4l2 ioctls as
the HW support coplanar formats.
Archit Taneja [Wed, 16 Oct 2013 05:36:46 +0000 (02:36 -0300)]
[media] v4l: ti-vpe: Add helpers for creating VPDMA descriptors
Create functions which the VPE driver can use to create a VPDMA
descriptor and add it to a VPDMA descriptor list. These functions take a
pointer to an existing list, and append the configuration/data/control
descriptor header to the list.
In the case of configuration descriptors, the creation of a payload
block may be required(the payloads can hold VPE MMR values, or scaler
coefficients). The allocation of the payload buffer and it's content is
left to the VPE driver. However, the VPDMA library provides helper
macros to create payload in the correct format.
Add debug functions to dump the descriptors in a way such that it's easy
to see the values of different fields in the descriptors.
Archit Taneja [Wed, 16 Oct 2013 05:36:45 +0000 (02:36 -0300)]
[media] v4l: ti-vpe: Create a vpdma helper library
The primary function of VPDMA is to move data between external memory
and internal processing modules(in our case, VPE) that source or sink
data. VPDMA is capable of buffering this data and then delivering the
data as demanded to the modules as programmed. The modules that source
or sink data are referred to as clients or ports. A channel is setup
inside the VPDMA to connect a specific memory buffer to a specific
client. The VPDMA centralizes the DMA control functions and buffering
required to allow all the clients to minimize the effect of long latency
times.
Add the following to the VPDMA helper:
- A data struct which describe VPDMA channels. For now, these channels
are the ones used only by VPE, the list of channels will increase when
VIP(Video Input Port) also uses the VPDMA library. This channel
information will be used to populate fields required by data
descriptors.
- Data structs which describe the different data types supported by
VPDMA. This data type information will be used to populate fields
required by data descriptors and used by the VPE driver to map a V4L2
format to the corresponding VPDMA data type.
- Provide VPDMA register offset definitions, functions to read, write
and modify VPDMA registers.
- Functions to create and submit a VPDMA list. A list is a group of
descriptors that makes up a set of DMA transfers that need to be
completed. Each descriptor will either perform a DMA transaction to
fetch input buffers and write to output buffers(data descriptors), or
configure the MMRs of sub blocks of VPE(configuration descriptors), or
provide control information to VPDMA (control descriptors).
- Functions to allocate, map and unmap buffers needed for the descriptor
list, payloads containing MMR values and scaler coefficients. These use
the DMA mapping APIs to ensure exclusive access to VPDMA.
- Functions to enable VPDMA interrupts. VPDMA can trigger an interrupt
on the VPE interrupt line when a descriptor list is parsed completely
and the DMA transactions are completed. This requires masking the events
in VPDMA registers and configuring some top level VPE interrupt
registers.
- Enable some VPDMA specific parameters: frame start event(when to start
DMA for a client) and line mode(whether each line fetched should be
mirrored or not).
- Function to load firmware required by VPDMA. VPDMA requires a firmware
for it's internal list manager. We add the required request_firmware
apis to fetch this firmware from user space.
- Function to dump VPDMA registers.
- A function to initialize and create a VPDMA instance, this will be
called by the VPE driver with it's platform device pointer, this
function will take care of loading VPDMA firmware and returning a
vpdma_data instance back to the VPE driver. The VIP driver will also
call the same init function to initialize it's own VPDMA instance.
Chen Gang [Mon, 23 Sep 2013 02:20:48 +0000 (23:20 -0300)]
[media] drivers: media: usb: b2c2: use usb_*_coherent() instead of pci_*_consistent() in flexcop-usb.c
Some architectures do not support PCI, but still support USB, so need
let our usb driver try to use usb_* instead of pci_* to support these
architectures, or can not pass compiling.
The related error (with allmodconfig for arc):
CC [M] drivers/media/usb/b2c2/flexcop-usb.o
drivers/media/usb/b2c2/flexcop-usb.c: In function ‘flexcop_usb_transfer_exit’:
drivers/media/usb/b2c2/flexcop-usb.c:393: error: implicit declaration of function ‘pci_free_consistent’
drivers/media/usb/b2c2/flexcop-usb.c: In function ‘flexcop_usb_transfer_init’:
drivers/media/usb/b2c2/flexcop-usb.c:410: error: implicit declaration of function ‘pci_alloc_consistent’
Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
The variable frame_ready is only assigned the values true and false.
Change its type to bool.
The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Philipp Zabel [Thu, 19 Sep 2013 07:37:29 +0000 (04:37 -0300)]
[media] videobuf2-core: call __setup_offsets only for mmap memory type
__setup_offsets fills the v4l2_planes' mem_offset fields, which is only valid
for V4L2_MEMORY_MMAP type buffers. For V4L2_MEMORY_DMABUF and _USERPTR buffers,
this incorrectly overwrites the fd and userptr fields.
Reported-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Pawel Osciak <pawel@osciak.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Chanho Min [Fri, 27 Sep 2013 04:57:40 +0000 (01:57 -0300)]
[media] uvcvideo: Fix data type for pan/tilt control
The pan/tilt absolute control value is signed value. If minimum value
is minus, It will be changed to plus by clamp_t() as commit 64ae9958a62.
([media] uvcvideo: Fix control value clamping for unsigned integer controls).
It leads to wrong setting of the control values. For example,
when min and max are -36000 and 36000, the setting value between of this range
is always 36000. So, its data type should be changed to signed.
Hans Verkuil [Fri, 4 Oct 2013 14:01:51 +0000 (11:01 -0300)]
[media] cx25821: fix sparse warnings
drivers/media/pci/cx25821/cx25821-cards.c:49:20: warning: symbol 'cx25821_bcount' was not declared. Should it be static?
drivers/media/pci/cx25821/cx25821-video-upstream.c:162:33: warning: incorrect type in assignment (different base types)
drivers/media/pci/cx25821/cx25821-video-upstream.c:163:33: warning: incorrect type in assignment (different base types)
drivers/media/pci/cx25821/cx25821-video-upstream.c:164:33: warning: incorrect type in assignment (different base types)
drivers/media/pci/cx25821/cx25821-video-upstream.c:165:33: warning: incorrect type in assignment (different base types)
drivers/media/pci/cx25821/cx25821-medusa-video.h:43:16: warning: symbol '_num_decoders' was not declared. Should it be static?
drivers/media/pci/cx25821/cx25821-medusa-video.h:44:16: warning: symbol '_num_cameras' was not declared. Should it be static?
drivers/media/pci/cx25821/cx25821-medusa-video.h:46:14: warning: symbol '_video_standard' was not declared. Should it be static?
drivers/media/pci/cx25821/cx25821-medusa-video.h:47:5: warning: symbol '_display_field_cnt' was not declared. Should it be static?
After analyzing the last four warnings carefully it became clear that these
variables were really completely unused. As a result of that the call to
medusa_set_decoderduration() is now dubious since the duration is always 0.
Without documentation, however, I can't tell what the right value is.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
[media] cx231xx: fix double free and leaks on failure path in cx231xx_usb_probe()
There are numerous issues in error handling code of cx231xx initialization.
Double free (when cx231xx_init_dev() calls kfree(dev) via cx231xx_release_resources()
and then cx231xx_usb_probe() does the same) and memory leaks
(e.g. usb_get_dev() before (ifnum != 1) check in cx231xx_usb_probe())
are just a few of them.
The patch fixes the issues in cx231xx_usb_probe() and cx231xx_init_dev()
by moving usb_get_dev(interface_to_usbdev(interface)) below in code and
implementing proper error handling.
Found by Linux Driver Verification project (linuxtesting.org).
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Fri, 4 Oct 2013 14:01:52 +0000 (11:01 -0300)]
[media] siano: fix sparse warnings
drivers/media/common/siano/smsdvb-main.c:47:5: warning: symbol 'sms_to_guard_interval_table' was not declared. Should it be static?
drivers/media/common/siano/smsdvb-main.c:54:5: warning: symbol 'sms_to_code_rate_table' was not declared. Should it be static?
drivers/media/common/siano/smsdvb-main.c:63:5: warning: symbol 'sms_to_hierarchy_table' was not declared. Should it be static?
drivers/media/common/siano/smsdvb-main.c:70:5: warning: symbol 'sms_to_modulation_table' was not declared. Should it be static?
drivers/media/common/siano/smscoreapi.c:925:35: warning: cast to restricted __le32
drivers/media/common/siano/smscoreapi.c:926:28: warning: cast to restricted __le32
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Fri, 4 Oct 2013 14:01:48 +0000 (11:01 -0300)]
[media] az6027: fix sparse warnings
drivers/media/usb/dvb-usb/az6027.c:257:23: warning: symbol 'az6027_stb0899_config' was not declared. Should it be static?
drivers/media/usb/dvb-usb/az6027.c:294:23: warning: symbol 'az6027_stb6100_config' was not declared. Should it be static?
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Fri, 4 Oct 2013 14:01:45 +0000 (11:01 -0300)]
[media] drxk_hard: fix sparse warnings
drivers/media/dvb-frontends/drxk_hard.c:1086:62: warning: Using plain integer as NULL pointer
drivers/media/dvb-frontends/drxk_hard.c:2784:63: warning: Using plain integer as NULL pointer
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Fri, 4 Oct 2013 14:01:44 +0000 (11:01 -0300)]
[media] drxd_hard: fix sparse warnings
drivers/media/dvb-frontends/drxd_hard.c:1017:70: warning: Using plain integer as NULL pointer
drivers/media/dvb-frontends/drxd_hard.c:1038:69: warning: Using plain integer as NULL pointer
drivers/media/dvb-frontends/drxd_hard.c:2836:33: warning: Using plain integer as NULL pointer
drivers/media/dvb-frontends/drxd_hard.c:2972:30: warning: Using plain integer as NULL pointer
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Fri, 4 Oct 2013 14:01:49 +0000 (11:01 -0300)]
[media] cx231xx: fix sparse warnings
drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:31:19: warning: symbol 'cx231xx_Scenario' was not declared. Should it be static?
drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:675:23: warning: cast to restricted __le32
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Fri, 4 Oct 2013 14:01:39 +0000 (11:01 -0300)]
[media] hdpvr: fix sparse warnings
drivers/media/usb/hdpvr/hdpvr-core.c:110:54: warning: incorrect type in argument 1 (different base types)
drivers/media/usb/hdpvr/hdpvr-core.c:112:39: warning: invalid assignment: +=
drivers/media/usb/hdpvr/hdpvr-core.c:304:26: warning: Using plain integer as NULL pointer
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
[media] gscpa_ov534_9: Add support for ov3610 sensor
Dear Hans de Goede, I have Ubuntu (raring) and recently bought digital
microscope eyepiece Lomo MD300. It is the same device as Future Optics MVV3000.
Unfortunately it does not work out of box. Moreover drivers refused to work
under Windows 7 as well leaving me only with Win Xp working system. I have had
no choice but to examine what happened in USB bus and attempt to reproduce the
sequence. So, i have download the source(3.8.0-30 kernel) and made required
changes to driver to make my hardware work.
I submit my changed files to you as maintainer of the driver so you can
integrade my changes into main stream. Thanx. Hopefully my Ubuntu will work
with my hardware out of box.
Sincerely yours Vladik Aranov
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Fri, 4 Oct 2013 17:40:06 +0000 (14:40 -0300)]
[media] em28xx: MaxMedia UB425-TC offer firmware for demodulator
Downloading new firmware for DRX-K demodulator is not obligatory but
usually it offers important bug fixes compared to default firmware
burned into chip rom. DRX-K demod driver will continue even without
the firmware, but in that case it will print warning to system log
to tip user he should install firmware.
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
[media] siano: Fix initialization for Stellar models
Since kernel 3.8, the initialization for Stellar (sms1000)
devices are broken.
Those devices have a behaviour different than usual sms1100
and sms2270: they start with one USB ID (devices in cold state),
but after firmware load, they get a different USB ID.
This weren't docummented at the driver. So, the patches that added
support for sms2270 broke it.
Properly documment it, and provide a debug log that allows to
follow all phases of the device initialization:
smsusb_probe: board id=13, interface number 0
smsusb_probe: interface 0 won't be used. Expecting interface 1 to popup
smsusb_probe: board id=13, interface number 1
smsusb_probe: smsusb_probe 1
smsusb_probe: endpoint 0 81 02 64
smsusb_probe: endpoint 1 02 02 64
smsusb_probe: stellar device in cold state was found at usb\4-2.
smsusb1_load_firmware: sent 38144(38144) bytes, rc 0
smsusb1_load_firmware: read FW dvbt_bda_stellar_usb.inp, size=38144
smsusb_probe: stellar device now in warm state
usbcore: registered new interface driver smsusb
usb 4-2: USB disconnect, device number 52
usb 4-2: new full-speed USB device number 53 using uhci_hcd
usb 4-2: New USB device found, idVendor=187f, idProduct=0100
usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-2: Product: SMS DVBT-BDA Receiver
usb 4-2: Manufacturer: Siano Mobile Silicon
smsusb_probe: board id=1, interface number 0
smsusb_probe: smsusb_probe 0
smsusb_probe: endpoint 0 81 02 64
smsusb_probe: endpoint 1 02 02 64
smsusb_init_device: in_ep = 81, out_ep = 02
smscore_register_device: allocated 50 buffers
smscore_register_device: device ffff88012a00bc00 created
smsusb_init_device: smsusb_start_streaming(...).
smscore_set_device_mode: set device mode to 4
smsusb1_detectmode: 4 "SMS DVBT-BDA Receiver"
smsusb_sendrequest: sending MSG_SMS_INIT_DEVICE_REQ(578) size: 12
smsusb_onresponse: received MSG_SMS_INIT_DEVICE_RES(579) size: 12
smscore_set_device_mode: Success setting device mode.
smscore_init_ir: IR port has not been detected
smscore_start_device: device ffff88012a00bc00 started, rc 0
smsusb_init_device: device 0xffff88002cfa6000 created
smsusb_probe: Device initialized with return code 0
DVB: registering new adapter (Siano Stellar Digital Receiver)
usb 4-2: DVB: registering adapter 0 frontend 0 (Siano Mobile Digital MDTV Receiver)...
smscore_register_client: ffff88012174a000 693 1
sms_board_dvb3_event: DVB3_EVENT_HOTPLUG
smsdvb_hotplug: success
smsdvb_module_init:
Some messages are not clear, some are debug data, but are
shown as errors, and one message is duplicated.
Cleanup that mess in order to provide a cleaner log.
[media] siano: Don't show debug messages as errors
At this bugzilla and similar ones:
https://bugzilla.kernel.org/show_bug.cgi?id=60645
Those debug messages were seen as errors, but they're just debug
data, and are OK to appear on sms1100 and sms2270. Re-tag them
to appear only if debug is enabled.
Krzysztof Hałasa [Thu, 12 Sep 2013 11:43:34 +0000 (08:43 -0300)]
[media] SOLO6x10: Fix video headers on certain hardware
On certain platforms a sequence of dma_map_sg() and dma_unmap_sg()
discards data previously stored in the buffers. Build video headers
only after the DMA is completed.
Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
[hans.verkuil@cisco.com: fix merge problems due to the recent solo sg_table changes] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Krzysztof Hałasa [Thu, 12 Sep 2013 11:28:07 +0000 (08:28 -0300)]
[media] SOLO6x10: Fix video encoding on big-endian systems
Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
[hans.verkuil@cisco.com: fix merge problems due to the recent solo sg_table changes] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
[media] media/v4l2: VIDEO_RENESAS_VSP1 should depend on HAS_DMA
If NO_DMA=y:
warning: (... && VIDEO_RENESAS_VSP1 && ...) selects VIDEOBUF2_DMA_CONTIG which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA)
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:
drivers/media/v4l2-core/videobuf2-dma-contig.c:202: error: implicit declaration of function ‘dma_mmap_coherent’
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:
drivers/media/v4l2-core/videobuf2-dma-contig.c:385: error: implicit declaration of function ‘dma_get_sgtable’
make[7]: *** [drivers/media/v4l2-core/videobuf2-dma-contig.o] Error 1
VIDEO_RENESAS_VSP1 (which doesn't have a platform dependency) selects
VIDEOBUF2_DMA_CONTIG, but the latter depends on HAS_DMA.
Make VIDEO_RENESAS_VSP1 depend on HAS_DMA to fix this.
[media] dvb-usb: fix error handling in ttusb_dec_probe()
There is an asymmetry in ttusb_dec_init_usb()-ttusb_init_rc()
and ttusb_dec_exit_usb()-ttusb_dec_exit_rc() in terms of resources
allocated-deallocated. irq_urb and irq_buffer are allocated in
ttusb_dec_init_usb(), while they are deallocated in ttusb_dec_exit_rc().
As a result there is a leak of them in ttusb_dec_probe().
The patch fixes the asymmetry and a leak on a failure path in ttusb_dec_init_usb().
By the way, it
- removes usage of -1 as a custom error code,
- replaces GFP_ATOMIC by GFP_KERNEL in usb_alloc_coherent() in ttusb_dec_init_usb()
as soon as all other memory allocation done with GFP_KERNEL;
- refactors ttusb_dec_boot_dsp() in an equivalent way except for returning 0
instead of 1 if ttusb_dec_boot_dsp() succeed in (!mode) branch.
Found by Linux Driver Verification project (linuxtesting.org).
[media] ts2020: keep 1.06 MHz as default value for frequency_div
Changeset 9e8da9e8 added a parameter to specify the frequency
divisor, used by the driver. However, not all places are passing
this parameter. So, preserve the previous default, to avoid breaking
the existing drivers.
John Horan [Wed, 28 Aug 2013 12:37:37 +0000 (09:37 -0300)]
[media] media: dvb-frontends: ts2020: Added in a option for frequency divider value for s600 devices
When the tuner part of the ds3000 driver was split to share code with the m88rs2000 driver, the ts2020 driver used
the frequency divider value from the m88rs2000 driver. However the ds3000 driver requires a different value, and this
resulted in some frequecies being invisible to the tuner. This patch adds back in the value needed for the ds3000 driver
and configured as an option in the dw2102 frontend driver.
It may also apply to su3000 devices, which use the same ds3000 driver, but for now it is only applied to the s660 device.
Signed-off-by: John Horan <knasher@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Christoph Jaeger [Mon, 30 Sep 2013 16:13:12 +0000 (13:13 -0300)]
[media] drxd_hard: remove unused SIZEOF_ARRAY
SIZEOF_ARRAY is not used (anymore). Besides, ARRAY_SIZE, defined in
include/linux/kernel.h, should be used rather than explicitly coding some
variant of it.
Signed-off-by: Christoph Jaeger <christophjaeger@linux.com> Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reading firmware status register to detect whether firmware is
running or not didn't work 100% reliably. That register was
likely set by firmware itself which means it could not contain
reasonable values until firmware is up and running. Usually it
just worked as some garbage value was returned accidentally but it
appears that in some cases returned garbage value was 0x00 which
was considered "firmware is up and running" by the driver and
firmware loading was skipped leaving device to non-working state.
Fix problem by removing unreliable check and let the driver keep
count whether firmware is loaded or not.
Signed-off-by: Andreas Matthies <a.matthies@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
The variable vco_select is only assigned the values true and false.
Change its type to bool.
The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Ming Lei [Sat, 17 Aug 2013 15:25:07 +0000 (12:25 -0300)]
[media] media: dvb-core: prepare for enabling irq in complete()
Complete() will be run with interrupt enabled, so change to
spin_lock_irqsave().
These functions may be called inside URB->complete(), so use
spin_lock_irqsave().
Signed-off-by: Ming Lei <ming.lei@canonical.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
[media] videobuf2: Add debug print for the output buffer plane lengths checks
Add debug print so it's easier to find any errors resulting from
the planes' configuration checks added in commit 8023ed09cb278004a2
"videobuf2-core: Verify planes lengths for output buffers".
Ricardo Ribalda [Fri, 2 Aug 2013 13:20:00 +0000 (10:20 -0300)]
[media] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table
Replace the private struct vb2_dma_sg_desc with the struct sg_table so
we can benefit from all the helping functions in lib/scatterlist.c for
things like allocating the sg or compacting the descriptor.
marvel-ccic and solo6x10 drivers, that use this API have been updated.
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
[s.nawrocki@samsung.com: minor corrections of the changelog] Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Ricardo Ribalda [Fri, 2 Aug 2013 13:19:59 +0000 (10:19 -0300)]
[media] videobuf2-dma-sg: Allocate pages as contiguous as possible
Most DMA engines have limitations regarding the number of DMA segments
(sg-buffers) that they can handle. Videobuffers can easily spread
through hundreds of pages.
In the previous aproach, the pages were allocated individually, this
could led to the creation houndreds of dma segments (sg-buffers) that
could not be handled by some DMA engines.
This patch tries to minimize the number of DMA segments by using
alloc_pages. In the worst case it will behave as before, but most
of the times it will reduce the number of dma segments
Ricardo Ribalda [Wed, 28 Aug 2013 07:39:29 +0000 (04:39 -0300)]
[media] videobuf2: Fix vb2_write prototype
struct v4_file_operations defines the data param as
const char __user *data but on vb2 is defined as
char __user *data.
This patch fixes the warnings produced by this. ie:
drivers/qtec/qtec_xform.c:817:2: warning: initialization from
incompatible pointer type [enabled by default]
drivers/qtec/qtec_xform.c:817:2: warning: (near initialization for
‘qtec_xform_v4l_fops.write’) [enabled by default]
Andy Shevchenko [Tue, 3 Sep 2013 12:31:37 +0000 (09:31 -0300)]
[media] gspca: print small buffers via %*ph
Instead of passing each byte through stack let's use %*ph specifier to do this
job better.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Ondrej Zary [Fri, 30 Aug 2013 20:54:25 +0000 (17:54 -0300)]
[media] gspca-stk1135: Add variable resolution support
Add variable resolution support to Syntek STK1135 subdriver.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Ondrej Zary [Fri, 30 Aug 2013 20:54:24 +0000 (17:54 -0300)]
[media] gspca: Support variable resolution
Add variable resolution support to gspca by allowing subdrivers to
specify try_fmt and enum_framesizes functions.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Ondrej Zary [Fri, 30 Aug 2013 20:54:23 +0000 (17:54 -0300)]
[media] gspca: store current mode instead of individual parameters
Store complete current mode (struct v4l2_pix_format) in struct gspca_dev
instead of separate pixfmt, width and height parameters.
This is a preparation for variable resolution support.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Gregor Jasny [Sun, 8 Sep 2013 18:31:44 +0000 (15:31 -0300)]
[media] Add HCL T12Rg-H to STK webcam upside-down table
The owner knows the system as "LX INFINITI Powerlite".
DMI information for this system:
System Information
Manufacturer: HCL Infosystems Limited
Product Name: T12Rg-H
Version: 1.0
Serial Number: B073A1189988
UUID: 326B3F00-001D-602F-CFD2-4E45435F4349
Wake-up Type: Power Switch
SKU Number:
Family:
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: HCL Infosystems Limited
Product Name: T12Rg-H
Version: 1.0
Serial Number: BSN12345678901234567
Asset Tag: ATN12345678901234567
Features:
Board is a hosting board
Board is replaceable
Location In Chassis:
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
Bus 001 Device 003: ID 05e1:0501 Syntek Semiconductor Co., Ltd DC-1125 Webcam
Signed-off-by: Gregor Jasny <gjasny@googlemail.com> Reported-by: Noopur Srivastava <noopur.018@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>