aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-11-03[media] omap3isp: preview: Add crop support on the sink padLaurent Pinchart2-66/+198
The crop rectangle takes the preview engine internal cropping requirements into account. The smallest allowable margins are 14 columns and 8 rows when reading from memory, and 18 columns and 8 rows when processing data on the fly from the CCDC. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] omap3isp: preview: Rename min/max input/output sizes definesLaurent Pinchart2-19/+17
The macros that define the minimum/maximum input and output sizes are defined in seperate files and have no consistent naming. In preparation for preview engine cropping support, move them all to isppreview.c and rename them to PREV_{MIN|MAX}_{IN|OUT}_{WIDTH|HEIGHT}*. Remove unused and/or unneeded local variables that store the maximum output width. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] omap3isp: preview: Remove horizontal averager supportLaurent Pinchart2-23/+2
The horizontal averager isn't used and will get in the way when implementing cropping support on the input pad. Remove it, it can be added back later if needed. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] omap3isp: Report the ISP revision through the media controller APILaurent Pinchart1-0/+1
Set the media_device::hw_revision field to the ISP revision number. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] omap3isp: ccdc: remove redundant operationGuennadi Liakhovetski1-1/+1
Trivial arithmetics clean up. Signed-off-by: Guennadi Liakhovetski <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] omap3isp: Fix memory leaks in initialization error pathsLaurent Pinchart6-47/+74
Make sure all modules init functions clean up after themselves in case of error. Signed-off-by: Laurent Pinchart <[email protected]> Reported-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] omap3isp: Add missing mutex_destroy() callsLaurent Pinchart4-0/+7
Mutexes must be destroyed with mutex_destroy(). Add missing calls in the modules cleanup handlers. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] omap3isp: Move *_init_entities() functions to the init/cleanup sectionLaurent Pinchart6-239/+239
Group all init/cleanup functions together to make the code more readable. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] omap3isp: Move media_entity_cleanup() from unregister() to cleanup()Laurent Pinchart12-20/+34
The media_entity_cleanup() function belong to the module cleanup handlers, not the entity registration handlers. Move it there. Create a omap3isp_video_cleanup() function to cleanup the video node entity, and call it from the module cleanup handlers. Rename omap3isp_stat_free() to omap3isp_stat_cleanup(). Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] MFC: Change MFC firmware binary nameSachin Kamat1-2/+2
This patch renames the MFC firmware binary to avoid SoC name in it. Signed-off-by: Sachin Kamat <[email protected]> Acked-by: Kamil Debski <[email protected]> Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] vb2: add vb2_get_unmapped_area in vb2 coreScott Jiang2-0/+38
no mmu system needs get_unmapped_area file operations to do mmap Signed-off-by: Scott Jiang <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] v4l: Add v4l2 subdev driver for S5K6AAFX sensorSylwester Nawrocki4-0/+1739
This driver exposes preview mode operation of the S5K6AAFX sensor with embedded SoC ISP. The native capture (snapshot) operation mode is not supported. Following controls are available: manual/auto exposure and gain, power line frequency (anti-flicker), saturation, sharpness, brightness, contrast, white balance temperature, color effects, horizontal/vertical image flip, frame interval, auto white balance. RGB component gains are currently exposed through private controls. Reviewed-by: Sakari Ailus <[email protected]> Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] v4l: Add AUTO option for the V4L2_CID_POWER_LINE_FREQUENCY controlSylwester Nawrocki3-2/+5
V4L2_CID_POWER_LINE_FREQUENCY control allows applications to instruct a driver what is the power line frequency so an appropriate filter can be used by the device to cancel flicker by compensating the light intensity ripple. Currently in the menu we have entries for 50 Hz and 60 Hz and for entirely disabling the anti-flicker filter. However some devices are capable of automatically detecting the frequency, so add V4L2_CID_POWER_LINE_FREQUENCY_AUTO entry for them. Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] media: ov6650: stylistic improvementsJanusz Krzysztofik1-8/+6
* with no "retrun ret;" at the end, there is no need to initialize ret any longer, * consequently use conditional expressions, not if...else constructs, throughout ov6650_s_ctrl(), * v4l2_ctrl_new_std_menu() max value of V4L2_EXPOSURE_MANUAL instead of equivalent 1 looks more clear. Created on top of "Converting soc_camera to the control framework" series. Signed-off-by: Janusz Krzysztofik <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] media: ov5642: Add support for arbitrary resolutionBastian Hecht1-73/+167
This patch adds the ability to get arbitrary resolutions with a width up to 2592 and a height up to 720 pixels instead of the standard 1280x720 only. Signed-off-by: Bastian Hecht <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: replace soc-camera specific soc_mediabus.h with v4l2-mediabus.hGuennadi Liakhovetski12-12/+12
Most users of the <media/soc_mediabus.h> header only need pixel code definitions, which are now located in the generic <linux/v4l2-mediabus.h> header. Switch over to reduce soc-camera dependencies. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: soc-camera: make (almost) all client drivers re-usable outside ↵Guennadi Liakhovetski5-30/+68
of the framework The most important change in this patch is direct linking to struct soc_camera_link via the client->dev.platform_data pointer. This makes most of the soc-camera client drivers also usable outside of the soc-camera framework. After this change all what is needed for these drivers to function are inclusions of soc-camera headers for some convenience macros, suitably configured platform data, which is anyway always required, and loaded soc-camera core module for library functions. If desired, these library functions can be made generic in the future and moved to a more neutral location. The only two client drivers, that still depend on soc-camera are: mt9t031: it uses struct video_device for its PM. Since no hardware is available, alternative methods cannot be tested. ov6650: it uses struct soc_camera_device to pass its sense data back to the bridge driver. A generic v4l2-subdevice approach should be developed to perform this. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: add .g_std() core V4L2 subdevice operationGuennadi Liakhovetski1-0/+1
VIDIOC_G_STD can return the current TV-norm to the user in one of two ways: if an .vidioc_g_std() ioctl operation is provided by the driver, it is called, otherwise the value ot the .current_norm field of struct video_device is returned. Since subdevice drivers currently have no access to struct video_device objects, the only way to provide this information to the user is by implementing a .g_std() method. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: dynamically allocate video_device nodes in subdevicesGuennadi Liakhovetski2-7/+33
Currently only very few drivers actually use video_device nodes, embedded in struct v4l2_subdev. Allocate these nodes dynamically for those drivers to save memory for the rest. Signed-off-by: Guennadi Liakhovetski <[email protected]> Tested-by: Sylwester Nawrocki <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: sh_mobile_csi2: fix unbalanced pm_runtime_put()Guennadi Liakhovetski1-0/+6
If the sh_mobile_csi2 driver didn't attach to a client, normally, because the respective device connects to the SoC over the parallel CEU interface and doesn't use the CSI-2 controller, it also shouldn't call pm_runtime_put() on attempted disconnect. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: mt9m001, mt9v022: use internally cached pixel codeGuennadi Liakhovetski3-25/+4
Using the internally cached pixel code, instead of the one, provided by the soc-camera, removes one more use of struct soc_camera_device in these drivers. Also remove the no longer needed soc_camera_from_i2c() inline function. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: soc-camera: start removing struct soc_camera_device from client ↵Guennadi Liakhovetski15-286/+126
drivers Remove most trivial uses of struct soc_camera_device from most client drivers, abstracting some of them inside inline functions. Next steps will eliminate remaining uses and modify inline functions to not use struct soc_camera_device. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: docbook documentation for struct v4l2_create_buffersGuennadi Liakhovetski2-5/+22
Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] soc_camera: remove the now obsolete struct soc_camera_opsHans Verkuil6-25/+0
Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: mt9m001 hunk moved to an earlier patch] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] mt9t031: convert to the control frameworkHans Verkuil1-166/+86
Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: simplified pointer arithmetic] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] mt9m111: convert to the control frameworkHans Verkuil1-155/+48
Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: simplified pointer arithmetic] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] mt9m001: convert to the control frameworkHans Verkuil1-141/+77
Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: simplified pointer arithmetic] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] ov9740: convert to the control frameworkHans Verkuil1-55/+28
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] ov6650: convert to the control frameworkHans Verkuil1-266/+115
Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: simplified pointer arithmetic] [[email protected]: fix a typo in the register name] Acked-by: Janusz Krzysztofik <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] ov2640: convert to the control frameworkHans Verkuil1-63/+27
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] mt9v022: convert to the control frameworkHans Verkuil1-158/+107
Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: simplified pointer arithmetic] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] rj54n1cb0c: convert to the control frameworkHans Verkuil1-103/+38
Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: simplified pointer arithmetic] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: soc-camera: call subdevice .s_power() method, when powering up ↵Guennadi Liakhovetski1-8/+34
or down Currently soc-camera can use power regulators and platform specific methods to power clients up and down. Additionally, client drivers can provide their own subdevice .s_power() methods, acting directly on the device. This patch adds calls to this method, when external power supplies are on. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: soc_camera_platform: do not leave dangling invalid pointersGuennadi Liakhovetski1-0/+2
The life-time of soc-camera device objects can be longer, than the time, it is attached to a client driver, therefore all references to the driver own data have to be cleared, when the driver is detached. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: soc-camera: split a function into twoGuennadi Liakhovetski1-31/+34
The soc_camera_power_set() function processes two cases: power on anf off. These two cases don't share and common code, and the function is always called with a constant power on / off argument. Splitting this function into two removes a condition check, reduces indentation levels and makes the code look cleaner. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: sh_mobile_csi2: do not guess the client, the host tells usGuennadi Liakhovetski1-15/+3
We do not have to scan the list of subdevices to find our client - the sensor, the host has already set our grp_id value. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: sh_mobile_ceu_camera: the host shall configure the pipelineGuennadi Liakhovetski1-5/+15
It is a task of the host / bridge driver to bind single subdevices into a pipeline, not of respective subdevices. Eventually this might be handled by the Media Controller API. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: soc-camera: add 2 new ioctl() handlersGuennadi Liakhovetski1-2/+31
This patch adds two new ioctl() handlers: .vidioc_create_bufs() and .vidioc_prepare_buf() for compliant vb2 soc-camera hosts. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: mx3-camera: prepare to support multi-size buffersGuennadi Liakhovetski1-76/+85
Prepare the mx3_camera friver to support the new VIDIOC_CREATE_BUFS and VIDIOC_PREPARE_BUF ioctl()s. The .queue_setup() vb2 operation must be able to handle buffer sizes, provided by the caller, and the .buf_prepare() operation must not use the currently configured frame format for its operation, which makes it superfluous for this driver. Its functionality is moved into .buf_queue(). Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: sh-mobile-ceu-camera: prepare to support multi-size buffersGuennadi Liakhovetski1-43/+81
Prepare the sh_mobile_ceu_camera friver to support the new VIDIOC_CREATE_BUFS and VIDIOC_PREPARE_BUF ioctl()s. The .queue_setup() vb2 operation must be able to handle buffer sizes, provided by the caller, and the .buf_prepare() operation must not use the currently configured frame format for its operation. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] ov772x: convert to the control frameworkHans Verkuil1-78/+36
Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: simplified pointer arithmetic] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] ov9640: convert to the control frameworkHans Verkuil2-85/+38
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] sh_mobile_ceu_camera: implement the control handlerHans Verkuil2-57/+38
And since this is the last and only host driver that uses controls, also remove the now obsolete control fields from soc_camera.h. Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: moved code around, fixed problems] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] soc_camera: add control handler supportHans Verkuil2-75/+21
The soc_camera framework is switched over to use the control framework. After this patch none of the controls in subdevs or host drivers are available, until those drivers are also converted to the control framework. Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: moved code around, fixed problems] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] dmaengine: ipu-idmac: add support for the DMA_PAUSE controlGuennadi Liakhovetski1-23/+42
To support multi-size buffers in the mx3_camera V4L2 driver we have to be able to stop DMA on a channel without releasing descriptors and completely halting the hardware. Use the DMA_PAUSE control to implement this mode. Signed-off-by: Guennadi Liakhovetski <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: vb2: add support for buffers of different sizes on a single queueGuennadi Liakhovetski2-59/+270
The two recently added ioctl()s VIDIOC_CREATE_BUFS and VIDIOC_PREPARE_BUF allow user-space applications to allocate video buffers of different sizes and hand them over to the driver for fast switching between different frame formats. This patch adds support for buffers of different sizes on the same buffer-queue to vb2. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: vb2: prepare to support multi-size buffersGuennadi Liakhovetski14-32/+38
In preparation for the forthcoming VIDIOC_CREATE_BUFS ioctl add a "const struct v4l2_format *" argument to the .queue_setup() vb2 operation. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: document the new VIDIOC_CREATE_BUFS and VIDIOC_PREPARE_BUF ioctl()sGuennadi Liakhovetski5-0/+259
[[email protected]: remove emacs format crap at the end of the new files] Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: videobuf2: update buffer state on VIDIOC_QBUFGuennadi Liakhovetski1-0/+3
V4L2 specification states, that the videobuffer state flags have to be updated on VIDIOC_QBUF ioctl(). Videobuf2 currently doesn't do that, which is fixed by this patch. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-11-03[media] V4L: add two new ioctl()s for multi-size videobuffer managementGuennadi Liakhovetski4-8/+115
A possibility to preallocate and initialise buffers of different sizes in V4L2 is required for an efficient implementation of a snapshot mode. This patch adds two new ioctl()s: VIDIOC_CREATE_BUFS and VIDIOC_PREPARE_BUF and defines respective data structures. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>