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

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

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

[PATCH 1/3] [media] pvrusb2-ioread: Use common error handling code in pvr2_ioread_get_buffer()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 19 Sep 2017 21:50:05 +0200 Add 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 4/6] [media] go7007: Use common error handling code in s2250_probe()

2017-09-20 Thread SF Markus Elfring
>> @@ -555,17 +553,13 @@ static int s2250_probe(struct i2c_client *client, >> /* initialize the audio */ >> if (write_regs(audio, aud_regs) < 0) { >> dev_err(>dev, "error initializing audio\n"); >> -goto fail; >> +goto e_io; > > Preserve the error

[PATCH 1/2] [media] coda: Handle return value of kasprintf

2017-09-20 Thread Arvind Yadav
kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/media/platform/coda/coda-bit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c

[PATCH 0/2] [media] Handle return value of kasprintf

2017-09-20 Thread Arvind Yadav
kasprintf() can fail here and we must check its return value. Arvind Yadav (2): [PATCH 1/2][media] coda: Handle return value of kasprintf [PATCH 2/2][media] cx23885: Handle return value of kasprintf drivers/media/pci/cx23885/cx23885-input.c | 15 +--

[PATCH 2/2] [media] cx23885: Handle return value of kasprintf

2017-09-20 Thread Arvind Yadav
kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/media/pci/cx23885/cx23885-input.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/cx23885/cx23885-input.c

[PATCH 0/3] [media] pvrusb2-ioread: Fine-tuning for eight function implementations

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 08:28:48 +0200 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use common error handling code in pvr2_ioread_get_buffer() Delete an unnecessary check before

[PATCH 3/3] [media] pvrusb2-ioread: Delete unnecessary braces in six functions

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 08:15:51 +0200 Do not use curly brackets at some source code places where a single statement should be sufficient. Signed-off-by: Markus Elfring ---

Re: [PATCH 1/2] [media] coda: Handle return value of kasprintf

2017-09-20 Thread Philipp Zabel
Hi Arvind, On Wed, 2017-09-20 at 13:07 +0530, Arvind Yadav wrote: > kasprintf() can fail here and we must check its return value. > > Signed-off-by: Arvind Yadav > --- >  drivers/media/platform/coda/coda-bit.c | 3 +++ >  1 file changed, 3 insertions(+) > > diff --git

[PATCH 2/3] [media] pvrusb2-ioread: Delete an unnecessary check before kfree() in two functions

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 19 Sep 2017 22:12:49 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: kfree(NULL) is safe and this check is probably not required Thus fix the affected source code places. Signed-off-by: Markus

Re: [PATCH 4/6] [media] go7007: Use common error handling code in s2250_probe()

2017-09-20 Thread Dan Carpenter
On Wed, Sep 20, 2017 at 09:09:16AM +0200, SF Markus Elfring wrote: > >> @@ -555,17 +553,13 @@ static int s2250_probe(struct i2c_client *client, > >>/* initialize the audio */ > >>if (write_regs(audio, aud_regs) < 0) { > >>dev_err(>dev, "error initializing audio\n"); > >> -

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

2017-09-20 Thread Dave Stevenson
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 Dave, >> >> On Tue, 2017-09-19 at 14:08 +0100, Dave Stevenson wrote: >> > The existing fixed

[PATCH v2] media: vsp1: Prevent suspending and resuming DRM pipelines

2017-09-20 Thread Kieran Bingham
When used as part of a display pipeline, the VSP is stopped and restarted explicitly by the DU from its suspend and resume handlers. There is thus no need to stop or restart pipelines in the VSP suspend and resume handlers, and doing so would cause the hardware to be left in a misconfigured state.

Re: [PATCH v2 1/2] [media] coda: Handle return value of kasprintf

2017-09-20 Thread Philipp Zabel
On Wed, 2017-09-20 at 15:10 +0530, Arvind Yadav wrote: > kasprintf() can fail here and we must check its return value. > > Signed-off-by: Arvind Yadav --- > changes in v2 : > Calling coda_free_framebuffers to release already allocated buffers. Thanks,

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

2017-09-20 Thread Andy Shevchenko
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 > avoid conflicts, e.g. with audio machine

[PATCH v2 1/2] [media] coda: Handle return value of kasprintf

2017-09-20 Thread Arvind Yadav
kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- changes in v2 : Calling coda_free_framebuffers to release already allocated buffers. drivers/media/platform/coda/coda-bit.c | 4 1 file changed, 4 insertions(+)

[PATCH v5 2/2] [DVB][FRONTEND] Added a new ioctl for optimizing frontend property set operation

2017-09-20 Thread Satendra Singh Thakur
-For setting one frontend property , one FE_SET_PROPERTY ioctl is called -Since, size of struct dtv_property is 72 bytes, this ioctl requires ---allocating 72 bytes of memory in user space ---allocating 72 bytes of memory in kernel space ---copying 72 bytes of data from user space to kernel space

[PATCH v2] media: rc: Add driver for tango IR decoder

2017-09-20 Thread Marc Gonzalez
From: Mans Rullgard The tango IR decoder supports NEC, RC-5, RC-6 protocols. Signed-off-by: Marc Gonzalez --- Changes from v1 to v2 o Fixup a syntax error introduced by search & replace o Bring back support for linux,rc-map-name property o

Re: [PATCH v13 14/25] v4l: async: Allow binding notifiers to sub-devices

2017-09-20 Thread Sakari Ailus
Hi Laurent, On Tue, Sep 19, 2017 at 08:52:56PM +0300, Laurent Pinchart wrote: > Hi Sakari, > > On Tuesday, 19 September 2017 18:17:32 EEST Sakari Ailus wrote: > > On Tue, Sep 19, 2017 at 04:52:29PM +0300, Laurent Pinchart wrote: > > > On Friday, 15 September 2017 17:17:13 EEST Sakari Ailus

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/

[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

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

[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 |

[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 @@

[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

[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

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

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

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

[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()

[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

[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 ---

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

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(), > > >

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,

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

[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.

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

[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 ---

[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

[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

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

[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 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

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

[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

[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

[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 ++

[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:

[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

[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

[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

[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

[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

[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

[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

[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

[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 |

[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

[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

[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

[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 +

[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 +

[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:

[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

[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

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

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

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 > --- >

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. > >

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

[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 ---

[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

[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

[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 +-

[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

[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

[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

[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

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

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

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

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

[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

[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

[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

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

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

[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

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

[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

[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

[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

[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

  1   2   >