aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-15[media] V4L: mx2-camera: avoid overflowing 32-bitsGuennadi Liakhovetski1-2/+3
In mx2_camera_try_fmt(), when applying i.MX25 restrictions to frame sizes, the height is checked to be <= 0xffff. But later an integer multiplication height * 4 * 0x3ffff is performed, which will overflow even for bounded height values. This patch switches to using 64-bit multiplication and division to avoid overflowing. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] sh_mobile_ceu_camera: Support user-configurable line strideLaurent Pinchart1-15/+18
In image mode, the CEU allows configurable line strides up to 8188 pixels. Signed-off-by: Laurent Pinchart <[email protected]> [[email protected]: unify sh_mobile_ceu_set_rect() in data-fetch mode] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] soc-camera: Support user-configurable line strideLaurent Pinchart3-2/+10
Add a capabilities field to the soc_camera_host structure to flag hosts that support user-configurable line strides. soc_camera_try_fmt() then passes the user-provided bytesperline and sizeimage format fields to such hosts, and expects the host to check (and fix if needed) the values. Signed-off-by: Laurent Pinchart <[email protected]> [[email protected]: fix a typo in mx2_camera.c] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] mx2_camera: Use soc_mbus_image_size() instead of manual computationLaurent Pinchart1-2/+4
Use the new soc_mbus_image_size() function to compute the image size. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] soc-camera: Honor user-requested bytesperline and sizeimageLaurent Pinchart3-26/+43
Compute the bytesperline and sizeimage values when trying/setting formats or when allocating buffers by taking the user-requested values into account. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] soc-camera: Add soc_mbus_image_sizeLaurent Pinchart2-0/+20
The function returns the minimum size of an image for a given number of bytes per line (as per the V4L2 specification), width and format. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] soc-camera: Fix bytes per line computation for planar formatsLaurent Pinchart1-0/+3
The V4L2 specification defines bytesperline for planar formats as the number of bytes per line for the largest plane. Modify soc_mbus_bytes_per_line() accordingly. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] soc-camera: Add plane layout information to struct soc_mbus_pixelfmtLaurent Pinchart7-0/+68
To compute the value of the v4l2_pix_format::bytesperline field, we need information about planes layout for planar formats. The new enum soc_mbus_layout conveys that information. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] soc_camera: Use soc_camera_device::bytesperline to compute line sizesLaurent Pinchart2-8/+3
Instead of computing the line sizes, use the previously negotiated soc_camera_device::bytesperline value. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] soc_camera: Use soc_camera_device::sizeimage to compute buffer sizesLaurent Pinchart7-89/+29
Instead of computing the buffer size manually in the videobuf queue setup and buffer prepare callbacks, use the previously negotiated soc_camera_device::sizeimage value. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] mx2_camera: Fix sizeimage computation in try_fmt()Laurent Pinchart1-0/+1
The try_fmt() handler restricts the image width based on the hardware limits and updates the bytesperline value, but doesn't update sizeimage. Fix it. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] V4L: mem2mem: fix alignment in mem2mem-testdevGuennadi Liakhovetski1-1/+1
Fix a trivial alignment calculation issue. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] smiapp: Remove smiapp-debug.h in favour of dynamic debugSakari Ailus6-47/+0
Remove smiapp-debug.h and let people use CONFIG_DYNAMIC_DEBUG instead. The option only affected to when debug information was being printed. Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] cx231xx: replace open-coded ARRAY_SIZE with macroJim Cromie1-2/+2
Signed-off-by: Jim Cromie <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] V4L: JPEG class documentation correctionsSylwester Nawrocki2-1/+8
This patch fixes following compilation warning: Error: no ID for constraint linkend: v4l2-jpeg-chroma-subsampling. and adds missing JPEG control class at the Table A.58. Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] af9015: various small changes and clean-upsAntti Palosaari1-283/+212
Clean-up dvb_usb_device_properties and fix errors reported by checkpatch.pl. Some other very minor changes. Functionality remains untouched. Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] smiapp: fix compilation breakageMauro Carvalho Chehab2-1/+3
The usage of ../*.h breaks out-of-tree compilation and likely breaks compilation when O= argument is used. Instead of doing that, just add the include path via Makefile. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] media: mx2_camera: Fix mbus format handlingJavier Martin2-7/+47
Remove MX2_CAMERA_SWAP16 and MX2_CAMERA_PACK_DIR_MSB flags so that the driver can negotiate with the attached sensor whether the mbus format needs convertion from UYUV to YUYV or not. Signed-off-by: Javier Martin <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] i.MX27: visstrim_m10: Remove use of MX2_CAMERA_SWAP16Javier Martin1-1/+1
Signed-off-by: Javier Martin <[email protected]> Acked-by: Sascha Hauer <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] media: tvp5150: Fix mbus formatJavier Martin1-2/+2
According to p.14 fig 3-3 of the datasheet (SLES098A) this decoder transmits data in UYVY format. Signed-off-by: Javier Martin <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] dib9000: get rid of Dib*Lock macrosAlexey Khoroshilov1-70/+58
The patch replaces Dib*Lock macros with direct calls to mutex functions as soon as they just make the driver code harder to review (per request of Mauro). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] rtl28xxu: dynamic USB ID supportAntti Palosaari1-0/+25
DVB USB core refuses to load driver when current USB ID does not match IDs on driver table. Due to that dynamic IDs does not work. Replace reference design ID by dynamic ID in .probe() in order to get it working. Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] get_dvb_firmware: add dvb-demod-drxk-pctv.fwAntti Palosaari1-1/+19
Firmware for the PCTV QuatroStick nano (520e). Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] dib0700: Return -EINTR and unlock mutex if locking attempts failsSantosh Nayak1-11/+13
In 'dib0700_i2c_xfer_new()' and 'dib0700_i2c_xfer_legacy()' we are taking two locks: 1. i2c_mutex 2. usb_mutex If attempt to take 'usb_mutex' lock fails then the previously taken lock 'i2c_mutex' should be unlocked and -EINTR should be returned so that caller can take appropriate action. If locking attempt was interrupted by a signal then we should return -EINTR. At present we are returning '0' for such scenarios which is wrong. Replace -EAGAIN by -EINTR as a return type for the the scenario where locking attempt was interrupted by signal. Signed-off-by: Santosh Nayak <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] cxd2820r: tweak search algorithm behaviorGianluca Gennari1-2/+2
MPIS based STBs running 3.x kernels and the Enigma2 OS are not able to tune DVB-T channels with the PCTV 290e using the current cxd2820r driver. DVB-T2 channels instead work properly. This patch fixes the problem by changing the condition to break out from the wait lock loop in the "search" function of the cxd2820r demodulator from FE_HAS_SIGNAL to FE_HAS_LOCK. As a consequence, the "search" function of the demodulator driver now returns DVBFE_ALGO_SEARCH_SUCCESS only if the frequency lock is successfully acquired. This behavior seems consistent with other demodulator drivers (e.g. stv090x, hd29l2, stv0900, stb0899, mb86a16). This patch has been successfully tested with DVB-T and DVB-T2 signals, on both PC and the mipsel STB running Enigma2. No apparent side effect has been observed on PC applications like Kaffeine. DVB-C is not available in my country so it's not tested. Signed-off-by: Gianluca Gennari <[email protected]> Acked-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] em28xx-dvb: enable LNA for cxd2820r in DVB-T modeGianluca Gennari1-1/+2
Enable the LNA amplifier also for DVB-T (like for DVB-T2 and DVB-C); this greatly improves reception of weak signals without affecting the reception of the strong ones. Experimental data (collected with the mipsel STB) on the weakest frequencies available in my area: LNA OFF: MUX level BER picture RAI mux 4 72% 32000 corrupted TIMB 2 75% 14 OK TVA Vicenza 68% 32000 corrupted RAI mux 2 78% 14 OK LNA ON: MUX level BER picture RAI mux 4 73% 1500 OK TIMB 2 76% 0 OK TVA Vicenza 69% 0 OK RAI mux 2 79% 0 OK Moreover, with LNA enabled, the PCTV 290e was able to pick up 2 new frequencies matching the integrated tuner of my Panasonic G20 TV, which is really good. Signed-off-by: Gianluca Gennari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] saa7134: remove unused log_err() macroMauro Carvalho Chehab1-5/+0
As reported by Masanari, this macro is using "KERN_ERR" instead of "KERN_ERROR". That would lead into a compilation breakage, if this macro were used somewhere inside the driver. Instead of fixing the macro, as originally proposed, let's just remove the dead code. Reported-by: Masanari Iida <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] staging: easycap: Split easycap_delete() into several piecesEzequiel García1-196/+249
The patch splits easycap_delete(), which is in charge of buffer deallocation, into smaller functions each deallocating a specific kind of buffer. Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] staging: easycap: Clean comment style in easycap_delete()Ezequiel García1-27/+16
Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] staging: easycap: Clean comment style in easycap_usb_disconnect()Ezequiel García1-40/+24
Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] staging: easycap: Split audio buffer and urb allocationEzequiel García1-105/+124
When the device is probed, this driver allocates audio buffers, and audio urbs. This patch just split this into separate functions, which helps clearing the currently gigantic probe function. Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] staging: easycap: Push video registration to easycap_register_video()Ezequiel García1-25/+33
Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] staging: easycap: Initialize 'ntsc' parameter before usageEzequiel García1-4/+4
This parameter is now initialized at init_easycap(), this way we assure it won't be used uninitialized. Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] staging: easycap: Push bInterfaceNumber saving to config_easycap()Ezequiel García1-31/+41
Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] staging: easycap: Split buffer and video urb allocationEzequiel García1-164/+211
When the device is probed, this driver allocates frame buffers, field buffers, isoc buffers and urbs. This patch just split this into separate functions, which helps clearing the currently gigantic probe function. Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] staging: easycap: Split device struct alloc and retrieval codeEzequiel García1-168/+216
When the device is probed a driver struct is either allocated or retrieved. This operation is logically splitted in several functions. Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] V4L: soc-camera: (cosmetic) use a more explicit name for a host handlerGuennadi Liakhovetski2-8/+8
Use "enum_framesizes" instead of "enum_fsizes" to more precisely follow the name of the respective ioctl(). Signed-off-by: Guennadi Liakhovetski <[email protected]> Reviewed-by: Sergio Aguirre <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] V4L: marvell-ccic: (cosmetic) remove redundant variable assignmentGuennadi Liakhovetski1-1/+0
The "ret = 0" assignment in mcam_vidioc_s_fmt_vid_cap() is redundant, because at that location "ret" is anyway guaranteed to be == 0. Signed-off-by: Guennadi Liakhovetski <[email protected]> Acked-by: Jonathan Corbet <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] v4l2-event: fix regression with initial event handlingHans Verkuil4-4/+10
If the V4L2_EVENT_SUB_FL_SEND_INITIAL was set, then the application expects to receive an initial event of the initial value of the control. However, commit c53c2549333b340e2662dc64ec81323476b69a97 that added the new v4l2_subscribed_event_ops introduced a regression: while the code still queued that initial event the __v4l2_event_queue_fh() function was modified to ignore such requests if sev->elems was 0 (meaning that the event subscription wasn't finished yet). And sev->elems was only set to a non-zero value after the add operation returned. This patch fixes this by passing the elems value to the add function. Then the add function can set it before queuing the initial event. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15Merge remote-tracking branch 'linus/master' into staging/for_v3.5Mauro Carvalho Chehab808-4885/+7476
* linus/master: (805 commits) tty: Fix LED error return openvswitch: checking wrong variable in queue_userspace_packet() bonding: Fix LACPDU rx_dropped commit. Linux 3.4-rc7 ARM: EXYNOS: fix ctrlbit for exynos5_clk_pdma1 ARM: EXYNOS: use s5p-timer for UniversalC210 board ARM / mach-shmobile: Invalidate caches when booting secondary cores ARM / mach-shmobile: sh73a0 SMP TWD boot regression fix ARM / mach-shmobile: r8a7779 SMP TWD boot regression fix ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper MAINTAINERS: Add myself as the cpufreq maintainer dm mpath: check if scsi_dh module already loaded before trying to load dm thin: correct module description dm thin: fix unprotected use of prepared_discards list dm thin: reinstate missing mempool_free in cell_release_singleton gpio/exynos: Fix compiler warnings when non-exynos machines are selected gpio: pch9: Use proper flow type handlers powerpc/irq: Fix another case of lazy IRQ state getting out of sync ks8851: Update link status during link change interrupt ... Conflicts: drivers/media/common/tuners/xc5000.c drivers/media/common/tuners/xc5000.h drivers/usb/gadget/uvc_queue.c
2012-05-15[media] lmedm04: Initialize a variable before its usageIl Han1-1/+1
The variable ret is used uninitialized. It should be initialized before used. Initialize it. Signed-off-by: Il Han <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] it913x.: Fix a misuse of ||Malcolm Priestley1-2/+2
On Mon, 2012-05-07 at 07:45 -0300, Mauro Carvalho Chehab wrote: > Malcolm, > > Em 04-04-2012 20:00, Joe Perches escreveu: > > Likely these should be && not || > > > > drivers/scsi/FlashPoint.c: if(bit_cnt != 0 || bit_cnt != 8) > > > drivers/media/dvb/dvb-usb/it913x.c: if (ret == 0 || ret != -EBUSY || ret != -ETIMEDOUT) > > drivers/media/dvb/dvb-usb/it913x.c: if (ret == 0 || ret != -EBUSY || ret != -ETIMEDOUT) > > Could you please take a look on the above? Hmm... yes, thanks, also a bug. Just check for -EBUSY && -ETIMEDOUT Signed-off-by: Malcolm Priestley <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] staging/media/as102: removed else statementsjoseph daniel1-21/+7
The else statement is actually not required, as we can assign AS10X_CMD_ERROR to the error variable directly. Signed-off-by: joseph daniel <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] em28xx: Remove unused wait_queue'sEzequiel García3-9/+0
Nobody ever waits on any of these wait_queue's, so this patch removes them completely. Tested by compilation only. Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] drivers/media: add missing __devexit_p() annotationsArnd Bergmann7-7/+7
Drivers that refer to a __devexit function in an operations structure need to annotate that pointer with __devexit_p so replace it with a NULL pointer when the section gets discarded. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] media/video: add I2C dependenciesArnd Bergmann1-0/+1
Davinci VIDEO_VPFE_CAPTURE depends on I2C, so reflect that in Kconfig to avoid build failures in random configurations. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] media/rc: IR_SONY_DECODER depends on BITREVERSEArnd Bergmann1-0/+1
The IR sony decoder is making use of 'bitrev8' that, in turn, requires BITREVERSE. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] dvb/drxd: stub out drxd_attach when not builtArnd Bergmann1-0/+14
This avoids getting drivers/media/video/em28xx/em28xx-dvb.c:721: \ undefined reference to `drxd_attach' Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] video/omap24xxcam: use __iomem annotationsArnd Bergmann3-19/+18
MMIO registers are __iomem tokens in virtual address space, not integers. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-05-15[media] Convert I2C drivers to dev_pm_opsMark Brown2-8/+22
The legacy I2C PM functions have been deprecated and warning on boot for over a year, convert the drivers still using them to dev_pm_ops. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>