summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [media] v4l: omap4iss: Don't reinitialize the video qlock at every streamonLaurent Pinchart2014-07-171-1/+1
| | | | | | | Initialize the spin lock once only when initializing the video object. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: omap4iss: Copy paste error in iss_get_clocksVitaly Osipov2014-07-171-1/+1
| | | | | | | | | | It makes more sense to return PTR_ERR(iss->iss_ctrlclk) here. The current code looks like an oversight in pasting the block just above this one. Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: omap4iss: tighten omap4iss dependenciesArnd Bergmann2014-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | The OMAP4 camera support depends on I2C and VIDEO_V4L2, both of which can be loadable modules. This causes build failures if we want the camera driver to be built-in. This can be solved by turning the option into "tristate", which unfortunately causes another problem, because the driver incorrectly calls a platform-internal interface for omap4_ctrl_pad_readl/omap4_ctrl_pad_writel. Instead, this patch just forbids the invalid configurations and ensures that the driver can only be built if all its dependencies are built-in. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vb2: Add fatal error condition flagLaurent Pinchart2014-07-172-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a fatal error occurs that render the device unusable, the only options for a driver to signal the error condition to userspace is to set the V4L2_BUF_FLAG_ERROR flag when dequeuing buffers and to return an error from the buffer prepare handler when queuing buffers. The buffer error flag indicates a transient error and can't be used by applications to detect fatal errors. Returning an error from vb2_qbuf() is thus the only real indication that a fatal error occurred. However, this is difficult to handle for multithreaded applications that requeue buffers from a thread other than the control thread. In particular the poll() call in the control thread will not notify userspace of the error. This patch adds an explicit mechanism to report fatal errors to userspace. Drivers can call the vb2_queue_error() function to signal a fatal error. From this moment on, buffer preparation will return -EIO to userspace, and vb2_poll() will set the POLLERR flag and return immediately. The error flag is cleared when cancelling the queue, either at stream off time (through vb2_streamoff) or when releasing the queue with vb2_queue_release(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vb2: Don't return POLLERR during transient buffer underrunsLaurent Pinchart2014-07-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | The V4L2 specification states that "When the application did not call VIDIOC_QBUF or VIDIOC_STREAMON yet the poll() function succeeds, but sets the POLLERR flag in the revents field." The vb2_poll() function sets POLLERR when the queued buffers list is empty, regardless of whether this is caused by the stream not being active yet, or by a transient buffer underrun. Bring the implementation in line with the specification by returning POLLERR if no buffer has been queued only when the queue is not streaming. Buffer underruns during streaming are not treated specially anymore and just result in poll() blocking until the next event. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: uds: Fix scaling of alpha layerLaurent Pinchart2014-07-175-35/+122
| | | | | | | | | | | | | | Pixel color components can be scaled using either bilinear interpolation or a multitap filter. The multitap filter provides better results, but can't be selected when the alpha layer need to be scaled down by more than 1/2. Disable alpha scaling when the input has a fixed alpha value, and program the UDS to output a fixed alpha value in that case. This ensures the multitap filter will be used whenever possible. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: bru: Make the background color configurableLaurent Pinchart2014-07-172-5/+49
| | | | | | | | Expose the background color to userspace through the V4L2_CID_BG_COLOR control. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: bru: Support non-premultiplied colors at the BRU outputLaurent Pinchart2014-07-171-2/+9
| | | | | | | | | The BRU outputs premultiplied colors, enable color data normalization when the format configured at the output of the pipeline isn't premultiplied. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: bru: Support premultiplied alpha at the BRU inputsLaurent Pinchart2014-07-173-28/+50
| | | | | | | | | | | Adjust the BRU blending formula to avoid the multiplication by alpha when the corresponding input format is premultiplied. As this requires access to the RPFs connected to the BRU inputs from the BRU module, store pointers to the RPFs in the BRU structure when validating the pipeline. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: Add V4L2_CID_ALPHA_COMPONENT control supportLaurent Pinchart2014-07-173-4/+104
| | | | | | | | The control is used to configure the fixed alpha channel value, when reading from memory in the RPF or writing to memory in the WPF. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: Add alpha channel support to the memory portsLaurent Pinchart2014-07-174-20/+41
| | | | | | | | Support ARGB formats on the RPF side by reading the alpha component from memory and on the WPF side by writing it to memory. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: Switch to XRGB formatsLaurent Pinchart2014-07-171-4/+22
| | | | | | | | | | | | The driver ignores the alpha component on output video nodes and hardcodes the alpha component to 0 on capture video nodes. Make this explicit by exposing XRGB formats. Compatibility with existing userspace applications is handled by selecting the XRGB format corresponding to the requested old RGB format. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: wpf: Clear RPF to WPF association at stream off timeLaurent Pinchart2014-07-171-0/+1
| | | | | | | | | | | | | | | | The VSP1 stores the video pipelines' input (RPF) to output (WPF) mappings in a WPF register. An RPF must never be associated with multiple WPFs, even if all of those WPFs but one are unused, otherwise the hardware won't function properly. The driver doesn't ensure this correctly as it never clears the mappings. An RPF used with one WPF and later with a different WPF will lead to malfunction, as it will be associated with two WPFs. Clear the mappings at stream off time to fix this. Reported-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: wpf: Simplify cast to pipeline structureLaurent Pinchart2014-07-171-2/+1
| | | | | | | | Use the subdev pointer directly to_vsp1_pipeline() macro instead of casting from the subdev to the wpf object and back to the subdev. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: sru: Make the intensity controllable during streamingLaurent Pinchart2014-07-173-43/+61
| | | | | | | | | | The control value is currently stored in the SRU structure by the control set handler and written to the hardware at stream on time, making control set during streaming ineffective. Fix it by writing to the registers from within the control set handler. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: sru: Fix the intensity control default valueLaurent Pinchart2014-07-171-1/+11
| | | | | | | | | | | The default value isn't set and defaults to 0, which isn't in the 1-6 min-max range. Fix it by setting the default value to 1. This shoud have been caught when checking the control handler error field at initialization time, but the check was missing. Add it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: Setup control handler automatically at stream on timeLaurent Pinchart2014-07-172-0/+46
| | | | | | | | | | | | | | | | | | | When setting a control directly on a subdev node the VSP1 driver doesn't guarantee that the device is powered on. This leads to crashes when the control handlers writes to hardware registers. One easy way to fix this is to ensure that the device gets powered on when a subdev node is opened. However, this consumes power unnecessarily, as there's no need to power the device on when setting formats on the pipeline. Furthermore, control handler setup at entity init time suffers from the same problem as the device isn't powered on easier. Fix this by extend the entity base object to setup the control handler automatically when starting the stream. Entities must then skip writing to registers in the set control handler when not streaming, which can be tested with the new vsp1_entity_is_streaming() helper function. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: Propagate vsp1_device_get errors to the callersLaurent Pinchart2014-07-173-13/+9
| | | | | | | | Modify the vsp1_device_get() function to return an error code instead of a pointer to the VSP1 device, and use the return value in the callers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: Cleanup video nodes at removal timeLaurent Pinchart2014-07-174-12/+18
| | | | | | | | | | | | | Video nodes created and initialized in the RPF and WPF init code paths are never unregistered, and the related resources (videobuf alloc context and media entity) never released. Fix this by storing a pointer to the vsp1_video object in vsp1_entity and calling vsp1_video_cleanup() from vsp1_entity_destroy(). This also allows simplifying the init error code paths. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: Fix typosLaurent Pinchart2014-07-173-10/+10
| | | | | | | | Several macros were mistakenly prefixed with VPS1 instead of VSP1. Fix them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: Fix pipeline stop timeoutLaurent Pinchart2014-07-171-3/+7
| | | | | | | | | | | | | If the pipeline was already stopped when stopping the stream, no frame end interrupt will be generated and the driver will time out waiting for the pipeline to stop. Fix this by setting the pipeline state to STOPPED when the pipeline is idle waiting for frames to process, and to STOPPING at stream stop time only when the pipeline is currently RUNNING. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: Release buffers at stream stopLaurent Pinchart2014-07-171-0/+3
| | | | | | | | | | | | videobuf2 expects no buffer to be owned by the driver when the stop_stream queue operation returns. As the vsp1 driver fails to do so, a warning is generated at stream top time. Fix this by releasing all buffers queued on the IRQ queue in the stop_stream operation handler and marking them as erroneous. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vsp1: Fix routing cleanup when stopping the streamLaurent Pinchart2014-07-171-1/+1
| | | | | | | | | | | | | | | Commit d9b45ed3d8b75e8cf38c8cd1563c29217eecba27 ("v4l: vsp1: Support multi-input entities") reworked pipeline routing configuration and introduced a bug by writing to the entities routing registers without first checking whether the entity had a routing register. This results in overwriting the value at offset 0 of the device register space when stopping the stream. Fix this by skipping routing register write for entities without a routing register. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: vb2: Fix stream start and buffer completion raceLaurent Pinchart2014-07-171-1/+3
| | | | | | | | | | | | | | | | | videobuf2 stores the driver streaming state internally in the queue in the start_streaming_called variable. The state is set right after the driver start_stream operation returns, and checked in the vb2_buffer_done() function, typically called from the frame completion interrupt handler. A race condition exists if the hardware finishes processing the first frame before the start_stream operation returns. Fix this by setting start_streaming_called to 1 before calling the start_stream operation, and resetting it to 0 if the operation fails. Cc: stable@vger.kernel.org # for v3.15 and up Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: Add premultiplied alpha flag for pixel formatsLaurent Pinchart2014-07-174-5/+41
| | | | | | | | When set, the new V4L2_PIX_FMT_FLAG_PREMUL_ALPHA flag indicates that the pixel values are premultiplied by the alpha channel value. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: Support extending the v4l2_pix_format structureLaurent Pinchart2014-07-1731-70/+134
| | | | | | | | | | | | | | | | | | | | | | | | | The v4l2_pix_format structure has no reserved field. It is embedded in the v4l2_framebuffer structure which has no reserved fields either, and in the v4l2_format structure which has reserved fields that were not previously required to be zeroed out by applications. To allow extending v4l2_pix_format, inline it in the v4l2_framebuffer structure, and use the priv field as a magic value to indicate that the application has set all v4l2_pix_format extended fields and zeroed all reserved fields following the v4l2_pix_format field in the v4l2_format structure. The availability of this API extension is reported to userspace through the new V4L2_CAP_EXT_PIX_FORMAT capability flag. Just checking that the priv field is still set to the magic value at [GS]_FMT return wouldn't be enough, as older kernels don't zero the priv field on return. To simplify the internal API towards drivers zero the extended fields and set the priv field to the magic value for applications not aware of the extensions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] DocBook: media: Document ALPHA_COMPONENT control usage on output devicesLaurent Pinchart2014-07-171-7/+10
| | | | | | | | | | Extend the V4L2_CID_ALPHA_COMPONENT control for use on output devices, to set the alpha component value when the output format doesn't have an alpha channel. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: Add ARGB and XRGB pixel formatsLaurent Pinchart2014-07-172-20/+403
| | | | | | | | | | | | | | The existing RGB pixel formats are ill-defined in respect to their alpha bits and their meaning is driver dependent. Create new standard ARGB and XRGB variants with clearly defined meanings and make the existing variants deprecated. The new pixel formats 4CC values have been selected to match the DRM 4CCs for the same in-memory formats. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] Fix 64-bit division fall-out from 64-bit control rangesHans Verkuil2014-07-178-19/+31
| | | | | | | | | | | | | | Commit 0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3 increased the internal control ranges to 64 bit, but that caused problems in drivers that use the minimum/maximum/step/default_value control values in a division or modulus operations since not all architectures support those natively. Luckily, in almost all cases it is possible to just cast to 32 bits (the control value is known to be 32 bits, so it is safe to cast). Only in v4l2-ctrls.c was it necessary to use do_div in one function. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] DocBook improvement for U8 and U16 control typesHans Verkuil2014-07-171-4/+4
| | | | | | | | Removed the "This type is only used-in array controls." sentence in DocBook which was thought to only confuse. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] go7007: add motion detection supportHans Verkuil2014-07-176-184/+345
| | | | | | | | | | | | | | | | This patch adds motion detection support to the go7007 driver using the new motion detection controls, events. The global motion detection works fine, but the regional motion detection support probably needs more work. There seems to be some interaction between regions that makes setting correct thresholds difficult. The exact meaning of the thresholds isn't entirely clear either. I do not have any documentation, the only information I have is the custom code in the driver and a modet.c application. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] solo6x10: check dma_map_sg() return valueHans Verkuil2014-07-171-4/+6
| | | | | | | The dma_map_sg() function can fail, so check for the return value. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] solo6x10: fix 'dma from stack' warningHans Verkuil2014-07-171-4/+6
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] solo6x10: implement the motion detection eventHans Verkuil2014-07-172-15/+60
| | | | | | | Use the new motion detection event. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] solo6x10: implement the new motion detection controlsHans Verkuil2014-07-173-87/+39
| | | | | | | | Replace the custom ioctls to set motion detection thresholds by standard matrix controls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] DocBook: document new v4l motion detection eventHans Verkuil2014-07-172-0/+52
| | | | | | | Document the new motion detection event. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2: add a motion detection eventHans Verkuil2014-07-171-0/+17
| | | | | | | Add a new MOTION_DET event to signal when motion is detected. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] DocBook media: document new motion detection controlsHans Verkuil2014-07-171-0/+96
| | | | | | | | Document the 'Detect' control class and the new Motion Detection controls. Those controls will be used by the solo6x10 and go7007 drivers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2-ctrls/v4l2-controls.h: add MD controlsHans Verkuil2014-07-172-0/+44
| | | | | | | | Add the 'Detect' control class and the new motion detection controls. Those controls will be used by the solo6x10 and go7007 drivers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2-ctrls: fix commentsHans Verkuil2014-07-171-5/+9
| | | | | | | | | | Various comments referred to videodev2.h, but the control definitions have been moved to v4l2-controls.h. Also add the same reminder message to each class of controls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] DocBook media: document new u8 and u16 control typesHans Verkuil2014-07-172-1/+36
| | | | | | | | These types are needed for the upcoming Motion Detection matrix controls, so document them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2-ctrls/videodev2.h: add u8 and u16 typesHans Verkuil2014-07-173-4/+49
| | | | | | | | These are needed by the upcoming patches for the motion detection matrices. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2-controls.txt: update to the new way of accessing controlsHans Verkuil2014-07-171-23/+38
| | | | | | | | | The way current and new values are accessed has changed. Update the document to bring it up to date with the code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] DocBook media: update control sectionHans Verkuil2014-07-171-7/+20
| | | | | | | | Document the support for compound types in controls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] DocBook media: improve control sectionHans Verkuil2014-07-171-19/+55
| | | | | | | | | | | | | | Improve the control section: - Clarify the handling of private controls - Explain the V4L2_CTRL_FLAG_INACTIVE flag - Remove obsolete text regarding missing control event (we have them today) and the incorrect V4L2_CTRL_FLAG_DISABLED reference. - Add a code example on how to enumerate over user controls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] DocBook media: fix coding style in the control example codeHans Verkuil2014-07-171-41/+40
| | | | | | | Use the proper kernel coding style in these examples. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] DocBook media: update VIDIOC_G/S/TRY_EXT_CTRLSHans Verkuil2014-07-171-8/+29
| | | | | | | Document the support for the new compound type controls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] DocBook media: document VIDIOC_QUERY_EXT_CTRLHans Verkuil2014-07-171-36/+175
| | | | | | | Document the new VIDIOC_QUERY_EXT_CTRL ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2-ctrl: fix error return of copy_to/from_userHans Verkuil2014-07-171-5/+6
| | | | | | | | copy_to/from_user returns the number of bytes not copied, it does not return a 'normal' linux error code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2-ctrls: return elem_size instead of strlenHans Verkuil2014-07-171-1/+1
| | | | | | | | | | When getting a string and the size given by the application is too short return the max length the string can have (elem_size) instead of the string length + 1. That makes more sense. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
OpenPOWER on IntegriCloud