aboutsummaryrefslogtreecommitdiffstats
path: root/include (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-05-20[media] v4l2-dv-timings.h: definitions for CEA-861 and VESA DMT timingsHans Verkuil2-0/+817
This header contains the timings for the common CEA-861 and all VESA DMT formats for use with the V4L2 dv_timings API. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20[media] v4l2 framework: add support for the new dv_timings ioctlsHans Verkuil2-0/+12
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-18[media] videodev2.h: add enum/query/cap dv_timings ioctlsHans Verkuil1-24/+149
These new ioctls make it possible for the dv_timings API to replace the dv_preset API eventually. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15[media] V4L2: sh_mobile_ceu: manage lower 8bit busKuninori Morimoto1-0/+1
CAMCR::DTIF feild controls camera bus as upper8bit/16bit/lower8bit. This patch manages unmanaged lower 8bit bus Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15[media] soc-camera: Support user-configurable line strideLaurent Pinchart1-0/+4
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 <laurent.pinchart@ideasonboard.com> [g.liakhovetski@gmx.de: fix a typo in mx2_camera.c] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15[media] soc-camera: Add soc_mbus_image_sizeLaurent Pinchart1-0/+2
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 <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15[media] soc-camera: Add plane layout information to struct soc_mbus_pixelfmtLaurent Pinchart1-0/+19
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 <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15[media] V4L: soc-camera: (cosmetic) use a more explicit name for a host handlerGuennadi Liakhovetski1-1/+1
Use "enum_framesizes" instead of "enum_fsizes" to more precisely follow the name of the respective ioctl(). Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Sergio Aguirre <sergio.a.aguirre@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15[media] v4l2-event: fix regression with initial event handlingHans Verkuil1-1/+1
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 <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15Merge remote-tracking branch 'linus/master' into staging/for_v3.5Mauro Carvalho Chehab39-154/+357
* 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-14Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds1-1/+2
Pull media fixes from Mauro Carvalho Chehab: "For a some fix patches for v3.4, including a regression fix at DVB core" Fix up trivial conflicts in Documentation/feature-removal-schedule.txt * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] gspca - sonixj: Fix a zero divide in isoc interrupt [media] media: videobuf2-dma-contig: include header for exported symbols [media] media: videobuf2-dma-contig: quiet sparse noise about plain integer as NULL pointer [media] media: vb2-memops: Export vb2_get_vma symbol [media] s5p-fimc: Correct memory allocation for VIDIOC_CREATE_BUFS [media] s5p-fimc: Fix locking in subdev set_crop op [media] dvb_frontend: fix a regression with DVB-S zig-zag [media] fintek-cir: change || to && [media] V4L: Schedule V4L2_CID_HCENTER, V4L2_CID_VCENTER controls for removal [media] rc: Postpone ISR registration [media] marvell-cam: fix an ARM build error [media] V4L: soc-camera: protect hosts during probing from overzealous user-space
2012-05-14[media] v4l2-dev: rename two functionsHans Verkuil1-5/+5
Rename the function v4l2_dont_use_lock to v4l2_disable_ioctl_locking, and rename v4l2_dont_use_cmd to v4l2_disable_ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l2-dev.h: add comment not to use V4L2_FL_LOCK_ALL_FOPS in new driversHans Verkuil1-1/+1
This flag is for legacy drivers only and will go away in the future. A note regarding commit 5126f2590bee412e3053de851cb07f531e4be36a (v4l2-dev: add flag to have the core lock all file operations): That commit message suggests that by not taking the core lock for fops other than unlocked_ioctl all problems relating to AB-BA locking and mm->mmap_sem are solved. This is not the case. More work needs to be done by moving the core lock further down into video_ioctl2. It should only be taken after the copy_from/to_user calls are done. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] saa7146: fix querycap, vbi/video separation and g/s_registerHans Verkuil2-3/+3
The querycap ioctl returned an incorrect version number and incorrect capabilities (mixing up vbi and video caps). The reason for that was that video nodes could do vbi activities: that should be separated between the vbi and video nodes. There were also a few minor problems with dbg_g/s_register that have been resolved. The mxb/saa7146 driver now passes the v4l2_compliance tests. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] saa7146: support control events and priority handlingHans Verkuil1-0/+3
Use v4l2_fh which gives you control events and priority handling for free. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] saa7146: rename vbi/video_q to vbi/video_dmaqHans Verkuil1-2/+2
There was also a vbi_q and video_q in saa7146_fh, so that was confusing. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] saa7146: remove the unneeded type field from saa7146_fhHans Verkuil1-2/+0
This information can also be retrieved from struct video_device. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] saa7146: move vbi fields from saa7146_fh to saa7146_vvHans Verkuil1-2/+2
This fields are global and don't belong in a fh struct. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] saa7146: move video_fmt from saa7146_fh to saa7146_vvHans Verkuil1-1/+1
This is a global structure and does not belong to saa7146_fh. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] saa7146: move overlay information from saa7146_fh into saa7146_vvHans Verkuil1-4/+1
This is global information, not per-filehandle information. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] mxb/saa7146: first round of cleanupsHans Verkuil2-0/+3
Convert to the control framework, fix the easy v4l2-compliance failures. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Add camera auto focus controlsSylwester Nawrocki1-0/+16
Add following auto focus controls: - V4L2_CID_AUTO_FOCUS_START - single-shot auto focus start - V4L2_CID_AUTO_FOCUS_STOP - single-shot auto focus stop - V4L2_CID_AUTO_FOCUS_STATUS - automatic focus status - V4L2_CID_AUTO_FOCUS_RANGE - automatic focus scan range selection Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Add camera 3A lock controlSylwester Nawrocki1-0/+5
The V4L2_CID_3A_LOCK bitmask control allows applications to pause or resume the automatic exposure, focus and wite balance adjustments. It can be used, for example, to lock the 3A adjustments right before a still image is captured, for pre-focus, etc. The applications can control each of the algorithms independently, through a corresponding control bit, if driver allows that. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Add camera scene mode controlSylwester Nawrocki1-0/+18
Add control for the scene mode feature available in image sensor with more advanced ISP firmware. The V4L2_CID_SCENE_MODE menu control allows to select a set of parameters or a specific image processing and capture control algorithm optimized for common image capture conditions. Signed-off-by: HeungJun Kim <riverful.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Add camera exposure metering controlSylwester Nawrocki1-0/+7
The V4L2_CID_EXPOSURE_METERING control allows to determine a method used by the camera for measuring the amount of light available for automatic exposure. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Add camera ISO sensitivity controlsSylwester Nawrocki1-0/+7
Add ISO sensitivity and ISO auto/manual controls. The sensitivity values are related to level of amplification of the analog signal between image sensor and ADC. These controls allow to support sensors exposing an interface to accept the ISO values directly. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Add camera image stabilization controlSylwester Nawrocki1-0/+1
Add V4L2_CID_IMAGE_STABILIZATION control for the camera image stabilization feature. This control can be used to enable/disable image stabilization. It might get converted to a menu control in future if more options are needed. Signed-off-by: HeungJun Kim <riverful.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Add camera wide dynamic range controlSylwester Nawrocki1-0/+2
Add V4L2_CID_WIDE_DYNAMIC_RANGE camera class control for the camera wide dynamic range (WDR, HDR) feature. This control can be used to enable/disable wide dynamic range. It might get converted to a menu control in future if more options are needed. Signed-off-by: HeungJun Kim <riverful.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Add an extended camera white balance controlSylwester Nawrocki1-0/+14
This patch adds V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE control which is an extended version of the V4L2_CID_AUTO_WHITE_BALANCE control, including white balance presets. The following presets are defined: - V4L2_WHITE_BALANCE_INCANDESCENT, - V4L2_WHITE_BALANCE_FLUORESCENT, - V4L2_WHITE_BALANCE_FLUORESCENT_H, - V4L2_WHITE_BALANCE_HORIZON, - V4L2_WHITE_BALANCE_DAYLIGHT, - V4L2_WHITE_BALANCE_FLASH, - V4L2_WHITE_BALANCE_CLOUDY, - V4L2_WHITE_BALANCE_SHADE. Signed-off-by: HeungJun Kim <riverful.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Add camera exposure bias controlSylwester Nawrocki1-0/+2
The camera may in some conditions incorrectly determine the exposure, and a manual automatic exposure correction may be needed. This patch adds V4L2_CID_AUTO_EXPOSURE_BIAS control which allows to add some offset in the automatic exposure control loop, to compensate for frame under- or over-exposure. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Add helper function for standard integer menu controlsSylwester Nawrocki1-0/+17
This patch adds v4l2_ctrl_new_int_menu() helper function which can be used in drivers for creating standard integer menu control with driver-specific menu item list. It is similar to v4l2_ctrl_new_std_menu(), except it doesn't have a mask parameter and an additional qmenu parameter allows passing an array of signed 64-bit integers as the menu item list. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Tested-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] V4L: Extend V4L2_CID_COLORFX with more image effectsSylwester Nawrocki1-11/+18
This patch adds definition of additional color effects: - V4L2_COLORFX_AQUA, - V4L2_COLORFX_ART_FREEZE, - V4L2_COLORFX_SILHOUETTE, - V4L2_COLORFX_SOLARIZATION, - V4L2_COLORFX_ANTIQUE, - V4L2_COLORFX_SET_CBCR. The new V4L2_COLORFX_CBCR control is added to allow setting the fixed Cb, Cr values that replace chroma Cb/Cr coefficients in case of V4L2_COLORFX_SET_CBCR effect. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l: v4l2-ctrls: moves the forward declaration of struct fileLaurent Pinchart1-1/+1
This fixes the following warning: In file included from drivers/media/video/v4l2-subdev.c:29: include/media/v4l2-ctrls.h:501: warning: 'struct file' declared inside parameter list include/media/v4l2-ctrls.h:501: warning: its scope is only this definition or declaration, which is probably not what you want include/media/v4l2-ctrls.h:509: warning: 'struct file' declared inside parameter list Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] mt9p031: Replace the reset board callback by a GPIO numberLaurent Pinchart1-3/+10
Use the GPIO from the sensor driver instead of calling back to board code. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] mt9p031: Identify color/mono models using I2C device nameLaurent Pinchart1-6/+0
Instead of passing a color/monochrome flag through platform data, rely on the I2C device name to identify the chip model. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] Input: move drivers/input/fixp-arith.h to include/linuxAntonio Ospite1-0/+87
Move drivers/input/fixp-arith.h to include/linux so that the functions defined there can be used by other subsystems, for instance some video devices ISPs can control the output HUE value by setting registers for sin(HUE) and cos(HUE). Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l2-dev: add flag to have the core lock all file operationsHans Verkuil1-0/+3
This used to be the default if the lock pointer was set, but now that lock is by default only used for ioctl serialization. Those drivers that already used core locking have this flag set explicitly, except for some drivers where it was obvious that there was no need to serialize any file operations other than ioctl. The drivers that didn't need this flag were: drivers/media/radio/dsbr100.c drivers/media/radio/radio-isa.c drivers/media/radio/radio-keene.c drivers/media/radio/radio-miropcm20.c drivers/media/radio/radio-mr800.c drivers/media/radio/radio-tea5764.c drivers/media/radio/radio-timb.c drivers/media/video/vivi.c sound/i2c/other/tea575x-tuner.c The other drivers that use core locking and where it was not immediately obvious that this flag wasn't needed were changed so that the flag is set together with a comment that that driver needs work to avoid having to set that flag. This will often involve taking the core lock in the fops themselves. Eventually this flag should go and it should not be used in new drivers. There are a few reasons why we want to avoid core locking of non-ioctl fops: in the case of mmap this can lead to a deadlock in rare situations since when mmap is called the mmap_sem is held and it is possible for other parts of the code to take that lock as well (copy_from_user()/copy_to_user() perform a down_read(&mm->mmap_sem) when a page fault occurs). It is very unlikely that that happens since the core lock serializes all fops, but the kernel warns about it if lock validation is turned on. For poll it is also undesirable to take the core lock as that can introduce increased latency. The same is true for read/write. While it was possible to make flags or something to turn on/off taking the core lock for each file operation, in practice it is much simpler to just not take it at all except for ioctl and leave it to the driver to take the lock. There are only a handful fops compared to the zillion ioctls we have. I also wanted to make it obvious which drivers still take the lock for all fops, so that's why I chose to have drivers set it explicitly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l2-dev/ioctl: determine the valid ioctls upfrontHans Verkuil1-0/+11
Rather than testing whether an ioctl is implemented in the driver or not every time the ioctl is called, do it upfront when the device is registered. This also allows a driver to disable certain ioctls based on the capabilities of the detected board, something you can't do today without creating separate v4l2_ioctl_ops structs for each new variation. For the most part it is pretty straightforward, but for control ioctls a flag is needed since it is possible that you have per-filehandle controls, and that can't be determined upfront of course. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l2-dev: make it possible to skip locking for selected ioctlsHans Verkuil1-0/+11
Using the V4L2 core lock is a very robust method that is usually very good at doing the right thing. But some drivers, particularly USB drivers, may want to prevent the core from taking the lock for specific ioctls, particularly buffer queuing ioctls. The reason is that certain commands like S_CTRL can take a long time to process over USB and all the time the core has the lock, preventing VIDIOC_DQBUF from proceeding, even though a frame may be ready in the queue. This introduces unwanted latency. Since the buffer queuing commands often have their own internal lock it is often not necessary to take the core lock. Drivers can now say that they don't want the core to take the lock for specific ioctls. As it is a specific opt-out it makes it clear to the reviewer that those ioctls will need more care when reviewing. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] smiapp: Add driverSakari Ailus1-0/+83
Add driver for SMIA++/SMIA image sensors. The driver exposes the sensor as three subdevs, pixel array, binner and scaler --- in case the device has a scaler. Currently it relies on the board code for external clock handling. There is no fast way out of this dependency before the ISP drivers (omap3isp) among others will be able to export that clock through the clock framework instead. Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] omap3isp: Add lane configuration to platform dataSakari Ailus1-0/+25
Add lane configuration (order of clock and data lane) to platform data on both CCP2 and CSI-2. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] omap3isp: Move definitions required by board code under include/mediaSakari Ailus1-0/+4
XCLK definitions are often required by the board code. Move them to public include file. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l: Allow changing control handler lockSakari Ailus1-3/+6
Allow choosing the lock used by the control handler. This may be handy sometimes when a driver providing multiple subdevs does not want to use several locks to serialise its functions. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l: Implement v4l2_subdev_link_validate()Sakari Ailus1-0/+12
v4l2_subdev_link_validate() is the default op for validating a link. In V4L2 subdev context, it is used to call a pad op which performs the proper link check without much extra work. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] media: Add link_validate() op to check links to the sink padSakari Ailus1-2/+3
The purpose of the link_validate() op is to allow an entity driver to ensure that the properties of the pads at the both ends of the link are suitable for starting the pipeline. link_validate is called on sink pads on active links which belong to the active part of the graph. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l: Add DPCM compressed raw bayer pixel formatsSakari Ailus1-0/+3
Add three other colour orders for 10-bit to 8-bit DPCM compressed raw bayer pixel formats. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l: Image processing control classSakari Ailus1-0/+8
Add control class for image processing controls. The control class deals with controls processing image, for example digital gain or noise filtering, which can be present in any part of the pipeline. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l: Image source control classSakari Ailus1-0/+9
Add image source control class. This control class is intended to contain low level controls which deal with control of the image capture process --- the A/D converter in image sensors, for example. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14[media] v4l2: use __u32 rather than enums in ioctl() structsSakari Ailus1-31/+33
V4L2 uses the enum type in IOCTL arguments in IOCTLs that were defined until the use of enum was considered less than ideal. Recently Rémi Denis-Courmont brought up the issue by proposing a patch to convert the enums to unsigned: <URL:http://www.spinics.net/lists/linux-media/msg46167.html> This sparked a long discussion where another solution to the issue was proposed: two sets of IOCTL structures, one with __u32 and the other with enums, and conversion code between the two: <URL:http://www.spinics.net/lists/linux-media/msg47168.html> Both approaches implement a complete solution that resolves the problem. The first one is simple but requires assuming enums and __u32 are the same in size (so we won't break the ABI) while the second one is more complex and less clean but does not require making that assumption. The issue boils down to whether enums are fundamentally different from __u32 or not, and can the former be substituted by the latter. During the discussion it was concluded that the __u32 has the same size as enums on all archs Linux is supported: it has not been shown that replacing those enums in IOCTL arguments would break neither source or binary compatibility. If no such reason is found, just replacing the enums with __u32s is the way to go. This is what this patch does. This patch is slightly different from Remi's first RFC (link above): it uses __u32 instead of unsigned and also changes the arguments of VIDIOC_G_PRIORITY and VIDIOC_S_PRIORITY. Signed-off-by: Rémi Denis-Courmont <remi@remlab.net> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-12Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds3-14/+19
Pull networking fixes from David S. Miller: 1) Since we do RCU lookups on ipv4 FIB entries, we have to test if the entry is dead before returning it to our caller. 2) openvswitch locking and packet validation fixes from Ansis Atteka, Jesse Gross, and Pravin B Shelar. 3) Fix PM resume locking in IGB driver, from Benjamin Poirier. 4) Fix VLAN header handling in vhost-net and macvtap, from Basil Gor. 5) Revert a bogus network namespace isolation change that was causing regressions on S390 networking devices. 6) If bonding decides to process and handle a LACPDU frame, we shouldn't bump the rx_dropped counter. From Jiri Bohac. 7) Fix mis-calculation of available TX space in r8169 driver when doing TSO, which can lead to crashes and/or hung device. From Julien Ducourthial. 8) SCTP does not validate cached routes properly in all cases, from Nicolas Dichtel. 9) Link status interrupt needs to be handled in ks8851 driver, from Stephen Boyd. 10) Use capable(), not cap_raised(), in connector/userns netlink code. From Eric W. Biederman via Andrew Morton. 11) Fix pktgen OOPS on module unload, from Eric Dumazet. 12) iwlwifi under-estimates SKB truesizes, also from Eric Dumazet. 13) Cure division by zero in SFC driver, from Ben Hutchings. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits) ks8851: Update link status during link change interrupt macvtap: restore vlan header on user read vhost-net: fix handle_rx buffer size bonding: don't increase rx_dropped after processing LACPDUs connector/userns: replace netlink uses of cap_raised() with capable() sctp: check cached dst before using it pktgen: fix crash at module unload Revert "net: maintain namespace isolation between vlan and real device" ehea: fix losing of NEQ events when one event occurred early igb: fix rtnl race in PM resume path ipv4: Do not use dead fib_info entries. r8169: fix unsigned int wraparound with TSO sfc: Fix division by zero when using one RX channel and no SR-IOV openvswitch: Validation of IPv6 set port action uses IPv4 header net: compare_ether_addr[_64bits]() has no ordering cdc_ether: Ignore bogus union descriptor for RNDIS devices bnx2x: bug fix when loading after SAN boot e1000: Silence sparse warnings by correcting type igb, ixgbe: netdev_tx_reset_queue incorrectly called from tx init path openvswitch: Release rtnl_lock if ovs_vport_cmd_build_info() failed. ...