Re: [PATCH v2 1/2] clk: change clk_ops' -round_rate() prototype

2015-05-07 Thread Stephen Boyd
On 04/30, Boris Brezillon wrote: Clock rates are stored in an unsigned long field, but -round_rate() (which returns a rounded rate from a requested one) returns a long value (errors are reported using negative error codes), which can lead to long overflow if the clock rate exceed 2Ghz.

Re: [PATCH] dma-buf: add ref counting for module as exporter

2015-05-07 Thread Greg KH
On Thu, May 07, 2015 at 01:00:52PM +0530, Sumit Semwal wrote: Add reference counting on a kernel module that exports dma-buf and implements its operations. This prevents the module from being unloaded while DMABUF file is in use. The original patch [1] was submitted by Tomasz, but he's since

[PATCH] rcar-vin: use monotonic timestamps

2015-05-07 Thread Hans Verkuil
Even though the rcar-vin driver tells userspace that it will give a monotonic timestamp, it is actually using gettimeofday. Replace this with a proper monotonic timestamp. diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index

[PATCH] dma-buf: add ref counting for module as exporter

2015-05-07 Thread Sumit Semwal
Add reference counting on a kernel module that exports dma-buf and implements its operations. This prevents the module from being unloaded while DMABUF file is in use. The original patch [1] was submitted by Tomasz, but he's since shifted jobs and a ping didn't elicit any response. [tomasz:

Re: [PATCH v2 1/2] clk: change clk_ops' -round_rate() prototype

2015-05-07 Thread Boris Brezillon
Hi Stephen, On Wed, 6 May 2015 23:39:53 -0700 Stephen Boyd sb...@codeaurora.org wrote: On 04/30, Boris Brezillon wrote: Clock rates are stored in an unsigned long field, but -round_rate() (which returns a rounded rate from a requested one) returns a long value (errors are reported using

Re: [PATCH] sta2x11: use monotonic timestamp

2015-05-07 Thread Hans Verkuil
On 05/07/2015 08:22 AM, Hans Verkuil wrote: V4L2 drivers should use MONOTONIC timestamps instead of gettimeofday, which is affected by daylight savings time. Signed-off-by: Hans Verkuil hans.verk...@cisco.com diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c

Re: [PATCH] rcar-vin: use monotonic timestamps

2015-05-07 Thread Hans Verkuil
On 05/07/2015 08:26 AM, Hans Verkuil wrote: Even though the rcar-vin driver tells userspace that it will give a monotonic timestamp, it is actually using gettimeofday. Replace this with a proper monotonic timestamp. It was clearly too early in the day for me, but here is my Signed-off-by:

Re: [PATCH] sta2x11: use monotonic timestamp

2015-05-07 Thread Hans Verkuil
Added Federico to the CC-list. On 05/07/2015 08:22 AM, Hans Verkuil wrote: V4L2 drivers should use MONOTONIC timestamps instead of gettimeofday, which is affected by daylight savings time. diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index

[PATCH] sta2x11: use monotonic timestamp

2015-05-07 Thread Hans Verkuil
V4L2 drivers should use MONOTONIC timestamps instead of gettimeofday, which is affected by daylight savings time. diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index d384a6b..59b3a36 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++

Re: [PATCH v3 5/6] si2168: add I2C error handling

2015-05-07 Thread Antti Palosaari
Moikka! I didn't make any tests, but I could guess that error flag is set by firmware when some unsupported / invalid parameter is given as a firmware command request. Anyhow, I am not sure which is proper error code to return. Could you please study, check from API docs and so, which are

Re: [PATCH v2] dma-buf: add ref counting for module as exporter

2015-05-07 Thread Greg KH
On Thu, May 07, 2015 at 06:58:44PM +0530, Sumit Semwal wrote: Add reference counting on a kernel module that exports dma-buf and implements its operations. This prevents the module from being unloaded while DMABUF file is in use. The original patch [1] was submitted by Tomasz Stanislawski,

Re: [PATCH v3 5/6] si2168: add I2C error handling

2015-05-07 Thread Olli Salonen
Hi Antti, I basically used the same code that was used earlier in the same function in case i2c_master_send/recv returns an unexpected result. When working with the RTL2832P based Si2168 device I noticed that at some point, often but not always during firmware loading, the Si2168 started to

[PATCH 10/18] media controller: use macros to check for V4L2 subdev entities

2015-05-07 Thread Mauro Carvalho Chehab
Instead of relying on media subtype, use the new macros to detect if an entity is a subdev or an A/V DMA entity. Please note that most drivers assume that there's just AV_DMA or V4L2 subdevs. This is not true anymore, as we've added MC support for DVB, and there are plans to add support for ALSA

[PATCH 11/18] omap3/omap4/davinci: get rid of MEDIA_ENT_T_V4L2_SUBDEV abuse

2015-05-07 Thread Mauro Carvalho Chehab
On omap3/omap4/davinci drivers, MEDIA_ENT_T_V4L2_SUBDEV macro is abused in order to simplify the pad checks. Basically, it does a logical or of this macro, in order to check for a local index and if the entity is either a subdev or not. As we'll get rid of MEDIA_ENT_T_V4L2_SUBDEV macro, replace

[PATCH 04/18] media controller: Rename camera entities

2015-05-07 Thread Mauro Carvalho Chehab
As explained before, the hole idea of subtypes at entities was not nice. All V4L2 subdevs may have a device node associated. Also, the hole idea is to expose hardware IP blocks, so calling them as V4L2 is a very bad practice, as they were not designed for the V4L2 API. It is just the reverse.

[PATCH 07/18] media controller: rename the tuner entity

2015-05-07 Thread Mauro Carvalho Chehab
Finally, let's rename the tuner entity. inside the media subsystem, a tuner can be used by AM/FM radio, SDR radio, analog TV and digital TV. It could even be used on other subsystems, like network, for wireless devices. So, it is not constricted to V4L2 API, or to a subdev. Let's then rename it

[PATCH 13/18] s5k5baf: fix subdev type

2015-05-07 Thread Mauro Carvalho Chehab
This sensor driver is abusing MEDIA_ENT_T_V4L2_SUBDEV, creating some subdevs with a non-existing type. As this is a sensor driver, the proper type is likely MEDIA_ENT_T_CAM_SENSOR. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/i2c/s5k5baf.c

[PATCH 01/18] media controller: add EXPERIMENTAL to Kconfig option for DVB support

2015-05-07 Thread Mauro Carvalho Chehab
The Media Controller DVB support is still an experimental feature, as it is under heavy development. It is already said that it is an experimental feature at the help, but let make it even clearer and louder, as we may need to adjust some bits when we start using it on embedded drivers.

[PATCH 12/18] s5c73m3: fix subdev type

2015-05-07 Thread Mauro Carvalho Chehab
This sensor driver is abusing MEDIA_ENT_T_V4L2_SUBDEV, creating some subdevs with a non-existing type. As this is a sensor driver, the proper type is likely MEDIA_ENT_T_CAM_SENSOR. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c

[PATCH 08/18] media controller: add comments for the entity types

2015-05-07 Thread Mauro Carvalho Chehab
Better document the linux/media.h UAPI header, by adding comments to each entity subtype. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h index 6acc4be1378c..8d47b70b7ea8 100644 --- a/include/uapi/linux/media.h +++

[PATCH 15/18] omap4iss: stop MEDIA_ENT_T_V4L2_SUBDEV abuse

2015-05-07 Thread Mauro Carvalho Chehab
This driver is abusing MEDIA_ENT_T_V4L2_SUBDEV, as it uses a hack to check if the remote entity is a subdev. Get rid of it. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c b/drivers/staging/media/omap4iss/iss_ipipe.c index

[PATCH 09/18] media controller: add macros to check if subdev or A/V DMA

2015-05-07 Thread Mauro Carvalho Chehab
As we'll be removing entity subtypes from the Kernel, we need to provide a way for drivers and core to check if a given entity is represented by a V4L2 subdev or if it is an A/V DMA. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/include/media/media-entity.h

Re: Mystique SaTiX-S2 Sky V2 USB (DVBSKY S960 clone) - Linux driver.

2015-05-07 Thread P. van Gaans
Olli, what kernel version/v4l-dvb are you running? (I want to update the wiki) Steve, you can download Windows software from http://www.dvbsky.net/Support_win.html. It looks like the device should work with the driver+player. Bestunar doesn't sound like something to worry about. Seems to be

[PATCH 14/18] davinci_vbpe: stop MEDIA_ENT_T_V4L2_SUBDEV abuse

2015-05-07 Thread Mauro Carvalho Chehab
This driver is abusing MEDIA_ENT_T_V4L2_SUBDEV: - it uses a hack to check if the remote entity is a subdev; - it still uses the legacy entity subtype check macro, that will be removed soon. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git

[PATCH 02/18] media controller: deprecate entity subtype

2015-05-07 Thread Mauro Carvalho Chehab
The media controller entity subtype doesn't make much sense, especially since V4L2 subdevices may also have associated devnodes. So, better to get rid of it while it is not too late. We need, of course, to keep the old symbols to avoid userspace breakage, but we should avoid using them

[PATCH 00/18] Remove media controller entity subtypes and rename types

2015-05-07 Thread Mauro Carvalho Chehab
The media controller entity subtype doesn't make much sense, especially since V4L2 subdevices may also have associated devnodes. So, better to get rid of it while it is not too late. Also, the entities namespace is a bit messy, putting tuners under V4L2, while this kind of entity could also be

[PATCH 17/18] media controller: get rid of entity subtype on Kernel

2015-05-07 Thread Mauro Carvalho Chehab
Don't use anymore the type/subtype entity data/macros inside the Kernel. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/include/media/media-entity.h b/include/media/media-entity.h index f15b48145711..bb98506532ff 100644 --- a/include/media/media-entity.h +++

[PATCH 16/18] v4l2-subdev: use MEDIA_ENT_T_UNKNOWN for new subdevs

2015-05-07 Thread Mauro Carvalho Chehab
Instead of abusing MEDIA_ENT_T_V4L2_SUBDEV, initialize new subdev entities as MEDIA_ENT_T_UNKNOWN. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 66c6d9fd2033..0233d30b4922 100644 ---

[PATCH 03/18] media controller: use MEDIA_ENT_T_AV_DMA for A/V DMA engines

2015-05-07 Thread Mauro Carvalho Chehab
At the Video4Linux API, the /dev/video?, /dev/vbi? and /dev/radio? device nodes are used for the chipset that provides the bridge between video/radio streams and the USB, PCI or CPU buses. Such bridge is also typically used to control the V4L2 device as a hole. For video streaming devices and

[PATCH 18/18] DocBook: update descriptions for the media controller entities

2015-05-07 Thread Mauro Carvalho Chehab
Cleanup the media controller entities description: - remove MEDIA_ENT_T_DEVNODE and MEDIA_ENT_T_V4L2_SUBDEV; - improve the description of some entities; - add MEDIA_ENT_T_UNKNOWN with a proper description. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git

[PATCH 05/18] media controller: rename MEDIA_ENT_T_DEVNODE_DVB entities

2015-05-07 Thread Mauro Carvalho Chehab
In order to reflect that the entities are actually the hardware (or firmware, or in-kernel software), and are not associated with the DVB API, let's remove DEVNODE_ from the entity names and use DTV (Digital TV) for the entities. The frontend is an special case: the frontend devnode actually

[PATCH 06/18] media controller: rename analog TV decoder

2015-05-07 Thread Mauro Carvalho Chehab
To keep coherency, let's also remove V4L2_SUBDEV from the analog TV decoder, calling it by its function, and not by the V4L2 API mapping. So, MEDIA_ENT_T_V4L2_SUBDEV_DECODER - MEDIA_ENT_T_ATV_DECODER Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git

Re: [PATCH] sta2x11: use monotonic timestamp

2015-05-07 Thread Federico Vaga
On Thursday 07 May 2015 08:27:20 Hans Verkuil wrote: Added Federico to the CC-list. Fine for me Acked-by: Federico Vaga federico.v...@gmail.com On 05/07/2015 08:22 AM, Hans Verkuil wrote: V4L2 drivers should use MONOTONIC timestamps instead of gettimeofday, which is affected by daylight

Re: Re: Mystique SaTiX-S2 Sky V2 USB (DVBSKY S960 clone) - Linux driver.

2015-05-07 Thread Nibble Max
Hello Steve, Could you try the following methods? 1 Could you try to install the media code from dvbsky.net? http://www.dvbsky.net/download/linux/media_build-bst-150322.tar.gz 2 You can download the driver and software for windows from dvbsky.net and test to confirm the device is working

cron job: media_tree daily build: ERRORS

2015-05-07 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: Fri May 8 04:00:15 CEST 2015 git branch: test git hash: 1555f3bf5cc172e7d23c2b8db10d656d15bec13e gcc

Re: [RFC] How implement Secure Data Path ?

2015-05-07 Thread Thierry Reding
On Wed, May 06, 2015 at 03:15:32PM +0200, Daniel Vetter wrote: On Wed, May 06, 2015 at 11:19:21AM +0200, Thierry Reding wrote: On Wed, May 06, 2015 at 10:35:52AM +0200, Daniel Vetter wrote: On Tue, May 05, 2015 at 05:54:05PM +0100, One Thousand Gnomes wrote: First what is Secure Data

[PATCH v2] dma-buf: add ref counting for module as exporter

2015-05-07 Thread Sumit Semwal
Add reference counting on a kernel module that exports dma-buf and implements its operations. This prevents the module from being unloaded while DMABUF file is in use. The original patch [1] was submitted by Tomasz Stanislawski, but this is a simpler way to do it. v2: move owner to struct

Coda : QP rate control encoding

2015-05-07 Thread Jean-Michel Hautbois
Hi, I am playing a bit with the coda encoder on i.MX6 and try to get the most quality out of it. So, I am trying to use the controls of the driver, in particular h264_i_frame_qp_value and h264_p_frame_qp_value. I can get something with the following pipeline : gst-launch-1.0 -evvv v4l2src

Re: [RFC] How implement Secure Data Path ?

2015-05-07 Thread Daniel Vetter
On Thu, May 07, 2015 at 03:22:20PM +0200, Thierry Reding wrote: On Wed, May 06, 2015 at 03:15:32PM +0200, Daniel Vetter wrote: Yes the idea would be a special-purpose allocater thing like ion. Might even want that to be a syscall to do it properly. Would you care to elaborate why a syscall

Re: [RFC] How implement Secure Data Path ?

2015-05-07 Thread Thierry Reding
On Wed, May 06, 2015 at 07:29:56AM -0400, Rob Clark wrote: On Wed, May 6, 2015 at 4:35 AM, Daniel Vetter dan...@ffwll.ch wrote: On Tue, May 05, 2015 at 05:54:05PM +0100, One Thousand Gnomes wrote: First what is Secure Data Path ? SDP is a set of hardware features to garanty that some

Re: [RFC] How implement Secure Data Path ?

2015-05-07 Thread One Thousand Gnomes
On Thu, 7 May 2015 15:52:12 +0200 Daniel Vetter dan...@ffwll.ch wrote: On Thu, May 07, 2015 at 03:22:20PM +0200, Thierry Reding wrote: On Wed, May 06, 2015 at 03:15:32PM +0200, Daniel Vetter wrote: Yes the idea would be a special-purpose allocater thing like ion. Might even want that to

Re: [PATCH] dma-buf: add ref counting for module as exporter

2015-05-07 Thread Sumit Semwal
On 7 May 2015 at 13:40, Greg KH gre...@linuxfoundation.org wrote: On Thu, May 07, 2015 at 01:00:52PM +0530, Sumit Semwal wrote: Add reference counting on a kernel module that exports dma-buf and implements its operations. This prevents the module from being unloaded while DMABUF file is in