Re: [PATCH 2/3] [media] tc358743: Increase FIFO level to 300.

2017-09-20 Thread Sakari Ailus
Hi Hans, On Wed, Sep 20, 2017 at 03:12:03PM +0200, Hans Verkuil wrote: > On 09/20/17 14:50, Sakari Ailus wrote: > > Hi Hans and others, > > > > On Wed, Sep 20, 2017 at 01:24:02PM +0200, Hans Verkuil wrote: > >> On 09/20/17 13:00, Dave Stevenson wrote: > >>> On 20 September 2017 at 11:23, Philipp

cron job: media_tree daily build: WARNINGS

2017-09-20 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: Thu Sep 21 05:00:15 CEST 2017 media-tree git hash:1efdf1776e2253b77413c997bed862410e4b6aaf media_build gi

Re: [PATCH] media: dvb_ca_en50221: sanity check slot number from userspace

2017-09-20 Thread Dan Carpenter
Looks good. Reviewed-by: Dan Carpenter regards, dan carpenter

[PATCH v2 17/31] media/i2c/tc358743: Initialize timer

2017-09-20 Thread Kees Cook
This converts to use setup_timer() to set callback and data, though it doesn't look like this would have worked with timer checking enabled since no init_timer() was ever called before. Cc: Mats Randgaard Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Kees Cook --- dr

Re: [PATCH 2/5] [media] s2255drv: Adjust 13 checks for null pointers

2017-09-20 Thread Dan Carpenter
On Wed, Sep 20, 2017 at 06:58:56PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 20 Sep 2017 16:46:19 +0200 > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > You've been told several times that this stuff doesn't work. Try ap

[PATCH] media: dvb_ca_en50221: sanity check slot number from userspace

2017-09-20 Thread Colin King
From: Colin Ian King Currently a user can pass in an unsanitized slot number which will lead to and out of range index into ca->slot_info. Fix this by checking that the slot number is no more than the allowed maximum number of slots. Seems that this bug has been in the driver forever. Detected b

Re: [PATCH 01/25] media: dvb_frontend: better document the -EPERM condition

2017-09-20 Thread Shuah Khan
On 09/20/2017 01:11 PM, Mauro Carvalho Chehab wrote: > Two readonly ioctls can't be allowed if the frontend device > is opened in read only mode. Explain why. > > Signed-off-by: Mauro Carvalho Chehab > --- > drivers/media/dvb-core/dvb_frontend.c | 20 +--- > 1 file changed, 17 in

Re: usb/media/pvrusb2: warning in pvr2_send_request_ex/usb_submit_urb

2017-09-20 Thread Andrey Konovalov
On Wed, Sep 20, 2017 at 9:33 PM, Mike Isely wrote: Hi Mike! > > What you have here is way beyond just feeding random crap in via the > syscall interface. To cause this you have to fake the presence of a > pvrusb2 compatible *hardware* USB device and then lie about its endpoint > configuration.

Re: [PATCH 2/6] media: dvb_frontend: cleanup ioctl handling logic

2017-09-20 Thread Mauro Carvalho Chehab
Em Wed, 20 Sep 2017 14:58:12 -0600 Shuah Khan escreveu: > > + c->state = DTV_UNDEFINED;> +err = dvb_frontend_handle_ioctl(file, > > cmd, parg); > > With this change, c->state value gets changed unconditionally before > calling the ioctl. > > dvb_frontend_ioctl_properties() has logic fo

Re: [PATCH 5/6] media: dvb_frontend: better document the -EPERM condition

2017-09-20 Thread Shuah Khan
On 09/19/2017 07:42 AM, Mauro Carvalho Chehab wrote: > Two readonly ioctls can't be allowed if the frontend device > is opened in read only mode. Explain why. > > Signed-off-by: Mauro Carvalho Chehab > --- > drivers/media/dvb-core/dvb_frontend.c | 20 +--- > 1 file changed, 17 in

Re: [PATCH 3/6] media: dvb_frontend: get rid of proprierty cache's state

2017-09-20 Thread Shuah Khan
On 09/19/2017 07:42 AM, Mauro Carvalho Chehab wrote: > In the past, I guess the idea was to use state in order to > allow an autofush logic. However, in the current code, it is > used only for debug messages, on a poor man's solution, as > there's already a debug message to indicate when the proper

Re: [PATCH 2/6] media: dvb_frontend: cleanup ioctl handling logic

2017-09-20 Thread Shuah Khan
H Mauro, On 09/19/2017 07:42 AM, Mauro Carvalho Chehab wrote: > Currently, there are two handlers for ioctls: > - dvb_frontend_ioctl_properties() > - dvb_frontend_ioctl_legacy() > > Despite their names, both handles non-legacy DVB ioctls. > > Besides that, there's no reason why to not handle a

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

2017-09-20 Thread Pierre-Louis Bossart
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, e.g. with audio machine drivers enabling the MCLK for external codecs Fixes: a49d25364dfb ("staging/a

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

2017-09-20 Thread Rob Herring
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 Machek wrote: > >>> Hi! > >>> > Specify th

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

2017-09-20 Thread Rob Herring
On Mon, Sep 18, 2017 at 11:25:05AM +0300, Sakari Ailus wrote: > 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 value

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

2017-09-20 Thread Rob Herring
On Mon, Sep 18, 2017 at 11:25:04AM +0300, Sakari Ailus wrote: > A lot of devices do not need and do not document port or endpoint > numbering at all, e.g. in case where there's just a single port and a > single endpoint. Whereas this is just common sense, document it to make it > explicit. > > Sig

Re: [PATCH 1/6] media: dvb_frontend: cleanup dvb_frontend_ioctl_properties()

2017-09-20 Thread Mauro Carvalho Chehab
Em Wed, 20 Sep 2017 14:11:39 -0600 Shuah Khan escreveu: > On 09/19/2017 07:42 AM, Mauro Carvalho Chehab wrote: > > Use a switch() on this function, just like on other ioctl > > handlers and handle parameters inside each part of the > > switch. > > > > That makes it easier to integrate with the a

Re: [PATCH 1/6] media: dvb_frontend: cleanup dvb_frontend_ioctl_properties()

2017-09-20 Thread Shuah Khan
On 09/19/2017 07:42 AM, Mauro Carvalho Chehab wrote: > Use a switch() on this function, just like on other ioctl > handlers and handle parameters inside each part of the > switch. > > That makes it easier to integrate with the already existing > ioctl handler function. > > Signed-off-by: Mauro Ca

[RESEND RFC PATCH 7/7] ARM: sun8i: h3: Enable HDMI output on H3 boards

2017-09-20 Thread Jernej Skrabec
Enable HDMI output on all boards which include HDMI connector. Signed-off-by: Jernej Skrabec --- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 33 + arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 33 + arch/arm/boot/dts/sun8i-h3-nanopi-m1.dt

[RESEND RFC PATCH 4/7] dt-bindings: Document Allwinner DWC HDMI TX node

2017-09-20 Thread Jernej Skrabec
Add documentation about Allwinner DWC HDMI TX node, found in H3 SoC. Signed-off-by: Jernej Skrabec --- .../bindings/display/sunxi/sun4i-drm.txt | 158 - 1 file changed, 157 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/sunxi/su

[RESEND RFC PATCH 3/7] clk: sunxi: Add CLK_SET_RATE_PARENT flag for H3 HDMI clock

2017-09-20 Thread Jernej Skrabec
When setting the HDMI clock of H3, the PLL_VIDEO clock needs to be set. Add CLK_SET_RATE_PARENT flag for H3 HDMI clock. Signed-off-by: Jernej Skrabec Signed-off-by: Icenowy Zheng --- drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[RESEND RFC PATCH 5/7] drm: sun4i: Add a glue for the DesignWare HDMI controller in H3

2017-09-20 Thread Jernej Skrabec
Allwinner H3 features DesignWare HDMI Transmitter paired with custom PHY. Add a glue driver for it. For now, only video and CEC are supported. Audio will be supported at a later time. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/Kconfig | 9 + drivers/gpu/drm/sun4i/Makefil

[RESEND RFC PATCH 2/7] drm: bridge: Enable workaround in dw_hdmi for v1.32a

2017-09-20 Thread Jernej Skrabec
Allwinner SoCs have dw hdmi controller v1.32a which exhibits same magenta line issue as i.MX6Q and i.MX6DL. Enable workaround for it. Allwinner never released any kind of dw hdmi or errata documentation, so it is not clear how many iterations need to be executed. One iteration seems to be enough.

[RESEND RFC PATCH 0/7] sun8i H3 HDMI glue driver for DW HDMI

2017-09-20 Thread Jernej Skrabec
[added media mailing list due to CEC question] This patch series adds a HDMI glue driver for Allwinner H3 SoC. For now, only video and CEC functionality is supported. Audio needs more tweaks. Series is based on the H3 DE2 patch series available on mailing list: http://lists.infradead.org/pipermai

[RESEND RFC PATCH 1/7] drm: bridge: Enable polling hpd event in dw_hdmi

2017-09-20 Thread Jernej Skrabec
Some custom phys don't support hpd interrupts. Add support for polling such events. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/br

[RESEND RFC PATCH 6/7] ARM: sun8i: h3: Add DesignWare HDMI controller node

2017-09-20 Thread Jernej Skrabec
From: Icenowy Zheng The H3 SoC has a DesignWare HDMI controller with some Allwinner-specific glue and custom PHY. Since H3 and H5 have same HDMI controller, add related device node in shared dtsi file. Signed-off-by: Icenowy Zheng Signed-off-by: Jernej Skrabec --- arch/arm/boot/dts/sun8i-h3.

Re: [RFC PATCH v5 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Mauro Carvalho Chehab
Em Wed, 20 Sep 2017 20:59:53 +0200 Wolfram Sang escreveu: > Signed-off-by: Wolfram Sang Documentation looks OK on my eyes. So: Reviewed-by: Mauro Carvalho Chehab > --- > Documentation/i2c/DMA-considerations | 58 > > 1 file changed, 58 insertions(+) >

Re: usb/media/pvrusb2: warning in pvr2_send_request_ex/usb_submit_urb

2017-09-20 Thread Mike Isely
What you have here is way beyond just feeding random crap in via the syscall interface. To cause this you have to fake the presence of a pvrusb2 compatible *hardware* USB device and then lie about its endpoint configuration. Is that really a concern here? Are we now saying that any kernel d

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

2017-09-20 Thread Andy Shevchenko
On Wed, 2017-09-20 at 12:01 -0500, Pierre-Louis Bossart wrote: > > On 09/20/2017 04:12 AM, Andy Shevchenko wrote: > > On Tue, 2017-09-19 at 15:45 -0500, Pierre-Louis Bossart wrote: > > > The Atom ISP driver initializes and configures PMC clocks which > > > are > > > already handled by the clock fr

usb/media/pvrusb2: warning in pvr2_send_request_ex/usb_submit_urb

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). There seems to be no check on endpoint type before submitting bulk urb in pvr2_send_request_ex(). usb 1-1: New USB device found, idVendor=2040, idProduct=7500

[PATCH 3/3] [media] dvb-ttusb-budget: Adjust eight checks for null pointers

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 20:53:13 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code pla

[PATCH 2/3] [media] dvb-ttusb-budget: Improve two size determinations in ttusb_probe()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 20:46:11 +0200 * The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix an affected source code place. * Replace the specification of data structures by variable references a

[PATCH 15/25] media: dvb_demux: fix type of dvb_demux_feed.ts_type

2017-09-20 Thread Mauro Carvalho Chehab
Just like pes_type, this field represents an enum. Properly identify it as such. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-core/dvb_demux.h b/drivers/media/dvb-core/dvb_demux.

[PATCH 21/25] scripts: kernel-doc: fix nexted handling

2017-09-20 Thread Mauro Carvalho Chehab
At DVB, we have, at some structs, things like (see struct dvb_demux_feed, at dvb_demux.h): union { struct dmx_ts_feed ts; struct dmx_section_feed sec; } feed; union { dmx_ts_cb ts; dmx_section_cb sec;

[PATCH 09/25] media: dvb_demux.h: add an enum for DMX_TYPE_* and document

2017-09-20 Thread Mauro Carvalho Chehab
kernel-doc allows documenting enums. Also, it makes clearer about the meaning of each field on structures. So, convert DMX_TYPE_* to an enum. While here, get rid of the unused DMX_TYPE_PES. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.h | 17 - 1 fi

[PATCH 1/3] [media] dvb-ttusb-budget: Use common error handling code in ttusb_probe()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 20:25:24 +0200 Add two 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 --- drivers/media/usb/ttusb-budget/dvb-

[PATCH 18/25] media: dvb_frontend: get rid of dtv_get_property_dump()

2017-09-20 Thread Mauro Carvalho Chehab
Simplify the get property handling and move it to the existing code at dtv_property_process_get() directly. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_frontend.c | 43 ++- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/dri

[PATCH 19/25] media: dvb_demux.h: document structs defined on it

2017-09-20 Thread Mauro Carvalho Chehab
There are three structs defined inside dvb_demux.h. None of them are currently documented. Add documentation for them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.c | 1 + drivers/media/dvb-core/dvb_demux.h | 58 -- 2 files chan

[PATCH 12/25] media: dvb_demux: mark a boolean field as such

2017-09-20 Thread Mauro Carvalho Chehab
The struct dvb_demux_filter.doneq is a boolean. Mark it as such, as it helps to understand what it does. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.c | 4 ++-- drivers/media/dvb-core/dvb_demux.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 00/25] DVB cleanups and documentation improvements

2017-09-20 Thread Mauro Carvalho Chehab
This patch series comes after a previous patchset with DVB fixes. both series are there at: https://git.linuxtv.org/mchehab/experimental.git/log/?h=dvb-fixes-v3 It is mainly focused on improving the DVB kAPI documentation, making it (finally!) in sync with the current implementation. It also c

[PATCH 11/25] media: dvb_demux.h: get rid of unused timer at struct dvb_demux_filter

2017-09-20 Thread Mauro Carvalho Chehab
This field is not used. So, get rid of it. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/dvb-core/dvb_demux.h b/drivers/media/dvb-core/dvb_demux.h index b24d69b5a20f..045f7fd1a8b1 100644 --- a/drivers

[PATCH 06/25] media: dtv-core.rst: add chapters and introductory tests for common parts

2017-09-20 Thread Mauro Carvalho Chehab
Better document the DVB common parts by adding two sections and an introductory text for each. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/kapi/dtv-core.rst | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/media/kapi/dtv-core.rst b/Documentation/m

[PATCH 23/25] media: dtv-demux.rst: parse other demux headers with kernel-doc

2017-09-20 Thread Mauro Carvalho Chehab
Now that we have kernel-doc markups at dvb_demux.h and dmxdev.h, parse them. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/kapi/dtv-demux.rst | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Documentation/media/kapi/dtv-demux.rst b/Documentation

[PATCH 01/25] media: dvb_frontend: better document the -EPERM condition

2017-09-20 Thread Mauro Carvalho Chehab
Two readonly ioctls can't be allowed if the frontend device is opened in read only mode. Explain why. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_frontend.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-core/dv

[PATCH 22/25] media: dmxdev.h: add kernel-doc markups for data types and functions

2017-09-20 Thread Mauro Carvalho Chehab
Despite being used by DVB drivers, this header was not documented. Document it. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dmxdev.h | 90 - 1 file changed, 88 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-core/dmxdev.h

[PATCH 04/25] media: dvbdev: fully document its functions

2017-09-20 Thread Mauro Carvalho Chehab
There are several functions at the dvbdev that are common to all digital TV device nodes with aren't documented. Add documentation for them. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvbdev.h | 86 + 1 file cha

[PATCH 16/25] media: dvb_demux: document dvb_demux_filter and dvb_demux_feed

2017-09-20 Thread Mauro Carvalho Chehab
Document those two structs using kernel-doc markups. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.h | 49 -- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-core/dvb_demux.h b/drivers/media/dvb-cor

[PATCH 17/25] media: dvb_frontend: dtv_property_process_set() cleanups

2017-09-20 Thread Mauro Carvalho Chehab
From: Satendra Singh Thakur Since all properties in the func dtv_property_process_set() use at most 4 bytes arguments, change the code to pass u32 cmd and u32 data as function arguments, instead of passing a pointer to the entire struct dtv_property *tvp. Instead of having a generic dtv_property

[PATCH 14/25] media: dvb_demux.h: get rid of DMX_FEED_ENTRY() macro

2017-09-20 Thread Mauro Carvalho Chehab
This isn't used anywere. Get rid of it. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/dvb-core/dvb_demux.h b/drivers/media/dvb-core/dvb_demux.h index 9db3c2b7c64e..d9b30d669bf3 100644 --- a/drivers/

[PATCH 03/25] media: dvbdev: convert DVB device types into an enum

2017-09-20 Thread Mauro Carvalho Chehab
Enums can be documented via kernel-doc. So, convert the DVB_DEVICE_* macros to an enum. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvbdev.c | 34 +++ drivers/media/dvb-core/dvbdev.h | 51 - 2 files changed, 64 i

[PATCH 24/25] media: dvb-net.rst: document DVB network kAPI interface

2017-09-20 Thread Mauro Carvalho Chehab
That's the last DVB kAPI that misses documentation. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/kapi/dtv-core.rst | 1 + Documentation/media/kapi/dtv-net.rst | 4 drivers/media/dvb-core/dvb_net.h | 34 -- 3 files changed, 37 insertion

[PATCH 25/25] media: dvb uAPI docs: get rid of examples section

2017-09-20 Thread Mauro Carvalho Chehab
That section is too outdated and got superseded by DVBv5 and by libdvbv5. Maybe some day we'll end adding updated examples there, but while nobody has time or interest of doing that, just mention that there and get rid of the current examples for good. Signed-off-by: Mauro Carvalho Chehab --- D

[PATCH 08/25] media: dtv-demux.rst: minor markup improvements

2017-09-20 Thread Mauro Carvalho Chehab
Add a cross-reference to a mentioned structure and split the kernel-doc stuff on a separate chapter. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/kapi/dtv-demux.rst | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/media/kapi/dtv-demux.

[PATCH 07/25] media: dtv-core.rst: split into multiple files

2017-09-20 Thread Mauro Carvalho Chehab
Instead of document all kAPI into a single file, split it on multiple ones. That makes easier to maintain each part. As a side effect, it will produce multiple html pages, with is a good idea. No changes at the text. Just some chapter levels changed. Signed-off-by: Mauro Carvalho Chehab --- Do

[PATCH 05/25] media: dvb_frontend.h: improve kernel-doc markups

2017-09-20 Thread Mauro Carvalho Chehab
Several minor adjustments at the kernel-doc markups: - some syntax fixes; - some cross-references; - add cross-references for the mentioned ioctls; - some constants marked as such. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_frontend.h | 94 ++

[PATCH 20/25] media: dvb_demux.h: document functions

2017-09-20 Thread Mauro Carvalho Chehab
The functions used on dvb_demux.h are largely used on DVB drivers. Yet, none of them are documented. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.h | 106 +++-- 1 file changed, 103 insertions(+), 3 deletions(-)

[PATCH 02/25] media: dvb_frontend: fix return values for FE_SET_PROPERTY

2017-09-20 Thread Mauro Carvalho Chehab
There are several problems with regards to the return of FE_SET_PROPERTY. The original idea were to return per-property return codes via tvp->result field, and to return an updated set of values. However, that never worked. What's actually implemented is: - the FE_SET_PROPERTY implementation does

[PATCH 10/25] media: dvb_demux.h: add an enum for DMX_STATE_* and document

2017-09-20 Thread Mauro Carvalho Chehab
kernel-doc allows documenting enums. Also, it makes clearer about the meaning of each field on structures. So, convert DMX_STATE_* to an enum. While here, get rid of the unused DMX_STATE_SET. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.h | 25 ++---

[PATCH 13/25] media: dvb_demux: dvb_demux_feed.pusi_seen is boolean

2017-09-20 Thread Mauro Carvalho Chehab
Instead of using an integer to represent it, use boolean, as this better describes what this field really means. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.c| 12 ++-- drivers/media/dvb-core/dvb_demux.h| 2 +- drivers/media/pci/ttpci/av7110.c

[PATCH 0/3] [media] TTUSB DVB Budget: Fine-tuning for three function implementations

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 21:03:45 +0200 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use common error handling code in ttusb_probe() Improve two size determinations in ttusb_probe() Adjust eight checks for null po

usb/media/smsusb: null-ptr-deref in smsusb_init_device

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). The null-ptr-deref happens on dev->udev->ep_in[1]->desc.wMaxPacketSize. There seems to be no check on the number of endpoints. usb 1-1: New USB device found, i

[RFC PATCH v5 2/6] i2c: add helpers to ease DMA handling

2017-09-20 Thread Wolfram Sang
One helper checks if DMA is suitable and optionally creates a bounce buffer, if not. The other function returns the bounce buffer and makes sure the data is properly copied back to the message. Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-core-base.c | 45 +

[RFC PATCH v5 0/6] i2c: document DMA handling and add helpers for it

2017-09-20 Thread Wolfram Sang
So, after revisiting old mail threads, taking part in a similar discussion on the USB list, and implementing a not-convincing solution before, here is what I cooked up to document and ease DMA handling for I2C within Linux. Please have a look at the documentation introduced in patch 3 for details.

[RFC PATCH v5 4/6] i2c: sh_mobile: use helper to decide if DMA is useful

2017-09-20 Thread Wolfram Sang
This ensures that we fall back to PIO if the message length is too small for DMA being useful. Otherwise, we use DMA. A bounce buffer might be applied by the helper if the original message buffer is not DMA safe. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-sh_mobile.c | 8 ++-- 1

[RFC PATCH v5 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- Documentation/i2c/DMA-considerations | 58 1 file changed, 58 insertions(+) create mode 100644 Documentation/i2c/DMA-considerations diff --git a/Documentation/i2c/DMA-considerations b/Documentation/i2c/DMA-considerations new

[RFC PATCH v5 1/6] i2c: add a message flag for DMA safe buffers

2017-09-20 Thread Wolfram Sang
I2C has no requirement that the buffer of a message needs to be DMA safe. In case it is, it can now be flagged, so drivers wishing to do DMA can use the buffer directly. Signed-off-by: Wolfram Sang --- include/uapi/linux/i2c.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/l

[RFC PATCH v5 5/6] i2c: rcar: skip DMA if buffer is not safe

2017-09-20 Thread Wolfram Sang
This HW is prone to races, so it needs to setup new messages in irq context. That means we can't alloc bounce buffers if a message buffer is not DMA safe. So, in that case, simply fall back to PIO. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-rcar.c | 2 +- 1 file changed, 1 insertion(

[RFC PATCH v5 6/6] i2c: dev: mark RDWR buffers as DMA_SAFE

2017-09-20 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 6f638bbc922db4..bbc7aadb4c899d 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -280,6 +280,8 @@ static noinline int i2c

usb/media/cx231xx: null-ptr-deref in cx231xx_usb_probe

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). The null-ptr-deref happens on assoc_desc->bFirstInterface, where assoc_desc = udev->actconfig->intf_assoc[0]. There seems to be no check that the device actuall

Re: [RFC PATCH v4 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Wolfram Sang
> In order to avoid that, and to place them into a box using monotonic fonts, > I usually add "::" at the preceding line, e. g.: Just in time: I added the '::' and will resubmit the new version in a minute. Thanks for the pointers! signature.asc Description: PGP signature

Re: [RFC PATCH v4 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Mauro Carvalho Chehab
Em Wed, 20 Sep 2017 19:18:40 +0200 Wolfram Sang escreveu: > Hi Mauro, > > > > +Linux I2C and DMA > > > +- > > > > I would use, instead: > > > > = > > Linux I2C and DMA > > = > > > > As this is the way we're starting document titles, after conv

Re: [PATCH] dma-fence: fix dma_fence_get_rcu_safe

2017-09-20 Thread Daniel Vetter
On Mon, Sep 11, 2017 at 01:06:32PM +0200, Christian König wrote: > Am 11.09.2017 um 12:01 schrieb Chris Wilson: > > [SNIP] > > > Yeah, but that is illegal with a fence objects. > > > > > > When anybody allocates fences this way it breaks at least > > > reservation_object_get_fences_rcu(), > > > res

Re: A patch slipped through the cracks?

2017-09-20 Thread Mauro Carvalho Chehab
Em Wed, 20 Sep 2017 19:17:17 +0200 Lubomir Rintel escreveu: > Hi, > > we're trying to get this reasonably trivial patch [1] applied for more > than a year and four attempts now. (I'm not including it in this > message so that this message won't be ignored for the same reason the > submissions we

Re: [RFC PATCH v4 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Wolfram Sang
Hi Mauro, > > +Linux I2C and DMA > > +- > > I would use, instead: > > = > Linux I2C and DMA > = > > As this is the way we're starting document titles, after converted to > ReST. So, better to have it already using the right format, as one day I d

Re: [media] Siano: Use common error handling code in smsusb_init_device()

2017-09-20 Thread SF Markus Elfring
> If smscore_register_device() succeeds then mdev is freed when we call > smsusb_term_device(intf); The call tree is: Thanks for your constructive information. How do you think about another implementation detail in this function then? May the statement “kfree(mdev);” be executed before “smsus

A patch slipped through the cracks?

2017-09-20 Thread Lubomir Rintel
Hi, we're trying to get this reasonably trivial patch [1] applied for more than a year and four attempts now. (I'm not including it in this message so that this message won't be ignored for the same reason the submissions were, whatever they are.) [1] https://patchwork.linuxtv.org/patch/40862/ I

[PATCH 5/5] [media] s2255drv: Delete an unnecessary return statement in five functions

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 17:50:36 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected functions. Signed-off-by: Markus Elfring --- driver

[PATCH 4/5] [media] s2255drv: Use common error handling code in read_pipe_completion()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 17:45:13 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring --- drivers/media/usb/s2255/s2255drv.c | 17 + 1 file changed, 9 insertions(+), 8 del

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

2017-09-20 Thread Pierre-Louis Bossart
On 09/20/2017 04:12 AM, Andy Shevchenko wrote: On Tue, 2017-09-19 at 15:45 -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 avoi

[PATCH 3/5] [media] s2255drv: Improve two size determinations in s2255_probe()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 16:56:20 +0200 Replace the specification of data structures by variable references as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus

[PATCH 2/5] [media] s2255drv: Adjust 13 checks for null pointers

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 16:46:19 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus fix the affected source code pl

[PATCH 1/5] [media] s2255drv: Delete three error messages for a failed memory allocation in s2255_probe()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 16:30:13 +0200 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/media/usb/s2255/s2255drv.c | 13 - 1 file changed, 4

[PATCH 0/5] [media] s2255drv: Fine-tuning for some function implementations

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 18:18:28 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (5): Delete three error messages for a failed memory allocation in s2255_probe() Adjust 13 checks for null pointers Improve two size

[PATCH] scripts: kernel-doc: fix nexted handling

2017-09-20 Thread Mauro Carvalho Chehab
At DVB, we have, at some structs, things like (see struct dvb_demux_feed, at dvb_demux.h): union { struct dmx_ts_feed ts; struct dmx_section_feed sec; } feed; union { dmx_ts_cb ts; dmx_section_cb sec;

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

2017-09-20 Thread Dave Stevenson
Add driver for the Unicam camera receiver block on BCM283x processors. Signed-off-by: Dave Stevenson --- Changes from v2. - Don't store the irq value as it isn't used outside the probe. - Change PIX_FMT_ALL_ defines to avoid potential clashes with 4CCs. - Clock now called "lp" and not "lp_clock"

[PATCH v3 4/4] MAINTAINERS: Add entry for BCM2835 camera driver

2017-09-20 Thread Dave Stevenson
Signed-off-by: Dave Stevenson --- No changes from v2 to v3 MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index eb930eb..b47ddaa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2713,6 +2713,13 @@ S: Maintained N: bcm2835 F: driver

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

2017-09-20 Thread Dave Stevenson
Document the DT bindings for the CSI2/CCP2 receiver peripheral (known as Unicam) on BCM283x SoCs. Signed-off-by: Dave Stevenson --- Changes since v2 - Removed all references to Linux drivers. - Reworded section about disabling the firmware driver. - Renamed clock from "lp_clock" to "lp" in descr

[PATCH v3 0/4] BCM283x Camera Receiver driver

2017-09-20 Thread Dave Stevenson
Hi All. v3 of this patch set. This addresses the DT issues raised by Rob, and the things raised by Eric on the driver. More complete change details between v2 and v3 are in the individual patches. Thanks Dave Dave Stevenson (4): [media] v4l2-common: Add helper function for fourcc to string

[PATCH v3 1/4] [media] v4l2-common: Add helper function for fourcc to string

2017-09-20 Thread Dave Stevenson
New helper function char *v4l2_fourcc2s(u32 fourcc, char *buf) that converts a fourcc into a nice printable version. Signed-off-by: Dave Stevenson --- No changes from v2 to v3 drivers/media/v4l2-core/v4l2-common.c | 18 ++ include/media/v4l2-common.h | 3 +++ 2 files

Re: [PATCH v13 11/25] v4l: async: Introduce helpers for calling async ops callbacks

2017-09-20 Thread Sakari Ailus
Hi Laurent, On Tue, Sep 19, 2017 at 07:27:17PM +0300, Laurent Pinchart wrote: > Hi Sakari, > > On Tuesday, 19 September 2017 17:50:49 EEST Sakari Ailus wrote: > > On Tue, Sep 19, 2017 at 03:43:48PM +0300, Laurent Pinchart wrote: > > > On Tuesday, 19 September 2017 15:13:11 EEST Sakari Ailus wrote

Re: [PATCH v13 06/25] omap3isp: Use generic parser for parsing fwnode endpoints

2017-09-20 Thread Sakari Ailus
Hi Laurent, On Tue, Sep 19, 2017 at 03:46:18PM +0300, Laurent Pinchart wrote: > Hi Sakari, > > On Tuesday, 19 September 2017 15:43:26 EEST Sakari Ailus wrote: > > On Tue, Sep 19, 2017 at 02:40:29PM +0300, Laurent Pinchart wrote: > > > > @@ -2256,7 +2210,9 @@ static int isp_probe(struct platform_d

Re: [PATCH] [media] Siano: Use common error handling code in smsusb_init_device()

2017-09-20 Thread Dan Carpenter
On Wed, Sep 20, 2017 at 02:40:28PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 20 Sep 2017 14:30:55 +0200 > > Add a jump target so that a bit of exception handling can be better > reused at the end of this function. > > This refactoring might fix also an error situation w

Re: [PATCH 2/3] [media] tc358743: Increase FIFO level to 300.

2017-09-20 Thread Hans Verkuil
On 09/20/17 14:50, Sakari Ailus wrote: > Hi Hans and others, > > On Wed, Sep 20, 2017 at 01:24:02PM +0200, Hans Verkuil wrote: >> On 09/20/17 13:00, Dave Stevenson wrote: >>> On 20 September 2017 at 11:23, Philipp Zabel wrote: Hi, On Wed, 2017-09-20 at 10:14 +0100, Dave Stevenson w

Re: [PATCH 2/3] [media] tc358743: Increase FIFO level to 300.

2017-09-20 Thread Sakari Ailus
Hi Hans and others, On Wed, Sep 20, 2017 at 01:24:02PM +0200, Hans Verkuil wrote: > On 09/20/17 13:00, Dave Stevenson wrote: > > On 20 September 2017 at 11:23, Philipp Zabel wrote: > >> Hi, > >> > >> On Wed, 2017-09-20 at 10:14 +0100, Dave Stevenson wrote: > >>> Hi Mauro & Philipp > >>> > >>> On

[PATCH] [media] Siano: Use common error handling code in smsusb_init_device()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 14:30:55 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This refactoring might fix also an error situation where the function "kfree" was not called after a software failure was noticed in

Re: [PATCH 2/3] [media] tc358743: Increase FIFO level to 300.

2017-09-20 Thread Hans Verkuil
On 09/20/17 14:23, Dave Stevenson wrote: > On 20 September 2017 at 12:24, Hans Verkuil wrote: >> On 09/20/17 13:00, Dave Stevenson wrote: >>> On 20 September 2017 at 11:23, Philipp Zabel wrote: Hi, On Wed, 2017-09-20 at 10:14 +0100, Dave Stevenson wrote: > Hi Mauro & Philipp >>

Re: [PATCH 2/3] [media] tc358743: Increase FIFO level to 300.

2017-09-20 Thread Philipp Zabel
On Wed, 2017-09-20 at 13:24 +0200, Hans Verkuil wrote: > On 09/20/17 13:00, Dave Stevenson wrote: [...] > > It is communicated over the subdevice API - tc358743_g_mbus_config > > reports back the appropriate number of lanes to the receiver > > subdevice. > > A suitable v4l2_subdev_has_op(dev->senso

Re: [PATCH 2/3] [media] tc358743: Increase FIFO level to 300.

2017-09-20 Thread Dave Stevenson
On 20 September 2017 at 12:24, Hans Verkuil wrote: > On 09/20/17 13:00, Dave Stevenson wrote: >> On 20 September 2017 at 11:23, Philipp Zabel wrote: >>> Hi, >>> >>> On Wed, 2017-09-20 at 10:14 +0100, Dave Stevenson wrote: Hi Mauro & Philipp On 19 September 2017 at 17:49, Mauro Carv

Re: [PATCH 2/3] [media] tc358743: Increase FIFO level to 300.

2017-09-20 Thread Hans Verkuil
On 09/20/17 13:00, Dave Stevenson wrote: > On 20 September 2017 at 11:23, Philipp Zabel wrote: >> Hi, >> >> On Wed, 2017-09-20 at 10:14 +0100, Dave Stevenson wrote: >>> Hi Mauro & Philipp >>> >>> On 19 September 2017 at 17:49, Mauro Carvalho Chehab >>> wrote: Em Tue, 19 Sep 2017 17:24:45 +02

Re: [PATCH 2/3] [media] tc358743: Increase FIFO level to 300.

2017-09-20 Thread Dave Stevenson
On 20 September 2017 at 11:23, Philipp Zabel wrote: > Hi, > > On Wed, 2017-09-20 at 10:14 +0100, Dave Stevenson wrote: >> Hi Mauro & Philipp >> >> On 19 September 2017 at 17:49, Mauro Carvalho Chehab >> wrote: >> > Em Tue, 19 Sep 2017 17:24:45 +0200 >> > Philipp Zabel escreveu: >> > >> > > Hi Da

  1   2   >