summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-20[media] tw686x-kh: add audio support to the TODO listHans Verkuil
The mainline tw686x driver also supports audio, that's missing here as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-20[media] tw686x-kh: specify that the DMA is 32 bitsHans Verkuil
Set vb2_queue.gfp_flags to GFP_DMA32. Otherwise it will start to create bounce buffers which is something you want to avoid since those are in limited supply. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-20[media] tw686x-kh: use the cached valueMauro Carvalho Chehab
the dma_requests field is cached, but cache is not used: drivers/staging/media/tw686x-kh/tw686x-kh-video.c: In function 'tw686x_video_irq': drivers/staging/media/tw686x-kh/tw686x-kh-video.c:622:6: warning: variable 'requests' set but not used [-Wunused-but-set-variable] u32 requests; ^ Use the cache instead, as it seems reading it needs to be done with spin lock taken. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-20[media] media: Support Intersil/Techwell TW686x-based video capture cardsEzequiel Garcia
This commit introduces the support for the Techwell TW686x video capture IC. This hardware supports a few DMA modes, including scatter-gather and frame (contiguous). This commit makes little use of the DMA engine and instead has a memcpy based implementation. DMA frame and scatter-gather modes support may be added in the future. Currently supported chips: - TW6864 (4 video channels), - TW6865 (4 video channels, not tested, second generation chip), - TW6868 (8 video channels but only 4 first channels using built-in video decoder are supported, not tested), - TW6869 (8 video channels, second generation chip). [mchehab@osg.samsung.com: make checkpatch happy by using "unsigned int" instead of just "unsigned"] Cc: Krzysztof Halasa <khalasa@piap.pl> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-20[media] TW686x frame grabber driverKrzysztof HaƂasa
A driver for Intersil/Techwell TW686x-based PCIe frame grabbers. [hans.verkuil@cisco.com: renamed staging tw686x to tw686x-kh to prevent naming conflicts] [hans.verkuil@cisco.com: don't build tw686x-kh if tw686x is already selected to prevent conflicts] [mchehab@osg.samsung.com: use "unsigned int" instead of just "unsigned" and add some whitespaces to make checkpatch happier] Signed-off-by: Krzysztof Halasa <khalasa@piap.pl> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-20[media] media: Improve documentation for link_setup/link_modifyMauro Carvalho Chehab
Those callbacks are called with the media_device.graph_mutex held. Add a note about that, as the code called by those notifiers should not be touching in the mutex. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-20[media] media-device: get rid of the spinlockMauro Carvalho Chehab
Right now, the lock schema for media_device struct is messy, since sometimes, it is protected via a spin lock, while, for media graph traversal, it is protected by a mutex. Solve this conflict by always using a mutex. As a side effect, this prevents a bug when the media notifiers is called at atomic context, while running the notifier callback: BUG: sleeping function called from invalid context at mm/slub.c:1289 in_atomic(): 1, irqs_disabled(): 0, pid: 3479, name: modprobe 4 locks held by modprobe/3479: #0: (&dev->mutex){......}, at: [<ffffffff81ce8933>] __driver_attach+0xa3/0x160 #1: (&dev->mutex){......}, at: [<ffffffff81ce8941>] __driver_attach+0xb1/0x160 #2: (register_mutex#5){+.+.+.}, at: [<ffffffffa10596c7>] usb_audio_probe+0x257/0x1c90 [snd_usb_audio] #3: (&(&mdev->lock)->rlock){+.+.+.}, at: [<ffffffffa0e6051b>] media_device_register_entity+0x1cb/0x700 [media] CPU: 2 PID: 3479 Comm: modprobe Not tainted 4.5.0-rc3+ #49 Hardware name: /NUC5i7RYB, BIOS RYBDWi35.86A.0350.2015.0812.1722 08/12/2015 0000000000000000 ffff8803b3f6f288 ffffffff81933901 ffff8803c4bae000 ffff8803c4bae5c8 ffff8803b3f6f2b0 ffffffff811c6af5 ffff8803c4bae000 ffffffff8285d7f6 0000000000000509 ffff8803b3f6f2f0 ffffffff811c6ce5 Call Trace: [<ffffffff81933901>] dump_stack+0x85/0xc4 [<ffffffff811c6af5>] ___might_sleep+0x245/0x3a0 [<ffffffff811c6ce5>] __might_sleep+0x95/0x1a0 [<ffffffff8155aade>] kmem_cache_alloc_trace+0x20e/0x300 [<ffffffffa0e66e3d>] ? media_add_link+0x4d/0x140 [media] [<ffffffffa0e66e3d>] media_add_link+0x4d/0x140 [media] [<ffffffffa0e69931>] media_create_pad_link+0xa1/0x600 [media] [<ffffffffa0fe11b3>] au0828_media_graph_notify+0x173/0x360 [au0828] [<ffffffffa0e68a6a>] ? media_gobj_create+0x1ba/0x480 [media] [<ffffffffa0e606fb>] media_device_register_entity+0x3ab/0x700 [media] Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] m88ds3103: fix undefined divisionPeter Rosin
s32tmp in the below code may be negative, and dev->mclk_khz is an unsigned type. s32tmp = 0x10000 * (tuner_frequency - c->frequency); s32tmp = DIV_ROUND_CLOSEST(s32tmp, dev->mclk_khz); This is undefined, as DIV_ROUND_CLOSEST is undefined for negative dividends when the divisor is of unsigned type. So, change mclk_khz to be signed (s32). Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] media: platform: rcar_jpu, vsp1: Use ARCH_RENESASSimon Horman
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Update WPF and LIF maximum sizes for Gen3Laurent Pinchart
The maximum image size supported by the WPF is 2048x2048 on Gen2 and 8190x8190 on Gen3. Update the code accordingly, and fix the maximum LIF size for both Gen2 and Gen3. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Fix V4L2_PIX_FMT_XRGB444 format definitionLaurent Pinchart
The format is erroneously defined with an alpha channel. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Add global alpha support for DRM pipelineLaurent Pinchart
Make the global alpha multiplier of DRM planes configurable. All the necessary infrastructure is there, we just need to store the alpha value passed through the DRM API. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Add Z-order support for DRM pipelineLaurent Pinchart
Make the Z-order of planes configurable by assigning RPFs to BRU inputs dynamically based on the Z-order position. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Add support for the RPF alpha multiplier on Gen3Laurent Pinchart
The Gen3 RPF includes an alpha multiplier that can both multiply the alpha channel by a fixed global alpha value, and multiply the pixel components to convert the input to premultiplied alpha. As alpha premultiplication is available in the BRU for both Gen2 and Gen3 we handle it there and use the Gen3 alpha multiplier for global alpha multiplication only. This prevents conversion to premultiplied alpha if no BRU is present in the pipeline, that use case will be implemented later if needed. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: lut: Use display list fragments to fill LUTLaurent Pinchart
Synchronize the userspace LUT setup with the pipeline operation by using a display list fragment to store LUT data. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: dl: Add support for multi-body display listsLaurent Pinchart
Display lists support up to 8 bodies but we currently use a single one. To support preparing display lists for large look-up tables, add support for multi-body display lists. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: dl: Fix race conditionsLaurent Pinchart
The vsp1_dl_list_put() function expects to be called with the display list manager lock held. This assumption is correct for calls from within the vsp1_dl.c file, but not for the external calls. Fix it by taking the lock inside the function and providing an unlocked version for the internal callers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: dl: Make reg_count field unsignedLaurent Pinchart
The field takes positive values only, make it unsigned. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Fix LUT format settingLaurent Pinchart
The LUT set format handler overrides the requested format by mistake. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Factorize frame size enumeration codeLaurent Pinchart
Most of the entities can't perform scaling and implement the same frame size enumeration function. Factorize the code into a single implementation. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13Revert "[media] v4l2-ioctl: simplify code"Mauro Carvalho Chehab
There are some issues rised on this patch during patch review. I ended by merging this one by mistake. So, let's revert it. This reverts commit 54ace1cfd4358fd11112f17cc711eea234d5ab9e. Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Factorize media bus codes enumeration codeLaurent Pinchart
Most of the entities can't perform format conversion and implement the same media bus enumeration function. Factorize the code into a single implementation. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Factorize get pad format codeLaurent Pinchart
All entities implement the same get pad format handler, factorize it into a common function. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: RPF entities can't be target nodesLaurent Pinchart
The RPF entities are located at the very beginning of pipelines, they can't be target nodes in the Data Path Router matrix. Remove their input ID from the routing table. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Allocate pipelines on demandLaurent Pinchart
Instead of embedding pipelines in the vsp1_video objects allocate them on demand when they are needed. This fixes the streamon race condition where pipelines objects from different video nodes could be used for the same pipeline. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: video: Reorder functionsLaurent Pinchart
Move the pipeline initialization and cleanup functions to prepare for the next commit. No functional code change is performed here. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Store pipeline pointer in rwpfLaurent Pinchart
This prepares for dynamic pipeline allocation by providing a field that can be used to store the pipeline pointer atomically under driver control. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Pass pipe pointer to entity configure functionsLaurent Pinchart
Pass the pipe explicitly instead of retrieving it through media entities. This decouples device state stored in the pipeline from the active state stored in entities, preparing for dynamic pipeline creation. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Rename pipeline validate functions to pipeline buildLaurent Pinchart
The primary purpose of those functions is to build the pipeline, rename them to make this clearer. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Pass display list explicitly to configure functionsLaurent Pinchart
Modules write register values to the active display list pointed to by the pipeline. In order to support preparing display lists ahead of time, pass them explicitly to all configuration functions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Use __vsp1_video_try_format to initialize format at init timeLaurent Pinchart
Reuse the runtime logic to initialize the default format instead of open-coding it. This ensures coherency between intialization and runtime. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Merge RPF and WPF pad ops structuresLaurent Pinchart
The two structures are identical, merge them and move the result to vsp1_rwpf.c. All rwpf pad operations can now be declared static. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Create a new configure operation to setup modulesLaurent Pinchart
The subdev s_stream operation is abused as a generic way to setup modules at every frame. Move the code out to a new VSP1 entity configure operation. Most modules now have an empty s_stream operation that can be removed. The only exception is the WPF module that needs to perform hardware configuration when stopping the stream. The code can be simplified accordingly as we know that that operation never fails. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Store active selection rectangles in a pad config structureLaurent Pinchart
Use the pad config structure part of the vsp1_entity to store all active pad selection rectangles. This generalizes the code to operate on pad config structures. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Store active formats in a pad config structureLaurent Pinchart
Add a pad config structure field to the vsp1_entity structure and use it to store all active pad formats. This generalizes the code to operate on pad config structures. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Implement and use the subdev pad::init_cfg configurationLaurent Pinchart
Turn the custom formats initialization function into a standard pad::init_cfg handler and use it in subdevs instead of initializing formats in the subdev open handler. This makes the subdev open handler empty, so remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Add race condition FIXME commentLaurent Pinchart
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Fix BRU try compose rectangle storageLaurent Pinchart
Fix a typo that stored the try compose rectangle in the crop rectangle. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Consolidate entity ops in a struct vsp1_entity_operationsLaurent Pinchart
Entities have two operations, a destroy operation stored directly in vsp1_entity and a set_memory operation stored in a vsp1_rwpf_operations structure. Move the two to a more generic vsp1_entity_operations structure that will serve to implement additional operations. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Move subdev initialization code to vsp1_entity_init()Laurent Pinchart
Don't duplicate the code in every module driver, centralize it in a single place. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Use display lists with the userspace APILaurent Pinchart
Don't restrict display list usage to the DRM pipeline, use them unconditionally. This prepares the driver to support the request API. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Add header display list supportLaurent Pinchart
Display lists can operate in header or headerless mode. The headerless mode is only available on WPF0, to be used with the display engine. All other WPF instances can only use display lists in header mode. Implement support for header mode to prepare for display list usage on WPFs other than 0. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Fix 80 characters per line violationsLaurent Pinchart
Commit f7234138f14c ("v4l2-subdev: replace v4l2_subdev_fh by v4l2_subdev_pad_config") introduced lots of 80 characters per line violations. Fix them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Document calling context of vsp1_pipeline_propagate_alpha()Laurent Pinchart
The function can only be called from a s_stream handler as it requires a valid display list context (due to calling vsp1_uds_set_alpha() which writes to module registers). Document the requirement. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Remove unneeded entity streaming flagLaurent Pinchart
The flag is set but never read, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Don't configure RPF memory buffers before calculating offsetsLaurent Pinchart
The RPF source memory pointers need to be offset to take the crop rectangle into account. Offsets are computed in the RPF stream start, which can happen (when using the DRM pipeline) after calling the RPF .set_memory() operation that programs the buffer addresses. The .set_memory() operation tries to guard against the problem by skipping programming of the registers when the module isn't streaming. This will however only protect the first use of an RPF in a DRM pipeline, as in all subsequent uses the module streaming flag will be set and the .set_memory() operation will use potentially incorrect offsets. Fix this by allowing the caller to decide whether to program the hardware immediately or just cache the addresses. While at it refactor the memory set code and create a new vsp1_rwpf_set_memory() that cache addresses and calls the .set_memory() operation to apply them to the hardware. As a side effect the driver now writes all three DMA address registers regardless of the number of planes, and initializes unused addresses to zero. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Enable display list support for the HS[IT], LUT, SRU and UDSLaurent Pinchart
Those modules were left out of display list integration as they're not used by the DRM pipeline. To prepare for display list support in non-DRM pipelines use the module write API to set registers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: Don't setup control handler when starting streamingLaurent Pinchart
The control handler set operations don't program the hardware anymore, there's thus no need to call them when starting the stream. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: sru: Don't program intensity in control set handlerLaurent Pinchart
The datasheet clearly states that all but a few registers can't be modified when the device is running. Programming the intensity parameters in the control set handler is thus prohibited. Program it when starting the module instead. This requires storing the intensity value internally as the module can be started from the frame completion interrupt handler, and accessing control values requires taking a mutex. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13[media] v4l: vsp1: rwpf: Don't program alpha value in control set handlerLaurent Pinchart
The datasheet clearly states that all but a few registers can't be modified when the device is running. Programming the alpha value in the control set handler is thus prohibited. Program it when starting the module instead. This requires storing the alpha value internally as the module can be started from the frame completion interrupt handler, and accessing control values requires taking a mutex. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>