[PATCH 0/2] DVB: represent frequencies at tuner/frontend .info in Hz

2018-07-04 Thread Mauro Carvalho Chehab
This is a long standing issue that affect newer devices whose tuner and frontend are capable of supporting both satellite and non-satellite delivery standards. Compile-tested only. I intend to run some tests later this week with some random hardware, but I'd appreciate any tests and feedback, as

[PATCH 2/2] media: dvb: represent min/max/step/tolerance freqs in Hz

2018-07-04 Thread Mauro Carvalho Chehab
Right now, satellite frontend drivers specify frequencies in kHz, while terrestrial/cable ones specify in Hz. That's confusing for developers. However, the main problem is that universal frontends capable of handling both satellite and non-satelite delivery systems are appearing. We end by

[PATCH 1/2] media: dvb: convert tuner_info frequencies to Hz

2018-07-04 Thread Mauro Carvalho Chehab
Right now, satellite tuner drivers specify frequencies in kHz, while terrestrial/cable ones specify in Hz. That's confusing for developers. However, the main problem is that universal tuners capable of handling both satellite and non-satelite delivery systems are appearing. We end by needing to

[PATCH] media: dvb: fix noderef.cocci warnings

2018-07-04 Thread kbuild test robot
From: kbuild test robot drivers/media/dvb-core/dvb_frontend.c:2396:18-24: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci Fixes: 07acff734698 ("media: dvb: represent

Re: [PATCH 2/2] media: dvb: represent min/max/step/tolerance freqs in Hz

2018-07-04 Thread kbuild test robot
Hi Mauro, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.18-rc3 next-20180704] [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

[GIT FIXES FOR v4.18] leaking bpf programs after detach

2018-07-04 Thread Sean Young
Hi Mauro, With the syscall bpf(BPF_PROG_ATTACH), a bpf program can be attached to a lirc device; that should increase the refcount so that the program is not freed. However, when we detach the bpf program, we don't decrease the refcount, so the bpf program will never be freed. Tested with kasan

cron job: media_tree daily build: ERRORS

2018-07-04 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 Jul 5 05:00:11 CEST 2018 media-tree git hash:666e994aa2278e948e2492ee9d81b4df241e7222 media_build

Re: [PATCH 2/2] media: dvb: represent min/max/step/tolerance freqs in Hz

2018-07-04 Thread kbuild test robot
Hi Mauro, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.18-rc3 next-20180704] [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

Re: [PATCH 2/2] media: dvb: represent min/max/step/tolerance freqs in Hz

2018-07-04 Thread kbuild test robot
Hi Mauro, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.18-rc3 next-20180704] [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

Re: [PATCH] vivid: fix gain when autogain is on

2018-07-04 Thread Mauro Carvalho Chehab
Em Fri, 29 Jun 2018 11:40:41 +0200 Hans Verkuil escreveu: > In the vivid driver you want gain to continuous change while autogain > is on. However, dev->jiffies_vid_cap doesn't actually change. It probably > did in the past, but changes in the code caused this to be a fixed value > that is only

[PATCH] media: ov5640: do not change mode if format or frame interval is unchanged

2018-07-04 Thread Hugues Fruchet
Save load of mode registers array when V4L2 client sets a format or a frame interval which selects the same mode than the current one. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git

[PATCH 4/5] media: ov5640: fix auto controls values when switching to manual mode

2018-07-04 Thread Hugues Fruchet
When switching from auto to manual mode, V4L2 core is calling g_volatile_ctrl() in manual mode in order to get the manual initial value. Remove the manual mode check/return to not break this behaviour. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 4 1 file changed, 4

[PATCH 3/5] media: ov5640: fix wrong binning value in exposure calculation

2018-07-04 Thread Hugues Fruchet
ov5640_set_mode_exposure_calc() is checking binning value but binning value read is buggy and binning value set is done after calling ov5640_set_mode_exposure_calc(), fix all of this. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 0/5] Fix OV5640 exposure & gain

2018-07-04 Thread Hugues Fruchet
This patch serie fixes some problems around exposure & gain in OV5640 driver. The 4th patch about autocontrols requires also a fix in v4l2-ctrls.c: https://www.mail-archive.com/linux-media@vger.kernel.org/msg133164.html Here is the test procedure used for exposure & gain controls check: 1)

[PATCH 5/5] media: ov5640: fix restore of last mode set

2018-07-04 Thread Hugues Fruchet
Mode setting depends on last mode set, in particular because of exposure calculation when downscale mode change between subsampling and scaling. At stream on the last mode was wrongly set to current mode, so no change was detected and exposure calculation was not made, fix this. Signed-off-by:

Re: [PATCH] vivid: fix gain when autogain is on

2018-07-04 Thread Hans Verkuil
On 04/07/18 14:16, Mauro Carvalho Chehab wrote: > Em Fri, 29 Jun 2018 11:40:41 +0200 > Hans Verkuil escreveu: > >> In the vivid driver you want gain to continuous change while autogain >> is on. However, dev->jiffies_vid_cap doesn't actually change. It probably >> did in the past, but changes in

[PATCH 1/5] media: ov5640: fix exposure regression

2018-07-04 Thread Hugues Fruchet
fixes: bf4a4b518c20 ("media: ov5640: Don't force the auto exposure state at start time"). Symptom was black image when capturing HD or 5Mp picture due to manual exposure set to 1 while it was intended to set autoexposure to "manual", fix this. Signed-off-by: Hugues Fruchet ---

[PATCH 2/5] media: ov5640: fix auto gain & exposure when changing mode

2018-07-04 Thread Hugues Fruchet
Ensure that auto gain and auto exposure are well restored when changing mode. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 96 ++ 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/drivers/media/i2c/ov5640.c

[GIT PULL FOR v4.19] Various fixes

2018-07-04 Thread Hans Verkuil
About half of this pull request is Jacopo's R-Car R8A77995 series, the other half are miscellaneous patches. Regards, Hans The following changes since commit 3c4a737267e89aafa6308c6c456d2ebea3fcd085: media: ov5640: fix frame interval enumeration (2018-06-28 09:24:38 -0400) are

[PATCH] media: dvb_ca_en50221: off by one in dvb_ca_en50221_io_do_ioctl()

2018-07-04 Thread Dan Carpenter
The > should be >= so we don't read one element beyond the end of the ca->slot_info[] array. The array is allocated in dvb_ca_en50221_init(). Signed-off-by: Dan Carpenter diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c index

Re: [PATCH v2 2/3] s5p-g2d: Remove unrequired wait in .job_abort

2018-07-04 Thread Hans Verkuil
On 18/06/18 06:38, Ezequiel Garcia wrote: > As per the documentation, job_abort is not required > to wait until the current job finishes. It is redundant > to do so, as the core will perform the wait operation. > > Remove the wait infrastructure completely. Sylwester, can you review this?

Re: [PATCH v7 1/2] media: ov2680: dt: Add bindings for OV2680

2018-07-04 Thread jacopo mondi
Hi Rui, sorry, I'm a bit late, you're already at v7 and I don't want to slow down inclusion with a few minor comments. Please bear with me and see below... On Tue, Jul 03, 2018 at 03:08:02PM +0100, Rui Miguel Silva wrote: > Add device tree binding documentation for the OV2680 camera sensor. >

[PATCH] v4l2-ctrls: add v4l2_ctrl_request_hdl_find/put/ctrl_find functions

2018-07-04 Thread Hans Verkuil
If a driver needs to find/inspect the controls set in a request then it can use these functions. E.g. to check if a required control is set in a request use this in the req_validate() implementation: int res = -EINVAL; hdl = v4l2_ctrl_request_hdl_find(req, parent_hdl);

Re: [PATCH v7 1/2] media: ov2680: dt: Add bindings for OV2680

2018-07-04 Thread Rui Miguel Silva
Hi Jacopo, Hope your fine. Thanks for the review. On Wed 04 Jul 2018 at 09:58, jacopo mondi wrote: Hi Rui, sorry, I'm a bit late, you're already at v7 and I don't want to slow down inclusion with a few minor comments. Please bear with me and see below... On Tue, Jul 03, 2018 at

Re: [PATCH 3/5] media: ov5640: fix wrong binning value in exposure calculation

2018-07-04 Thread jacopo mondi
Hi Hugues, On Wed, Jul 04, 2018 at 03:29:56PM +, Hugues FRUCHET wrote: > Hi Jacopo, > > Many thanks for you valuable comments, I hardly understand this exposure > code, and still some wrongly exposed images are observed switching from > subsampling to scaling modes. Thank you for the

Re: [PATCH 3/5] media: ov5640: fix wrong binning value in exposure calculation

2018-07-04 Thread Hugues FRUCHET
Hi Jacopo, Many thanks for you valuable comments, I hardly understand this exposure code, and still some wrongly exposed images are observed switching from subsampling to scaling modes. Steve, do you have more insight to share with us on this code ? On 07/04/2018 04:38 PM, jacopo mondi wrote:

Re: [PATCH v3 0/3] IOCTLs in ddbridge.

2018-07-04 Thread Mauro Carvalho Chehab
Hi Daniel, Em Sat, 12 May 2018 13:24:29 +0200 Daniel Scheller escreveu: > From: Daniel Scheller > > Third iteration of the IOCTL patches for ddbridge, split into multiple > patches: > > Patch 1 just adds the reservation/information of the used IOCTLs into > ioctl-numbers.txt in the Docs dir.

Re: [PATCH 3/5] media: ov5640: fix wrong binning value in exposure calculation

2018-07-04 Thread jacopo mondi
Hi Hugues, On Wed, Jul 04, 2018 at 02:58:41PM +0200, Hugues Fruchet wrote: > ov5640_set_mode_exposure_calc() is checking binning value but > binning value read is buggy and binning value set is done > after calling ov5640_set_mode_exposure_calc(), fix all of this. The ov5640_binning_on()

[PATCH] media.h: add encoder/decoder functions for codecs

2018-07-04 Thread Hans Verkuil
Add MEDIA_ENT_F_PROC_VIDEO_EN/DECODER to be used for the encoder and decoder entities of codec hardware. Signed-off-by: Hans Verkuil --- Documentation/media/uapi/mediactl/media-types.rst | 10 ++ include/uapi/linux/media.h| 2 ++ 2 files changed, 12

[PATCH] media: bpf: ensure bpf program is freed on detach

2018-07-04 Thread Sean Young
Currently we are leaking bpf programs when they are detached from the lirc device; the refcount never reaches zero. Signed-off-by: Sean Young --- drivers/media/rc/bpf-lirc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/rc/bpf-lirc.c b/drivers/media/rc/bpf-lirc.c index

Re: [PATCH v3 0/3] IOCTLs in ddbridge.

2018-07-04 Thread Daniel Scheller
Am Wed, 4 Jul 2018 13:08:31 -0300 schrieb Mauro Carvalho Chehab : > Em Sat, 12 May 2018 13:24:29 +0200 > Daniel Scheller escreveu: > > > From: Daniel Scheller > > > > Third iteration of the IOCTL patches for ddbridge, split into multiple > > patches: > > > > Patch 1 just adds the

Please update linux-media.tar.bz2

2018-07-04 Thread Jasmin J.
Hello Mauro! I got a request from a user, that media_build does not compile for older Kernels. I checked that and found that the downloaded linux-media.tar.bz2 does not contain "include/linux/overflow.h". Please can you add this file, because media-build needs that file now. BR, Jasmin

Re: [PATCH v3 0/3] IOCTLs in ddbridge.

2018-07-04 Thread Jasmin J.
Hello Mauro! > Patch looks ok, although it would be great to get some acks there. I have no time to test this, but I know Daniel does all this tests and in fact he is currently adapting changes done by DD in their repo, modifying them to work in the current media-tree version and submits them to