[GIT PULL for 5.3] Sensor and sun6i patches

2019-05-29 Thread Sakari Ailus
to fix test pattern Documentation/devicetree/bindings/media/sun6i-csi.txt | 1 + drivers/media/i2c/ov8856.c| 12 ++-- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c| 1 + 3 files changed, 8 insertions(+), 6 deletions(-) -- Kind regards, Sakari Ailus

[GIT PULL for 5.3] ImgU driver warning fixes

2019-05-29 Thread Sakari Ailus
izes (2019-05-29 13:42:57 +0300) ipu3 warning fixes -------- Sakari Ailus (5): staging: imgu: Address a compiler warning on alignment staging: imgu: Remove redund

Re: [PATCH v2 1/4] staging: imgu: Address a compiler warning on alignment

2019-05-29 Thread Sakari Ailus
Hi Jacopo, On Mon, May 27, 2019 at 06:44:41PM +0200, Jacopo Mondi wrote: > Hi Sakari, > > On Fri, Mar 01, 2019 at 01:23:57PM +0200, Sakari Ailus wrote: > > Address a compiler warnings on alignment of struct ipu3_uapi_awb_fr_config_s > > by adding __attribute__((aligned(32)

Re: [PATCH] media-ioc-enum-links.rst: fix incorrect reserved field documentation

2019-05-28 Thread Sakari Ailus
On Mon, May 27, 2019 at 11:11:32AM +0200, Hans Verkuil wrote: > The reserved field array for struct media_link_desc has length 2, not 4. > > And the reserved field array of struct media_links_enum was never documented > at all. > > Signed-off-by: Hans Verkuil Acke

Re: [PATCH] mc-device.c: don't memset __user pointer contents

2019-05-28 Thread Sakari Ailus
nks->reserved, links.reserved, > + sizeof(ulinks->reserved))) > + return -EFAULT; > return 0; Good catch! Reviewed-by: Sakari Ailus > } > -- Kind regards, Sakari Ailus

[GIT PULL for 5.3] Videobuf2 corner case fixes

2019-05-22 Thread Sakari Ailus
corner case fixes Sakari Ailus (3): videobuf2-core: Prevent size alignment wrapping buffer size to 0 videobuf2-dma-sg: Prevent size from overflowing videobuf2-core.h: Document the alloc memop size argument as page

[GIT PULL for 5.3] Sensor and ccic driver patches

2019-05-22 Thread Sakari Ailus
name the clocks marvell-ccic/mmp: add devicetree support marvell-ccic: use async notifier to get the sensor marvell-ccic: provide a clock for the sensor Nicholas Mc Guire (1): media: smiapp: core: add small range to usleep_range Sakari Ailus (1): v4l: fwnode: C-PHY ha

[PATCH 0/5] Support running driver's probe for a device powered off

2019-05-10 Thread Sakari Ailus
2c: imx319: Support probe while the device is off Sakari Ailus (4): ACPI: Enable driver and firmware hints to control power at probe time ACPI: Add a convenience function to tell a device is suspended in probe ov5670: Support probe whilst the device is off at24: Support probing while of

[PATCH 1/5] ACPI: Enable driver and firmware hints to control power at probe time

2019-05-10 Thread Sakari Ailus
Allow drivers and firmware tell ACPI that there's no need to power on a device for probe. This requires both a hint from the firmware as well as an indication from a driver to leave the device off. Signed-off-by: Sakari Ailus --- drivers/acpi/device_pm.c | 9 +++-- include/linux/dev

[PATCH 2/5] ACPI: Add a convenience function to tell a device is suspended in probe

2019-05-10 Thread Sakari Ailus
ff-by: Sakari Ailus --- drivers/acpi/device_pm.c | 33 + include/linux/acpi.h | 5 + 2 files changed, 38 insertions(+) diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index ca2409a30d26d..774bf4380afd3 100644 --- a/drivers/acpi/device_pm.c

[PATCH 5/5] at24: Support probing while off

2019-05-10 Thread Sakari Ailus
property is required from the firmware. Signed-off-by: Sakari Ailus --- drivers/misc/eeprom/at24.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 63aa541c96088..b9dbe5b6a97be

[PATCH 4/5] media: i2c: imx319: Support probe while the device is off

2019-05-10 Thread Sakari Ailus
From: Rajmohan Mani Tell ACPI device PM code that the driver supports the device being powered off when the driver's probe function is entered. Signed-off-by: Rajmohan Mani Signed-off-by: Sakari Ailus --- drivers/media/i2c/imx319.c | 25 ++--- 1 file change

[PATCH 3/5] ov5670: Support probe whilst the device is off

2019-05-10 Thread Sakari Ailus
Tell ACPI device PM code that the driver supports the device being powered off when the driver's probe function is entered. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ov5670.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/

Re: Route lifetime in SUBDEV_[GS]_ROUTING

2019-05-02 Thread Sakari Ailus
Hi Jacopo, On Sat, Apr 27, 2019 at 01:00:42AM +0200, Jacopo Mondi wrote: > HI Sakari, > > On Tue, Apr 23, 2019 at 04:28:40PM +0300, Sakari Ailus wrote: > > Hi Jacopo, > > > > On Tue, Apr 23, 2019 at 12:19:32PM +0200, Jacopo Mondi wrote: > > > Hi Sakari, >

Re: Route lifetime in SUBDEV_[GS]_ROUTING

2019-04-23 Thread Sakari Ailus
Hi Jacopo, On Tue, Apr 23, 2019 at 12:19:32PM +0200, Jacopo Mondi wrote: > Hi Sakari, > > On Wed, Apr 17, 2019 at 01:41:48PM +0300, Sakari Ailus wrote: > > Hi Jacopo, > > > > I promised to write a bit about the routing problem I attempted to write on > > #v4l

Route lifetime in SUBDEV_[GS]_ROUTING

2019-04-17 Thread Sakari Ailus
ementation accordingly. No API changes are needed (apart from adding the dynamic flag --- or rather call it "volatile", to avoid confusing with routes that can be enabled or disabled while streaming). -- Best regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH 0/9] Rework V4L2 fwnode parsing; add defaults and avoid iteration

2019-04-12 Thread Sakari Ailus
On Fri, Apr 12, 2019 at 05:33:38PM +0200, Jacopo Mondi wrote: > Hi Sakari, > > On Fri, Apr 05, 2019 at 12:41:17PM +0300, Sakari Ailus wrote: > > Hi folks, > > > > This patchset reworks V4L2 fwnode endpoint parsing. It enables the use of > > endpoint configu

[GIT PULL for 5.2] Mipid02, ImgU and sensor driver patches

2019-04-10 Thread Sakari Ailus
k_get() to ov6650_video_probe() helper media: ov6650: Register with asynchronous subdevice framework Mickael Guene (3): media: uapi: Add MEDIA_BUS_FMT_BGR888_3X8 media bus format dt-bindings: Document MIPID02 bindings media: st-mipid02: MIPID02 CSI-2 to PARALLEL bridge driver Sakar

Re: [PATCH 1/1] ipu3-imgu: Use %u for formatting unsigned values (not %d)

2019-04-09 Thread Sakari Ailus
Hi Bingbu, On Tue, Apr 09, 2019 at 07:09:09PM +0800, Bingbu Cao wrote: > > On 4/9/19 6:18 PM, Sakari Ailus wrote: > > The driver used %d for formatting unsigned values. Use %u instead. > > > > Signed-off-by: Sakari Ailus > > --- > > drivers

[PATCH 1/1] ipu3-imgu: Use %u for formatting unsigned values (not %d)

2019-04-09 Thread Sakari Ailus
The driver used %d for formatting unsigned values. Use %u instead. Signed-off-by: Sakari Ailus --- drivers/staging/media/ipu3/ipu3-v4l2.c | 40 +- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers

Re: [PATCH resend v2] media:staging/intel-ipu3: parameter buffer refactoring

2019-04-08 Thread Sakari Ailus
portant things to do. Just a note. > + vb2_buffer_done(vb, VB2_BUF_STATE_ERROR); > + dev_warn(&imgu->pci_dev->dev, > + "set parameters failed."); > + continue; > + } > + > + vb2_buffer_done(vb, VB2_BUF_STATE_DONE); > + dev_dbg(&imgu->pci_dev->dev, > + "queue user parameters %d to css.", vb->index); %d -> %u. I can fix that while applying the patch. > + list_del(&ivb->list); > } else if (imgu_pipe->queue_enabled[node]) { > struct imgu_css_buffer *buf = > imgu_queue_getbuf(imgu, node, pipe); -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Edinburgh Media Summit 2018 meeting report v2

2019-04-08 Thread Sakari Ailus
hael Ira Krufky Niklas Söderlund Patrick Lai Paul Elder Peter Griffin Ralph Clark Ricardo Ribalda Sakari Ailus Sean Young Seung-Woo Kim Stefan Klug Vinod Koul CEC status - Hans Verkuil - Hans pre

Re: [PATCH 1/9] davinci-vpif: Fix endpoint refcounting

2019-04-05 Thread Sakari Ailus
format-patch after changing the commit message. Oh well. The other one is what I intended to send; please ignore this one. -- Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH 0/9] Rework V4L2 fwnode parsing; add defaults and avoid iteration

2019-04-05 Thread Sakari Ailus
On Fri, Apr 05, 2019 at 12:41:17PM +0300, Sakari Ailus wrote: > - Add another patch to change fwnode refcounting for > v4l2_async_notifier_add_fwnode_subdev > > - Add a patch to fix OF node refcounting and use / put order for > davinci-vpif If you wondered why does adding two

[PATCH 5/9] omap3isp: Rework OF endpoint parsing

2019-04-05 Thread Sakari Ailus
which was not possible while using callbacks. This driver does not benefit from that feature, but as the omap3isp is one of the exemplary drivers, this works as an example for driver developers. Depends-on: ("device property: Add fwnode_graph_get_endpoint_by_id") Signed-off-by: Sa

[PATCH 3/9] v4l2-async: Get fwnode reference when putting it to the notifier's list

2019-04-05 Thread Sakari Ailus
logical. Improve this by always getting a reference when the function succeeds, and the caller releasing the reference when it does not *itself* need it anymore. Luckily, perhaps, there were just a handful of callers using the function. Signed-off-by: Sakari Ailus --- drivers/media/platform

[PATCH 9/9] ipu3-cio2: Parse information from firmware without using callbacks

2019-04-05 Thread Sakari Ailus
over the process. The parsing assumes D-PHY instead of letting the V4L2 fwnode framework guess it. Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 92 +--- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/drivers/media/pci/intel

[PATCH 0/9] Rework V4L2 fwnode parsing; add defaults and avoid iteration

2019-04-05 Thread Sakari Ailus
rcar_drif.c --- thanks, Niklas! Sakari Ailus (9): davinci-vpif: Don't dereference endpoint after putting it, fix refcounting v4l2-async: Use endpoint node, not device node, for fwnode match v4l2-async: Get fwnode reference when putting it to the notifier&

[PATCH 7/9] ipu3-cio2: Clean up notifier's subdev list if parsing endpoints fails

2019-04-05 Thread Sakari Ailus
The notifier must be cleaned up whenever parsing endpoints fails. Do that to avoid a memory leak in that case. Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/ipu3

[PATCH 6/9] v4l2-async: Safely clean up an uninitialised notifier

2019-04-05 Thread Sakari Ailus
Make the V4L2 async framework a bit more robust by allowing to clean up an uninitialised notifier. Otherwise the result would be a (close to) NULL pointer dereference. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 8/9] ipu3-cio2: Proceed with notifier init even if there are no subdevs

2019-04-05 Thread Sakari Ailus
The notifier may be registered even if there are no subdevs. Do that to simplify the code. Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers

[PATCH 1/9] davinci-vpif: Don't dereference endpoint after putting it, fix refcounting

2019-04-05 Thread Sakari Ailus
-off-by: Sakari Ailus --- drivers/media/platform/davinci/vpif_capture.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index b5aacb0fb96b..72bdb3c10962 100644 --- a/drivers

[PATCH 2/9] v4l2-async: Use endpoint node, not device node, for fwnode match

2019-04-05 Thread Sakari Ailus
. Depends-on: ("pxa-camera: Match with device node, not the port node") Signed-off-by: Sakari Ailus --- drivers/media/platform/am437x/am437x-vpfe.c | 2 +- drivers/media/platform/atmel/atmel-isc.c | 2 +- drivers/media/platform/atmel/atmel-isi.c | 2 +- drivers/media/p

[PATCH 4/9] v4l2-async: Add v4l2_async_notifier_add_fwnode_remote_subdev

2019-04-05 Thread Sakari Ailus
v4l2_async_notifier_add_fwnode_remote_subdev is a convenience function for parsing information on V4L2 fwnode subdevs. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-async.c | 23 +++ include/media/v4l2-async.h | 25 + 2 files

[PATCH 1/9] davinci-vpif: Fix endpoint refcounting

2019-04-05 Thread Sakari Ailus
This patch addresses two problems with endpoint refcounting in parsing davinci-vpif endpoints: - put endpoints on error and - do not dereference endpoints after they have been put. Signed-off-by: Sakari Ailus --- drivers/media/platform/davinci/vpif_capture.c | 5 ++--- 1 file changed, 2

Re: [RFC 4/8] omap3isp: Rework OF endpoint parsing

2019-04-04 Thread Sakari Ailus
Hi Hans, Thank you for reviewing this. On Thu, Apr 04, 2019 at 03:43:51PM +0200, Hans Verkuil wrote: > On 3/18/19 8:16 PM, Sakari Ailus wrote: ... > > +static int isp_parse_of_endpoints(struct isp_device *isp) > > +{ > > + struct fwnode_handle *ep; > > + s

Re: [RFC 2/8] v4l2-async: Add v4l2_async_notifier_add_fwnode_remote_subdev

2019-04-04 Thread Sakari Ailus
On Thu, Apr 04, 2019 at 03:39:41PM +0200, Hans Verkuil wrote: > On 3/18/19 8:16 PM, Sakari Ailus wrote: > > v4l2_async_notifier_add_fwnode_remote_subdev is a convenience function for > > parsing information on V4L2 fwnode subdevs. > > > > Signed-off-by: Sakari Ailus

Re: [RFC 1/8] v4l2-async: Use endpoint node, not device node, for fwnode match

2019-04-04 Thread Sakari Ailus
dently of the device at any point of time. > > */ > > - if (!sd->fwnode && sd->dev) > > - sd->fwnode = dev_fwnode(sd->dev); > > + if (!sd->fwnode && sd->dev) { > > + sd->fwnode = fwnode_graph_get_next_endpoint( > > + dev_fwnode(sd->dev), NULL); > > Doesn't this take a reference? As opposed to the assignment below? > > Shouldn't you call 'fwnode_handle_put(sd->fwnode);'? Yes. I'll fix this for the next version. > > > + if (!sd->fwnode) > > + sd->fwnode = dev_fwnode(sd->dev); > > + } > > > > mutex_lock(&list_lock); > > -- Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH 1/6] media: v4l2-subdev: add stubs for v4l2_subdev_get_try_*

2019-04-04 Thread Sakari Ailus
ev *sd, > + struct v4l2_subdev_pad_config *cfg, > + unsigned int pad) > +{ > + return ERR_PTR(-ENOTTY); > +} > + > +#endif /* defined(CONFIG_VIDEO_V4L2_SUBDEV_API) */ > > extern const struct v4l2_file_operations v4l2_subdev_fops; > -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

[PATCH v3 2/3] videobuf2-dma-sg: Prevent size from overflowing

2019-04-03 Thread Sakari Ailus
Note on backporting to stable: the file used to be under drivers/media/v4l2-core, it was moved to the current location after 4.14. Signed-off-by: Sakari Ailus Cc: sta...@vger.kernel.org Reviewed-by: Hans Verkuil --- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 2 +- 1 file changed, 1

[PATCH v3 0/3] Videobuf2 corner case fixes

2019-04-03 Thread Sakari Ailus
nt in vb2_dma_sg_alloc_compacted. - Add a comment in __vb2_buf_mem_alloc noting that the size shall be page aligned. Sakari Ailus (3): videobuf2-core: Prevent size alignment wrapping buffer size to 0 videobuf2-dma-sg: Prevent size from overflowing videobuf2-core.h: Document the alloc memop

[PATCH v3 1/3] videobuf2-core: Prevent size alignment wrapping buffer size to 0

2019-04-03 Thread Sakari Ailus
PAGE_ALIGN() may wrap the buffer size around to 0. Prevent this by checking that the aligned value is not smaller than the unaligned one. Note on backporting to stable: the file used to be under drivers/media/v4l2-core, it was moved to the current location after 4.14. Signed-off-by: Sakari Ailus

[PATCH v3 3/3] videobuf2-core.h: Document the alloc memop size argument as page aligned

2019-04-03 Thread Sakari Ailus
The size argument of the alloc memop, which allocates buffer memory, is page aligned. Document it as such in the only caller as well as ops documentation. Signed-off-by: Sakari Ailus Reviewed-by: Hans Verkuil --- drivers/media/common/videobuf2/videobuf2-core.c | 1 + include/media/videobuf2

Re: [PATCH] media: Add missing "Auto" option to the power line frequency control

2019-04-02 Thread Sakari Ailus
{ 3, "Auto" }, The auto option appears to have been added by UVC 1.5, so the menu entry may only be available for such devices. > }; > > static const struct uvc_menu_info exposure_auto_controls[] = { -- Kind regards, Sakari Ailus

[GIT PULL for 5.2] Sensor driver patch and SoC camera cleanups

2019-03-29 Thread Sakari Ailus
r 5.2 Akinobu Mita (1): media: ov7740: enable to get exposure control in autoexposure mode Sakari Ailus (2): MAINTAINERS: Fix files for obsolete SoC camera framework soc_camera: Remove leftover files, add TODO MAINTA

[PATCH 1/1] soc_camera: Remove leftover files, add TODO

2019-03-26 Thread Sakari Ailus
Remove a few files left over from the mt9t031 driver. While at it, add a TODO file for the SoC camera framework as a whole. Signed-off-by: Sakari Ailus --- drivers/staging/media/mt9t031/Kconfig | 5 - drivers/staging/media/mt9t031/Makefile | 1 - drivers/staging/media/mt9t031/TODO | 5

[PATCH 1/1] MAINTAINERS: Fix files for obsolete SoC camera framework

2019-03-26 Thread Sakari Ailus
The SoC camera was moved to the staging tree but we missed updating MAINTAINERS. Do that now. Reported-by: Joe Perches Fixes: 280de94a6519 ("media: soc_camera: Move to the staging tree") Signed-off-by: Sakari Ailus --- Thanks, Joe, for reporting this! MAINTAINERS | 5 ++--- 1 file

[RFC v1.1 1/8] v4l2-async: Use endpoint node, not device node, for fwnode match

2019-03-19 Thread Sakari Ailus
. Depends-on: ("pxa-camera: Match with device node, not the port node") Signed-off-by: Sakari Ailus --- since RFC v1: - Fix ti-vpe driver changes. drivers/media/platform/am437x/am437x-vpfe.c | 2 +- drivers/media/platform/atmel/atmel-isc.c | 2 +- drivers/media/platfo

[RFC v1.1 2/8] v4l2-async: Add v4l2_async_notifier_add_fwnode_remote_subdev

2019-03-19 Thread Sakari Ailus
v4l2_async_notifier_add_fwnode_remote_subdev is a convenience function for parsing information on V4L2 fwnode subdevs. Signed-off-by: Sakari Ailus --- since RFC v1: - Fix documentation for v4l2_async_notifier_add_fwnode_remote_subdev. drivers/media/v4l2-core/v4l2-async.c | 23

[GIT PULL for 5.2] Sensor, IPU3 driver patches and fwnode fixes

2019-03-19 Thread Sakari Ailus
er-up media: ov7670: don't access registers when the device is powered off Arnd Bergmann (3): media: staging/intel-ipu3-v4l: reduce kernel stack usage media: staging/intel-ipu3: mark PM function as __maybe_unused media: staging/intel-ipu3: reduce kernel stack usage Sakar

[PATCH 1/1] v4l2-fwnode: Add a deprecation note in the old ACPI parsing example

2019-03-19 Thread Sakari Ailus
This is not how ACPI tables are written. Add a deprecation note and refer to the proper documentation. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-fwnode.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers

[RFC 2/8] v4l2-async: Add v4l2_async_notifier_add_fwnode_remote_subdev

2019-03-18 Thread Sakari Ailus
v4l2_async_notifier_add_fwnode_remote_subdev is a convenience function for parsing information on V4L2 fwnode subdevs. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-async.c | 23 +++ include/media/v4l2-async.h | 24 2 files

[RFC 4/8] omap3isp: Rework OF endpoint parsing

2019-03-18 Thread Sakari Ailus
which was not possible while using callbacks. This driver does not benefit from that feature, but as the omap3isp is one of the exemplary drivers, this works as an example for driver developers. Depends-on: ("device property: Add fwnode_graph_get_endpoint_by_id") Signed-off-by: Sa

[RFC 6/8] ipu3-cio2: Clean up notifier's subdev list if parsing endpoints fails

2019-03-18 Thread Sakari Ailus
The notifier must be cleaned up whenever parsing endpoints fails. Do that to avoid a memory leak in that case. Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/ipu3

[RFC 3/8] v4l2-fwnode: Use v4l2_async_notifier_add_fwnode_remote_subdev

2019-03-18 Thread Sakari Ailus
Shorten v4l2_async_notifier_fwnode_parse_endpoint by using v4l2_async_notifier_add_fwnode_remote_subdev. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-fwnode.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c

[RFC 0/8] Rework V4L2 fwnode parsing; add defaults and avoid iteration

2019-03-18 Thread Sakari Ailus
er patches. They all can be found here: https://git.linuxtv.org/sailus/media_tree.git/log/?h=fwnode-linear> Sakari Ailus (8): v4l2-async: Use endpoint node, not device node, for fwnode match v4l2-async: Add v4l2_async_notifier_add_fwnode_remote_subdev v4l

[RFC 1/8] v4l2-async: Use endpoint node, not device node, for fwnode match

2019-03-18 Thread Sakari Ailus
. Depends-on: ("pxa-camera: Match with device node, not the port node") Signed-off-by: Sakari Ailus --- drivers/media/platform/am437x/am437x-vpfe.c | 2 +- drivers/media/platform/atmel/atmel-isc.c | 2 +- drivers/media/platform/atmel/atmel-isi.c | 2 +- drivers/media/p

[RFC 5/8] v4l2-async: Safely clean up an uninitialised notifier

2019-03-18 Thread Sakari Ailus
Make the V4L2 async framework a bit more robust by allowing to clean up an uninitialised notifier. Otherwise the result would be a (close to) NULL pointer dereference. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[RFC 7/8] ipu3-cio2: Proceed with notifier init even if there are no subdevs

2019-03-18 Thread Sakari Ailus
The notifier may be registered even if there are no subdevs. Do that to simplify the code. Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers

[RFC 8/8] ipu3-cio2: Parse information from firmware without using callbacks

2019-03-18 Thread Sakari Ailus
over the process. The parsing assumes D-PHY instead of letting the V4L2 fwnode framework guess it. Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 93 +--- 1 file changed, 50 insertions(+), 43 deletions(-) diff --git a/drivers/media/pci/intel

[PATCH 1/1] ipu3-cio2: Set CSI-2 receiver sub-device entity function

2019-03-18 Thread Sakari Ailus
Set the entity function for the four CSI-2 receiver sub-devices the driver creates. This avoids a kernel warning from each as well. Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2

[PATCH 1/1] v4l: i2c: Regroup lens drivers under their own section

2019-03-18 Thread Sakari Ailus
The lens drivers had ended up under the video decoder section; add a new one just for them, between the camera sensors and flash drivers. Signed-off-by: Sakari Ailus --- drivers/media/i2c/Kconfig | 76 --- 1 file changed, 39 insertions(+), 37

Re: [PATCH 0/2] media: ov7670: fix regressions caused by "hook s_power onto v4l2 core"

2019-03-13 Thread Sakari Ailus
after power-up > > media: ov7670: don't access registers when the device is powered off > > > > drivers/media/i2c/ov7670.c | 32 +++- > > 1 file changed, 27 insertions(+), 5 deletions(-) > > > > Cc: Lubomir Rintel > >

Re: [media-workshop] [ANN] Edinburgh Media Summit 2018 meeting report

2019-03-11 Thread Sakari Ailus
Hi Mauro, On Wed, Dec 12, 2018 at 05:30:02AM -0200, Mauro Carvalho Chehab wrote: > Sakari, > > Em Sun, 18 Nov 2018 00:45:02 +0200 > Sakari Ailus escreveu: > > > Hello everyone, > > Sorry for taking so long to review this. Was very busy those days. Likewise in my re

Re: [PATCH v3 19/31] media: Documentation: Add GS_ROUTING documentation

2019-03-08 Thread Sakari Ailus
Hi Jacopo, On Fri, Mar 08, 2019 at 02:31:33PM +0100, Jacopo Mondi wrote: > Hi Sakari, >thanks for the review > > On Thu, Mar 07, 2019 at 05:19:29PM +0200, Sakari Ailus wrote: > > Hi Jacopo, > > > > Thanks for writing the documentation for this! > > >

Re: [PATCH v3 00/31] v4l: add support for multiplexed streams

2019-03-08 Thread Sakari Ailus
On Fri, Mar 08, 2019 at 02:19:03PM +0100, Jacopo Mondi wrote: > Hi Sakari and Niklas, > > On Thu, Mar 07, 2019 at 11:47:26AM +0200, Sakari Ailus wrote: > > Hi Jacopo, > > > > On Tue, Mar 05, 2019 at 07:51:19PM +0100, Jacopo Mondi wrote: > > > Hello, > >

Re: [PATCHv2 7/9] v4l2-subdev: handle module refcounting here

2019-03-07 Thread Sakari Ailus
entities ? We will need to do that to allow removing entities safely. The current patchset only deals with the media device and it's stille pending on DVB framework issues. -- Regards, Sakari Ailus

Re: [PATCH v1.1 4/4] ti-vpe: Parse local endpoint for properties, not the remote one

2019-03-07 Thread Sakari Ailus
On Thu, Mar 07, 2019 at 09:34:12AM -0600, Benoit Parrot wrote: > Sakari Ailus wrote on Tue [2019-Mar-05 > 22:48:44 +0200]: > > On Tue, Mar 05, 2019 at 11:38:42AM -0600, Benoit Parrot wrote: > > > Sakari Ailus wrote on Tue [2019-Mar-05 > > > 18:3

Re: [PATCH v3 19/31] media: Documentation: Add GS_ROUTING documentation

2019-03-07 Thread Sakari Ailus
TE_FL_ACTIVE > + - 0 > + - The route is enabled. Set by applications. > +* - V4L2_SUBDEV_ROUTE_FL_IMMUTABLE > + - 1 > + - The route is immutable. Set by the driver. > + > +Return Value > + > + > +On success 0 is returned, on error -1 and the ``errno`` variable is set > +appropriately. The generic error codes are described at the > +:ref:`Generic Error Codes ` chapter. > + > +ENOSPC > + The number of provided route entries is less than the available ones. > + > +EINVAL > + The sink or source pad identifiers reference a non-existing pad, or > refernce > + pads of different types (ie. the sink_pad identifiers refers to a source > pad) > + The sink or source stream identifiers reference a non-existing stream s/The/or the/ > + in the sink or source pad. s/i/o/ > + -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v3 31/31] media: rcar-csi2: Implement has_route()

2019-03-07 Thread Sakari Ailus
That'd probably not be trivial to implement though. > + } > + > + if (source_pad == pad1) > + return true; > + } > + > + return false; > +} > + > static const struct media_entity_operations rcar_csi2_entity_ops = { > + .has_route = rcar_csi2_has_route, > .link_validate = v4l2_subdev_link_validate, > }; > -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v3 28/31] adv748x: afe: Implement has_route()

2019-03-07 Thread Sakari Ailus
; @@ -595,6 +619,8 @@ int adv748x_afe_init(struct adv748x_afe *afe) > > afe->pads[ADV748X_AFE_SOURCE].flags = MEDIA_PAD_FL_SOURCE; > > + afe->sd.entity.ops = &adv748x_afe_entity_ops; > + > ret = media_entity_pads_init(&afe->sd.entity, ADV748X_AFE_NR_PADS, > afe->pads); > if (ret) > -- > 2.20.1 > -- Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v3 12/31] media: entity: Add an iterator helper for connected pads

2019-03-07 Thread Sakari Ailus
On Thu, Mar 07, 2019 at 10:27:36AM +, Ian Arkver wrote: > On 07/03/2019 10:09, Sakari Ailus wrote: > > Hi Jacopo, > > > > On Tue, Mar 05, 2019 at 07:51:31PM +0100, Jacopo Mondi wrote: > > > From: Sakari Ailus > > > > > > Add a helper macro fo

Re: [PATCH v3 12/31] media: entity: Add an iterator helper for connected pads

2019-03-07 Thread Sakari Ailus
Hi Jacopo, On Tue, Mar 05, 2019 at 07:51:31PM +0100, Jacopo Mondi wrote: > From: Sakari Ailus > > Add a helper macro for iterating over pads that are connected through > enabled routes. This can be used to find all the connected pads within an > entity, for instance starting fro

Re: [PATCH v3 00/31] v4l: add support for multiplexed streams

2019-03-07 Thread Sakari Ailus
/2 [ENABLED] > 0/0 -> 1/3 [] > --- > > Below is reported the media graph of the system used for testing [1]. > > v4l2-ctl patches to handle the newly introduced IOCTLs are available from > Niklas' repository at: > git://git.ragnatech.se/v4l-utils routing Could you send the v4l2-ctl patches out as well, please? -- Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH 1/5] staging: imgu: Switch to __aligned() from __attribute__((aligned()))

2019-03-06 Thread Sakari Ailus
On Thu, Mar 07, 2019 at 12:00:59PM +0900, Tomasz Figa wrote: > On Thu, Mar 7, 2019 at 12:00 PM Tomasz Figa wrote: > > > > Hi Sakari, > > > > On Wed, Feb 20, 2019 at 8:21 PM Sakari Ailus > > wrote: > > > > > > __aligned() is preferre

Re: [PATCH v1.1 4/4] ti-vpe: Parse local endpoint for properties, not the remote one

2019-03-05 Thread Sakari Ailus
On Tue, Mar 05, 2019 at 11:38:42AM -0600, Benoit Parrot wrote: > Sakari Ailus wrote on Tue [2019-Mar-05 > 18:32:40 +0200]: > > Hi Benoit, > > > > On Tue, Mar 05, 2019 at 08:34:09AM -0600, Benoit Parrot wrote: > > > Sakari, > > > > > > Thank

Re: [PATCH v1.1 4/4] ti-vpe: Parse local endpoint for properties, not the remote one

2019-03-05 Thread Sakari Ailus
Hi Benoit, On Tue, Mar 05, 2019 at 08:34:09AM -0600, Benoit Parrot wrote: > Sakari, > > Thank you for the patch. > > Sakari Ailus wrote on Tue [2019-Mar-05 > 16:02:24 +0200]: > > ti-vpe driver parsed the remote endpoints for properties but ignored the > > local

Re: [PATCH] [v2] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-05 Thread Sakari Ailus
quot;media: staging/intel-ipu3: Add css pipeline > programming") > Signed-off-by: Arnd Bergmann > --- > v2: restructure to use 'return -ENOMEM' instead of goto for failed > allocation. Thanks, Arnd! All three applied. -- Sakari Ailus sakari.ai...@linux.intel.com

[PATCH v1.1 4/4] ti-vpe: Parse local endpoint for properties, not the remote one

2019-03-05 Thread Sakari Ailus
ti-vpe driver parsed the remote endpoints for properties but ignored the local ones. Fix this by parsing the local endpoint properties instead. Signed-off-by: Sakari Ailus --- since v1: - Remove of_node_put(remote_ep) as well, the only remaining reference to it. drivers/media/platform/ti-vpe

[PATCH 2/4] v4l2-fwnode: The first default data lane is 0 on C-PHY

2019-03-05 Thread Sakari Ailus
C-PHY has no clock lanes. Therefore the first data lane is 0 by default. Fixes: edc6d56c2e7e ("media: v4l: fwnode: Support parsing of CSI-2 C-PHY endpoints") Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-fwnode.c | 6 +- 1 file changed, 5 insertions(+), 1 deletio

[PATCH 3/4] pxa-camera: Match with device node, not the port node

2019-03-05 Thread Sakari Ailus
V4L2 fwnode matching right now still works based on device nodes, not port nodes. Fix this. Signed-off-by: Sakari Ailus --- drivers/media/platform/pxa_camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform

[PATCH 4/4] ti-vpe: Parse local endpoint for properties, not the remote one

2019-03-05 Thread Sakari Ailus
ti-vpe driver parsed the remote endpoints for properties but ignored the local ones. Fix this by parsing the local endpoint properties instead. Signed-off-by: Sakari Ailus --- drivers/media/platform/ti-vpe/cal.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a

[PATCH 0/4] V4L2 fwnode framework and driver fixes

2019-03-05 Thread Sakari Ailus
Hi folks, Here are a few fixes for the parsing fwnodes in the V4L2 framework as well as drivers using it. Sakari Ailus (4): v4l2-fwnode: Defaults may not override endpoint configuration in firmware v4l2-fwnode: The first default data lane is 0 on C-PHY pxa-camera: Match with device

[PATCH 1/4] v4l2-fwnode: Defaults may not override endpoint configuration in firmware

2019-03-05 Thread Sakari Ailus
for drivers") Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-fwnode.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c index 9bfedd7596a1..93d0547779df 100644 --- a/drivers/media

Re: [PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-05 Thread Sakari Ailus
On Tue, Mar 05, 2019 at 09:40:24AM +0100, Arnd Bergmann wrote: > On Tue, Mar 5, 2019 at 8:53 AM Sakari Ailus > wrote: > > On Tue, Mar 05, 2019 at 12:25:18AM +, Cao, Bingbu wrote: > > > > > struct v4l2_pix_format_mplane *const in = > > > >

Re: [PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-04 Thread Sakari Ailus
resolution adjustment failed\n"); > > - return -EINVAL; > > + ret = -EINVAL; > > + goto out; > > } > > *fmts[i] = q[i].fmt.mpix; > > } > > @@ -1859,7 +1869,10 @@ int imgu_css_fmt_try(struct imgu_css *css, > > bds->width, bds->height, gdc->width, gdc->height, > > out->width, out->height, vf->width, vf->height); > > > > - return 0; > > + ret = 0; > > +out: > > + kfree(q); > > + return ret; > > } > > > > int imgu_css_fmt_set(struct imgu_css *css, -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH 3/3] media: tc358746: update MAINTAINERS file

2019-03-04 Thread Sakari Ailus
On Mon, Mar 04, 2019 at 06:31:51PM +0100, Marco Felsch wrote: > Hi Sakari, > > On 19-02-18 13:46, Sakari Ailus wrote: > > Hi Marco, > > > > On Tue, Dec 18, 2018 at 03:12:40PM +0100, Marco Felsch wrote: > > > Add me as partial maintainer, others are welcome to

Re: [PATCH 1/3] media: dt-bindings: add bindings for Toshiba TC358746

2019-03-04 Thread Sakari Ailus
it's common to use the last port > as output (e.g. video-mux). The ports represent hardware and I think I would avoid reordering them. I wonder what would the DT folks prefer. The device specific property is to the point at least: it describes an orthogonal part of the device configuration. That's why I'd pick that if I were to choose. But I'll let Rob to comment on this. -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH 1/3] media: dt-bindings: add bindings for Toshiba TC358746

2019-03-04 Thread Sakari Ailus
Hi Marco, On Fri, Mar 01, 2019 at 02:01:18PM +0100, Marco Felsch wrote: > Hi Ian, > > On 19-03-01 11:07, Ian Arkver wrote: > > Hi, > > > > On 01/03/2019 10:52, Marco Felsch wrote: > > > Hi Sakari, > > > > > > On 19-02-18 12:03, Sak

Re: [PATCH 1/3] media: dt-bindings: add bindings for Toshiba TC358746

2019-03-04 Thread Sakari Ailus
Hi Macro, On Fri, Mar 01, 2019 at 11:52:35AM +0100, Marco Felsch wrote: > Hi Sakari, > > On 19-02-18 12:03, Sakari Ailus wrote: > > Hi Marco, > > > > My apologies for reviewing this so late. You've received good comments > > already. I have a few more. >

[PATCH v2 1/4] staging: imgu: Address a compiler warning on alignment

2019-03-01 Thread Sakari Ailus
Address a compiler warnings on alignment of struct ipu3_uapi_awb_fr_config_s by adding __attribute__((aligned(32))) to a struct member of that type as well. Signed-off-by: Sakari Ailus Tested-by: Rajmohan Mani --- drivers/staging/media/ipu3/include/intel-ipu3.h | 2 +- 1 file changed, 1

[PATCH v2 0/4] Fix most ImgU driver compiler / checker warnings

2019-03-01 Thread Sakari Ailus
Drop __attribute__((aligned())) -> __aligned() change for now - Align awb_fr field in struct ipu3_uapi_acc_param - Add Raj's Tested-by: tag Sakari Ailus (4): staging: imgu: Address a compiler warning on alignment staging: imgu: Remove redundant checks staging: imgu: Address compi

[PATCH v2 2/4] staging: imgu: Remove redundant checks

2019-03-01 Thread Sakari Ailus
Remove redundant checks for less than zero on unsigned variables. Signed-off-by: Sakari Ailus Tested-by: Rajmohan Mani --- drivers/staging/media/ipu3/ipu3-css-fw.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3-css-fw.c b/drivers

[PATCH v2 4/4] Revert "media: ipu3: shut up warnings produced with W=1"

2019-03-01 Thread Sakari Ailus
This reverts commit 0bdfc56c13c0ffe003f28395fcde2cd9b5ea0622. The original patch suppressed compiler and checker warnings and those warnings have been addressed. Do not attempt to suppress these warnings anymore. Signed-off-by: Sakari Ailus Tested-by: Rajmohan Mani --- drivers/staging/media

[PATCH v2 3/4] staging: imgu: Address compiler / checker warnings in MMU code

2019-03-01 Thread Sakari Ailus
Address C compiler, sparse and smatch warnings and little style issues in the IMGU MMU code. Signed-off-by: Sakari Ailus Tested-by: Rajmohan Mani --- drivers/staging/media/ipu3/ipu3-mmu.c | 39 +++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a

Re: [PATCH yavta 6/7] Support setting control from values stored in a file

2019-02-22 Thread Sakari Ailus
Hi Laurent, On Fri, Feb 22, 2019 at 01:47:39PM +0200, Laurent Pinchart wrote: > Hi Sakari, > > On Wed, Feb 20, 2019 at 11:26:52PM +0200, Sakari Ailus wrote: > > On Wed, Feb 20, 2019 at 02:51:22PM +0200, Laurent Pinchart wrote: > > > Signed-off-by: Laurent Pinchart >

Re: [PATCH v2 16/30] v4l: subdev: Add [GS]_ROUTING subdev ioctls and operations

2019-02-22 Thread Sakari Ailus
Hi Jacopo, On Fri, Feb 22, 2019 at 12:17:47PM +0100, Jacopo Mondi wrote: > Hi Sakari, > thanks for your suggestions. > > On Fri, Feb 22, 2019 at 01:04:29PM +0200, Sakari Ailus wrote: > > Hi Jacopo, > > [snip] > > > > On the previous example, I thoug

Re: [PATCH v2 16/30] v4l: subdev: Add [GS]_ROUTING subdev ioctls and operations

2019-02-22 Thread Sakari Ailus
Hi Jacopo, On Fri, Feb 22, 2019 at 09:40:19AM +0100, Jacopo Mondi wrote: > Hi Sakari, > > On Fri, Feb 22, 2019 at 12:31:32AM +0200, Sakari Ailus wrote: > > Hi Jacopo, > > > > On Thu, Feb 21, 2019 at 03:39:40PM +0100, Jacopo Mondi wrote: > > > Hi Sakari, > &

Re: [PATCH v2 17/30] v4l: subdev: compat: Implement handling for VIDIOC_SUBDEV_[GS]_ROUTING

2019-02-21 Thread Sakari Ailus
; > handling. > > > > Care to explain what makes this ioctl require a compat version? I > don't see assumptions on the word length on the implementation. What > am I missing? The size of the "routes" pointer isn't constant, therefore affecting the memor

Re: [PATCH v2 16/30] v4l: subdev: Add [GS]_ROUTING subdev ioctls and operations

2019-02-21 Thread Sakari Ailus
for multiplexed links > > > - Copy the argument back in case of an error. This is needed to let the > > > caller know the number of routes. > > > > > > Signed-off-by: Sakari Ailus > > > Reviewed-by: Niklas Söderlund > > > --- > >

<    1   2   3   4   5   6   7   8   9   10   >