Re: Question about 2 gp8psk patches I noticed, and possible bug.

2016-11-08 Thread VDR User
Hi Mauro, Unfortunately the patch doesn't seem to have solved the problem. I do have the kernel recompiled with debug enabled though per your irc msg. dmesg gives me: [ 70.741073] usbcore: deregistering interface driver dvb_usb_gp8psk [ 70.741165] [ cut here ] [ 70.7

cron job: media_tree daily build: ERRORS

2016-11-08 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: Wed Nov 9 05:00:18 CET 2016 media-tree git hash:bd676c0c04ec94bd830b9192e2c33f2c4532278d media_build git

Re: [v4.9-rc4] dvb-usb/cinergyT2 NULL pointer dereference

2016-11-08 Thread Mauro Carvalho Chehab
Em Tue, 8 Nov 2016 22:15:24 +0100 Benjamin Larsson escreveu: > On 11/08/2016 09:22 PM, Mauro Carvalho Chehab wrote: > > Em Tue, 8 Nov 2016 10:42:03 -0800 > > Linus Torvalds escreveu: > > > >> On Sun, Nov 6, 2016 at 7:40 AM, Jörg Otte wrote: > >>> Since v4.9-rc4 I get following crash in dvb-usb-

Re: [v4.9-rc4] dvb-usb/cinergyT2 NULL pointer dereference

2016-11-08 Thread Benjamin Larsson
On 11/08/2016 09:22 PM, Mauro Carvalho Chehab wrote: Em Tue, 8 Nov 2016 10:42:03 -0800 Linus Torvalds escreveu: On Sun, Nov 6, 2016 at 7:40 AM, Jörg Otte wrote: Since v4.9-rc4 I get following crash in dvb-usb-cinergyT2 module. Looks like it's commit 5ef8ed0e5608f ("[media] cinergyT2-core:

Re: [v4.9-rc4] dvb-usb/cinergyT2 NULL pointer dereference

2016-11-08 Thread Mauro Carvalho Chehab
Em Tue, 8 Nov 2016 10:42:03 -0800 Linus Torvalds escreveu: > On Sun, Nov 6, 2016 at 7:40 AM, Jörg Otte wrote: > > Since v4.9-rc4 I get following crash in dvb-usb-cinergyT2 module. > > Looks like it's commit 5ef8ed0e5608f ("[media] cinergyT2-core: don't > do DMA on stack"), which movced the DM

Re: [RFC v4 08/21] media: Enable allocating the media device dynamically

2016-11-08 Thread Shuah Khan
On Tue, Nov 8, 2016 at 6:55 AM, Sakari Ailus wrote: > From: Sakari Ailus > > Allow allocating the media device dynamically. As the struct media_device > embeds struct media_devnode, the lifetime of that object is that same than > that of the media_device. > > Signed-off-by: Sakari Ailus > --- >

Re: [v4.9-rc4] dvb-usb/cinergyT2 NULL pointer dereference

2016-11-08 Thread Linus Torvalds
On Sun, Nov 6, 2016 at 7:40 AM, Jörg Otte wrote: > Since v4.9-rc4 I get following crash in dvb-usb-cinergyT2 module. Looks like it's commit 5ef8ed0e5608f ("[media] cinergyT2-core: don't do DMA on stack"), which movced the DMA data array from the stack to the "private" pointer. In the process it a

Re: Question about 2 gp8psk patches I noticed, and possible bug.

2016-11-08 Thread Mauro Carvalho Chehab
Em Sat, 5 Nov 2016 19:24:58 -0700 VDR User escreveu: > I have > several different Genpix devices that use the gp8psk driver and in all > cases the following happens when I unload it: > > [494896.234616] usbcore: deregistering interface driver dvb_usb_gp8psk > [494896.234712] [ cut he

Re: [RFC v4 01/21] Revert "[media] media: fix media devnode ioctl/syscall and unregister race"

2016-11-08 Thread Mauro Carvalho Chehab
Em Tue, 8 Nov 2016 15:55:10 +0200 Sakari Ailus escreveu: > This reverts commit 6f0dd24a084a ("[media] media: fix media devnode > ioctl/syscall and unregister race"). The commit was part of an original > patchset to avoid crashes when an unregistering device is in use. As I said before: I will o

Re: [PATCH v2] media: i2c-polling: add i2c-polling driver

2016-11-08 Thread Matt Ranostay
On Mon, Nov 7, 2016 at 11:03 PM, Ozgur wrote: > Dear Matt; > > I think the "inux/slab.h" line is incorrect and I fixed to "linux/slab.h", I > tested. Success now. > > Regards, > > ~ Ozgur > >>> -#include >>> +#include Gah wondering how it built for me. will fix in v3 > > > 2016-11-08 9:00 GMT

[PATCH v2 1/1] v4l: compat: Prevent allocating excessive amounts of memory

2016-11-08 Thread Sakari Ailus
get_v4l2_ext_controls32() is used to convert the 32-bit compat struct into native 64-bit representation. The function multiplies the array length by the entry length before validating size. Perform the size validation first. Also use unsigned values for size computation. Make similar changes to g

[RFC v4 06/21] media device: Drop nop release callback

2016-11-08 Thread Sakari Ailus
The release callback is only used to print a debug message. Drop it. (It will be re-introduced later in a different form.) Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media-devi

[RFC v4 03/21] Revert "[media] media-device: dynamically allocate struct media_devnode"

2016-11-08 Thread Sakari Ailus
This reverts commit a087ce704b80 ("[media] media-device: dynamically allocate struct media_devnode"). The commit was part of an original patchset to avoid crashes when an unregistering device is in use. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 44 +++--

[RFC v4 05/21] media: devnode: Rename mdev argument as devnode

2016-11-08 Thread Sakari Ailus
Historically, mdev argument name was being used on both struct media_device and struct media_devnode. Recently most occurrences of mdev referring to struct media_devnode were replaced by devnode, which makes more sense. Fix the last remaining occurrence. Fixes: 163f1e93e9950 ("[media] media-devnod

[RFC v4 04/21] media: Remove useless curly braces and parentheses

2016-11-08 Thread Sakari Ailus
Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/media-device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 0e07300..bb19c04 100644 --- a/drivers/media/media-device.c +++ b/drivers/

[RFC v4 14/21] media device: Get the media device driver's device

2016-11-08 Thread Sakari Ailus
The struct device of the media device driver (i.e. not that of the media devnode) is pointed to by the media device. The struct device pointer is mostly used for debug prints. Ensure it will stay around as long as the media device does. Signed-off-by: Sakari Ailus --- drivers/media/media-device

[RFC v4 13/21] media device: Deprecate media_device_{init,cleanup}() for drivers

2016-11-08 Thread Sakari Ailus
Drivers should no longer directly allocate media_device but rely on media_device_alloc(), media_device_get() and media_device_put() instead. Deprecate media_device_init() and media_device_cleanup(). Signed-off-by: Sakari Ailus --- include/media/media-device.h | 8 1 file changed, 8 inse

[RFC v4 10/21] media: Shuffle functions around

2016-11-08 Thread Sakari Ailus
As the call paths of the functions in question will change, move them around in anticipation of that. No other changes. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/media-device.c | 56 ++-- 1 file changed, 28 insertions(+), 28 del

[RFC v4 11/21] media device: Refcount the media device

2016-11-08 Thread Sakari Ailus
As the struct media_device embeds struct media_devnode, the lifetime of that object must be that same than that of the media_device. References are obtained by media_entity_get() and released by media_entity_put(). In case a driver uses media_device_alloc() to allocate its media device, it must re

[RFC v4 12/21] media device: Initialise media devnode in media_device_init()

2016-11-08 Thread Sakari Ailus
Call media_devnode_init() from media_device_init(). This has the effect of creating a struct device for the media_devnode before it is registered, making it possible to obtain a reference to it for e.g. video devices. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 26

[RFC v4 17/21] v4l: Acquire a reference to the media device for every video device

2016-11-08 Thread Sakari Ailus
The video device depends on the existence of its media device --- if there is one. Acquire a reference to it. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-dev.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-dev.c

[RFC v4 07/21] media-device: Make devnode.dev->kobj parent of devnode.cdev

2016-11-08 Thread Sakari Ailus
The struct cdev embedded in struct media_devnode contains its own kobj. Instead of trying to manage its lifetime separately from struct media_devnode, make the cdev kobj a parent of the struct media_device.dev kobj. The cdev will thus be released during unregistering the media_devnode, not in medi

[RFC v4 15/21] media: Provide a way to the driver to set a private pointer

2016-11-08 Thread Sakari Ailus
Now that the media device can be allocated dynamically, drivers have no longer a way to conveniently obtain the driver private data structure. Provide one again in the form of a private pointer passed to the media_device_alloc() function. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- d

[RFC v4 19/21] omap3isp: Allocate the media device dynamically

2016-11-08 Thread Sakari Ailus
Use the new media_device_alloc() API to allocate and release the media device. Signed-off-by: Sakari Ailus --- drivers/media/platform/omap3isp/isp.c | 24 +--- drivers/media/platform/omap3isp/isp.h | 2 +- drivers/media/platform/omap3isp/ispvideo.c | 2 +- 3 files

[RFC v4 16/21] media: Add release callback for media device

2016-11-08 Thread Sakari Ailus
The release callback may be used by the driver to signal the release of the media device. This way the lifetime of the driver's own memory allocations may be made dependent on that of the media device. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 4 include/media/media-dev

[RFC v4 18/21] media-device: Postpone graph object removal until free

2016-11-08 Thread Sakari Ailus
The media device itself will be unregistered based on it being unbound and driver's remove callback being called. The graph objects themselves may still be in use; rely on the media device release callback to release them. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/med

[RFC v4 01/21] Revert "[media] media: fix media devnode ioctl/syscall and unregister race"

2016-11-08 Thread Sakari Ailus
This reverts commit 6f0dd24a084a ("[media] media: fix media devnode ioctl/syscall and unregister race"). The commit was part of an original patchset to avoid crashes when an unregistering device is in use. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 15 +++ driver

[RFC v4 02/21] Revert "[media] media: fix use-after-free in cdev_put() when app exits after driver unbind"

2016-11-08 Thread Sakari Ailus
This reverts commit 5b28dde51d0c ("[media] media: fix use-after-free in cdev_put() when app exits after driver unbind"). The commit was part of an original patchset to avoid crashes when an unregistering device is in use. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 6 ++

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

2016-11-08 Thread Sakari Ailus
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 driver for a device may result in the file handle left behind after the device is long gone. This wil

[RFC v4 08/21] media: Enable allocating the media device dynamically

2016-11-08 Thread Sakari Ailus
From: Sakari Ailus Allow allocating the media device dynamically. As the struct media_device embeds struct media_devnode, the lifetime of that object is that same than that of the media_device. Signed-off-by: Sakari Ailus --- drivers/media/media-device.c | 15 +++ include/media/med

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

2016-11-08 Thread Sakari Ailus
Hi folks, This is the third version of the RFC set to fix referencing in media devices. The lifetime of the media device (and media devnode) is now bound to that of struct device embedded in it and its memory is only released once the last reference is gone: unregistering is simply unregistering,

[RFC v4 09/21] media: Split initialising and adding media devnode

2016-11-08 Thread Sakari Ailus
As registering a device node of an entity belonging to a media device will require a reference to the struct device. Taking that reference is only possible once the device has been initialised, which took place only when it was registered. Split this in two, and initialise the device when the media

[RFC v4 20/21] omap3isp: Release the isp device struct by media device callback

2016-11-08 Thread Sakari Ailus
Use the media device release callback to release the isp device's data structure. This approach has the benefit of not releasing memory which may still be accessed through open file handles whilst the isp driver is being unbound. Signed-off-by: Sakari Ailus --- drivers/media/platform/omap3isp/is

[PATCH 1/1] media: entity: Add media_entity_has_route() function

2016-11-08 Thread Sakari Ailus
From: Laurent Pinchart This is a wrapper around the media entity has_route operation. Signed-off-by: Laurent Pinchart Signed-off-by: Michal Simek Signed-off-by: Sakari Ailus --- Hi Niklas, There was actually another problem with the Kerneldoc comment related to the mutex. Fixed that one as w

Re: [PATCH 01/32] media: entity: Add has_route entity operation

2016-11-08 Thread Sakari Ailus
On Wed, Nov 02, 2016 at 02:22:58PM +0100, Niklas Söderlund wrote: > From: Laurent Pinchart > > The optional operation can be used by entities to report whether two > pads are internally connected. > > Signed-off-by: Laurent Pinchart > Signed-off-by: Michal Simek > Signed-off-by: Niklas Söderlu

Re: [PATCH 02/32] media: entity: Add media_entity_has_route() function

2016-11-08 Thread Sakari Ailus
Hi Niklas, On Wed, Nov 02, 2016 at 02:22:59PM +0100, Niklas Söderlund wrote: > From: Laurent Pinchart > > This is a wrapper around the media entity has_route operation. > > Signed-off-by: Laurent Pinchart > Signed-off-by: Michal Simek > Signed-off-by: Niklas Söderlund > --- > drivers/media/

Re: [PATCH] media: fix uninitialized variable warning in dib0700_rc_urb_completion()

2016-11-08 Thread Sean Young
On Mon, Nov 07, 2016 at 08:41:12AM -0700, Shuah Khan wrote: > Fix the following uninitialized variable compiler warning: > > drivers/media/usb/dvb-usb/dib0700_core.c: In function > ‘dib0700_rc_urb_completion’: > drivers/media/usb/dvb-usb/dib0700_core.c:763:2: warning: ‘protocol’ may be > used u

Re: [Ksummit-discuss] Including images on Sphinx documents

2016-11-08 Thread Mauro Carvalho Chehab
Em Mon, 7 Nov 2016 09:05:05 -0800 Josh Triplett escreveu: > On Mon, Nov 07, 2016 at 09:46:48AM -0200, Mauro Carvalho Chehab wrote: > > That's said, PNG also doesn't seem to work fine on Sphinx 1.4.x. > > > > On my tests, I installed *all* texlive extensions on Fedora 24, to > > be sure that the

[PATCH 1/1] media: entity: Swap pads if route is checked from source to sink

2016-11-08 Thread Sakari Ailus
This way the pads are always passed to the has_route() op sink pad first. Makes sense. Signed-off-by: Sakari Ailus --- Hi Niklas, This should make it easier to implement the has_route() op in drivers. Feel free to merge this to "[PATCH 02/32] media: entity: Add media_entity_has_route() function

Problem retrieving zl10353 information: Resource temporarily unavailable (but signal =71% ?)

2016-11-08 Thread mjs
Hello, I'm trying to get a dvb-t usb-stick to work with debian. Components: em2882 - xc3028l (uses XC3028L-V36.fw) - ce6353 (zl10353) - tvp5150 - emp202 Kernel: 4.7.0-0.bpo.1-686-pae - debian 8 i2c device: eeprom @ 0xa0 - tvp5150 @ 0xb8 - tuner(analog) @0xc2 (from dmesg 2.6 k

Re: [PATCH v2 13/21] ARM: dts: imx6qdl: Add mipi_ipu1/2 multiplexers, mipi_csi, and their connections

2016-11-08 Thread Ying Liu
Hi Philipp, On Sat, Oct 15, 2016 at 1:34 AM, Philipp Zabel wrote: > This patch adds the device tree graph connecting the input multiplexers > to the IPU CSIs and the MIPI-CSI2 gasket on i.MX6. The MIPI_IPU > multiplexers are added as children of the iomuxc-gpr syscon device node. > On i.MX6Q/D tw

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

2016-11-08 Thread Sakari Ailus
Hi Shuah, On Mon, Nov 07, 2016 at 01:16:45PM -0700, Shuah Khan wrote: > Hi Sakari, > > On 08/26/2016 05:43 PM, Sakari Ailus wrote: > > Hi folks, > > > > This is the third version of the RFC set to fix referencing in media > > devices. > > > > The lifetime of the media device (and media devnode)