Re: [PATCH v3 0/4] AS3645A fixes

2017-09-22 Thread Sakari Ailus
Hi Jacek, (Fixed DT list address.) Jacek Anaszewski wrote: Hi Sakari, On 09/22/2017 11:32 AM, Sakari Ailus wrote: Hi Jacek and others, Here are a few fixes for the as3645a DTS as well as changes in bindings. The driver is not in a release yet. Jacek: Could you take these to your fixes

[PATCH v4 0/9] bring back stack frame warning with KASAN

2017-09-22 Thread Arnd Bergmann
This is a new version of patches I originally submitted back in March [1], and last time in June [2]. This time I have basically rewritten the entire patch series based on a new approach that came out of GCC PR81715 that I opened[3]. The upcoming gcc-8 release is now much better at consolidating

[PATCH 5/8] media: v4l2-device.h: document ancillary macros

2017-09-22 Thread Mauro Carvalho Chehab
There are several widely macros that aren't documented using kernel-docs markups. Add it. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-device.h | 238 +--- 1 file changed, 204 insertions(+), 34 deletions(-) diff

[PATCH 4/8] media: v4l2-common.h: document ancillary functions

2017-09-22 Thread Mauro Carvalho Chehab
There are several ancillary functions that aren't documented. Document them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-common.c | 14 - include/media/v4l2-common.h | 104 ++ 2 files changed, 94

[PATCH 6/8] media: v4l2-dv-timings.h: convert comment into kernel-doc markup

2017-09-22 Thread Mauro Carvalho Chehab
The can_reduce_fps() is already documented, but it is not using the kernel-doc markup. Convert it, in order to generate documentation from it. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-dv-timings.h | 14 -- 1 file changed, 8 insertions(+),

[PATCH 1/8] media: tuner-types: add kernel-doc markups for struct tunertype

2017-09-22 Thread Mauro Carvalho Chehab
This struct is lacking documentation. Add it. Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner-types.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h index

[PATCH 8/8] media: v4l2-ioctl.h: convert debug macros into enum and document

2017-09-22 Thread Mauro Carvalho Chehab
Currently, there's no way to document #define foo with kernel-doc. So, convert it to an enum, and document. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-ioctl.h | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-)

[PATCH 0/8] Document more parts of V4L2 kAPI part 1

2017-09-22 Thread Mauro Carvalho Chehab
There are several functions and structs at V4L2 that aren't documented. This is an effort to document some of those. My plan is to work on other similar patch series until we have the kAPI in sync with the current implementation. Mauro Carvalho Chehab (8): media: tuner-types: add kernel-doc

[PATCH 3/8] media: v4l2-common: get rid of struct v4l2_discrete_probe

2017-09-22 Thread Mauro Carvalho Chehab
This struct is there just two store two arguments of v4l2_find_nearest_format(). The other two arguments are passed as parameter. IMHO, there isn't much sense on doing that, and that will just add one more struct to document ;) So, let's get rid of the struct, passing the parameters directly.

[PATCH 7/8] media: v4l2-event.rst: improve events description

2017-09-22 Thread Mauro Carvalho Chehab
Both v4l2-event.rst and v4l2-event.h have an overview of events, but there are some inconsistencies there: - at v4l2-event, the event's ringbuffer is called kevent. Its name is, instead, v4l2_kevent; - Some things are mentioned on both places (with different words), others are either on one

[PATCH 2/8] media: v4l2-common: get rid of v4l2_routing dead struct

2017-09-22 Thread Mauro Carvalho Chehab
This struct is not used anymore. Get rid of it and update the documentation about what should still be converted. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-common.h | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git

[PATCH 0/4] RFC: TDA1997x HDMI video receiver

2017-09-22 Thread Tim Harvey
This is an RFC for a driver supporting the TDA1997x HDMI video receiver. I've tested this on a Gateworks GW54xx with an IMX6Q which uses the TDA19971 with 16bits connected to the IMX6 CSI. For this configuration I've tested both 16bit YUV422 and 8bit BT656 mode. While the driver should support

Re: [PATCH v3 0/4] AS3645A fixes

2017-09-22 Thread Jacek Anaszewski
Hi Sakari, On 09/22/2017 11:32 AM, Sakari Ailus wrote: > Hi Jacek and others, > > Here are a few fixes for the as3645a DTS as well as changes in bindings. > The driver is not in a release yet. > > Jacek: Could you take these to your fixes branch so we don't get faulty DT > bindings to a

[PATCH v4 3/9] brcmsmac: reindent split functions

2017-09-22 Thread Arnd Bergmann
In the previous commit I left the indentation alone to help reviewing the patch, this one now runs the three new functions through 'indent -kr -8' with some manual fixups to avoid silliness. No changes other than whitespace are intended here. Signed-off-by: Arnd Bergmann

[PATCH v4 7/9] rocker: fix rocker_tlv_put_* functions for KASAN

2017-09-22 Thread Arnd Bergmann
Inlining these functions creates lots of stack variables that each take 64 bytes when KASAN is enabled, leading to this warning about potential stack overflow: drivers/net/ethernet/rocker/rocker_ofdpa.c: In function 'ofdpa_cmd_flow_tbl_add': drivers/net/ethernet/rocker/rocker_ofdpa.c:621:1:

[PATCH v4 4/9] em28xx: fix em28xx_dvb_init for KASAN

2017-09-22 Thread Arnd Bergmann
With CONFIG_KASAN, the init function uses a large amount of kernel stack: drivers/media/usb/em28xx/em28xx-dvb.c: In function 'em28xx_dvb_init.part.4': drivers/media/usb/em28xx/em28xx-dvb.c:2061:1: error: the frame size of 3232 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] It

[PATCH 4/4] ARM: DTS: imx: ventana: add TDA19971 HDMI Receiver to GW54xx

2017-09-22 Thread Tim Harvey
The GW54xx has a front-panel microHDMI connector routed to a TDA19971 which is connected the the IPU CSI when using IMX6Q. Signed-off-by: Tim Harvey --- arch/arm/boot/dts/imx6q-gw54xx.dts | 85 ++ 1 file changed, 85 insertions(+) diff

[PATCH 3/4] media: i2c: Add TDA1997x HDMI receiver driver

2017-09-22 Thread Tim Harvey
Add support for the TDA1997x HDMI receivers. Signed-off-by: Tim Harvey --- drivers/media/i2c/Kconfig|9 + drivers/media/i2c/Makefile |1 + drivers/media/i2c/tda1997x.c | 3065 ++

[PATCH 1/4] MAINTAINERS: add entry for NXP TDA1997x driver

2017-09-22 Thread Tim Harvey
Signed-off-by: Tim Harvey --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2093060..de7124e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13019,6 +13019,14 @@ T: git git://linuxtv.org/mkrufky/tuners.git S:

[PATCH 2/4] media: dt-bindings: Add bindings for TDA1997X

2017-09-22 Thread Tim Harvey
Signed-off-by: Tim Harvey --- .../devicetree/bindings/media/i2c/tda1997x.txt | 159 + 1 file changed, 159 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/tda1997x.txt diff --git

Re: [RESEND PATCH v2 4/6] dt: bindings: as3645a: Improve label documentation, DT example

2017-09-22 Thread Jacek Anaszewski
On 09/20/2017 10:53 PM, Rob Herring wrote: > On Tue, Sep 19, 2017 at 11:01:02PM +0200, Jacek Anaszewski wrote: >> Hi Pavel, >> >> On 09/18/2017 10:54 PM, Pavel Machek wrote: >>> On Mon 2017-09-18 17:49:23, Sakari Ailus wrote: Hi Pavel, On Mon, Sep 18, 2017 at 12:56:55PM +0200, Pavel

[PATCH v4 1/9] brcmsmac: make some local variables 'static const' to reduce stack size

2017-09-22 Thread Arnd Bergmann
With KASAN and a couple of other patches applied, this driver is one of the few remaining ones that actually use more than 2048 bytes of kernel stack: broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function 'wlc_phy_workarounds_nphy_gainctrl': broadcom/brcm80211/brcmsmac/phy/phy_n.c:16065:1:

[PATCH v4 9/9] kasan: rework Kconfig settings

2017-09-22 Thread Arnd Bergmann
We get a lot of very large stack frames using gcc-7.0.1 with the default -fsanitize-address-use-after-scope --param asan-stack=1 options, which can easily cause an overflow of the kernel stack, e.g. drivers/gpu/drm/i915/gvt/handlers.c:2407:1: error: the frame size of 31216 bytes is larger than

[PATCH v4 2/9] brcmsmac: split up wlc_phy_workarounds_nphy

2017-09-22 Thread Arnd Bergmann
The stack consumption in this driver is still relatively high, with one remaining warning if the warning level is lowered to 1536 bytes: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:17135:1: error: the frame size of 1880 bytes is larger than 1536 bytes

[PATCH v4 8/9] netlink: fix nla_put_{u8,u16,u32} for KASAN

2017-09-22 Thread Arnd Bergmann
When CONFIG_KASAN is enabled, the "--param asan-stack=1" causes rather large stack frames in some functions. This goes unnoticed normally because CONFIG_FRAME_WARN is disabled with CONFIG_KASAN by default as of commit 3f181b4d8652 ("lib/Kconfig.debug: disable -Wframe-larger-than warnings with

Re: [PATCH v2 2/2] [media] imx: ask source subdevice for number of active data lanes

2017-09-22 Thread Steve Longerbeam
On 09/21/2017 08:30 AM, Philipp Zabel wrote: Temporarily use g_mbus_config() to determine the number of active data lanes used by the transmitter. If g_mbus_config is not supported or does not return the number of active lines, default to using all connected data lines. Signed-off-by: Philipp

[PATCH v4 6/9] dvb-frontends: fix i2c access helpers for KASAN

2017-09-22 Thread Arnd Bergmann
A typical code fragment was copied across many dvb-frontend drivers and causes large stack frames when built with with CONFIG_KASAN on gcc-5/6/7: drivers/media/dvb-frontends/cxd2841er.c:3225:1: error: the frame size of 3992 bytes is larger than 3072 bytes [-Werror=frame-larger-than=]

[PATCH v4 5/9] r820t: fix r820t_write_reg for KASAN

2017-09-22 Thread Arnd Bergmann
With CONFIG_KASAN, we get an overly long stack frame due to inlining the register access functions: drivers/media/tuners/r820t.c: In function 'generic_set_freq.isra.7': drivers/media/tuners/r820t.c:1334:1: error: the frame size of 2880 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

Re: [PATCH 0/8] [media] v4l2-core: Fine-tuning for some function implementations

2017-09-22 Thread SF Markus Elfring
> Sorry Markus, just stay away from the videobuf-* sources. Will the software evolution be continued for related source files? Are there any update candidates left over in the directory “v4l2-core”? Regards, Markus

Re: [media] spca500: Use common error handling code in spca500_synch310()

2017-09-22 Thread SF Markus Elfring
> No one needs to argue about keeping it the way it is. I got an other impression in this case after a bit of information was presented which seems to be contradictory. > I don't see any improvement brought by the proposed change, Do you care if the source code for an error message is present

[RESEND PATCH v3 0/4] AS3645A fixes

2017-09-22 Thread Sakari Ailus
Hi Jacek and others, (Resending, got devicetree list address wrong.) Here are a few fixes for the as3645a DTS as well as changes in bindings. The driver is not in a release yet. Jacek: Could you take these to your fixes branch so we don't get faulty DT bindings to a release? I've dropped the

[RESEND PATCH v3 1/4] as3645a: Use ams,input-max-microamp as documented in DT bindings

2017-09-22 Thread Sakari Ailus
DT bindings document the property "ams,input-max-microamp" that limits the chip's maximum input current. The driver and the DTS however used "peak-current-limit" property. Fix this by using the property documented in DT binding documentation. Signed-off-by: Sakari Ailus

[RESEND PATCH v3 3/4] as3645a: Use integer numbers for parsing LEDs

2017-09-22 Thread Sakari Ailus
Use integer numbers for LEDs, 0 is the flash and 1 is the indicator. Signed-off-by: Sakari Ailus Acked-by: Pavel Machek Acked-by: Jacek Anaszewski --- arch/arm/boot/dts/omap3-n950-n9.dtsi | 8 ++--

[RESEND PATCH v3 4/4] as3645a: Unregister indicator LED on device unbind

2017-09-22 Thread Sakari Ailus
The indicator LED was registered in probe but was not removed in driver remove callback. Fix this. Signed-off-by: Sakari Ailus --- drivers/leds/leds-as3645a.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/leds/leds-as3645a.c

[RESEND PATCH v3 2/4] dt: bindings: as3645a: Use LED number to refer to LEDs

2017-09-22 Thread Sakari Ailus
Use integers (reg property) to tell the number of the LED to the driver instead of the node name. While both of these approaches are currently used by the LED bindings, using integers will require less driver changes for ACPI support. Additionally, it will make possible LED naming using chip and

[PATCH v4 0/2] media: v4l: Add support for the Cadence MIPI-CSI2 RX

2017-09-22 Thread Maxime Ripard
Hi, Here is the fourth attempt at supporting the MIPI-CSI2 RX block from Cadence. This IP block is able to receive CSI data over up to 4 lanes, and split it to over 4 streams. Those streams are basically the interfaces to the video grabbers that will perform the capture. It is able to map

[PATCH v4 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 RX Device Tree bindings

2017-09-22 Thread Maxime Ripard
The Cadence MIPI-CSI2 RX controller is a CSI2RX bridge that supports up to 4 CSI-2 lanes, and can route the frames to up to 4 streams, depending on the hardware implementation. It can operate with an external D-PHY, an internal one or no D-PHY at all in some configurations. Acked-by: Rob Herring

[PATCH v4 2/2] v4l: cadence: Add Cadence MIPI-CSI2 RX driver

2017-09-22 Thread Maxime Ripard
The Cadence CSI-2 RX Controller is an hardware block meant to be used as a bridge between a CSI-2 bus and pixel grabbers. It supports operating with internal or external D-PHY, with up to 4 lanes, or without any D-PHY. The current code only supports the former case. It also support dynamic

Re: [PATCH v2 1/3] media: V3s: Add support for Allwinner CSI.

2017-09-22 Thread Yong
Hello Mylène, On Fri, 22 Sep 2017 10:44:13 +0200 Mylene JOSSERAND wrote: > Hello Yong, > > Thank you for these drivers! > > I tested it with an OV5640 camera on an Nanopi M1 plus (Allwinner H3) > and I noticed that I got a frame correctly displayed only on

[PATCH v3 1/4] as3645a: Use ams,input-max-microamp as documented in DT bindings

2017-09-22 Thread Sakari Ailus
DT bindings document the property "ams,input-max-microamp" that limits the chip's maximum input current. The driver and the DTS however used "peak-current-limit" property. Fix this by using the property documented in DT binding documentation. Signed-off-by: Sakari Ailus

[PATCH v3 0/4] AS3645A fixes

2017-09-22 Thread Sakari Ailus
Hi Jacek and others, Here are a few fixes for the as3645a DTS as well as changes in bindings. The driver is not in a release yet. Jacek: Could you take these to your fixes branch so we don't get faulty DT bindings to a release? I've dropped the patches related to LED naming and label property as

[PATCH v3 2/4] dt: bindings: as3645a: Use LED number to refer to LEDs

2017-09-22 Thread Sakari Ailus
Use integers (reg property) to tell the number of the LED to the driver instead of the node name. While both of these approaches are currently used by the LED bindings, using integers will require less driver changes for ACPI support. Additionally, it will make possible LED naming using chip and

[PATCH v3 3/4] as3645a: Use integer numbers for parsing LEDs

2017-09-22 Thread Sakari Ailus
Use integer numbers for LEDs, 0 is the flash and 1 is the indicator. Signed-off-by: Sakari Ailus Acked-by: Pavel Machek Acked-by: Jacek Anaszewski --- arch/arm/boot/dts/omap3-n950-n9.dtsi | 8 ++--

[PATCH v3 4/4] as3645a: Unregister indicator LED on device unbind

2017-09-22 Thread Sakari Ailus
The indicator LED was registered in probe but was not removed in driver remove callback. Fix this. Signed-off-by: Sakari Ailus --- drivers/leds/leds-as3645a.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/leds/leds-as3645a.c

[PATCH] [media] atomisp2: remove cast from memory allocation

2017-09-22 Thread Aishwarya Pant
Patch removes the following warning issued was coccicheck: WARNING: casting value returned by memory allocation function to (char *) is useless. Signed-off-by: Aishwarya Pant --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 4 ++-- 1 file changed, 2

Re: [PATCH v3 3/4] [media] bcm2835-unicam: Driver for CCP2/CSI2 camera interface

2017-09-22 Thread Hans Verkuil
Hi Dave, Thank you for working on this! See my review below: On 20/09/17 18:07, Dave Stevenson wrote: > Add driver for the Unicam camera receiver block on > BCM283x processors. > > Signed-off-by: Dave Stevenson > --- > > Changes from v2. > - Don't store the

Re: [PATCH v2 0/4] BCM283x Camera Receiver driver

2017-09-22 Thread Hans Verkuil
On 13/09/17 17:49, Dave Stevenson wrote: > OV5647 > > v4l2-compliance SHA : f6ecbc90656815d91dc6ba90aac0ad8193a14b38 > > Driver Info: > Driver name : unicam > Card type : unicam > Bus info : platform:unicam 3f801000.csi1 > Driver version: 4.13.0 > Capabilities :

Re: [PATCH v3 2/4] [media] dt-bindings: Document BCM283x CSI2/CCP2 receiver

2017-09-22 Thread Stefan Wahren
Hi Dave, > Dave Stevenson hat am 20. September 2017 um > 18:07 geschrieben: > > > Document the DT bindings for the CSI2/CCP2 receiver peripheral > (known as Unicam) on BCM283x SoCs. > > Signed-off-by: Dave Stevenson > --- > >

Re: usb/media/hdpvr: trying to register non-static key in hdpvr_probe

2017-09-22 Thread Arvind Yadav
Hi, I have a doubt. Why we are calling flush_work in hdpvr_probe for every failure. We are flushing work which is not defined yet. Here, hdpvr_register_videodev() is responsible for setup and register a video device. Also defining and initializing a worker. we are calling

Re: [PATCH 1/2] dt: bindings: media: Document port and endpoint numbering

2017-09-22 Thread Sakari Ailus
On Thu, Sep 21, 2017 at 10:58:34AM -0500, Rob Herring wrote: > On Thu, Sep 21, 2017 at 4:25 AM, Sakari Ailus > wrote: > > Hi Rob, > > > > Thanks for the reply. > > > > On Wed, Sep 20, 2017 at 03:53:13PM -0500, Rob Herring wrote: > >> On Mon, Sep 18, 2017 at

Re: [PATCH v2 1/3] media: V3s: Add support for Allwinner CSI.

2017-09-22 Thread Mylene JOSSERAND
Hello Yong, Thank you for these drivers! I tested it with an OV5640 camera on an Nanopi M1 plus (Allwinner H3) and I noticed that I got a frame correctly displayed only on a half of the frame's size. It is related to your "sun6i_csi_set_window" function (see below). > Allwinner V3s SoC have

Re: [PATCH] [media] tc358743: validate lane count and order

2017-09-22 Thread Sakari Ailus
Hi Philipp, On Thu, Sep 21, 2017 at 05:31:39PM +0200, Philipp Zabel wrote: > The TC358743 does not support reordering lanes, or more than 4 data > lanes. > > Signed-off-by: Philipp Zabel > --- > drivers/media/i2c/tc358743.c | 16 > 1 file changed, 16

[PATCH v2 1/1] ov13858: Use do_div() for dividing a 64-bit number

2017-09-22 Thread Sakari Ailus
ov13858 contained a 64-bit division. Use do_div() for calculating it. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ov13858.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/ov13858.c

[PATCH v2 2/2] dt: bindings: media: Document data lane numbering without lane reordering

2017-09-22 Thread Sakari Ailus
Most devices do not support lane reordering and in many cases the documentation of the data-lanes property is incomplete for such devices. Document that in case the lane reordering isn't supported, monotonically incremented values from 0 or 1 shall be used. Signed-off-by: Sakari Ailus

[PATCH v2 0/2] Improve generic DT binding documentation for media devices

2017-09-22 Thread Sakari Ailus
Hi folks, This set improves the DT binding documentation for media devices where device specific documentation is lacking and also documents that explicit documentation of all properties supported by the device is required. - Port and endpoint numbering - lane numbering for the data-lanes

[PATCH v2 1/2] dt: bindings: media: Document practices for DT bindings, ports, endpoints

2017-09-22 Thread Sakari Ailus
Port and endpoint numbering has been omitted in DT binding documentation for a large number of devices. Also common properties the device uses have been missed in binding documentation. Make it explicit that these things need to be documented. Signed-off-by: Sakari Ailus

Re: [PATCH 00/11] drm/sun4i: add CEC support

2017-09-22 Thread Maxime Ripard
On Thu, Sep 21, 2017 at 09:19:43PM +, Hans Verkuil wrote: > On 21/09/17 22:37, Maxime Ripard wrote: > > Hi Hans, > > > > On Fri, Sep 08, 2017 at 10:59:44AM +, Hans Verkuil wrote: > >> Hi Maxime, > >> > >> On 07/18/17 18:29, Maxime Ripard wrote: > >>> Hi, > >>> > >>> On Tue, Jul 11, 2017

cron job: media_tree daily build: WARNINGS

2017-09-22 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: Sat Sep 23 05:00:15 CEST 2017 media-tree git hash:1efdf1776e2253b77413c997bed862410e4b6aaf media_build

Re: usb/media/hdpvr: trying to register non-static key in hdpvr_probe

2017-09-22 Thread Andrey Konovalov
On Fri, Sep 22, 2017 at 9:41 AM, Arvind Yadav wrote: > Hi, > > I have a doubt. Why we are calling flush_work in hdpvr_probe for every > failure. > We are flushing work which is not defined yet. > > Here, hdpvr_register_videodev() is responsible for setup and register a

Re: [PATCH 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 TX Device Tree bindings

2017-09-22 Thread Sakari Ailus
On Fri, Sep 22, 2017 at 01:47:02PM +0200, Maxime Ripard wrote: > The Cadence MIPI-CSI2 RX controller is a CSI2 bridge that supports up to 4 Should this be TX? I was just thinking what does this chip do, and saw both. RX it at least less common. :-) -- Sakari Ailus e-mail: sakari.ai...@iki.fi

[PATCH] videobuf2-core: add queue_busy/idle queue ops

2017-09-22 Thread Hans Verkuil
Some controls (ROTATE) change the buffer layout. This means that they cannot be set when buffers are allocated. This can be achieved by calling v4l2_ctrl_grab(ctrl, true) when the queue becomes busy (i.e. the first buffer is allocated) and v4l2_ctrl_grab(ctrl, false) when the queue becomes idle

usb/media/zr364xx: GPF in zr364xx_vidioc_querycap/strlcpy

2017-09-22 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). usb 1-1: new full-speed USB device number 2 using dummy_hcd gadgetfs: connected gadgetfs: disconnected gadgetfs: connected usb 1-1: config 225 has an invalid

usb/media/stkwebcam: use-after-free in v4l2_ctrl_handler_free

2017-09-22 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). == BUG: KASAN: use-after-free in v4l2_ctrl_handler_free+0x9e1/0x9f0 Read of size 8 at addr

usb/media/dib0700: BUG in stk7070p_frontend_attach/symbol_put_addr

2017-09-22 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). dib0700: stk7070p_frontend_attach: state->dib7000p_ops.i2c_enumeration failed. Cannot continue [ cut here ] kernel BUG at

[PATCH] [media] hdpvr: Fix an error handling path in hdpvr_probe()

2017-09-22 Thread Arvind Yadav
Here, hdpvr_register_videodev() is responsible for setup and register a video device. Also defining and initializing a worker. hdpvr_register_videodev() is calling by hdpvr_probe at last. So No need to flash any work here. Unregister v4l2, free buffers and memory. If hdpvr_probe() will fail.

[PATCH 2/2] v4l: cadence: Add Cadence MIPI-CSI2 TX driver

2017-09-22 Thread Maxime Ripard
The Cadence MIPI-CSI2 TX controller is an hardware block meant to be used as a bridge between pixel interfaces and a CSI-2 bus. It supports operating with an internal or external D-PHY, with up to 4 lanes, or without any D-PHY. The current code only supports the former case. While the virtual

[PATCH 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 TX Device Tree bindings

2017-09-22 Thread Maxime Ripard
The Cadence MIPI-CSI2 RX controller is a CSI2 bridge that supports up to 4 video streams and can output on up to 4 CSI-2 lanes, depending on the hardware implementation. It can operate with an external D-PHY, an internal one or no D-PHY at all in some configurations. Signed-off-by: Maxime Ripard

[PATCH 0/2] media: v4l: Add support for the Cadence MIPI-CSI2 TX controller

2017-09-22 Thread Maxime Ripard
Hi, Here is an attempt at supporting the MIPI-CSI2 TX block from Cadence. This IP block is able to receive 4 video streams and stream them over a MIPI-CSI2 link using up to 4 lanes. Those streams are basically the interfaces to controllers generating some video signals, like a camera or a

Re: [PATCH 2/4] [media] usbvision-core: Use common error handling code in usbvision_set_compress_params()

2017-09-22 Thread Dan Carpenter
On Thu, Sep 21, 2017 at 05:07:06PM +0200, SF Markus Elfring wrote: > @@ -1913,11 +1908,12 @@ static int usbvision_set_compress_params(struct > usb_usbvision *usbvision) >USB_DIR_OUT | USB_TYPE_VENDOR | >USB_RECIP_ENDPOINT, 0, >

Re: [PATCH v9 1/4] rockchip/rga: v4l2 m2m support

2017-09-22 Thread Hans Verkuil
Hi Jacob, Sorry for the delay, but here is my review. I noticed that there is no patch for the MAINTAINERS file, please add an entry there for this driver. On 14/09/17 03:19, Jacob Chen wrote: > Rockchip RGA is a separate 2D raster graphic acceleration unit. It > accelerates 2D graphics

Re: [PATCH v8 0/5] Synopsys Designware HDMI Video Capture Controller + PHY

2017-09-22 Thread Hans Verkuil
Hi Jose, I'm going to mark this patch series as 'Changes Requested' since it depends on Sakari's subnotifier work. Once that is accepted I assume you'll make a v9 on top and then this can hopefully be merged. Regards, Hans On 10/07/17 17:46, Jose Abreu wrote: > The Synopsys Designware

Re: [PATCH] [media] hdpvr: Fix an error handling path in hdpvr_probe()

2017-09-22 Thread Andrey Konovalov
On Fri, Sep 22, 2017 at 3:07 PM, Arvind Yadav wrote: > Here, hdpvr_register_videodev() is responsible for setup and > register a video device. Also defining and initializing a worker. > hdpvr_register_videodev() is calling by hdpvr_probe at last. > So No need to flash

Re: [PATCH 2/2] v4l: cadence: Add Cadence MIPI-CSI2 TX driver

2017-09-22 Thread Sakari Ailus
Hi Maxime, On Fri, Sep 22, 2017 at 01:47:03PM +0200, Maxime Ripard wrote: > The Cadence MIPI-CSI2 TX controller is an hardware block meant to be used > as a bridge between pixel interfaces and a CSI-2 bus. > > It supports operating with an internal or external D-PHY, with up to 4 > lanes, or

Re: [PATCH v4 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 RX Device Tree bindings

2017-09-22 Thread Sakari Ailus
Hi Maxime, On Fri, Sep 22, 2017 at 12:08:22PM +0200, Maxime Ripard wrote: > The Cadence MIPI-CSI2 RX controller is a CSI2RX bridge that supports up to > 4 CSI-2 lanes, and can route the frames to up to 4 streams, depending on > the hardware implementation. > > It can operate with an external

Re: [PATCH 3/4] [media] usbvision-core: Delete unnecessary braces in 11 functions

2017-09-22 Thread Dan Carpenter
No. Multi-line indents get curly braces for readability. regards, dan carpenter

Re: usb/media/hdpvr: trying to register non-static key in hdpvr_probe

2017-09-22 Thread Arvind Yadav
Hi Andrey, On Friday 22 September 2017 05:16 PM, Andrey Konovalov wrote: On Fri, Sep 22, 2017 at 9:41 AM, Arvind Yadav wrote: Hi, I have a doubt. Why we are calling flush_work in hdpvr_probe for every failure. We are flushing work which is not defined yet. Here,

Re: usb/media/hdpvr: trying to register non-static key in hdpvr_probe

2017-09-22 Thread Andrey Konovalov
On Fri, Sep 22, 2017 at 3:09 PM, Arvind Yadav wrote: > Hi Andrey, > > > On Friday 22 September 2017 05:16 PM, Andrey Konovalov wrote: >> >> On Fri, Sep 22, 2017 at 9:41 AM, Arvind Yadav >> wrote: >>> >>> Hi, >>> >>> I have a doubt. Why we are

Re: [PATCH v2] [media] staging: atomisp: use clock framework for camera clocks

2017-09-22 Thread Sakari Ailus
Hi Pierre-Louis, On Wed, Sep 20, 2017 at 03:53:58PM -0500, Pierre-Louis Bossart wrote: > The Atom ISP driver initializes and configures PMC clocks which are > already handled by the clock framework. > > Remove all legacy vlv2_platform_clock stuff and move to the clk API to > avoid conflicts,

[GIT PULL for 4.15] atomisp cleanups and improvements

2017-09-22 Thread Sakari Ailus
Hi Mauro, Here are a bunch of atomisp cleanups and improvements. Please pull. The following changes since commit 1efdf1776e2253b77413c997bed862410e4b6aaf: media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency (2017-09-05 16:32:45 -0400) are available in the git repository at:

Re: [PATCH 2/4] [media] usbvision-core: Use common error handling code in usbvision_set_compress_params()

2017-09-22 Thread SF Markus Elfring
>> @@ -1913,11 +1908,12 @@ static int usbvision_set_compress_params(struct >> usb_usbvision *usbvision) >> USB_DIR_OUT | USB_TYPE_VENDOR | >> USB_RECIP_ENDPOINT, 0, >> (__u16) USBVISION_PCM_THR1, value, 6, HZ); >> +

Re: [media] usbvision-core: Delete unnecessary braces in 11 functions

2017-09-22 Thread SF Markus Elfring
> No. Multi-line indents get curly braces for readability. Which of the proposed change possibilities do you not like especially at the moment? Regards, Markus

Re: [PATCH 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 TX Device Tree bindings

2017-09-22 Thread Maxime Ripard
Hi Sakari, On Fri, Sep 22, 2017 at 12:01:06PM +, Sakari Ailus wrote: > On Fri, Sep 22, 2017 at 01:47:02PM +0200, Maxime Ripard wrote: > > The Cadence MIPI-CSI2 RX controller is a CSI2 bridge that supports up to 4 > > Should this be TX? > > I was just thinking what does this chip do, and saw

Re: [PATCH v4 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 RX Device Tree bindings

2017-09-22 Thread Maxime Ripard
Hi Sakari, On Fri, Sep 22, 2017 at 11:35:23AM +, Sakari Ailus wrote: > Hi Maxime, > > On Fri, Sep 22, 2017 at 12:08:22PM +0200, Maxime Ripard wrote: > > The Cadence MIPI-CSI2 RX controller is a CSI2RX bridge that supports up to > > 4 CSI-2 lanes, and can route the frames to up to 4 streams,

[PATCH] [media] stk-webcam: Fix use after free on disconnect

2017-09-22 Thread Dan Carpenter
We free the stk_camera device too early. It's allocate first in probe and it should be freed last in stk_camera_disconnect(). Reported-by: Andrey Konovalov Signed-off-by: Dan Carpenter --- Not tested but these bug reports seem surprisingly

Re: [PATCH v3 2/4] [media] dt-bindings: Document BCM283x CSI2/CCP2 receiver

2017-09-22 Thread Dave Stevenson
Hi Stefan On 22 September 2017 at 07:45, Stefan Wahren wrote: > Hi Dave, > >> Dave Stevenson hat am 20. September 2017 um >> 18:07 geschrieben: >> >> >> Document the DT bindings for the CSI2/CCP2 receiver peripheral >> (known as Unicam)

Re: [PATCH 2/2] v4l: cadence: Add Cadence MIPI-CSI2 TX driver

2017-09-22 Thread Maxime Ripard
Hi Sakari, I'll address the minor comments you had and that I stripped. On Fri, Sep 22, 2017 at 12:38:49PM +, Sakari Ailus wrote: > > + /* > > +* Create a static mapping between the CSI virtual channels > > +* and the input streams. > > Which virtual channel is used here? Like I

Re: [PATCH v2 0/4] BCM283x Camera Receiver driver

2017-09-22 Thread Dave Stevenson
On 22 September 2017 at 12:00, Hans Verkuil wrote: > On 13/09/17 17:49, Dave Stevenson wrote: >> OV5647 >> >> v4l2-compliance SHA : f6ecbc90656815d91dc6ba90aac0ad8193a14b38 >> >> Driver Info: >> Driver name : unicam >> Card type : unicam >> Bus info :

[PATCH] [media] sn9c20x: Use common error handling code in sd_init()

2017-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 22 Sep 2017 17:45:33 +0200 Add jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

Re: [PATCH v3 2/4] [media] dt-bindings: Document BCM283x CSI2/CCP2 receiver

2017-09-22 Thread Eric Anholt
Dave Stevenson writes: > Hi Stefan > > On 22 September 2017 at 07:45, Stefan Wahren wrote: >> Hi Dave, >> >>> Dave Stevenson hat am 20. September 2017 >>> um 18:07 geschrieben: >>> >>> >>> Document the DT

[PATCH] [media] spca500: Use common error handling code in spca500_synch310()

2017-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 22 Sep 2017 18:45:07 +0200 Adjust a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

Re: [PATCH] [media] spca500: Use common error handling code in spca500_synch310()

2017-09-22 Thread Julia Lawall
On Fri, 22 Sep 2017, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 22 Sep 2017 18:45:07 +0200 > > Adjust a jump target so that a bit of exception handling can be better > reused at the end of this function. > > This issue was detected by using the

Re: [PATCH v2 0/4] BCM283x Camera Receiver driver

2017-09-22 Thread Hans Verkuil
On 22/09/17 18:31, Dave Stevenson wrote: > On 22 September 2017 at 12:00, Hans Verkuil wrote: >> On 13/09/17 17:49, Dave Stevenson wrote: >>> OV5647 >>> >>> v4l2-compliance SHA : f6ecbc90656815d91dc6ba90aac0ad8193a14b38 >>> >>> Driver Info: >>> Driver name : unicam >>>

Re: [media] spca500: Use common error handling code in spca500_synch310()

2017-09-22 Thread Julia Lawall
On Fri, 22 Sep 2017, SF Markus Elfring wrote: > >>return 0; > >> -error: > >> + > >> +report_failure: > >> + PERR("Set packet size: set interface error"); > >>return -EBUSY; > >> } > > > > Why change the label name? > > I find the suggested variant a bi better. > > > > They are both

Re: [media] spca500: Use common error handling code in spca500_synch310()

2017-09-22 Thread SF Markus Elfring
>> return 0; >> -error: >> + >> +report_failure: >> +PERR("Set packet size: set interface error"); >> return -EBUSY; >> } > > Why change the label name? I find the suggested variant a bi better. > They are both equally uninformative. Which identifier would you find appropriate

Re: [PATCH v3 2/4] [media] dt-bindings: Document BCM283x CSI2/CCP2 receiver

2017-09-22 Thread Stefan Wahren
Hi Dave, > Dave Stevenson hat am 22. September 2017 um > 18:07 geschrieben: > > > Hi Stefan > > On 22 September 2017 at 07:45, Stefan Wahren wrote: > > Hi Dave, > > > >> Dave Stevenson hat am 20.

Re: [media] spca500: Use common error handling code in spca500_synch310()

2017-09-22 Thread SF Markus Elfring
>>> They are both equally uninformative. >> >> Which identifier would you find appropriate there? > > error was fine. How do the different views fit together? Regards, Markus

[PATCH] gspca: Convert PERR to gspca_err

2017-09-22 Thread Joe Perches
Use a more typical kernel logging style. The current macro hides the gspca_dev argument so add it to the macro uses instead. Miscellanea: o Add missing '\n' terminations to formats o Realign arguments to open parenthesis Signed-off-by: Joe Perches ---

Re: [media] spca500: Use common error handling code in spca500_synch310()

2017-09-22 Thread Joe Perches
On Fri, 2017-09-22 at 19:46 +0200, SF Markus Elfring wrote: > > > > They are both equally uninformative. > > > > > > Which identifier would you find appropriate there? > > > > error was fine. > > How do the different views fit together? Markus, please respect what others tell you because your

Re: [media] spca500: Use common error handling code in spca500_synch310()

2017-09-22 Thread Daniele Nicolodi
On 9/22/17 11:46 AM, SF Markus Elfring wrote: They are both equally uninformative. >>> >>> Which identifier would you find appropriate there? >> >> error was fine. > > How do the different views fit together? You want to change something. Changing something requires to spend energy. You