Re: [PATCH] media: s5p-mfc fix vidioc_g_crop() to return crop info.

2016-06-29 Thread Hans Verkuil
On 06/30/2016 01:33 AM, Shuah Khan wrote: > Fix vidioc_g_crop() to report crop information irrepective of ctx state. > g_crop is expected to return crop information as long as the passed in > v4l2_crop type field is vV4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE. > > Signed-off-by: Shuah Khan > --- > driver

Re: [PATCH] cxd2841er: Do some changes at the dvbv5 stats logic

2016-06-29 Thread kbuild test robot
Hi, [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.7-rc5 next-20160629] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/cxd2841er-Do-some

Re: [RESEND PATCH v2 1/5] ir-rx51: Fix build after multiarch changes broke it

2016-06-29 Thread Tony Lindgren
* Ivaylo Dimitrov [160627 11:22]: > On 23.06.2016 20:48, Pali Rohár wrote: > > On Wednesday 22 June 2016 21:22:17 Ivaylo Dimitrov wrote: > > > The ir-rx51 driver for n900 has been disabled since the multiarch > > > changes as plat include directory no longer is SoC specific. > > > > > > Let's fix

[PATCH] cxd2841er: Do some changes at the dvbv5 stats logic

2016-06-29 Thread Mauro Carvalho Chehab
It is a good idea to measure the signal strength while tuning, as this helps to identify if the antenna is ok. Also, such measure helps to identify the quality of the signal. Do some changes to enable it before signal lock. While here, optimize the code to only initialize the stats length once, an

cron job: media_tree daily build: ERRORS

2016-06-29 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Thu Jun 30 04:00:30 CEST 2016 git branch: test git hash: d81295d1bed850335f9f4ccb6b1aa4f6a123d4f0 gcc versi

Re: [PATCH 04/15] lirc_dev: replace printk with pr_* or dev_*

2016-06-29 Thread Joe Perches
On Wed, 2016-06-29 at 22:20 +0900, Andi Shyti wrote: > This patch mutes also all the checkpatch warnings related to > printk. > > Reword all the printouts so that the string doesn't need to be > split, which fixes the following checkpatch warning: Adding #define pr_fmt(fmt) KBUILD_MODNAME ": " f

Re: [PATCH 15/15] include: lirc: add set length and frequency ioctl options

2016-06-29 Thread Andi Shyti
Hi Sean, > > For that we need to have more control on the device frequency to > > set (which is a new concept fro LIRC) and we also need to provide > > to userspace, as feedback, the values of the used frequency and > > length. > > Please can you elaborate on what exactly you mean by frequency an

[PATCH 3/3] rtl2832: do not allow driver unbind

2016-06-29 Thread Antti Palosaari
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/rtl2832.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c index c16c69e..0ced01f 100644 --- a/dr

[PATCH 1/3] rtl2830: do not allow driver unbind

2016-06-29 Thread Antti Palosaari
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/rtl2830.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/rtl2830.c b/drivers/media/dvb-frontends/rtl2830.c index d25d1e0..ec1e9

[PATCH 2/3] rtl2830: move statistics to read_status()

2016-06-29 Thread Antti Palosaari
Move statistics polling to read_status() in order to avoid use of kernel work. Also replace home made sign extension used for statistics with kernel sign_extend32(). Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/rtl2830.c | 200 + drivers/media/d

[PATCH 1/5] m88ds3103: remove useless most significant bit clear

2016-06-29 Thread Antti Palosaari
No need to clear negative msb bits as those were dropped in any case when data is written to register. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/m88ds3103.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-fro

[PATCH 1/3] af9033: move statistics to read_status()

2016-06-29 Thread Antti Palosaari
Move statistics polling to read_status() in order to avoid use of kernel work. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9033.c | 326 +-- 1 file changed, 154 insertions(+), 172 deletions(-) diff --git a/drivers/media/dvb-frontends/af9033.c

[PATCH 3/5] m88ds3103: improve ts clock setting

2016-06-29 Thread Antti Palosaari
Simplify TS clock divider calculation and programming slightly. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/m88ds3103.c | 39 ++--- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/me

[PATCH 2/5] m88ds3103: calculate DiSEqC message sending time

2016-06-29 Thread Antti Palosaari
DiSEqC message sending takes 13.5 ms per byte, which is 54 ms total when typical 4 byte message is sent. Don't hard-code time limit to 54 ms, but calculate it. Time limit is only used to determine when to start poll "DiSEqC Tx ready" status from the chip. Signed-off-by: Antti Palosaari --- drive

[PATCH 4/5] m88ds3103: use Hz instead of kHz on calculations

2016-06-29 Thread Antti Palosaari
There was some calculations where was kHz used in order to keep calculation withing 32-bit. Convert all to Hz and use 64-bit division helpers where needed. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/m88ds3103.c | 50 ++-- drivers/media/dvb-fronten

[PATCH 5/5] m88ds3103: refactor firmware download

2016-06-29 Thread Antti Palosaari
* remove some unneeded variable initialization * rename variables * use min() macro to calc max i2c xfer len * change bad firmware error code from EFAULT to EINVAL Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/m88ds3103.c | 49 +++-- 1 file changed, 2

[PATCH 3/3] it913x: do not allow driver unbind

2016-06-29 Thread Antti Palosaari
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari --- drivers/media/tuners/it913x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/tuners/it913x.c b/drivers/media/tuners/it913x.c index 5c96da6..6c3ef21 100644 --- a/drivers/media/tuners/it913x

[PATCH 2/3] af9033: do not allow driver unbind

2016-06-29 Thread Antti Palosaari
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9033.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/dvb-frontends/af9033.c b/drivers/media/dvb-frontends/af9033.c index 42fbd0f..6c2f9b8 100644 --- a/drive

[PATCH 1/3] si2168: add support for newer firmwares

2016-06-29 Thread Antti Palosaari
Si2168-B40 firmware API has changed somewhere between 4.0-11 and 4.0-19 so that sleep will lose firmware upgrade from the chip. Due to that firmware re-upload is needed when newer firmwares are used. Rewrote firmware handling logic partly at the same. Signed-off-by: Antti Palosaari Cc: Olli Salo

[PATCH 2/3] si2168: do not allow driver unbind

2016-06-29 Thread Antti Palosaari
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/si2168.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 124addc..20b4a65

[PATCH 3/3] si2157: do not allow driver unbind

2016-06-29 Thread Antti Palosaari
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari --- drivers/media/tuners/si2157.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c index b07a681..57b2508 100644 --- a/drivers/m

[PATCH] media: s5p-mfc fix vidioc_g_crop() to return crop info.

2016-06-29 Thread Shuah Khan
Fix vidioc_g_crop() to report crop information irrepective of ctx state. g_crop is expected to return crop information as long as the passed in v4l2_crop type field is vV4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE. Signed-off-by: Shuah Khan --- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 9 +++-- 1

Re: [PATCH 15/15] include: lirc: add set length and frequency ioctl options

2016-06-29 Thread Sean Young
On Wed, Jun 29, 2016 at 10:20:44PM +0900, Andi Shyti wrote: > The Lirc framework works mainly with receivers, but there is > nothing that prevents us from using it for transmitters as well. The lirc interface already provides for transmitting IR. > For that we need to have more control on the dev

[PATCH 06/10] au8522: show signal strength in dBm, for devices with xc5000

2016-06-29 Thread Mauro Carvalho Chehab
Devices with xc5000 provide the signal strength value in dBm. So, provide it with the proper scale to userspace. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/au8522_dig.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-

[PATCH 03/10] au8522: add support for dvbv5 statistics API

2016-06-29 Thread Mauro Carvalho Chehab
It is possible to provide both SNR and signal strength in dB. Let's convert it to use the DVBv5 API and start showing the SNR in dB. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/au8522_dig.c | 142 ++ drivers/media/dvb-frontends/au8522_priv.h

[PATCH 09/10] au8522/xc5000: use the new get_rf_attenuation() ops

2016-06-29 Thread Mauro Carvalho Chehab
Switch to the new get_rf_attenuation(), in order to remove some hacks at au8522. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/au8522_dig.c | 26 +++- drivers/media/tuners/xc5000.c| 42 ++-- 2 files changed, 32 insert

[PATCH 10/10] lgdt3306a: better handle RF fake strength

2016-06-29 Thread Mauro Carvalho Chehab
There's a logic at lgdt3306a with emulates the signal strength via SNR measures. Such logic should be used for dvbv5 stats as well, so change the code to provide a more coherent data to userspace. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/lgdt3306a.c | 121

[PATCH 02/10] au8522: use the RF strentgh provided by the tuner

2016-06-29 Thread Mauro Carvalho Chehab
The usage of SNR to estimate the signal strength is a poor man's approach. The best is to use the RF strength as measured by the tuner. So, use it, if available. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/au8522_dig.c | 22 ++ 1 file changed, 18 inse

[PATCH 05/10] au8522: remove au8522_read_ber() ops

2016-06-29 Thread Mauro Carvalho Chehab
There's no code on au8522 to get the bit error rate. Remove the fake function that were returning the number of uncorrected error blocks as if they were ber. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/au8522_dig.c | 30 ++ 1 file changed, 10

[PATCH 04/10] au8522: reorder functions to avoid a forward declaration

2016-06-29 Thread Mauro Carvalho Chehab
Move au8522_read_status() to be after au8522_get_stats(), in order to avoid the need of a forward declaration. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/au8522_dig.c | 122 +++ 1 file changed, 60 insertions(+), 62 del

[PATCH 08/10] dvb_frontend: create a new ops to help returning signals in dB

2016-06-29 Thread Mauro Carvalho Chehab
add a new ops that will allow tuners to better report the dB level of its AGC logic to the demod drivers. As the maximum gain may vary from tuner to tuner, we'll be reversing the logic here: instead of reporting the gain, let's report the attenuation. This way, converting from it to the legacy DVBv

[PATCH 01/10] xc5000: add support to return RF strength

2016-06-29 Thread Mauro Carvalho Chehab
The xc5000 tuner is able to return the gain used to adjust the signal level. With that, it can return an estimation of the signal strength. So, add support for it. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/tuners/xc5000.c | 28 +--- 1 file changed, 25 inserti

[PATCH 07/10] lgdt3306a: Expose SNR via dvbv5 stats

2016-06-29 Thread Mauro Carvalho Chehab
Add support for dvbv5 stats to expose the S/N ratio in decibels. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/lgdt3306a.c | 36 +++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/driv

re: [media] cec: add HDMI CEC framework (adapter)

2016-06-29 Thread Dan Carpenter
Hello Hans Verkuil, The patch 9881fe0ca187: "[media] cec: add HDMI CEC framework (adapter)" from Jun 25, 2016, leads to the following static checker warning: drivers/staging/media/cec/cec-adap.c:1445 cec_receive_notify() error: buffer overflow 'adap->phys_addrs' 15 <= 15 drivers/

Re: [PATCH 1/6] [media] s5p-mfc: set capablity bus_info as required by VIDIOC_QUERYCAP

2016-06-29 Thread Shuah Khan
On 06/16/2016 03:40 PM, Javier Martinez Canillas wrote: > The driver doesn't set the struct v4l2_capability bus_info field so the > v4l2-compliance tool reports the following errors for VIDIOC_QUERYCAP: > > Required ioctls: > VIDIOC_QUERYCAP returned 0 (Success) > f

Re: [PATCH 3/6] [media] s5p-jpeg: set capablity bus_info as required by VIDIOC_QUERYCAP

2016-06-29 Thread Shuah Khan
On 06/16/2016 03:40 PM, Javier Martinez Canillas wrote: > The driver doesn't set the struct v4l2_capability cap_info field so the > v4l2-compliance tool reports the following errors for VIDIOC_QUERYCAP: > > Required ioctls: > VIDIOC_QUERYCAP returned 0 (Success) > f

Re: [PATCH 2/6] [media] s5p-mfc: improve v4l2_capability driver and card fields

2016-06-29 Thread Shuah Khan
On 06/16/2016 03:40 PM, Javier Martinez Canillas wrote: > According to the V4L2 documentation the driver and card fields should be > used to identify the driver and the device but the s5p-mfc driver fills > those field using the platform device name, which in turn is the name of > the device DT nod

Re: [PATCH 4/6] [media] s5p-jpeg: only fill driver's name in capabilities driver field

2016-06-29 Thread Shuah Khan
On 06/16/2016 03:40 PM, Javier Martinez Canillas wrote: > The driver fills in both the struct v4l2_capability driver and card fields > the same values, that is the driver's name plus the information if the dev > is a decoder or an encoder. > > But the driver field has a fixed length of 16 bytes so

[PATCH 2/3] [media] cec: add MEDIA_SUPPORT dependency

2016-06-29 Thread Arnd Bergmann
The MEDIA_CEC_EDID option is guarded by MEDIA_SUPPORT, so selecting it from MEDIA_CEC produces a warning: warning: (MEDIA_CEC) selects MEDIA_CEC_EDID which has unmet direct dependencies (MEDIA_SUPPORT) The warning is harmless, but it's better to add an explicit dependency to shut it up, to reduc

[PATCH 3/3] [media] cec: add RC_CORE dependency

2016-06-29 Thread Arnd Bergmann
We cannot build the cec driver when the RC core is a module and cec is built-in: drivers/staging/built-in.o: In function `cec_allocate_adapter': :(.text+0x134): undefined reference to `rc_allocate_device' drivers/staging/built-in.o: In function `cec_register_adapter': :(.text+0x304): undefined ref

[PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused

2016-06-29 Thread Arnd Bergmann
The suspend/resume functions in the s5p-cec driver are only referenced when CONFIG_PM is enabled, so we get a warning about unused functions otherwise: drivers/staging/media/s5p-cec/s5p_cec.c:260:12: error: 's5p_cec_resume' defined but not used [-Werror=unused-function] static int s5p_cec_resume

[PATCH 04/15] lirc_dev: replace printk with pr_* or dev_*

2016-06-29 Thread Andi Shyti
This patch mutes also all the checkpatch warnings related to printk. Reword all the printouts so that the string doesn't need to be split, which fixes the following checkpatch warning: WARNING: quoted string split across lines Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 76 ++

[PATCH 05/15] lirc_dev: simplify goto paths

2016-06-29 Thread Andi Shyti
The code can be rearranged so that some goto paths can be removed Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index b11

[PATCH 11/15] lirc_dev: fix variable constant comparisons

2016-06-29 Thread Andi Shyti
When comparing a variable with a constant, the comparison should start from the variable and not from the constant. It's also written in the human DNA. Swap the terms of comparisons whenever the constant comes first and fix the following checkpatch warning: WARNING: Comparisons should place the

[PATCH 01/15] lirc_dev: place buffer allocation on separate function

2016-06-29 Thread Andi Shyti
During the driver registration, move the buffer allocation on a separate function. Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 57 +++-- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/m

[PATCH 00/15] lirc_dev fixes and beautification

2016-06-29 Thread Andi Shyti
Hi, because I wanted to add three ioctl commands in lirc, I ended up with the patchset below. This is a collection of fixes, added functionality, coding rework and trivial coding style fixes. The first patch is preparatory to the second, which allows the user to create a lirc driver without rece

[PATCH 02/15] lirc_dev: allow bufferless driver registration

2016-06-29 Thread Andi Shyti
Some drivers don't necessarily need to have a FIFO managed buffer for their transfers. Drivers now should call lirc_register_bufferless_driver in order to handle the buffer themselves. The function works exaclty like lirc_register_driver except of the buffer allocation. Signed-off-by: Andi Shyti

[PATCH 13/15] lirc_dev: extremely trivial comment style fix

2016-06-29 Thread Andi Shyti
Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 6f3402c..0a3d65d 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -692,7 +69

[PATCH 06/15] lirc_dev: do not use goto to create loops

2016-06-29 Thread Andi Shyti
... use "do .. while" instead. Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 400ab80..cc00b9a 100644 --- a/drivers/media/rc/lirc_dev.c +++ b

[PATCH 03/15] lirc_dev: remove unnecessary debug prints

2016-06-29 Thread Andi Shyti
Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 25 - 1 file changed, 25 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index fa562a3..ee997ab 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -8

[PATCH 07/15] lirc_dev: simplify if statement in lirc_add_to_buf

2016-06-29 Thread Andi Shyti
The whole function is inside an 'if' statement ("if (ir->d.add_to_buf)"). Check the opposite of that statement at the beginning and exit, this way we can have one level less of indentation. Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 33 - 1 file

[PATCH 09/15] lirc_dev: merge three if statements in only one

2016-06-29 Thread Andi Shyti
The three if statements check the same thing, merge them in only one statement. Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 7dff92c..0c266

[PATCH 10/15] lirc_dev: remove CONFIG_COMPAT precompiler check

2016-06-29 Thread Andi Shyti
There is no need to check in precompilation whether the ioctl is compat or unlocked, depending on the configuration it will be called the correct one. Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/driv

[PATCH 15/15] include: lirc: add set length and frequency ioctl options

2016-06-29 Thread Andi Shyti
The Lirc framework works mainly with receivers, but there is nothing that prevents us from using it for transmitters as well. For that we need to have more control on the device frequency to set (which is a new concept fro LIRC) and we also need to provide to userspace, as feedback, the values of

[PATCH 08/15] lirc_dev: remove double if ... else statement

2016-06-29 Thread Andi Shyti
There are two if ... else which check the same thing in different part of the code, they can be merged in a single check. Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drive

[PATCH 14/15] lirc_dev: fix potential segfault

2016-06-29 Thread Andi Shyti
When opening or closing a lirc character device, the framework provides to the user the possibility to keep track of opening or closing of the device by calling two functions: - set_use_inc() when opening the device - set_use_dec() when closing the device if those are not set by the lirc user,

[PATCH 12/15] lirc_dev: fix error return value

2016-06-29 Thread Andi Shyti
If ioctl is called, it cannot be a case of invalid system call number (ENOSYS), that is an operation not permitted (EPERM). Replace ENOSYS with EPERM. Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/med

[PATCH] exynos4-is: Fix buffer release issue on fimc m2m video nodes

2016-06-29 Thread Sylwester Nawrocki
This fixes dropping ownership of buffers in the driver's stop_streaming callback, so buffers on the memory-to-memory video nodes are properly released, also in case when the driver has a buffer only on one of the queues (OUTPUT, CAPTURE) before the video node close. The issue was being reported by

[PATCH] media: platform/xilinx: Set VTC VSYNC/VBLANK values

2016-06-29 Thread Jose Abreu
This patch sets the values of VSYNC and VBLANK in Xilinx VTC. The patch was tested using a modified version of this driver and using an HDMI compliance equipment. There is still missing the polarity settings for H/V which would require a change in the interface of this driver. Signed-off-by: Jose