[GIT PULL FOR v4.10] media/cobalt: use pci_irq_allocate_vectors

2016-12-15 Thread Hans Verkuil
Hi Mauro, I completely forgot about this patch until Christoph reminded me. This should go into 4.10 since other work depends on this. Apologies for the late pull request, but nobody but me uses the cobalt driver anyway :-) Regards, Hans The following changes since commit d183e4efcae8

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

2016-12-15 Thread Laurent Pinchart
Hello, On Tuesday 13 Dec 2016 15:23:53 Shuah Khan wrote: > On 12/13/2016 05:24 AM, Mauro Carvalho Chehab wrote: > > Em Tue, 13 Dec 2016 12:53:05 +0200 Sakari Ailus escreveu: > >> On Tue, Nov 29, 2016 at 09:13:05AM -0200, Mauro Carvalho Chehab wrote: > >>> Hi Sakari, > >>> > >>> I answered you poi

Re: [PATCH] media: platform: s3c-camif: constify v4l2_subdev_ops structures

2016-12-15 Thread Sylwester Nawrocki
On 12/14/2016 12:11 PM, Bhumika Goyal wrote: > Check for v4l2_subdev_ops structures that are only passed as an > argument to the function v4l2_subdev_init. This argument is of type > const, so v4l2_subdev_ops structures having this property can also be > declared const. > Signed-off-by: Bhumika G

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

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Saturday 27 Aug 2016 02:43:29 Sakari Ailus wrote: > devm functions are fine for managing resources that are directly related > to the device at hand and that have no other dependencies. However, a > process holding a file handle to a device created by a driv

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

2016-12-15 Thread Sakari Ailus
Hi Mauro, On Tue, Dec 13, 2016 at 10:24:47AM -0200, Mauro Carvalho Chehab wrote: > Em Tue, 13 Dec 2016 12:53:05 +0200 > Sakari Ailus escreveu: > > > Hi Mauro, > > > > On Tue, Nov 29, 2016 at 09:13:05AM -0200, Mauro Carvalho Chehab wrote: > > > Hi Sakari, > > > > > > I answered you point to poi

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

2016-12-15 Thread Sakari Ailus
Hi Laurent, Thanks for the review! On Thu, Dec 15, 2016 at 01:23:50PM +0200, Laurent Pinchart wrote: > Hi Sakari, > > Thank you for the patch. > > On Saturday 27 Aug 2016 02:43:29 Sakari Ailus wrote: > > devm functions are fine for managing resources that are directly related > > to the device

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

2016-12-15 Thread Laurent Pinchart
Hi Sakari, On Thursday 15 Dec 2016 13:39:56 Sakari Ailus wrote: > On Thu, Dec 15, 2016 at 01:23:50PM +0200, Laurent Pinchart wrote: > > On Saturday 27 Aug 2016 02:43:29 Sakari Ailus wrote: > >> devm functions are fine for managing resources that are directly related > >> to the device at hand and

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

2016-12-15 Thread Sakari Ailus
Hi Laurent, On 12/15/16 13:42, Laurent Pinchart wrote: > You can split that part out. The devm_* removal is independent and could be > moved to the beginning of the series. Where do you release the memory in that case? In driver's remove(), i.e. this patch would simply move that code to isp_remo

Re: [PATCHv3 2/4] v4l: vsp1: Refactor video pipeline configuration

2016-12-15 Thread Kieran Bingham
Hi Laurent, On 14/12/16 16:30, Laurent Pinchart wrote: > Hi Kieran, > > Thank you for the patch. > > On Tuesday 13 Dec 2016 17:59:42 Kieran Bingham wrote: >> With multiple inputs through the BRU it is feasible for the streams to >> race each other at stream-on. > > Could you please explain the

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

2016-12-15 Thread Laurent Pinchart
On Thursday 15 Dec 2016 13:45:25 Sakari Ailus wrote: > Hi Laurent, > > On 12/15/16 13:42, Laurent Pinchart wrote: > > You can split that part out. The devm_* removal is independent and could > > be moved to the beginning of the series. > > Where do you release the memory in that case? In driver's

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Laurent Pinchart
Hi Mauro, (CC'ing Greg) On Wednesday 14 Dec 2016 13:14:06 Mauro Carvalho Chehab wrote: > Avoid calling streamoff without having the media structs allocated. > > Signed-off-by: Mauro Carvalho Chehab The driver has a maintainer listed in MAINTAINERS, and you know that Sakari is also actively in

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Greg KH
On Thu, Dec 15, 2016 at 02:13:42PM +0200, Laurent Pinchart wrote: > Hi Mauro, > > (CC'ing Greg) > > On Wednesday 14 Dec 2016 13:14:06 Mauro Carvalho Chehab wrote: > > Avoid calling streamoff without having the media structs allocated. > > > > Signed-off-by: Mauro Carvalho Chehab > > The driver

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Mauro Carvalho Chehab
Em Thu, 15 Dec 2016 14:13:42 +0200 Laurent Pinchart escreveu: > Hi Mauro, > > (CC'ing Greg) > > On Wednesday 14 Dec 2016 13:14:06 Mauro Carvalho Chehab wrote: > > Avoid calling streamoff without having the media structs allocated. > > > > Signed-off-by: Mauro Carvalho Chehab > > The driver

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Javier Martinez Canillas
Hello Mauro, On 12/15/2016 09:37 AM, Mauro Carvalho Chehab wrote: [snip] > > What happens is that omap3isp driver calls media_device_unregister() > too early. Right now, it is called at omap3isp_video_device_release(), > with happens when a driver unbind is ordered by userspace, and not after >

[PATCH v6 17/18] [media] rc: rc-loopback: Add loopback of filter scancodes

2016-12-15 Thread Sean Young
From: James Hogan Add the s_wakeup_filter callback to the rc-loopback driver, which instead of setting the filter just feeds the scancode back through the input device so that it can be verified. Signed-off-by: James Hogan Signed-off-by: Antti Seppälä Signed-off-by: Sean Young Cc: David Härde

[PATCH v6 14/18] [media] rc: ir-sharp-decoder: Add encode capability

2016-12-15 Thread Sean Young
Add the capability to encode Sharp scancodes as raw events. Signed-off-by: Sean Young --- drivers/media/rc/ir-sharp-decoder.c | 50 + 1 file changed, 50 insertions(+) diff --git a/drivers/media/rc/ir-sharp-decoder.c b/drivers/media/rc/ir-sharp-decoder.c inde

[PATCH v6 09/18] [media] rc: ir-rc5-decoder: Add encode capability

2016-12-15 Thread Sean Young
From: James Hogan Add the capability to encode RC-5, RC-5X and RC-5-SZ scancodes as raw events. The Manchester modulation helper is used, and for RC-5X it is used twice with two sets of timings, the first with a short trailer space for the space in the middle, and the second with no leader so th

[PATCH v6 15/18] [media] rc: ir-sony-decoder: Add encode capability

2016-12-15 Thread Sean Young
Add the capability to encode Sony scancodes as raw events. Sony uses pulse length rather than pulse distance. Signed-off-by: Sean Young --- drivers/media/rc/ir-sony-decoder.c | 48 drivers/media/rc/rc-core-priv.h| 20 drivers/media/rc/rc-ir-raw.c

[PATCH v6 01/18] [media] rc: change wakeup_protocols to list all protocol variants

2016-12-15 Thread Sean Young
For IR wakeup, a driver has to program the hardware to wakeup at a specific IR sequence, so it makes no sense to allow multiple wakeup protocols to be selected. In the same manner the sysfs interface only allows one scancode to be provided. In addition, we need to know the specific variant of the

[PATCH v6 16/18] [media] rc: rc-core: Add support for encode_wakeup drivers

2016-12-15 Thread Sean Young
From: James Hogan Add support in rc-core for drivers which implement the wakeup scancode filter by encoding the scancode using the raw IR encoders. This is by way of rc_dev::encode_wakeup which should be set to true and rc_dev::allowed_wakeup_protocols should be set to the raw IR encoders. We al

[PATCH v6 11/18] [media] rc: ir-nec-decoder: Add encode capability

2016-12-15 Thread Sean Young
From: James Hogan Add the capability to encode NEC scancodes as raw events. The scancode_to_raw is pretty much taken from the img-ir NEC filter() callback, and modulation uses the pulse distance helper added in a previous commit. Signed-off-by: James Hogan Signed-off-by: Sean Young Cc: Mauro C

[PATCH v6 13/18] [media] rc: ir-sanyo-decoder: Add encode capability

2016-12-15 Thread Sean Young
Add the capability to encode Sanyo scancodes as raw events. Signed-off-by: Sean Young --- drivers/media/rc/ir-sanyo-decoder.c | 43 + 1 file changed, 43 insertions(+) diff --git a/drivers/media/rc/ir-sanyo-decoder.c b/drivers/media/rc/ir-sanyo-decoder.c inde

[PATCH v6 18/18] [media] rc: nuvoton-cir: Add support wakeup via sysfs filter callback

2016-12-15 Thread Sean Young
From: Antti Seppälä Nuvoton-cir utilizes the encoding capabilities of rc-core to convert scancodes from user space to pulse/space format understood by the underlying hardware. Converted samples are then written to the wakeup fifo along with other necessary configuration to enable wake up functio

[PATCH v6 12/18] [media] rc: ir-jvc-decoder: Add encode capability

2016-12-15 Thread Sean Young
Add the capability to encode JVC scancodes as raw events. Signed-off-by: Sean Young --- drivers/media/rc/ir-jvc-decoder.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/drivers/media/rc/ir-jvc-decoder.c b/drivers/media/rc/ir-jvc-decoder.c index 1824

[PATCH v6 10/18] [media] rc: ir-rc6-decoder: Add encode capability

2016-12-15 Thread Sean Young
From: Antti Seppälä Add the capability to encode RC-6 and RC-6A scancodes as raw events. The Manchester modulation helper is used several times with various timings so that RC-6 header preamble, the header, header trailing bit and the data itself can be modulated correctly. Signed-off-by: Antti

[PATCH v6 08/18] [media] rc: rc-ir-raw: Add pulse-distance modulation helper

2016-12-15 Thread Sean Young
From: James Hogan Add IR encoding helper for pulse-distance modulation as used by the NEC protocol. Signed-off-by: James Hogan Signed-off-by: Sean Young Cc: Mauro Carvalho Chehab Cc: Antti Seppälä Cc: David Härdeman --- drivers/media/rc/rc-core-priv.h | 52 +

[PATCH v6 04/18] [media] winbond-cir: use sysfs wakeup filter

2016-12-15 Thread Sean Young
Now that we can select the exact variant of the protocol for wakeup filter, the winbond-cir can use the wakeup filter rather than module parameters. Signed-off-by: Sean Young Cc: David Härdeman --- drivers/media/rc/winbond-cir.c | 257 + 1 file changed, 1

[PATCH v6 07/18] [media] rc: rc-ir-raw: Add Manchester encoder (phase encoder) helper

2016-12-15 Thread Sean Young
From: Antti Seppälä Adding a simple Manchester encoder to rc-core. Manchester coding is used by at least RC-5 and RC-6 protocols and their variants. Signed-off-by: Antti Seppälä Signed-off-by: James Hogan Signed-off-by: Sean Young Cc: David Härdeman --- drivers/media/rc/rc-core-priv.h | 33

[PATCH v6 06/18] [media] rc: rc-ir-raw: Add scancode encoder callback

2016-12-15 Thread Sean Young
From: James Hogan Add a callback to raw ir handlers for encoding and modulating a scancode to a set of raw events. This could be used for transmit, or for converting a wakeup scancode to a form that is more suitable for raw hardware wake up filters. Signed-off-by: James Hogan Signed-off-by: Ant

[PATCH v6 02/18] [media] rc: Add scancode validation

2016-12-15 Thread Sean Young
We need to valdiate that scancodes are valid for their protocol; an incorrect necx scancode could actually be a nec scancode, for example. Signed-off-by: Sean Young --- drivers/media/rc/rc-main.c | 71 -- 1 file changed, 68 insertions(+), 3 deletions(-

[PATCH v6 03/18] [media] rc: unify nec32 protocol scancode format

2016-12-15 Thread Sean Young
There are two different encodings used for nec32: - The ir-nec-decoder.c decoder treats it as 32 bit msb first. - The img-ir decoder/encoder, winbond wakeup, dib0700, ir-ctl userspace, treat nec32 analogous to necx and nec: 4 bytes, each lsb first. So this format reverses the 4 bytes. Ther

[PATCH v6 05/18] [media] rc: raw IR drivers cannot handle cec, unknown or other

2016-12-15 Thread Sean Young
unknown and other are for IR protocols for which we have no decoder, so the raw IR drivers have no chance of generating them. cec is not an IR protocol. Signed-off-by: Sean Young Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Bruno Prémont --- drivers/hid/hid-picolcd_cir.c | 2 +- d

[PATCH v6 00/18] IR encoders and use for IR wakeup

2016-12-15 Thread Sean Young
This series introduces IR encoders and also makes winbond-cir and nuvoton-cir use the sysfs filter wakeup interface for programmable IR wakeup. To program hauppauge rc-5 remote power button for wakeup: cd /sys/class/rc/rc0 echo rc-5 > wakeup_protocols echo 0x1e3d > wakeup_

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Mauro Carvalho Chehab
Em Thu, 15 Dec 2016 09:42:35 -0300 Javier Martinez Canillas escreveu: > Hello Mauro, > > On 12/15/2016 09:37 AM, Mauro Carvalho Chehab wrote: > > [snip] > > > > > What happens is that omap3isp driver calls media_device_unregister() > > too early. Right now, it is called at omap3isp_video_devi

[PATCH 1/2] serio.h: add SERIO_RAINSHADOW_CEC ID

2016-12-15 Thread Hans Verkuil
From: Hans Verkuil Add a new serio ID for the RainShadow Tech USB HDMI CEC adapter. Signed-off-by: Hans Verkuil --- include/uapi/linux/serio.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/serio.h b/include/uapi/linux/serio.h index f2447a8..f42e919 100644 --- a/include

[PATCH 0/2] Add support for the RainShadow Tech HDMI CEC adapter

2016-12-15 Thread Hans Verkuil
From: Hans Verkuil This patch series adds support to the RainShadow Tech HDMI CEC adapter (http://rainshadowtech.com/HdmiCecUsb.html). The first patch adds the needed serio ID, the second adds the driver itself. Dmitry, will you take the first patch, or can we take it together with the second p

[PATCH 2/2] rainshadow-cec: new RainShadow Tech HDMI CEC driver

2016-12-15 Thread Hans Verkuil
From: Hans Verkuil This driver supports the RainShadow Tech USB HDMI CEC adapter. See: http://rainshadowtech.com/HdmiCecUsb.html Signed-off-by: Hans Verkuil --- MAINTAINERS | 7 + drivers/media/usb/Kconfig | 1 + drivers/media/

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

2016-12-15 Thread Laurent Pinchart
Hi Sakari, On Thursday 15 Dec 2016 13:30:41 Sakari Ailus wrote: > On Tue, Dec 13, 2016 at 10:24:47AM -0200, Mauro Carvalho Chehab wrote: > > Em Tue, 13 Dec 2016 12:53:05 +0200 Sakari Ailus escreveu: > >> On Tue, Nov 29, 2016 at 09:13:05AM -0200, Mauro Carvalho Chehab wrote: > >>> Hi Sakari, > >>>

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Laurent Pinchart
Hi Mauro, On Thursday 15 Dec 2016 10:37:34 Mauro Carvalho Chehab wrote: > Em Thu, 15 Dec 2016 14:13:42 +0200 Laurent Pinchart escreveu: > > On Wednesday 14 Dec 2016 13:14:06 Mauro Carvalho Chehab wrote: > >> Avoid calling streamoff without having the media structs allocated. > >> > >> Signed-off-

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Greg KH
On Thu, Dec 15, 2016 at 10:57:16AM -0200, Mauro Carvalho Chehab wrote: > Em Thu, 15 Dec 2016 09:42:35 -0300 > Javier Martinez Canillas escreveu: > > > Hello Mauro, > > > > On 12/15/2016 09:37 AM, Mauro Carvalho Chehab wrote: > > > > [snip] > > > > > > > > What happens is that omap3isp driver

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Laurent Pinchart
Hi Mauro, On Thursday 15 Dec 2016 10:57:16 Mauro Carvalho Chehab wrote: > Em Thu, 15 Dec 2016 09:42:35 -0300 Javier Martinez Canillas escreveu: > > On 12/15/2016 09:37 AM, Mauro Carvalho Chehab wrote: > > > > [snip] > > > >> What happens is that omap3isp driver calls media_device_unregister() >

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

2016-12-15 Thread Hans Verkuil
On 15/12/16 13:56, Laurent Pinchart wrote: Hi Sakari, On Thursday 15 Dec 2016 13:30:41 Sakari Ailus wrote: On Tue, Dec 13, 2016 at 10:24:47AM -0200, Mauro Carvalho Chehab wrote: Em Tue, 13 Dec 2016 12:53:05 +0200 Sakari Ailus escreveu: On Tue, Nov 29, 2016 at 09:13:05AM -0200, Mauro Carvalho

[PATCH 2/2] media: s5p-cec: Remove references to non-existent PLAT_S5P symbol

2016-12-15 Thread Corentin Labbe
Commit d78c16ccde96 ("ARM: SAMSUNG: Remove remaining legacy code") removed the Kconfig symbol PLAT_S5P. This patch remove the last occurrence of this symbol. Signed-off-by: Corentin Labbe --- drivers/staging/media/s5p-cec/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/2] media: s5p-cec: Remove unneeded linux/miscdevice.h include

2016-12-15 Thread Corentin Labbe
s5p-cec: does not use any miscdevice so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe --- drivers/staging/media/s5p-cec/exynos_hdmi_cec.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/s5p-cec/exynos_hdmi_cec.h b/drivers/staging/media/s5p-

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Mauro Carvalho Chehab
Greg, Em Thu, 15 Dec 2016 05:44:38 -0800 Greg KH escreveu: > On Thu, Dec 15, 2016 at 10:57:16AM -0200, Mauro Carvalho Chehab wrote: > > Em Thu, 15 Dec 2016 09:42:35 -0300 > > Javier Martinez Canillas escreveu: > > > > > Hello Mauro, > > > > > > On 12/15/2016 09:37 AM, Mauro Carvalho Chehab

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

2016-12-15 Thread Mauro Carvalho Chehab
Em Thu, 15 Dec 2016 15:03:36 +0100 Hans Verkuil escreveu: > On 15/12/16 13:56, Laurent Pinchart wrote: > > Hi Sakari, > > > > On Thursday 15 Dec 2016 13:30:41 Sakari Ailus wrote: > >> On Tue, Dec 13, 2016 at 10:24:47AM -0200, Mauro Carvalho Chehab wrote: > >>> Em Tue, 13 Dec 2016 12:53:05 +02

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

2016-12-15 Thread Shuah Khan
On 12/15/2016 07:03 AM, Hans Verkuil wrote: > On 15/12/16 13:56, Laurent Pinchart wrote: >> Hi Sakari, >> >> On Thursday 15 Dec 2016 13:30:41 Sakari Ailus wrote: >>> On Tue, Dec 13, 2016 at 10:24:47AM -0200, Mauro Carvalho Chehab wrote: Em Tue, 13 Dec 2016 12:53:05 +0200 Sakari Ailus escreveu:

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

2016-12-15 Thread Hans Verkuil
On 15/12/16 15:32, Mauro Carvalho Chehab wrote: Em Thu, 15 Dec 2016 15:03:36 +0100 Hans Verkuil escreveu: On 15/12/16 13:56, Laurent Pinchart wrote: Hi Sakari, On Thursday 15 Dec 2016 13:30:41 Sakari Ailus wrote: On Tue, Dec 13, 2016 at 10:24:47AM -0200, Mauro Carvalho Chehab wrote: Em Tue

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

2016-12-15 Thread Shuah Khan
On 12/15/2016 03:39 AM, Laurent Pinchart wrote: > Hello, > > On Tuesday 13 Dec 2016 15:23:53 Shuah Khan wrote: >> On 12/13/2016 05:24 AM, Mauro Carvalho Chehab wrote: >>> Em Tue, 13 Dec 2016 12:53:05 +0200 Sakari Ailus escreveu: On Tue, Nov 29, 2016 at 09:13:05AM -0200, Mauro Carvalho Chehab

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Laurent Pinchart
Hi Greg, On Thursday 15 Dec 2016 04:31:12 Greg KH wrote: > On Thu, Dec 15, 2016 at 02:13:42PM +0200, Laurent Pinchart wrote: > > Hi Mauro, > > > > (CC'ing Greg) > > > > On Wednesday 14 Dec 2016 13:14:06 Mauro Carvalho Chehab wrote: > > > Avoid calling streamoff without having the media structs a

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

2016-12-15 Thread Hans Verkuil
On 15/12/16 15:45, Shuah Khan wrote: On 12/15/2016 07:03 AM, Hans Verkuil wrote: On 15/12/16 13:56, Laurent Pinchart wrote: Hi Sakari, On Thursday 15 Dec 2016 13:30:41 Sakari Ailus wrote: On Tue, Dec 13, 2016 at 10:24:47AM -0200, Mauro Carvalho Chehab wrote: Em Tue, 13 Dec 2016 12:53:05 +020

Re: [RFC RESEND 01/11] vb2: Rename confusingly named internal buffer preparation functions

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Friday 11 Sep 2015 14:50:24 Sakari Ailus wrote: > Rename __qbuf_*() functions which are specific to a buffer type as > __prepare_*() which matches with what they do. The naming was there for > historical reasons; the purpose of the functions was changed with

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

2016-12-15 Thread Mauro Carvalho Chehab
Em Thu, 15 Dec 2016 15:45:22 +0100 Hans Verkuil escreveu: > On 15/12/16 15:32, Mauro Carvalho Chehab wrote: > > Em Thu, 15 Dec 2016 15:03:36 +0100 > > Hans Verkuil escreveu: > > > >> On 15/12/16 13:56, Laurent Pinchart wrote: > >>> Hi Sakari, > >>> > >>> On Thursday 15 Dec 2016 13:30:41 Saka

Re: [PATCH v4 2/6] [media] rc-main: split setup and unregister functions

2016-12-15 Thread Sean Young
Hi Andi, This patch breaks all rc devices, none of them have input devices any more (see below). On Wed, Dec 14, 2016 at 11:00:26PM +0900, Andi Shyti wrote: > Move the input device allocation, map and protocol handling to > different functions. > > Signed-off-by: Andi Shyti > Reviewed-by: Sean

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

2016-12-15 Thread Shuah Khan
On 12/15/2016 08:26 AM, Hans Verkuil wrote: > On 15/12/16 15:45, Shuah Khan wrote: >> On 12/15/2016 07:03 AM, Hans Verkuil wrote: >>> On 15/12/16 13:56, Laurent Pinchart wrote: Hi Sakari, On Thursday 15 Dec 2016 13:30:41 Sakari Ailus wrote: > On Tue, Dec 13, 2016 at 10:24:47AM -0

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

2016-12-15 Thread Hans Verkuil
On 15/12/16 16:45, Mauro Carvalho Chehab wrote: Em Thu, 15 Dec 2016 15:45:22 +0100 Hans Verkuil escreveu: On 15/12/16 15:32, Mauro Carvalho Chehab wrote: Em Thu, 15 Dec 2016 15:03:36 +0100 Hans Verkuil escreveu: On 15/12/16 13:56, Laurent Pinchart wrote: Hi Sakari, On Thursday 15 Dec 201

Re: [PATCH v4 2/6] [media] rc-main: split setup and unregister functions

2016-12-15 Thread Andi Shyti
> > + /* rc_open will be called here */ > > + rc = input_register_device(dev->input_dev); > > + if (rc) > > + goto out_table; > > + > > + dev->input_dev->dev.parent = &dev->dev; > > + memcpy(&dev->input_dev->id, &dev->input_id, sizeof(dev->input_id)); > > + dev->input_dev->phy

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

2016-12-15 Thread Hans Verkuil
On 15/12/16 17:06, Shuah Khan wrote: On 12/15/2016 08:26 AM, Hans Verkuil wrote: On 15/12/16 15:45, Shuah Khan wrote: On 12/15/2016 07:03 AM, Hans Verkuil wrote: On 15/12/16 13:56, Laurent Pinchart wrote: Hi Sakari, On Thursday 15 Dec 2016 13:30:41 Sakari Ailus wrote: On Tue, Dec 13, 2016 a

Re: [PATCH RFC] omap3isp: prevent releasing MC too early

2016-12-15 Thread Mauro Carvalho Chehab
Em Thu, 15 Dec 2016 04:31:12 -0800 Greg KH escreveu: > On Thu, Dec 15, 2016 at 02:13:42PM +0200, Laurent Pinchart wrote: > > Hi Mauro, > > > > (CC'ing Greg) > > > > On Wednesday 14 Dec 2016 13:14:06 Mauro Carvalho Chehab wrote: > > > Avoid calling streamoff without having the media structs al

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

2016-12-15 Thread Mauro Carvalho Chehab
Em Thu, 15 Dec 2016 16:26:19 +0100 Hans Verkuil escreveu: > > Should all the entities stick around until all references to media > > device are gone? If an application has /dev/media open, does that > > mean all entities should not be free'd until this app. exits? What > > should happen if an app

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

2016-12-15 Thread Shuah Khan
On 12/15/2016 09:28 AM, Hans Verkuil wrote: > On 15/12/16 17:06, Shuah Khan wrote: >> On 12/15/2016 08:26 AM, Hans Verkuil wrote: >>> On 15/12/16 15:45, Shuah Khan wrote: On 12/15/2016 07:03 AM, Hans Verkuil wrote: > On 15/12/16 13:56, Laurent Pinchart wrote: >> Hi Sakari, >> >

[PATCH v5 0/9] Qualcomm video decoder/encoder driver

2016-12-15 Thread Stanimir Varbanov
Hi all, Here is fifth version of the patchset. The changes since v4 are: * removed pointless vdec_s_selection. * renamed v4l2_m2m_buf_remove_exact to v4l2_m2m_buf_remove_by_buf and added kernel doc style for missing function arguments. * fixed pm_runtime_get_sync error path in vdec|venc_s

[PATCH v5 1/9] media: v4l2-mem2mem: extend m2m APIs for more accurate buffer management

2016-12-15 Thread Stanimir Varbanov
this add functions for: - remove buffers from src/dst queue by index - remove exact buffer from src/dst queue also extends m2m API to iterate over a list of src/dst buffers in safely and non-safely manner. Signed-off-by: Stanimir Varbanov --- drivers/media/v4l2-core/v4l2-mem2mem.c | 37

[PATCH v5 5/9] media: venus: vdec: add video decoder files

2016-12-15 Thread Stanimir Varbanov
This consists of video decoder implementation plus decoder controls. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/vdec.c | 952 + drivers/media/platform/qcom/venus/vdec.h | 32 + drivers/media/platform/qcom/venus/vdec_ctrls.c | 149 +

[PATCH v5 6/9] media: venus: venc: add video encoder files

2016-12-15 Thread Stanimir Varbanov
This adds encoder part of the driver plus encoder controls. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/venc.c | 1100 drivers/media/platform/qcom/venus/venc.h | 32 + drivers/media/platform/qcom/venus/venc_ctrls.c | 258 ++

[PATCH v5 4/9] media: venus: adding core part and helper functions

2016-12-15 Thread Stanimir Varbanov
* core.c has implemented the platform dirver methods, file operations and v4l2 registration. * helpers.c has implemented common helper functions for: - buffer management - vb2_ops and functions for format propagation, - functions for allocating and freeing buffers for internal usag

[PATCH v5 9/9] media: venus: enable building of Venus video driver

2016-12-15 Thread Stanimir Varbanov
This adds Venus driver Makefile and changes v4l2 platform Makefile/Kconfig in order to enable building of the driver. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/Kconfig | 13 + drivers/media/platform/Makefile| 2 ++ drivers/media/platform/qco

[PATCH v5 8/9] media: venus: hfi: add Venus HFI files

2016-12-15 Thread Stanimir Varbanov
Here is the implementation of Venus video accelerator low-level functionality. It contanins code which setup the registers and startup uthe processor, allocate and manipulates with the shared memory used for sending commands and receiving messages. Signed-off-by: Stanimir Varbanov --- drivers/me

[PATCH v5 7/9] media: venus: hfi: add Host Firmware Interface (HFI)

2016-12-15 Thread Stanimir Varbanov
This is the implementation of HFI. It is charged with the responsibility to comunicate with the firmware through an interface commands and messages. - hfi.c has interface functions used by the core, decoder and encoder parts to comunicate with the firmware. For example there are functions for ses

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

2016-12-15 Thread Mauro Carvalho Chehab
Em Thu, 15 Dec 2016 10:09:53 -0700 Shuah Khan escreveu: > On 12/15/2016 09:28 AM, Hans Verkuil wrote: > > On 15/12/16 17:06, Shuah Khan wrote: > > > > I think this will work for interface entities, but for subdev entities this > > certainly won't work. Unbinding subdevs should be blocked (jus

[PATCH v5 2/9] doc: DT: venus: binding document for Qualcomm video driver

2016-12-15 Thread Stanimir Varbanov
Add binding document for Venus video encoder/decoder driver Cc: Rob Herring Cc: Mark Rutland Cc: devicet...@vger.kernel.org Signed-off-by: Stanimir Varbanov --- .../devicetree/bindings/media/qcom,venus.txt | 68 ++ 1 file changed, 68 insertions(+) create mode 100644

[PATCH v5 3/9] MAINTAINERS: Add Qualcomm Venus video accelerator driver

2016-12-15 Thread Stanimir Varbanov
Add an entry for Venus video encoder/decoder accelerator driver. Signed-off-by: Stanimir Varbanov --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 52cc0775a799..9528488f538e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10013,6 +10013,1

Re: [PATCH RFC] [media] s5k6aa: set usleep_range greater 0

2016-12-15 Thread Sylwester Nawrocki
On 12/15/2016 02:14 AM, Nicholas Mc Guire wrote: > if its actually unused then it might be best to completely drop the code > raher than fixing up dead-code. Is the EXYNOS the only system that had > this device in use ? If it shold stay in then setting it to the above > proposed 3000, 4000 would se

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

2016-12-15 Thread Shuah Khan
On 12/15/2016 10:25 AM, Mauro Carvalho Chehab wrote: > Em Thu, 15 Dec 2016 10:09:53 -0700 > Shuah Khan escreveu: > >> On 12/15/2016 09:28 AM, Hans Verkuil wrote: >>> On 15/12/16 17:06, Shuah Khan wrote: > >>> >>> I think this will work for interface entities, but for subdev entities this >>> c

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

2016-12-15 Thread Shuah Khan
Hi Skarai, On 12/15/2016 04:57 AM, Laurent Pinchart wrote: > On Thursday 15 Dec 2016 13:45:25 Sakari Ailus wrote: >> Hi Laurent, >> >> On 12/15/16 13:42, Laurent Pinchart wrote: >>> You can split that part out. The devm_* removal is independent and could >>> be moved to the beginning of the series

[PATCH 1/2] media: omap3isp fix media_entity_cleanup() after media device unregister

2016-12-15 Thread Shuah Khan
During unbind isp_remove() media_entity_cleanup() after it unregisters the media_device. Cleanup routine calls media_entity_cleanup() accessing subdev entities that have been removed. This will cause problems during unbind. Signed-off-by: Shuah Khan --- drivers/media/platform/omap3isp/ispccdc.c

[PATCH 0/2] omap3 devm usage removal

2016-12-15 Thread Shuah Khan
This patch series contains two patches. The first one removes calls to media_entity_cleanup() after media device has been unregistered. The second one removes devm usage. Shuah Khan (2): media: omap3isp fix media_entity_cleanup() after media device unregister media: omap3isp change to dev

[PATCH 2/2] media: omap3isp change to devm for resources

2016-12-15 Thread Shuah Khan
Using devm resources that have external dependencies such as a dev for a file handler could result in devm resources getting released durin unbind while an application has the file open holding pointer to the devm resource. This results in use-after-free errors when the application exits. Signed-o

Re: [RFC RESEND 04/11] v4l: Unify cache management hint buffer flags

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Friday 11 Sep 2015 14:50:27 Sakari Ailus wrote: > The V4L2_BUF_FLAG_NO_CACHE_INVALIDATE and V4L2_BUF_FLAG_NO_CACHE_CLEAN > buffer flags are currently not used by the kernel. Replace the definitions > by a single V4L2_BUF_FLAG_NO_CACHE_SYNC flag to be used by

Re: [RFC RESEND 05/11] v4l2-core: Don't sync cache for a buffer if so requested

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Friday 11 Sep 2015 14:50:28 Sakari Ailus wrote: > From: Samu Onkalo > > The user may request to the driver (vb2) to skip the cache maintenance > operations in case the buffer does not need cache synchronisation, e.g. in > cases where the buffer is passed b

Re: [RFC RESEND 06/11] vb2: Improve struct vb2_mem_ops documentation; alloc and put are for MMAP

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Friday 11 Sep 2015 14:50:29 Sakari Ailus wrote: > The alloc() and put() ops are for MMAP buffers only. Document it. > > Signed-off-by: Sakari Ailus > --- > include/media/videobuf2-core.h | 20 ++-- > 1 file changed, 10 insertions(+), 10 de

Re: [RFC RESEND 07/11] vb2: dma-contig: Remove redundant sgt_base field

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Friday 11 Sep 2015 14:50:30 Sakari Ailus wrote: > The struct vb2_dc_buf contains two struct sg_table fields: sgt_base and > dma_sgt. The former is used by DMA-BUF buffers whereas the latter is used > by USERPTR. > > Unify the two, leaving dma_sgt. Looks go

Re: [RFC RESEND 08/11] vb2: dma-contig: Move vb2_dc_get_base_sgt() up

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Friday 11 Sep 2015 14:50:31 Sakari Ailus wrote: > Just move the function up. It'll be soon needed earlier than previously. > > Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart I would move this patch to 09/11 though, just before the patch that

Re: [RFC RESEND 09/11] vb2: dma-contig: Don't warn on failure in obtaining scatterlist

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Friday 11 Sep 2015 14:50:32 Sakari Ailus wrote: > vb2_dc_get_base_sgt() which obtains the scatterlist already prints > information on why the scatterlist could not be obtained. > > Also, remove the useless warning of a failed kmalloc(). > > Signed-off-by:

Re: [RFC RESEND 10/11] vb2: dma-contig: Let drivers decide DMA attrs of MMAP and USERPTR bufs

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Friday 11 Sep 2015 14:50:33 Sakari Ailus wrote: > The desirable DMA attributes are not generic for all devices using > Videobuf2 contiguous DMA ops. Let the drivers decide. > > This change also results in MMAP buffers always having an sg_table > (dma_sgt fi

[PATCH] [media] pctv452e: move buffer to heap, no mutex

2016-12-15 Thread Max Kellermann
Revert part of commit 73d5c5c864f4094, but move the buffer to the heap (DMA capable), not to the stack (may not be DMA capable). Instead of sharing one buffer which needs mutex protection, do a new heap allocation for each call. This fixes a NULL pointer dereference which occurs when dvb_usb_init

Re: [RFC RESEND 11/11] vb2: dma-contig: Add WARN_ON_ONCE() to check for potential bugs

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Friday 11 Sep 2015 14:50:34 Sakari Ailus wrote: > The scatterlist should always be present when the cache would need to be > flushed. Each buffer type has its own means to provide that. Add > WARN_ON_ONCE() to check the scatterist exists. Do you think such

[PATCH v4 0/3] stk1160: Let the driver setup the device's internal AC97 codec

2016-12-15 Thread Marcel Hasler
This patchset is a result of my attempt to fix a bug (https://bugzilla.kernel.org/show_bug.cgi?id=180071) that eventually turned out to be caused by a missing quirk in snd-usb-audio. My idea was to remove the AC97 interface and setup the codec using the same values and in the same order as the

[PATCH v4 1/3] stk1160: Remove stk1160-mixer and setup internal AC97 codec

2016-12-15 Thread Marcel Hasler
automatically. Reply-To: In-Reply-To: <20161215221146.GA9398@arch-desktop> Exposing all the channels of the device's internal AC97 codec to userspace is unnecessary and confusing. Instead the driver should setup the codec with proper values. This patch removes the mixer and sets up the codec us

[PATCH v4 2/3] stk1160: Check whether to use AC97 codec.

2016-12-15 Thread Marcel Hasler
Some STK1160-based devices use the chip's internal 8-bit ADC. This is configured through a strap pin. The value of this and other pins can be read through the POSVA register. If the internal ADC is used, or if audio is disabled altogether, there's no point trying to setup the AC97 codec. Signed

[PATCH v4 1/3] stk1160: Remove stk1160-mixer and setup internal AC97 codec automatically.

2016-12-15 Thread Marcel Hasler
Exposing all the channels of the device's internal AC97 codec to userspace is unnecessary and confusing. Instead the driver should setup the codec with proper values. This patch removes the mixer and sets up the codec using optimal values, i.e. the same values set by the Windows driver. This als

Re: [PATCH v4 1/3] stk1160: Remove stk1160-mixer and setup internal AC97 codec

2016-12-15 Thread Marcel Hasler
Sorry, somehow the email header got messed up. Ignore this one. 2016-12-15 23:13 GMT+01:00 Marcel Hasler : > automatically. > Reply-To: > In-Reply-To: <20161215221146.GA9398@arch-desktop> > > Exposing all the channels of the device's internal AC97 codec to userspace is > unnecessary and > confusi

Re: [PATCH 1/2] media: omap3isp fix media_entity_cleanup() after media device unregister

2016-12-15 Thread Laurent Pinchart
Hello Shuah, Thank you for the patch. On Thursday 15 Dec 2016 12:40:07 Shuah Khan wrote: > During unbind isp_remove() media_entity_cleanup() after it unregisters the I assume you meant "During unbind isp_remove() calls media_entity_cleanup()" > media_device. Cleanup routine calls media_entity_c

Re: [PATCH 2/2] media: omap3isp change to devm for resources

2016-12-15 Thread Laurent Pinchart
Hi Shuah, Thank you for the patch. Sakari has submitted a similar patch as part of his kref series. Please use it as a base point and rework it if you want to get it merged separately. I've reviewed the patch and left quite a few comments that need to be addressed. On Thursday 15 Dec 2016 12:4

[PATCH v4 3/3] stk1160: Wait for completion of transfers to and from AC97 codec.

2016-12-15 Thread Marcel Hasler
The STK1160 needs some time to transfer data to and from the AC97 codec. The transfer completion is indicated by command read/write bits in the chip's audio control register. The driver should poll these bits and wait until they have been cleared by hardware before trying to retrive the results

Re: [PATCH 2/2] media: omap3isp change to devm for resources

2016-12-15 Thread Shuah Khan
On 12/15/2016 03:33 PM, Laurent Pinchart wrote: > Hi Shuah, > > Thank you for the patch. > > Sakari has submitted a similar patch as part of his kref series. Please use > it > as a base point and rework it if you want to get it merged separately. I've > reviewed the patch and left quite a few

Re: [PATCH 1/2] media: omap3isp fix media_entity_cleanup() after media device unregister

2016-12-15 Thread Shuah Khan
On 12/15/2016 03:32 PM, Laurent Pinchart wrote: > Hello Shuah, > > Thank you for the patch. > > On Thursday 15 Dec 2016 12:40:07 Shuah Khan wrote: >> During unbind isp_remove() media_entity_cleanup() after it unregisters the > > I assume you meant "During unbind isp_remove() calls media_entity_c

Re: [PATCH 2/2] media: omap3isp change to devm for resources

2016-12-15 Thread Laurent Pinchart
Hi Shuah, On Thursday 15 Dec 2016 15:51:41 Shuah Khan wrote: > On 12/15/2016 03:33 PM, Laurent Pinchart wrote: > > Hi Shuah, > > > > Thank you for the patch. > > > > Sakari has submitted a similar patch as part of his kref series. Please > > use it as a base point and rework it if you want to ge

Re: [RFC RESEND 03/11] vb2: Move cache synchronisation from buffer done to dqbuf handler

2016-12-15 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Tuesday 15 Sep 2015 10:51:10 Sakari Ailus wrote: > Hans Verkuil wrote: > > On 09/11/2015 01:50 PM, Sakari Ailus wrote: > >> The cache synchronisation may be a time consuming operation and thus not > >> best performed in an interrupt which is a typical contex

[RFC v2 00/11] vb2: Handle user cache hints, allow drivers to choose cache coherency

2016-12-15 Thread Laurent Pinchart
Hello, This is a rebased version of the vb2 cache hints support patch series posted by Sakari more than a year ago. The patches have been modified as needed by the upstream changes and received the occasional small odd fix but are otherwise not modified. Please see the individual commit messages

  1   2   >