Re: [RFC v2 08/17] media-device: Make devnode.dev->kobj parent of devnode.cdev

2016-08-22 Thread Sakari Ailus
On Mon, Aug 22, 2016 at 02:17:28PM +0200, Hans Verkuil wrote: > On 08/19/2016 12:23 PM, Sakari Ailus wrote: > > The struct cdev embedded in struct media_devnode contains its own kobj. > > Instead of trying to manage its lifetime separately from struct > > media_devnode, make t

Re: [RFC v2 17/17] omap3isp: Don't rely on devm for memory resource management

2016-08-22 Thread Sakari Ailus
Hi Hans, On Mon, Aug 22, 2016 at 02:40:39PM +0200, Hans Verkuil wrote: > On 08/19/2016 12:23 PM, Sakari Ailus wrote: > > devm functions are fine for managing resources that are directly related > > to the device at hand and that have no other dependencies. However, a > > p

Re: [RFC v2 17/17] omap3isp: Don't rely on devm for memory resource management

2016-08-22 Thread Sakari Ailus
On Mon, Aug 22, 2016 at 05:02:31PM +0300, Sakari Ailus wrote: > Hi Hans, > > On Mon, Aug 22, 2016 at 02:40:39PM +0200, Hans Verkuil wrote: > > On 08/19/2016 12:23 PM, Sakari Ailus wrote: > > > devm functions are fine for managing resources that are directly related > &g

Re: [PATCH v5 2/2] media: Add a driver for the ov5645 camera sensor.

2016-08-24 Thread Sakari Ailus
get(dev, "enable", GPIOD_OUT_HIGH); > + if (IS_ERR(ov5645->enable_gpio)) { > + dev_err(dev, "cannot get enable gpio\n"); > + return PTR_ERR(ov5645->enable_gpio); > + } > + > + ov5645->rst_gpio =

Re: [PATCH] [media] m2m-deinterlace: Fix error print during probe

2016-08-24 Thread Sakari Ailus
v4l2_err(&pcdev->v4l2_dev, "DMA does not support INTERLEAVE\n"); > + dev_err(&pdev->dev, "DMA does not support INTERLEAVE\n"); > goto rel_dma; > } > Acked-by: Sakari Ailus -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMP

Re: [PATCH] [media] ad5820: fix one smatch warning

2016-08-24 Thread Sakari Ailus
nt standby : 1; > + unsigned int standby : 1; I guess a bool would be a better match for this one. It's what it's used for. [01] assignments should be replaced by boolean values. I can submit a patch for this as well, up to you. > }; > > static int ad5820_write

Re: [PATCH v5 2/2] media: Add a driver for the ov5645 camera sensor.

2016-08-25 Thread Sakari Ailus
Hi Todor, On Wed, Aug 24, 2016 at 06:24:31PM +0300, Todor Tomov wrote: > Hi Sakari, > > Thanks a lot for the time spent to review the driver! You're welcome! :-) > I have a few responses bellow. > > > On 08/24/2016 01:17 PM, Sakari Ailus wrote: > > Hi Todor,

Re: [PATCH v5 2/2] media: Add a driver for the ov5645 camera sensor.

2016-08-25 Thread Sakari Ailus
Hi Todor, On Thu, Aug 25, 2016 at 04:30:33PM +0300, Todor Tomov wrote: > Hi Sakari, Rob, > > On 08/25/2016 10:18 AM, Sakari Ailus wrote: > > Hi Todor, > > > > On Wed, Aug 24, 2016 at 06:24:31PM +0300, Todor Tomov wrote: > >> Hi Sakari, > >> >

[RFC v3 06/21] media device: Drop nop release callback

2016-08-26 Thread Sakari Ailus
The release callback is only used to print a debug message. Drop it. (It will be re-introduced later in a different form.) Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media

[RFC v3 15/21] media: Provide a way to the driver to set a private pointer

2016-08-26 Thread Sakari Ailus
Now that the media device can be allocated dynamically, drivers have no longer a way to conveniently obtain the driver private data structure. Provide one again in the form of a private pointer passed to the media_device_alloc() function. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil

[RFC v3 07/21] media-device: Make devnode.dev->kobj parent of devnode.cdev

2016-08-26 Thread Sakari Ailus
media_devnode.dev kobj's release callback. Signed-off-by: Sakari Ailus --- drivers/media/media-devnode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c index 7481c96..a8302fc 100644 --- a/drivers/media/

[RFC v3 11/21] media device: Refcount the media device

2016-08-26 Thread Sakari Ailus
release the media device by calling media_device_put() rather than media_device_cleanup(). Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 13 + include/media/media-device.h | 31 +++ 2 files changed, 44 insertions(+) diff --git a/drivers

[RFC v3 18/21] media-device: Postpone graph object removal until free

2016-08-26 Thread Sakari Ailus
The media device itself will be unregistered based on it being unbound and driver's remove callback being called. The graph objects themselves may still be in use; rely on the media device release callback to release them. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/

[RFC v3 12/21] media device: Initialise media devnode in media_device_init()

2016-08-26 Thread Sakari Ailus
Call media_devnode_init() from media_device_init(). This has the effect of creating a struct device for the media_devnode before it is registered, making it possible to obtain a reference to it for e.g. video devices. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 26

[RFC v3 16/21] media: Add release callback for media device

2016-08-26 Thread Sakari Ailus
The release callback may be used by the driver to signal the release of the media device. This way the lifetime of the driver's own memory allocations may be made dependent on that of the media device. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 4 include/media/

[RFC v3 14/21] media device: Get the media device driver's device

2016-08-26 Thread Sakari Ailus
The struct device of the media device driver (i.e. not that of the media devnode) is pointed to by the media device. The struct device pointer is mostly used for debug prints. Ensure it will stay around as long as the media device does. Signed-off-by: Sakari Ailus --- drivers/media/media

[RFC v3 20/21] omap3isp: Release the isp device struct by media device callback

2016-08-26 Thread Sakari Ailus
Use the media device release callback to release the isp device's data structure. This approach has the benefit of not releasing memory which may still be accessed through open file handles whilst the isp driver is being unbound. Signed-off-by: Sakari Ailus --- drivers/media/platform/oma

[RFC v3 21/21] omap3isp: Don't rely on devm for memory resource management

2016-08-26 Thread Sakari Ailus
will result in accessing released (and potentially reallocated) memory. Instead, rely on the media device which will stick around until all users are gone. Signed-off-by: Sakari Ailus --- drivers/media/platform/omap3isp/isp.c | 38 --- drivers/media/platform

[RFC v3 17/21] v4l: Acquire a reference to the media device for every video device

2016-08-26 Thread Sakari Ailus
The video device depends on the existence of its media device --- if there is one. Acquire a reference to it. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-dev.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-dev.c

[RFC v3 19/21] omap3isp: Allocate the media device dynamically

2016-08-26 Thread Sakari Ailus
Use the new media_device_alloc() API to allocate and release the media device. Signed-off-by: Sakari Ailus --- drivers/media/platform/omap3isp/isp.c | 24 +--- drivers/media/platform/omap3isp/isp.h | 2 +- drivers/media/platform/omap3isp/ispvideo.c | 2 +- 3

[RFC v3 10/21] media: Shuffle functions around

2016-08-26 Thread Sakari Ailus
As the call paths of the functions in question will change, move them around in anticipation of that. No other changes. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/media-device.c | 56 ++-- 1 file changed, 28 insertions(+), 28

[RFC v3 05/21] media: devnode: Rename mdev argument as devnode

2016-08-26 Thread Sakari Ailus
media-devnode: fix namespace mess") Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/media-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 8bdc316..a431775 100644 --- a/drivers/m

[RFC v3 02/21] Revert "[media] media: fix use-after-free in cdev_put() when app exits after driver unbind"

2016-08-26 Thread Sakari Ailus
This reverts commit 5b28dde51d0c ("[media] media: fix use-after-free in cdev_put() when app exits after driver unbind"). The commit was part of an original patchset to avoid crashes when an unregistering device is in use. Signed-off-by: Sakari Ailus --- drivers/media/media-devi

[RFC v3 01/21] Revert "[media] media: fix media devnode ioctl/syscall and unregister race"

2016-08-26 Thread Sakari Ailus
This reverts commit 6f0dd24a084a ("[media] media: fix media devnode ioctl/syscall and unregister race"). The commit was part of an original patchset to avoid crashes when an unregistering device is in use. Signed-off-by: Sakari Ailus --- drivers/media/media-devi

[RFC v3 09/21] media: Split initialising and adding media devnode

2016-08-26 Thread Sakari Ailus
media device is allocated. Don't distribute the effects of these changes yet. Add media_device_get() and media_device_put() first. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 18 +- drivers/media/media-devnode.c | 17 +++-- include/media/

[RFC v3 08/21] media: Enable allocating the media device dynamically

2016-08-26 Thread Sakari Ailus
From: Sakari Ailus Allow allocating the media device dynamically. As the struct media_device embeds struct media_devnode, the lifetime of that object is that same than that of the media_device. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 15 +++ include/media

[RFC v3 13/21] media device: Deprecate media_device_{init,cleanup}() for drivers

2016-08-26 Thread Sakari Ailus
Drivers should no longer directly allocate media_device but rely on media_device_alloc(), media_device_get() and media_device_put() instead. Deprecate media_device_init() and media_device_cleanup(). Signed-off-by: Sakari Ailus --- include/media/media-device.h | 8 1 file changed, 8

[RFC v3 03/21] Revert "[media] media-device: dynamically allocate struct media_devnode"

2016-08-26 Thread Sakari Ailus
This reverts commit a087ce704b80 ("[media] media-device: dynamically allocate struct media_devnode"). The commit was part of an original patchset to avoid crashes when an unregistering device is in use. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c

[RFC v3 04/21] media: Remove useless curly braces and parentheses

2016-08-26 Thread Sakari Ailus
Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/media-device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index a1cd50f..8bdc316 100644 --- a/drivers/media/media-device.c +++ b/drivers

[RFC v3 00/21] Make use of kref in media device, grab references as needed

2016-08-26 Thread Sakari Ailus
Hi folks, This is the third version of the RFC set to fix referencing in media devices. The lifetime of the media device (and media devnode) is now bound to that of struct device embedded in it and its memory is only released once the last reference is gone: unregistering is simply unregistering,

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

2016-08-29 Thread Sakari Ailus
lude/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 724f43e69d03..d1ac0250a966 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -143,6 +143,7 @@ enum v4l2_buf_type { > V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, >

[PATCH 3/5] smiapp: Return -EPROBE_DEFER if the clock cannot be obtained

2016-08-31 Thread Sakari Ailus
The clock may be provided by a driver which is yet to probe. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 92a6859

[PATCH 2/5] smiapp: Rename smiapp_platform_data as smiapp_hwconfig

2016-08-31 Thread Sakari Ailus
This is really configuration to the driver originating from DT or elsewhere. Do not call it platform data. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 140 drivers/media/i2c/smiapp/smiapp-quirk.c | 4 +- drivers/media/i2c/smiapp

[PATCH 5/5] smiapp: Switch to gpiod API for GPIO control

2016-08-31 Thread Sakari Ailus
Switch from the old gpio API to the new descriptor based gpiod API. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 28 +++- drivers/media/i2c/smiapp/smiapp.h | 1 + 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH 1/5] smiapp: Unify enforced and need-based 8-bit read

2016-08-31 Thread Sakari Ailus
From: Sakari Ailus Unify enforced 8-bit read access with that based on actual need. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-regs.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-regs.c b

[PATCH 0/5] smiapp cleanups, retry probe if getting clock fails

2016-08-31 Thread Sakari Ailus
Hi all, These patches contain cleanups for the smiapp driver and return -EPROBE_DEFER if getting the clock fails. -- 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 http:

[PATCH 4/5] smiapp: Constify the regs argument to smiapp_write_8s()

2016-08-31 Thread Sakari Ailus
The data may now be const as well. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-quirk.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-quirk.c b/drivers/media/i2c/smiapp/smiapp-quirk.c index d7e22bc..cb128ea

Re: [PATCH 5/5] smiapp: Switch to gpiod API for GPIO control

2016-08-31 Thread Sakari Ailus
Hi Sebastian, Thanks for the review! On 08/31/16 15:09, Sebastian Reichel wrote: > Hi Sakari, > > On Wed, Aug 31, 2016 at 10:42:05AM +0300, Sakari Ailus wrote: >> -if (gpio_is_valid(sensor->hwcfg->xshutdown)) { >> +if (client->dev.of_node) { >

[PATCH v1.1 3/5] smiapp: Return -EPROBE_DEFER if the clock cannot be obtained

2016-08-31 Thread Sakari Ailus
The clock may be provided by a driver which is yet to probe. Print the actual error code as well. Signed-off-by: Sakari Ailus --- since v1: - Add printing of the original error code drivers/media/i2c/smiapp/smiapp-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a

Re: RFC: V4L2_PIX_FMT_NV16: should it allow padding after each plane?

2016-08-31 Thread Sakari Ailus
tion of creating another format in that case. > > Or do I have to make a new NV16PAD format that allows such padding? > > I am in favor of extending the NV16 specification since I believe it > makes sense, but I want to know what others think. -- Regards, Sakari Ailus e-mail: sa

[PATCH v1.1 5/5] smiapp: Switch to gpiod API for GPIO control

2016-08-31 Thread Sakari Ailus
Switch from the old gpio API to the new descriptor based gpiod API. Signed-off-by: Sakari Ailus --- - Remove xshutdown field in smiapp_hwconfig, and SMIAPP_NO_XSHUTDOWN macro drivers/media/i2c/smiapp/smiapp-core.c | 36 +++--- drivers/media/i2c/smiapp/smiapp.h

[PATCH v1.1 6/6] smiapp: Remove set_xclk() callback from hwconfig

2016-08-31 Thread Sakari Ailus
The clock framework is generally so well supported that there's no reason to keep this one around. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 49 -- include/media/i2c/smiapp.h | 2 -- 2 files changed, 17 inser

[PATCH v1.2 5/5] smiapp: Switch to gpiod API for GPIO control

2016-08-31 Thread Sakari Ailus
Switch from the old gpio API to the new descriptor based gpiod API. Signed-off-by: Sakari Ailus --- since v1.1: - Return the error if devm_gpiod_get_optional() fails. NULL is returned if there's no GPIO defined. - No debug print is performed on lack of the GPIO. The GPIO framework al

[GIT PULL FOR v4.9] smiapp cleanups and probe deferral

2016-09-01 Thread Sakari Ailus
in the git repository at: ssh://linuxtv.org/git/sailus/media_tree.git smiapp for you to fetch changes up to e5523b3e420ea19172e364bb6f10ce6eeec61efc: smiapp: Remove set_xclk() callback from hwconfig (2016-09-01 12:42:13 +0300) -------- Sa

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

2016-09-02 Thread Sakari Ailus
Huomenta! On Fri, Sep 02, 2016 at 12:22:42AM +0300, Laurent Pinchart wrote: > Hi Sakari, > > On Monday 29 Aug 2016 12:13:40 Sakari Ailus wrote: > > On Wed, Aug 17, 2016 at 03:20:27PM +0300, Laurent Pinchart wrote: > > > The metadata buffer type is used to transfer me

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

2016-09-02 Thread Sakari Ailus
rmat` ioctls applications set the ``type`` of the s/of/field of/ ? > :ref:`v4l2_format ` structure to ``V4L2_BUF_TYPE_META_CAPTURE`` > and use the :ref:`v4l2_meta_format ` ``meta`` member of the > ``fmt`` union as needed per the desired operation. Both drivers and > a

Re: [PATCH] v4l: Add metadata buffer type and format

2016-09-02 Thread Sakari Ailus
; Signed-off-by: Laurent Pinchart > Tested-by: Guennadi Liakhovetski Acked-by: Sakari Ailus -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vg

[GIT PULL FOR v4.9] Media IOCTL handling rework

2016-09-05 Thread Sakari Ailus
//linuxtv.org/git/sailus/media_tree.git media-ioctl-rework for you to fetch changes up to 0412ff9e1e3ca06328e62366ac11c987a6869b46: media: Add flags to tell whether to take graph mutex for an IOCTL (2016-09-05 10:03:55 +0300) ---- Sa

[PATCH 1/1] ad5820: Use bool for boolean values

2016-09-06 Thread Sakari Ailus
The driver used integers for what boolean would have been a better fit. Use boolean instead. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ad5820.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820

[PATCH v4 2/8] doc-rst: Fix number of zeroed high order bits in 12-bit raw format defs

2016-09-06 Thread Sakari Ailus
The number of high order bits in samples was documented to be 6 for 12-bit data. This is clearly wrong, fix it. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- Documentation/media/uapi/v4l/pixfmt-srggb12.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v4 7/8] media: Add 1X16 16-bit raw bayer media bus code definitions

2016-09-06 Thread Sakari Ailus
The codes will be called: MEDIA_BUS_FMT_SBGGR16_1X16 MEDIA_BUS_FMT_SGBRG16_1X16 MEDIA_BUS_FMT_SGRBG16_1X16 MEDIA_BUS_FMT_SRGGB16_1X16 Signed-off-by: Sakari Ailus --- Documentation/media/uapi/v4l/subdev-formats.rst | 290 +++- include/uapi

[PATCH v4 0/8] New raw bayer format definitions, fixes

2016-09-06 Thread Sakari Ailus
Hi folks, Here's the fourth version of the new raw bayer format definition patchset. On Mauro's request, I've dropped the patches adding the new pixel formats as they're not being used in a driver now. I'm keeping these patches around in order to later on merge them once needed: https://git.linu

[PATCH v4 3/8] doc-rst: Clean up raw bayer pixel format definitions

2016-09-06 Thread Sakari Ailus
- Explicitly state that the most significant n bits are zeroed on 10 and 12 bpp formats. - Remove extra comma from the last entry of the format list - Add a missing colon before a list - Use figures versus word numerals consistently Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil

[PATCH v4 8/8] smiapp: Add support for 14 and 16 bits per sample depths

2016-09-06 Thread Sakari Ailus
SMIA++ supports 14 and 16 bits per pixel formats as well. Add support to these formats in the driver. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 8 drivers/media/i2c/smiapp/smiapp.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a

[PATCH v4 6/8] media: Add 1X14 14-bit raw bayer media bus code definitions

2016-09-06 Thread Sakari Ailus
From: Jouni Ukkonen The codes will be called: MEDIA_BUS_FMT_SBGGR14_1X14 MEDIA_BUS_FMT_SGBRG14_1X14 MEDIA_BUS_FMT_SGRBG14_1X14 MEDIA_BUS_FMT_SRGGB14_1X14 Signed-off-by: Jouni Ukkonen Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- Documentation/media

[PATCH v4 5/8] doc-rst: 16-bit BGGR is always 16 bits

2016-09-06 Thread Sakari Ailus
pixelformat currently. The sampling precision is understood to be 16 bits in all current cases. Remove the note on sampling precision. Signed-off-by: Sakari Ailus Acked-by: Lad, Prabhakar --- Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 5 - 1 file changed, 5 deletions(-) diff --git a

[PATCH v4 1/8] doc-rst: Correct the ordering of LSBs of the 10-bit raw packed formats

2016-09-06 Thread Sakari Ailus
byte and third and fourth least significant bits and so on. Signed-off-by: Sakari Ailus Acked-by: Aviv Greenberg Acked-by: Hans Verkuil --- Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/media

[PATCH v4 4/8] doc-rst: Unify documentation of the 8-bit bayer formats

2016-09-06 Thread Sakari Ailus
The other raw bayer formats had a single sample depth dependent definition whereas the 8-bit formats had one page for each. Unify the documentation of the 8-bit formats. Signed-off-by: Sakari Ailus --- Documentation/media/uapi/v4l/pixfmt-rgb.rst| 3 - Documentation/media/uapi/v4l/pixfmt

[GIT PULL FOR v4.9] Raw bayer media bus codes and fixes, raw bayer pixelformat cleanups

2016-09-06 Thread Sakari Ailus
-06 14:46:36 +0300) Jouni Ukkonen (1): media: Add 1X14 14-bit raw bayer media bus code definitions Sakari Ailus (7): doc-rst: Correct the ordering of LSBs of the 10-bit raw packed formats doc-rst: Fix number of

[GIT PULL FOR v4.9] Add an operations callback struct for the media device

2016-09-06 Thread Sakari Ailus
ice.h | 16 5 files changed, 33 insertions(+), 12 deletions(-) -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@

[GIT PULL FOR v4.9] ad5820 driver cleanup

2016-09-06 Thread Sakari Ailus
repository at: ssh://linuxtv.org/git/sailus/media_tree.git ad5820 for you to fetch changes up to 021a6d55696421194b72fbc3c6abc50b7f3f1dc4: ad5820: Use bool for boolean values (2016-09-06 15:23:46 +0300) Sakari Ailus (1): ad5820

[PATCH 3/7] smiapp: Initialise media entity after sensor init

2016-09-07 Thread Sakari Ailus
This allows determining the number of pads in the entity based on the sensor. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp

[PATCH 0/7] More smiapp cleanups

2016-09-07 Thread Sakari Ailus
Hi, This set further cleans up the smiapp driver and prepares for later changes. -- 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 http://vger.kernel.org/majordomo-info.

[PATCH 6/7] smiapp: Remove unnecessary BUG_ON()'s

2016-09-07 Thread Sakari Ailus
Instead, calculate how much is needed and then allocate the memory dynamically. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 24 ++-- drivers/media/i2c/smiapp/smiapp.h | 8 ++-- 2 files changed, 20 insertions(+), 12 deletions(-) diff

[PATCH 5/7] smiapp: Provide a common function to obtain native pixel array size

2016-09-07 Thread Sakari Ailus
The same pixel array size is required for the active format of each sub-device sink pad and try format of each sink pad of each opened file handle as well as for the native size rectangle. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 39

[PATCH 7/7] smiapp: Always initialise the sensor in probe

2016-09-07 Thread Sakari Ailus
onger exists. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 53 -- 1 file changed, 19 insertions(+), 34 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 7a25969..27b48f3 100644

[PATCH 1/7] smiapp: Move sub-device initialisation into a separate function

2016-09-07 Thread Sakari Ailus
Simplify smiapp_init() by moving the initialisation of individual sub-devices to a separate function. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 108 +++-- 1 file changed, 49 insertions(+), 59 deletions(-) diff --git a/drivers/media/i2c

[PATCH 4/7] smiapp: Split off sub-device registration into two

2016-09-07 Thread Sakari Ailus
Remove the loop in sub-device registration and create each sub-device explicitly instead. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 82 ++ 1 file changed, 43 insertions(+), 39 deletions(-) diff --git a/drivers/media/i2c/smiapp

[PATCH 2/7] smiapp: Explicitly define number of pads in initialisation

2016-09-07 Thread Sakari Ailus
Define the number of pads explicitly in initialising the sub-devices. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp

Re: [PATCH v3 01/10] v4l: ioctl: Clear the v4l2_pix_format_mplane reserved field

2016-09-08 Thread Sakari Ailus
; Signed-off-by: Laurent Pinchart > Tested-by: Kieran Bingham Acked-by: Sakari Ailus -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kerne

[PATCH 1/1] ad5820: Use bool for boolean values

2016-09-08 Thread Sakari Ailus
The driver used integers for what boolean would have been a better fit. Use boolean instead. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ad5820.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820

Re: [PATCH] [v4l-utils] libdvb5: Fix multiple definition of dvb_dev_remote_init linking error

2016-09-09 Thread Sakari Ailus
On Wed, Sep 07, 2016 at 12:53:26PM +0300, Laurent Pinchart wrote: > The function is defined in a header file when HAVE_DVBV5_REMOTE is not > set. It needs to be marked as static inline. > > Signed-off-by: Laurent Pinchart Applied. Thank you. -- Sakari Ailus e-mail: sakari.

[v4l-utils PATCH 0/2] Print information on given entity only

2016-09-13 Thread Sakari Ailus
Hi, These patches add the ability to media-ctl to print information on a given entity only. That's sometimes handy. -- 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 http://

[v4l-utils PATCH 2/2] media-ctl: Print information related to a single entity

2016-09-13 Thread Sakari Ailus
Add an optional argument to the -p option that allows printing all information related to a given entity. This may be handy sometimes if only a single entity is of interest and there are many entities. Signed-off-by: Sakari Ailus --- utils/media-ctl/media-ctl.c | 26

[v4l-utils PATCH 1/2] media-ctl: Split off printing information related to a single entity

2016-09-13 Thread Sakari Ailus
As a result, a function that can be used to print information on a given entity only is provided. Signed-off-by: Sakari Ailus --- utils/media-ctl/media-ctl.c | 93 - 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/utils/media-ctl/media

Re: [PATCH 1/2] [media] ad5820: use __maybe_unused for PM functions

2016-09-13 Thread Sakari Ailus
with a __maybe_unused annotation that is > > simpler and harder to get wrong, avoiding the warning. > > > > Signed-off-by: Arnd Bergmann > > Fixes: bee3d5115611 ("[media] ad5820: Add driver for auto-focus > coil") > > Thanks! > > Acked-by:

Re: [PATCH v4 1/5] media: Determine early whether an IOCTL is supported

2016-09-13 Thread Sakari Ailus
Hi Mauro, On Tue, Sep 06, 2016 at 06:56:17AM -0300, Mauro Carvalho Chehab wrote: > Em Thu, 11 Aug 2016 23:29:14 +0300 > Sakari Ailus escreveu: > > > Preparation for refactoring media IOCTL handling to unify common parts. > > > > Reviewed-by: Laurent Pinchart >

[v4l-utils PATCH v1.1 2/2] media-ctl: Print information related to a single entity

2016-09-14 Thread Sakari Ailus
Add an optional argument to the -p option that allows printing all information related to a given entity. This may be handy sometimes if only a single entity is of interest and there are many entities. Signed-off-by: Sakari Ailus --- utils/media-ctl/media-ctl.c | 33

[v4l-utils PATCH v1.2 2/2] media-ctl: Print information related to a single entity

2016-09-14 Thread Sakari Ailus
Add a possibility to printing all information related to a given entity by using both -p and -e options. This may be handy sometimes if only a single entity is of interest and there are many entities. Signed-off-by: Sakari Ailus --- Fixed the commit message as well. utils/media-ctl/media-ctl.c

Re: [v4l-utils PATCH v1.2 2/2] media-ctl: Print information related to a single entity

2016-09-14 Thread Sakari Ailus
On 09/15/16 01:05, Laurent Pinchart wrote: > Hi Sakari, > > Thank you for the patch. > > On Wednesday 14 Sep 2016 17:29:39 Sakari Ailus wrote: >> Add a possibility to printing all information related to a given entity by >> using both -p and -e options. This may b

[v4l-utils PATCH v1.3 2/2] media-ctl: Print information related to a single entity

2016-09-14 Thread Sakari Ailus
Add a possibility to printing all information related to a given entity by using both -p and -e options. This may be handy sometimes if only a single entity is of interest and there are many entities. Signed-off-by: Sakari Ailus --- utils/media-ctl/media-ctl.c | 32

Re: [v4l-utils PATCH v1.3 2/2] media-ctl: Print information related to a single entity

2016-09-15 Thread Sakari Ailus
On 09/15/16 11:10, Laurent Pinchart wrote: > Reviewed-by: Laurent Pinchart Thanks! pushed to master. -- Sakari Ailus sakari.ai...@linux.intel.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More m

[PATCH v2 10/17] smiapp: Unify setting up sub-devices

2016-09-15 Thread Sakari Ailus
The initialisation of the source sub-device is somewhat different as it's not created by the smiapp driver itself. Remove redundancy in initialising the two kind of sub-devices. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 5 + 1 file changed, 1 insertion(

[PATCH v2 15/17] smiapp: Obtain correct media bus code for try format

2016-09-15 Thread Sakari Ailus
The media bus code obtained for try format may have been a code that the sensor did not even support. Use a supported code with the current pixel order. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a

[PATCH v2 16/17] smiapp: Drop a debug print on frame size and bit depth

2016-09-15 Thread Sakari Ailus
The first time the sensor is powered on, the information is not yet available. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index

[PATCH v2 14/17] smiapp: Remove useless newlines and other small cleanups

2016-09-15 Thread Sakari Ailus
The code probably has been unindented at some point but rewrapping has not been done. Do it now. Also remove a useless memory allocation failure message. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 33 + 1 file changed, 13 insertions

[PATCH v2 09/17] smiapp: Read frame format earlier

2016-09-15 Thread Sakari Ailus
The information gathered during frame format reading will be required earlier in the initialisation when it was available. Also return an error if frame format cannot be obtained. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 8 ++-- 1 file changed, 6 insertions

[PATCH v2 01/17] smiapp: Move sub-device initialisation into a separate function

2016-09-15 Thread Sakari Ailus
Simplify smiapp_init() by moving the initialisation of individual sub-devices to a separate function. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 108 +++-- 1 file changed, 49 insertions(+), 59 deletions(-) diff --git a/drivers/media/i2c

[PATCH v2 08/17] smiapp: Merge smiapp_init() with smiapp_probe()

2016-09-15 Thread Sakari Ailus
The smiapp_probe() is the sole caller of smiapp_init(). Unify the two. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 425 - 1 file changed, 205 insertions(+), 220 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b

[PATCH v2 04/17] smiapp: Split off sub-device registration into two

2016-09-15 Thread Sakari Ailus
Remove the loop in sub-device registration and create each sub-device explicitly instead. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 82 +++--- 1 file changed, 45 insertions(+), 37 deletions(-) diff --git a/drivers/media/i2c/smiapp

[PATCH v2 11/17] smiapp: Use SMIAPP_PADS when referring to number of pads

2016-09-15 Thread Sakari Ailus
Replace plain value 2 with SMIAPP_PADS when referring to the number of pads. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp.h b/drivers/media/i2c/smiapp/smiapp.h index

[PATCH v2 17/17] smiapp-pll: Don't complain aloud about failing PLL calculation

2016-09-15 Thread Sakari Ailus
rally does not happen. Use dev_dbg() instead. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp-pll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/smiapp-pll.c b/drivers/media/i2c/smiapp-pll.c index e3348db..771db56 100644 --- a/drivers/media/i2c/s

[PATCH v2 03/17] smiapp: Initialise media entity after sensor init

2016-09-15 Thread Sakari Ailus
This allows determining the number of pads in the entity based on the sensor. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp

[PATCH v2 00/17] More smiapp cleanups, fixes

2016-09-15 Thread Sakari Ailus
Hi all, This set further cleans up the smiapp driver and prepares for later changes. More fixes and cleanups since v1. -- 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

[PATCH v2 07/17] smiapp: Always initialise the sensor in probe

2016-09-15 Thread Sakari Ailus
onger exists. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 53 -- 1 file changed, 19 insertions(+), 34 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 5d251b4..13322f3 100644

[PATCH v2 12/17] smiapp: Obtain frame layout from the frame descriptor

2016-09-15 Thread Sakari Ailus
Besides the image data, SMIA++ compliant sensors also provide embedded data in form of registers used to capture the image. Store this information for later use in frame descriptor and routing. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 44

[PATCH v2 13/17] smiapp: Improve debug messages from frame layout reading

2016-09-15 Thread Sakari Ailus
Provide more debugging information on reading the frame layout. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp

[PATCH v2 06/17] smiapp: Remove unnecessary BUG_ON()'s

2016-09-15 Thread Sakari Ailus
Instead, calculate how much is needed and then allocate the memory dynamically. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 24 ++-- drivers/media/i2c/smiapp/smiapp.h | 8 ++-- 2 files changed, 20 insertions(+), 12 deletions(-) diff

[PATCH v2 05/17] smiapp: Provide a common function to obtain native pixel array size

2016-09-15 Thread Sakari Ailus
The same pixel array size is required for the active format of each sub-device sink pad and try format of each sink pad of each opened file handle as well as for the native size rectangle. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 39

[PATCH v2 02/17] smiapp: Explicitly define number of pads in initialisation

2016-09-15 Thread Sakari Ailus
Define the number of pads explicitly in initialising the sub-devices. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp

  1   2   3   4   5   6   7   8   9   10   >