Re: [PATCH v3] [media] vimc: Virtual Media Controller core, capture and sensor

2016-05-24 Thread Jeremy Gebben
Helen, I am more of a v4l2 newb than a reviewer, but I got your driver working on a qemu arm64 system. Using it to play with mediactl -p was a good way to get started. I did have 2 minor include path problems. Maybe they come in implicitly on other architectures? See below: On 4/27/16

Re: [v4l-utils PATCH v1.1 2/2] mediactl: Separate entity and pad parsing

2016-05-24 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Tuesday 24 May 2016 23:56:33 Sakari Ailus wrote: > Sometimes it's useful to be able to parse the entity independent of the pad. > Separate entity parsing into media_parse_entity(). > > Signed-off-by: Sakari Ailus Acked-by:

Re: [PATCH v3] [media] vimc: Virtual Media Controller core, capture and sensor

2016-05-24 Thread Helen Koike
Hi Jeremy, On 24-05-2016 21:00, Jeremy Gebben wrote: Helen, I am more of a v4l2 newb than a reviewer, but I got your driver working on a qemu arm64 system. Using it to play with mediactl -p was a good way to get started. I did have 2 minor include path problems. Maybe they come in implicitly

cron job: media_tree daily build: OK

2016-05-24 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Wed May 25 04:00:25 CEST 2016 git branch: test git hash: bc2b80ee3490651904f121eac1c8fb7652d48253 gcc

[PATCH v2 1/2] media: Media Device Allocator API

2016-05-24 Thread Shuah Khan
Media Device Allocator API to allows multiple drivers share a media device. Using this API, drivers can allocate a media device with the shared struct device as the key. Once the media device is allocated by a driver, other drivers can get a reference to it. The media device is released when all

[PATCH v2 0/2] Media Device Allocator API

2016-05-24 Thread Shuah Khan
Media Device Allocator API to allows multiple drivers share a media device. Using this API, drivers can allocate a media device with the shared struct device as the key. Once the media device is allocated by a driver, other drivers can get a reference to it. The media device is released when all

[PATCH v2 2/2] media: change au0828 to use Media Device Allocator API

2016-05-24 Thread Shuah Khan
Change au0828 to use Media Device Allocator API to allocate media device with the parent usb struct device as the key, so it can be shared with the snd usb audio driver. Signed-off-by: Shuah Khan --- drivers/media/usb/au0828/au0828-core.c | 12

[PATCH v5 2/2] media: set proper max seg size for devices on Exynos SoCs

2016-05-24 Thread Marek Szyprowski
All multimedia devices found on Exynos SoCs support only contiguous buffers, so set DMA max segment size to DMA_BIT_MASK(32) to let memory allocator to correctly create contiguous memory mappings. Signed-off-by: Marek Szyprowski ---

[PATCH v5 0/2] vb2-dma-contig: configure DMA max segment size properly

2016-05-24 Thread Marek Szyprowski
Hello, This patch is a follow-up of my previous attempts to let Exynos multimedia devices to work properly with shared buffers when IOMMU is enabled: 1. https://www.mail-archive.com/linux-media@vger.kernel.org/msg96946.html 2.

[PATCH v5 1/2] media: vb2-dma-contig: add helper for setting dma max seg size

2016-05-24 Thread Marek Szyprowski
Add a helper function for device drivers to set DMA's max_seg_size. Setting it to largest possible value lets DMA-mapping API always create contiguous mappings in DMA address space. This is essential for all devices, which use dma-contig videobuf2 memory allocator and shared buffers. Till now,

Re: [PATCH] [media] adv7604: Add support for hardware reset

2016-05-24 Thread Lars-Peter Clausen
On 05/24/2016 11:13 AM, Dragos Bogdan wrote: > The part can be reset by a low pulse on the RESET pin (i.e. a hardware reset) > with a minimum width of 5 ms. It is recommended to wait 5 ms after the low > pulse before an I2C write is performed to the part. > For safety reasons, the delays will be

Re: [PATCHv3] support for AD5820 camera auto-focus coil

2016-05-24 Thread Ivaylo Dimitrov
On 24.05.2016 12:04, Pavel Machek wrote: Hi! +static int ad5820_registered(struct v4l2_subdev *subdev) +{ + struct ad5820_device *coil = to_ad5820_device(subdev); + struct i2c_client *client = v4l2_get_subdevdata(subdev); + + coil->vana = regulator_get(>dev, "VANA");

[PATCHv4] support for AD5820 camera auto-focus coil

2016-05-24 Thread Pavel Machek
This adds support for AD5820 autofocus coil, found for example in Nokia N900 smartphone. Signed-off-by: Pavel Machek --- v2: simple cleanups, fix error paths, simplify probe v3: more cleanups, remove printk, add include v4: remove header file. diff --git

Re: [RFC PATCH 04/24] smiapp-pll: Take existing divisor into account in minimum divisor check

2016-05-24 Thread Pali Rohár
On Sunday 01 May 2016 13:45:24 Sakari Ailus wrote: > Hi Ivaylo, > > On Mon, Apr 25, 2016 at 12:08:04AM +0300, Ivaylo Dimitrov wrote: > > From: Sakari Ailus > > > > Required added multiplier (and divisor) calculation did not take into > > account the existing divisor when

Re: [RFC PATCH 04/24] smiapp-pll: Take existing divisor into account in minimum divisor check

2016-05-24 Thread Pavel Machek
On Mon 2016-04-25 00:08:04, Ivaylo Dimitrov wrote: > From: Sakari Ailus > > Required added multiplier (and divisor) calculation did not take into > account the existing divisor when checking the values against the minimum > divisor. Do just that. > > Signed-off-by: Sakari

[PATCH] [media] adv7604: Add support for hardware reset

2016-05-24 Thread Dragos Bogdan
The part can be reset by a low pulse on the RESET pin (i.e. a hardware reset) with a minimum width of 5 ms. It is recommended to wait 5 ms after the low pulse before an I2C write is performed to the part. For safety reasons, the delays will be 10 ms. The RESET pin can be tied high, so the GPIO

Re: [PATCH 0/3] [media] s5p-mfc: Fixes for issues when module is removed

2016-05-24 Thread Marek Szyprowski
Hello, On 2016-05-03 22:27, Javier Martinez Canillas wrote: Hello, This patch series fixes some issues that I noticed when trying to remove the s5p-mfc driver when built as a module. Some of these issues will be fixed once Marek's patches to convert the custom memory region reservation code

Re: [RESEND PATCH] [media] s5p-mfc: don't close instance after free OUTPUT buffers

2016-05-24 Thread Marek Szyprowski
Hello, On 2016-05-07 00:11, Javier Martinez Canillas wrote: From: ayaka User-space applications can use the VIDIOC_REQBUFS ioctl to determine if a memory mapped, user pointer or DMABUF based I/O is supported by the driver. So a set of VIDIOC_REQBUFS ioctl calls will be

Re: [PATCHv3] support for AD5820 camera auto-focus coil

2016-05-24 Thread Pavel Machek
Hi! > >+static int ad5820_registered(struct v4l2_subdev *subdev) > >+{ > >+struct ad5820_device *coil = to_ad5820_device(subdev); > >+struct i2c_client *client = v4l2_get_subdevdata(subdev); > >+ > >+coil->vana = regulator_get(>dev, "VANA"); > > devm_regulator_get()? I'd rather

Re: [PATCH] [media]: Driver for Toshiba et8ek8 5MP sensor

2016-05-24 Thread Pavel Machek
Hi! > The sensor is found in Nokia N900 main camera > > Signed-off-by: Ivaylo Dimitrov > +/* > + * A buffered write method that puts the wanted register write > + * commands in a message list and passes the list to the i2c framework > + */ > +static int

Re: [PATCH] adv7604: Don't ignore pad number in subdev DV timings pad operations

2016-05-24 Thread Hans Verkuil
On 05/24/16 14:09, Laurent Pinchart wrote: > The dv_timings_cap() and enum_dv_timings() pad operations take a pad > number as an input argument and return the DV timings capabilities and > list of supported DV timings for that pad. > > Commit bd3e275f3ec0 ("[media] media: i2c: adv7604: Use

[v4l-utils PATCH 0/2] Prepare for mediatext library, cleanups

2016-05-24 Thread Sakari Ailus
Hi, These two patches prepare for the mediatext library and clean up libmediactl interface a little. -- Kind regards, Sakari -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at

[v4l-utils PATCH 2/2] mediactl: Separate entity and pad parsing

2016-05-24 Thread Sakari Ailus
Sometimes it's useful to be able to parse the entity independent of the pad. Separate entity parsing into media_parse_entity(). Signed-off-by: Sakari Ailus --- utils/media-ctl/libmediactl.c | 28 utils/media-ctl/mediactl.h| 14

[v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name()

2016-05-24 Thread Sakari Ailus
Recently it was decided that the API dealing with string operations would be better to just receive a nul-terminated string rather than a string the length of which is defined. This change was implemented for v4l2_subdev_string_to_pixelcode() and v4l2_subdev_string_to_field() functions by patch

[PATCH v4 2/7] media: s5p-mfc: use generic reserved memory bindings

2016-05-24 Thread Marek Szyprowski
Use generic reserved memory bindings and mark old, custom properties as obsoleted. Signed-off-by: Marek Szyprowski --- .../devicetree/bindings/media/s5p-mfc.txt | 39 +- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git

[PATCH v4 1/7] of: reserved_mem: add support for using more than one region for given device

2016-05-24 Thread Marek Szyprowski
This patch allows device drivers to initialize more than one reserved memory region assigned to given device. When driver needs to use more than one reserved memory region, it should allocate child devices and initialize regions by index for each of its child devices. Signed-off-by: Marek

[PATCH v4 3/7] media: s5p-mfc: replace custom reserved memory handling code with generic one

2016-05-24 Thread Marek Szyprowski
This patch removes custom code for initialization and handling of reserved memory regions in s5p-mfc driver and replaces it with generic reserved memory regions api. s5p-mfc driver now handles two reserved memory regions defined by generic reserved memory bindings. Support for non-dt platform has

[PATCH v4 0/7] Exynos: MFC driver: reserved memory cleanup and IOMMU support

2016-05-24 Thread Marek Szyprowski
device works correctly either when IOMMU is either enabled or disabled (assuming that board provides required reserved memory regions). Patches have been tested on top of linux-next from 20160524 with some additional patches: - "[PATCH 0/3] [media] s5p-mfc: Fixes for issues when module is re

[PATCH v4 7/7] ARM: dts: exynos4412-odroid*: enable MFC device

2016-05-24 Thread Marek Szyprowski
Enable support for Multimedia Codec (MFC) device for all Exynos4412-based Odroid boards. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v4 4/7] media: s5p-mfc: add iommu support

2016-05-24 Thread Marek Szyprowski
This patch adds support for IOMMU to s5p-mfc device driver. MFC firmware is limited and it cannot use the default configuration. If IOMMU is available, the patch disables the default DMA address space configuration and creates a new address space of size limited to 256M and base address set to

[PATCH] adv7604: Don't ignore pad number in subdev DV timings pad operations

2016-05-24 Thread Laurent Pinchart
The dv_timings_cap() and enum_dv_timings() pad operations take a pad number as an input argument and return the DV timings capabilities and list of supported DV timings for that pad. Commit bd3e275f3ec0 ("[media] media: i2c: adv7604: Use v4l2-dv-timings helpers") broke this as it started ignoring

Re: [PATCH] [media] adv7604: Add support for hardware reset

2016-05-24 Thread Laurent Pinchart
Hi Dragos, On Tuesday 24 May 2016 12:13:22 Dragos Bogdan wrote: > The part can be reset by a low pulse on the RESET pin (i.e. a hardware > reset) with a minimum width of 5 ms. It is recommended to wait 5 ms after > the low pulse before an I2C write is performed to the part. For safety > reasons,

[PATCH 1/2] drm/exynos: g2d: Add support for old S5Pv210 type

2016-05-24 Thread Krzysztof Kozlowski
The non-DRM s5p-g2d driver supports two versions of G2D: v3.0 on S5Pv210 and v4.x on Exynos 4x12 (or newer). The driver for 3.0 device version is doing two things differently: 1. Before starting the render process, it invalidates caches (pattern, source buffer and mask buffer). Cache control is

[PATCH 2/2] [media] s5p-g2d: Replace old driver with DRM version

2016-05-24 Thread Krzysztof Kozlowski
Remove the old non-DRM driver because it is now entirely supported by exynos_drm_g2d driver. Cc: Kyungmin Park Cc: Kamil Debski Signed-off-by: Krzysztof Kozlowski --- MAINTAINERS | 8 -

[PATCH v4 5/7] ARM: Exynos: remove code for MFC custom reserved memory handling

2016-05-24 Thread Marek Szyprowski
Once MFC driver has been converted to generic reserved memory bindings, there is no need for custom memory reservation code. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/Makefile | 2 - arch/arm/mach-exynos/exynos.c | 19

[PATCH v4 6/7] ARM: dts: exynos: convert MFC device to generic reserved memory bindings

2016-05-24 Thread Marek Szyprowski
This patch replaces custom properties for defining reserved memory regions with generic reserved memory bindings for MFC video codec device. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos-mfc-reserved-memory.dtsi | 27 ++

Re: [PATCH for 4.7] v4l2-ioctl: fix stupid mistake in cropcap condition

2016-05-24 Thread Sakari Ailus
On Mon, May 23, 2016 at 01:45:44PM +0200, Hans Verkuil wrote: > Fix duplicate tests in condition. The second test for vidioc_cropcap > should have tested for vidioc_g_selection instead. > > Signed-off-by: Hans Verkuil > Reported-by: David Binderman

Re: [PATCH 1/2] drm/exynos: g2d: Add support for old S5Pv210 type

2016-05-24 Thread Tobias Jakobi
Hello Krzysztof, are you sure that these are the only differences. Because AFAIK there are quite a few more: - DMA submission of commands - blend mode / rounding - solid fill - YCrCb support - and probably more One would need to add least split the command list parser into a v3 and v41 version

Re: [PATCH 1/2] drm/exynos: g2d: Add support for old S5Pv210 type

2016-05-24 Thread Krzysztof Kozlowski
On 05/24/2016 03:49 PM, Tobias Jakobi wrote: > Hello Krzysztof, > > are you sure that these are the only differences. Because AFAIK there > are quite a few more: > - DMA submission of commands > - blend mode / rounding > - solid fill > - YCrCb support > - and probably more > > One would need to

[PATCH v1 0/3] Add V4L2_PIX_FMT_VP9

2016-05-24 Thread Wu-Cheng Li
This patch series add V4L2_PIX_FMT_VP9 and the documentation. Wu-Cheng Li (3): videodev2.h: add V4L2_PIX_FMT_VP9 format. v4l2-ioctl: add VP9 format description. V4L: add VP9 format documentation Documentation/DocBook/media/v4l/pixfmt.xml | 5 + drivers/media/v4l2-core/v4l2-ioctl.c

[PATCH v1 2/3] v4l2-ioctl: add VP9 format description.

2016-05-24 Thread Wu-Cheng Li
VP9 is a video coding format and a successor to VP8. Signed-off-by: Wu-Cheng Li --- drivers/media/v4l2-core/v4l2-ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index

[PATCH v1 3/3] V4L: add VP9 format documentation

2016-05-24 Thread Wu-Cheng Li
Add documentation for V4L2_PIX_FMT_VP9. Signed-off-by: Wu-Cheng Li --- Documentation/DocBook/media/v4l/pixfmt.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index

[PATCH v1 1/3] videodev2.h: add V4L2_PIX_FMT_VP9 format.

2016-05-24 Thread Wu-Cheng Li
This adds VP9 video coding format, a successor to VP8. Signed-off-by: Wu-Cheng Li --- include/uapi/linux/videodev2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 8f95191..a95f940 100644 ---

[PATCH v2] [media] adv7604: Add support for hardware reset

2016-05-24 Thread Dragos Bogdan
The part can be reset by a low pulse on the RESET pin (i.e. a hardware reset) with a minimum width of 5 ms. It is recommended to wait 5 ms after the low pulse before an I2C write is performed to the part. For safety reasons, the delays will be between 5 and 10 ms. The RESET pin can be tied high,

Re: [PATCH 1/2] drm/exynos: g2d: Add support for old S5Pv210 type

2016-05-24 Thread Tobias Jakobi
Hello Krzysztof, Krzysztof Kozlowski wrote: > On 05/24/2016 03:49 PM, Tobias Jakobi wrote: >> Hello Krzysztof, >> >> are you sure that these are the only differences. Because AFAIK there >> are quite a few more: >> - DMA submission of commands >> - blend mode / rounding >> - solid fill >> -

Re: [PATCH/RFC v2 1/4] v4l: Add metadata buffer type and format

2016-05-24 Thread Hans Verkuil
On 05/24/2016 05:28 PM, Sakari Ailus wrote: > Hi Hans, > >> Should it be mentioned here that changing the video format might change >> the buffersize? In case the buffersize is always a multiple of the width? > > Isn't that the case in general, as with pixel formats? buffersize could also > be

[GIT PULL] mem2mem fixes

2016-05-24 Thread Kamil Debski
The following changes since commit aff093d4bbca91f543e24cde2135f393b8130f4b: [media] exynos-gsc: avoid build warning without CONFIG_OF (2016-05-09 18:38:33 -0300) are available in the git repository at: git://linuxtv.org/kdebski/media_tree_2.git fixes-20160524 for you to fetch changes up

Re: [PATCH/RFC v2 1/4] v4l: Add metadata buffer type and format

2016-05-24 Thread Sakari Ailus
Hi Hans, On Mon, May 23, 2016 at 12:09:16PM +0200, Hans Verkuil wrote: > On 05/12/2016 02:18 AM, Laurent Pinchart wrote: > > The metadata buffer type is used to transfer metadata between userspace > > and kernelspace through a V4L2 buffers queue. It comes with a new > > metadata capture

[RFC 2/2] Add support for Omnivision OV5647

2016-05-24 Thread roliveir
Signed-off-by: roliveir --- MAINTAINERS| 7 + drivers/media/i2c/Kconfig | 11 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov5647.c | 891 + 4 files changed, 910 insertions(+) create mode 100644

[RFC 0/2] Add support for OV5647 sensor

2016-05-24 Thread roliveir
Hello, This RFC patch adds support for the Omnivision OV5647 sensor. At the moment it only supports 640x480 in Raw 8. Ramiro Oliveira (2): Add OV5647 device tree documentation Add support for Omnivision OV5647 .../devicetree/bindings/media/i2c/ov5647.txt | 29 + MAINTAINERS

[RFC 1/2] Add OV5647 device tree documentation

2016-05-24 Thread roliveir
Signed-off-by: roliveir --- .../devicetree/bindings/media/i2c/ov5647.txt | 29 ++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ov5647.txt diff --git

[RFC v2 0/21] Media request API

2016-05-24 Thread Sakari Ailus
Hi all, This is a second version of the RFC set on my request API work. It includes patches from myself as well as from Hans and Laurent. The current set can be found here as well: I keep updating it as I work

[RFC v2 04/21] media: Only requests in IDLE state may be deleted

2016-05-24 Thread Sakari Ailus
Prevent deleting queued requests. Also mark deleted requests as such by adding a new state for them. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 21 + include/media/media-device.h | 1 + 2 files changed, 18 insertions(+), 4

[RFC v2 02/21] media: Add media device request state

2016-05-24 Thread Sakari Ailus
Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 9 + include/media/media-device.h | 8 2 files changed, 17 insertions(+) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 85b13db..7781c49 100644 ---

[RFC v2 11/21] v4l: subdev: Support the request API in format and selection operations

2016-05-24 Thread Sakari Ailus
From: Laurent Pinchart Store the formats and selection rectangles in per-entity request data. This minimizes changes to drivers by reusing the v4l2_subdev_pad_config infrastructure. Signed-off-by: Laurent Pinchart

[RFC v2 10/21] v4l: Support the request API in format operations

2016-05-24 Thread Sakari Ailus
From: Laurent Pinchart Store the formats in per-entity request data. The get and set format operations are completely handled by the V4L2 core with help of the try format driver operation. Signed-off-by: Laurent Pinchart

[RFC v2 08/21] videodev2.h: Add request field to v4l2_pix_format_mplane

2016-05-24 Thread Sakari Ailus
From: Laurent Pinchart Let userspace specify a request ID when getting or setting formats. The support is limited to the multi-planar API at the moment, extending it to the single-planar API is possible if needed. >From a userspace point of view the

[RFC v2 20/21] DocBook: media: Document media events (MEDIA_IOC_DQEVENT IOCTL)

2016-05-24 Thread Sakari Ailus
Add DocBook documentation for media events. Signed-off-by: Sakari Ailus --- .../DocBook/media/v4l/media-controller.xml | 1 + .../DocBook/media/v4l/media-ioc-dqevent.xml| 156 + 2 files changed, 157 insertions(+) create mode

[RFC v2 19/21] DocBook: media: Document the V4L2 subdev request API

2016-05-24 Thread Sakari Ailus
From: Laurent Pinchart The V4L2 subdev request API consists in extensions to existing V4L2 subdev ioctls. Document it. Signed-off-by: Laurent Pinchart --- .../DocBook/media/v4l/vidioc-subdev-g-fmt.xml |

[RFC v2 21/21] DocBook: media: Document request flags

2016-05-24 Thread Sakari Ailus
Signed-off-by: Sakari Ailus --- .../DocBook/media/v4l/media-ioc-request-cmd.xml| 24 ++ 1 file changed, 24 insertions(+) diff --git a/Documentation/DocBook/media/v4l/media-ioc-request-cmd.xml

[RFC v2 05/21] media: Add media_device_request_complete() to mark requests complete

2016-05-24 Thread Sakari Ailus
Once the request has been queued and later on completed, a driver will mark the request complete by calling media_device_request_complete(). Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 49

[RFC v2 18/21] DocBook: media: Document the subdev selection API

2016-05-24 Thread Sakari Ailus
From: Laurent Pinchart Now that the subdev crop API is considered obsolete, the selection API that replaces it deserves a full documentation instead of referring to the crop API documentation. Signed-off-by: Laurent Pinchart

[RFC v2 16/21] DocBook: media: Document the media request API

2016-05-24 Thread Sakari Ailus
From: Laurent Pinchart The media request API is made of a new ioctl to implement request management. Document it. Signed-off-by: Laurent Pinchart Strip off the reserved fields. Signed-off-by: Sakari Ailus

[RFC v2 14/21] media: Make events on request completion optional, disabled by default

2016-05-24 Thread Sakari Ailus
Add flags to requests. The first defined flag, MEDIA_REQ_FL_COMPLETE_EVENT is used to tell whether to queue an event on request completion. Unless the flag is set, no event is generated when a request completes. Signed-off-by: Sakari Ailus ---

[RFC v2 12/21] vb2: Add allow_requests flag

2016-05-24 Thread Sakari Ailus
From: Hans Verkuil The driver has to set allow_requests explicitly in order to allow queuing or preparing buffers for a specific request ID. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-v4l2.c | 5 +

[RFC v2 07/21] videodev2.h: Add request field to v4l2_buffer

2016-05-24 Thread Sakari Ailus
From: Hans Verkuil When queuing buffers allow for passing the request ID that should be associated with this buffer. Split the u32 reserved2 field into two u16 fields, one for request, one with the old reserved2 name. Signed-off-by: Hans Verkuil

[RFC v2 13/21] media: Add MEDIA_IOC_DQEVENT

2016-05-24 Thread Sakari Ailus
Events on a media device tell about completion of requests. Blocking and non-blocking operation is supported. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 102 ++- include/media/media-device.h | 10 +

[RFC v2 15/21] media: Add poll support

2016-05-24 Thread Sakari Ailus
Implement poll for events. POLLPRI is used to notify users on incoming events. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/media/media-device.c

[RFC v2 09/21] v4l2-subdev.h: Add request field to format and selection structures

2016-05-24 Thread Sakari Ailus
From: Laurent Pinchart Let userspace specify a request ID when getting or setting formats or selection rectangles. >From a userspace point of view the API change is minimized and doesn't require any new ioctl. Signed-off-by: Laurent Pinchart

Re: [PATCH/RFC v2 1/4] v4l: Add metadata buffer type and format

2016-05-24 Thread Sakari Ailus
Hi Hans, On Tue, May 24, 2016 at 05:36:42PM +0200, Hans Verkuil wrote: > On 05/24/2016 05:28 PM, Sakari Ailus wrote: > > Hi Hans, > > > >> Should it be mentioned here that changing the video format might change > >> the buffersize? In case the buffersize is always a multiple of the width? > > >

[RFC v2 01/21] media: Add request API

2016-05-24 Thread Sakari Ailus
From: Laurent Pinchart The request API allows bundling media device parameters with request objects and applying them atomically, either synchronously or asynchronously. Signed-off-by: Laurent Pinchart ---

[RFC v2 17/21] DocBook: media: Document the V4L2 request API

2016-05-24 Thread Sakari Ailus
From: Laurent Pinchart The V4L2 request API consists in extensions to existing V4L2 ioctls. Document it. Signed-off-by: Laurent Pinchart --- Documentation/DocBook/media/v4l/common.xml | 2 +

[RFC v2 03/21] media: Prevent queueing queued requests

2016-05-24 Thread Sakari Ailus
Verify that the request state is IDLE before queueing it. Also mark requests queued when they're queued, and return the request to IDLE if queueing it failed. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 55

[RFC v2 06/21] media: Add per-entity request data support

2016-05-24 Thread Sakari Ailus
From: Laurent Pinchart Allow subsystems to associate data with entities in each request. This will be used by the V4L2 subdev core to store pad formats in requests. Signed-off-by: Laurent Pinchart ---

Re: [PATCH 1/3] media: Media Device Allocator API

2016-05-24 Thread Shuah Khan
On 05/23/2016 05:26 AM, Hans Verkuil wrote: > Hi Shuah, > > Some comments below: Thanks for the review. > > On 05/13/2016 07:09 PM, Shuah Khan wrote: >> Media Device Allocator API to allows multiple drivers share a media device. >> Using this API, drivers can allocate a media device with the

Cross compiling v4l-utils for Android

2016-05-24 Thread Burt Poppenga
Hello, I was hoping to get some tips on cross compiling v4l-utils for Android. I am targeting a Nexus 5 Marshmallow device (using the android-6.0.1_r41 branch) and have the complete AOSP tree, it is built and flashed in my device. PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=6.0.1

Re: [v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name()

2016-05-24 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Tuesday 24 May 2016 15:48:02 Sakari Ailus wrote: > Recently it was decided that the API dealing with string operations would > be better to just receive a nul-terminated string rather than a string the > length of which is defined. This change was

Re: [PATCH 2/3] media: add media_device_unregister_put() interface

2016-05-24 Thread Shuah Khan
On 05/23/2016 05:39 AM, Hans Verkuil wrote: > On 05/13/2016 07:09 PM, Shuah Khan wrote: >> Add media_device_unregister_put() interface to release reference to a media >> device allocated using the Media Device Allocator API. The media device is >> unregistered and freed when the last driver that

Re: [v4l-utils PATCH 2/2] mediactl: Separate entity and pad parsing

2016-05-24 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Tuesday 24 May 2016 15:48:03 Sakari Ailus wrote: > Sometimes it's useful to be able to parse the entity independent of the pad. > Separate entity parsing into media_parse_entity(). > > Signed-off-by: Sakari Ailus > --- >

Re: [PATCHv3] support for AD5820 camera auto-focus coil

2016-05-24 Thread Pavel Machek
Hi! > >>devm_regulator_get()? > > > >I'd rather avoid devm_ here. Driver is simple enough to allow it. > > > > Now thinking about it, what would happen here if regulator_get() returns > -EPROBE_DEFER? Wouldn't it be better to move regulator_get to the probe() > function, something like: Ok, I

Re: [v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name()

2016-05-24 Thread Sakari Ailus
Hi Laurent, Thanks for the review! On Tue, May 24, 2016 at 08:09:37PM +0300, Laurent Pinchart wrote: ... > > + if (strcmp(entity->info.name, name) == 0) > > While the kernel API guarantees that entity->info.name will be NULL- > terminated, wouldn't it be safer to add a safety check

Re: [v4l-utils PATCH 2/2] mediactl: Separate entity and pad parsing

2016-05-24 Thread Sakari Ailus
Hi Laurent, On Tue, May 24, 2016 at 08:14:22PM +0300, Laurent Pinchart wrote: ... > > +struct media_pad *media_parse_pad(struct media_device *media, > > + const char *p, char **endp) > > +{ > > + unsigned int pad; > > + struct media_entity *entity; > > + char

RFC: HSV format

2016-05-24 Thread Ricardo Ribalda Delgado
Hi HSV is a cylindrical-coordinate representation of a color. It is very useful for computer vision because the Hue component can be used to segment a scene. My plan was to add a format in videodev2.h and then add support for vivid, libv4l2-convert and qv4l2. There are also plans to prepare a

[v4l-utils PATCH v1.1 2/2] mediactl: Separate entity and pad parsing

2016-05-24 Thread Sakari Ailus
Sometimes it's useful to be able to parse the entity independent of the pad. Separate entity parsing into media_parse_entity(). Signed-off-by: Sakari Ailus --- utils/media-ctl/libmediactl.c | 29 + utils/media-ctl/mediactl.h| 14