cron job: media_tree daily build: WARNINGS

2017-04-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:   Sun Apr  9 05:00:17 CEST 2017
media-tree git hash:2f65ec0567f77b75f459c98426053a3787af356a
media_build git hash:   d49f7b2d9934c96a3d2c04021e4da1e12ec97995
v4l-utils git hash: 08572e7db2120bc45db732d02409dfd3346b8e51
gcc version:i686-linux-gcc (GCC) 6.2.0
sparse version: v0.5.0-3553-g78b2ea6
smatch version: v0.5.0-3553-g78b2ea6
host hardware:  x86_64
host os:4.9.0-164

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-multi: OK
linux-git-arm-pxa: OK
linux-git-blackfin-bf561: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.36.4-i686: OK
linux-2.6.37.6-i686: OK
linux-2.6.38.8-i686: OK
linux-2.6.39.4-i686: OK
linux-3.0.60-i686: OK
linux-3.1.10-i686: OK
linux-3.2.37-i686: OK
linux-3.3.8-i686: OK
linux-3.4.27-i686: OK
linux-3.5.7-i686: OK
linux-3.6.11-i686: OK
linux-3.7.4-i686: OK
linux-3.8-i686: OK
linux-3.9.2-i686: OK
linux-3.10.1-i686: WARNINGS
linux-3.11.1-i686: OK
linux-3.12.67-i686: OK
linux-3.13.11-i686: WARNINGS
linux-3.14.9-i686: WARNINGS
linux-3.15.2-i686: WARNINGS
linux-3.16.7-i686: WARNINGS
linux-3.17.8-i686: WARNINGS
linux-3.18.7-i686: WARNINGS
linux-3.19-i686: WARNINGS
linux-4.0.9-i686: WARNINGS
linux-4.1.33-i686: WARNINGS
linux-4.2.8-i686: WARNINGS
linux-4.3.6-i686: WARNINGS
linux-4.4.22-i686: WARNINGS
linux-4.5.7-i686: WARNINGS
linux-4.6.7-i686: WARNINGS
linux-4.7.5-i686: WARNINGS
linux-4.8-i686: OK
linux-4.9-i686: OK
linux-4.10.1-i686: OK
linux-4.11-rc1-i686: OK
linux-2.6.36.4-x86_64: OK
linux-2.6.37.6-x86_64: OK
linux-2.6.38.8-x86_64: OK
linux-2.6.39.4-x86_64: OK
linux-3.0.60-x86_64: OK
linux-3.1.10-x86_64: OK
linux-3.2.37-x86_64: OK
linux-3.3.8-x86_64: OK
linux-3.4.27-x86_64: OK
linux-3.5.7-x86_64: OK
linux-3.6.11-x86_64: OK
linux-3.7.4-x86_64: OK
linux-3.8-x86_64: OK
linux-3.9.2-x86_64: OK
linux-3.10.1-x86_64: WARNINGS
linux-3.11.1-x86_64: OK
linux-3.12.67-x86_64: OK
linux-3.13.11-x86_64: WARNINGS
linux-3.14.9-x86_64: WARNINGS
linux-3.15.2-x86_64: WARNINGS
linux-3.16.7-x86_64: WARNINGS
linux-3.17.8-x86_64: WARNINGS
linux-3.18.7-x86_64: WARNINGS
linux-3.19-x86_64: WARNINGS
linux-4.0.9-x86_64: WARNINGS
linux-4.1.33-x86_64: WARNINGS
linux-4.2.8-x86_64: WARNINGS
linux-4.3.6-x86_64: WARNINGS
linux-4.4.22-x86_64: WARNINGS
linux-4.5.7-x86_64: WARNINGS
linux-4.6.7-x86_64: WARNINGS
linux-4.7.5-x86_64: WARNINGS
linux-4.8-x86_64: WARNINGS
linux-4.9-x86_64: WARNINGS
linux-4.10.1-x86_64: WARNINGS
linux-4.11-rc1-x86_64: OK
apps: WARNINGS
spec-git: OK
sparse: WARNINGS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Sunday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Sunday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/index.html


HauppaugeTV-quadHD DVB-T mpeg risc op code errors

2017-04-08 Thread Adam Zegelin
Hi,

I recently purchased a HauppaugeTV-quadHD DVB-T/T2/C tuner in Australia.

I followed the guide on linuxtv.org available here:
https://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-quadHD_(DVB-T/T2/C)

I installed the dvb-demod-si2168-b40-01.fw firmware file.

Device nodes for the card are present:
/dev/dvb/adapter3
/dev/dvb/adapter3/net0
/dev/dvb/adapter3/dvr0
/dev/dvb/adapter3/demux0
/dev/dvb/adapter3/frontend0
/dev/dvb/adapter2
/dev/dvb/adapter2/net0
/dev/dvb/adapter2/dvr0
/dev/dvb/adapter2/demux0
/dev/dvb/adapter2/frontend0
/dev/dvb/adapter1
/dev/dvb/adapter1/net0
/dev/dvb/adapter1/dvr0
/dev/dvb/adapter1/demux0
/dev/dvb/adapter1/frontend0
/dev/dvb/adapter0
/dev/dvb/adapter0/net0
/dev/dvb/adapter0/dvr0
/dev/dvb/adapter0/demux0
/dev/dvb/adapter0/frontend0

I cannot get any dvb-t application to work. TvHeadend detects the
adapters, but is unable to scan.
w_scan fails too, for example:
$ ./w_scan -c AU
w_scan version 20170107 (compiled for DVB API 5.10)
using settings for AUSTRALIA
DVB aerial
DVB-T AU
scan type TERRESTRIAL, channellist 3
output format vdr-2.0
WARNING: could not guess your codepage. Falling back to 'UTF-8'
output charset 'UTF-8', use -C  to override
Info: using DVB adapter auto detection.
/dev/dvb/adapter0/frontend0 -> TERRESTRIAL "Silicon Labs
Si2168": very good :-))

Using TERRESTRIAL frontend (adapter /dev/dvb/adapter0/frontend0)
-_-_-_-_ Getting frontend capabilities-_-_-_-_
Using DVB API 5.10
frontend 'Silicon Labs Si2168' supports
DVB-T2
INVERSION_AUTO
QAM_AUTO
TRANSMISSION_MODE_AUTO
GUARD_INTERVAL_AUTO
HIERARCHY_AUTO
FEC_AUTO
BANDWIDTH_AUTO not supported, trying 6/7/8 MHz.
FREQ (42.00MHz ... 870.00MHz)
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Scanning DVB-T...
Scanning 7MHz frequencies...
177500: (time: 00:00.009) signal ok:QAM_AUTO f = 177500
kHz I999B7C999D999T999G999Y999 (0:0:0)
Info: no data from PAT after 2 seconds
deleting (QAM_AUTO f = 177500 kHz I999B7C999D999T999G999Y999 (0:0:0))
177625: (time: 00:02.513) signal ok:QAM_AUTO f = 177625
kHz I999B7C999D999T999G999Y999 (0:0:0)
Info: no data from PAT after 2 seconds
deleting (QAM_AUTO f = 177625 kHz I999B7C999D999T999G999Y999 (0:0:0))
184500: (time: 00:05.519) signal ok:QAM_AUTO f = 184500
kHz I999B7C999D999T999G999Y999 (0:0:0)
Info: no data from PAT after 2 seconds
deleting (QAM_AUTO f = 184500 kHz I999B7C999D999T999G999Y999 (0:0:0))
184625: (time: 00:08.499) signal ok:QAM_AUTO f = 184625
kHz I999B7C999D999T999G999Y999 (0:0:0)
Info: no data from PAT after 2 seconds
deleting (QAM_AUTO f = 184625 kHz I999B7C999D999T999G999Y999 (0:0:0))


The `lspci` output for this card is:
01:00.0 PCI bridge: Pericom Semiconductor Device 2304 (rev 05)
02:01.0 PCI bridge: Pericom Semiconductor Device 2304 (rev 05)
02:02.0 PCI bridge: Pericom Semiconductor Device 2304 (rev 05)
03:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885
PCI Video and Audio Decoder (rev 03)
04:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885
PCI Video and Audio Decoder (rev 03)

`dmesg` output for each of the CX23885 devices on boot is:
[2.108823] tveeprom: Hauppauge model 166200, rev B5I6, serial# 4035886915
[2.108827] tveeprom: MAC address is 00:0d:fe:8e:bf:43
[2.108830] tveeprom: tuner model is SiLabs Si2157 (idx 186, type 4)
[2.108833] tveeprom: TV standards ATSC/DVB Digital (eeprom 0x80)
[2.108835] tveeprom: audio processor is CX23885 (idx 39)
[2.108836] tveeprom: decoder processor is CX23885 (idx 33)
[2.108838] tveeprom: has no radio, has IR receiver, has no IR transmitter
[2.108841] cx23885: cx23885[0]: warning: unknown hauppauge model #166200
[2.108842] cx23885: cx23885[0]: hauppauge eeprom: model=166200
[2.108846] cx23885: cx23885_dvb_register() allocating 1 frontend(s)
[2.108849] cx23885: cx23885[0]: cx23885 based dvb card
[2.118763] i2c i2c-4: Added multiplexed i2c bus 7
[2.118768] si2168 4-0064: Silicon Labs Si2168-B40 successfully identified
[2.118772] si2168 4-0064: firmware version: B 4.0.2
[2.122432] si2157 5-0060: Silicon Labs Si2147/2148/2157/2158
successfully attached
[2.122457] dvbdev: DVB: registering new adapter (cx23885[0])
[2.122464] cx23885 :03:00.0: DVB: registering adapter 0
frontend 0 (Silicon Labs Si2168)...
[2.123007] cx23885: cx23885_dvb_register() allocating 1 frontend(s)
[2.123010] cx23885: cx23885[0]: cx23885 based dvb card
[2.129982] i2c i2c-4: Added multiplexed i2c bus 8
[2.129987] si2168 4-0066: Silicon Labs Si2168-B40 successfully identified
[2.129990] si2168 4-0066: firmware version: B 4.0.2
[2.132024] si2157 5-0062: Silicon Labs Si2147/2148/2157/2158
successfully attached
[2.132043] dvbdev: DVB: registering new adapter (cx23885[0])
[2.132048] cx23885 :03:00.0: DVB: registering adapter 1
frontend 0 (Silicon Labs Si2168)...
[2.132503] cx23885: cx23885_dev_checkrevisio

[PATCH 09/12] [media] s5p-mfc: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index bb0a588..2c363aa 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1266,9 +1266,8 @@ static int s5p_mfc_probe(struct platform_device *pdev)
dev->hw_lock = 0;
INIT_WORK(&dev->watchdog_work, s5p_mfc_watchdog_worker);
atomic_set(&dev->watchdog_cnt, 0);
-   init_timer(&dev->watchdog_timer);
-   dev->watchdog_timer.data = (unsigned long)dev;
-   dev->watchdog_timer.function = s5p_mfc_watchdog;
+   setup_timer(&dev->watchdog_timer, s5p_mfc_watchdog,
+   (unsigned long)dev);
 
/* Initialize HW ops and commands based on MFC version */
s5p_mfc_init_hw_ops(dev);
-- 
2.9.3



[PATCH 06/12] [media] netup_unidvb: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c 
b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
index 191bd82..983 100644
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
@@ -663,9 +663,8 @@ static int netup_unidvb_dma_init(struct netup_unidvb_dev 
*ndev, int num)
spin_lock_init(&dma->lock);
INIT_WORK(&dma->work, netup_unidvb_dma_worker);
INIT_LIST_HEAD(&dma->free_buffers);
-   dma->timeout.function = netup_unidvb_dma_timeout;
-   dma->timeout.data = (unsigned long)dma;
-   init_timer(&dma->timeout);
+   setup_timer(&dma->timeout, netup_unidvb_dma_timeout,
+   (unsigned long)dma);
dma->ring_buffer_size = ndev->dma_size / 2;
dma->addr_virt = ndev->dma_virt + dma->ring_buffer_size * num;
dma->addr_phys = (dma_addr_t)((u64)ndev->dma_phys +
-- 
2.9.3



[PATCH 10/12] [media] c8sectpfe: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c 
b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 7652ce2..59280ac 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -865,9 +865,8 @@ static int c8sectpfe_probe(struct platform_device *pdev)
}
 
/* Setup timer interrupt */
-   init_timer(&fei->timer);
-   fei->timer.function = c8sectpfe_timer_interrupt;
-   fei->timer.data = (unsigned long)fei;
+   setup_timer(&fei->timer, c8sectpfe_timer_interrupt,
+   (unsigned long)fei);
 
mutex_init(&fei->lock);
 
-- 
2.9.3



[PATCH 12/12] [media] imon: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/rc/imon.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index 89823d2..3489010 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -2412,9 +2412,8 @@ static struct imon_context *imon_init_intf1(struct 
usb_interface *intf,
mutex_lock(&ictx->lock);
 
if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) {
-   init_timer(&ictx->ttimer);
-   ictx->ttimer.data = (unsigned long)ictx;
-   ictx->ttimer.function = imon_touch_display_timeout;
+   setup_timer(&ictx->ttimer, imon_touch_display_timeout,
+   (unsigned long)ictx);
}
 
ictx->usbdev_intf1 = usb_get_dev(interface_to_usbdev(intf));
-- 
2.9.3



[PATCH 05/12] [media] ivtv: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/pci/ivtv/ivtv-driver.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/pci/ivtv/ivtv-driver.c 
b/drivers/media/pci/ivtv/ivtv-driver.c
index a71a03e..e8fa99b 100644
--- a/drivers/media/pci/ivtv/ivtv-driver.c
+++ b/drivers/media/pci/ivtv/ivtv-driver.c
@@ -770,9 +770,8 @@ static int ivtv_init_struct1(struct ivtv *itv)
init_waitqueue_head(&itv->event_waitq);
init_waitqueue_head(&itv->vsync_waitq);
init_waitqueue_head(&itv->dma_waitq);
-   init_timer(&itv->dma_timer);
-   itv->dma_timer.function = ivtv_unfinished_dma;
-   itv->dma_timer.data = (unsigned long)itv;
+   setup_timer(&itv->dma_timer, ivtv_unfinished_dma,
+   (unsigned long)itv);
 
itv->cur_dma_stream = -1;
itv->cur_pio_stream = -1;
-- 
2.9.3



[PATCH 08/12] [media] fsl-viu: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/platform/fsl-viu.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index ae8c6b3..97e164b 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -1466,9 +1466,8 @@ static int viu_of_probe(struct platform_device *op)
viu_dev->decoder = v4l2_i2c_new_subdev(&viu_dev->v4l2_dev, ad,
"saa7113", VIU_VIDEO_DECODER_ADDR, NULL);
 
-   viu_dev->vidq.timeout.function = viu_vid_timeout;
-   viu_dev->vidq.timeout.data = (unsigned long)viu_dev;
-   init_timer(&viu_dev->vidq.timeout);
+   setup_timer(&viu_dev->vidq.timeout, viu_vid_timeout,
+   (unsigned long)viu_dev);
viu_dev->std = V4L2_STD_NTSC_M;
viu_dev->first = 1;
 
-- 
2.9.3



[PATCH 07/12] [media] av7110: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/pci/ttpci/av7110_ir.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/pci/ttpci/av7110_ir.c 
b/drivers/media/pci/ttpci/av7110_ir.c
index 10e28f0..ca05198 100644
--- a/drivers/media/pci/ttpci/av7110_ir.c
+++ b/drivers/media/pci/ttpci/av7110_ir.c
@@ -333,9 +333,8 @@ int av7110_ir_init(struct av7110 *av7110)
av_list[av_cnt++] = av7110;
av7110_check_ir_config(av7110, true);
 
-   init_timer(&av7110->ir.keyup_timer);
-   av7110->ir.keyup_timer.function = av7110_emit_keyup;
-   av7110->ir.keyup_timer.data = (unsigned long) &av7110->ir;
+   setup_timer(&av7110->ir.keyup_timer, av7110_emit_keyup,
+   (unsigned long)&av7110->ir);
 
input_dev = input_allocate_device();
if (!input_dev)
-- 
2.9.3



[PATCH 04/12] [media] cx18: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/pci/cx18/cx18-streams.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/pci/cx18/cx18-streams.c 
b/drivers/media/pci/cx18/cx18-streams.c
index 7c93814..3c45e007 100644
--- a/drivers/media/pci/cx18/cx18-streams.c
+++ b/drivers/media/pci/cx18/cx18-streams.c
@@ -282,9 +282,7 @@ static void cx18_stream_init(struct cx18 *cx, int type)
INIT_WORK(&s->out_work_order, cx18_out_work_handler);
 
INIT_LIST_HEAD(&s->vb_capture);
-   s->vb_timeout.function = cx18_vb_timeout;
-   s->vb_timeout.data = (unsigned long)s;
-   init_timer(&s->vb_timeout);
+   setup_timer(&s->vb_timeout, cx18_vb_timeout, (unsigned long)s);
spin_lock_init(&s->vb_lock);
if (type == CX18_ENC_STREAM_TYPE_YUV) {
spin_lock_init(&s->vbuf_q_lock);
-- 
2.9.3



[PATCH 03/12] [media] bt8xx: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/pci/bt8xx/bttv-driver.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-driver.c 
b/drivers/media/pci/bt8xx/bttv-driver.c
index fb4aefb..ed319f1 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -4043,9 +4043,7 @@ static int bttv_probe(struct pci_dev *dev, const struct 
pci_device_id *pci_id)
INIT_LIST_HEAD(&btv->capture);
INIT_LIST_HEAD(&btv->vcapture);
 
-   init_timer(&btv->timeout);
-   btv->timeout.function = bttv_irq_timeout;
-   btv->timeout.data = (unsigned long)btv;
+   setup_timer(&btv->timeout, bttv_irq_timeout, (unsigned long)btv);
 
btv->i2c_rc = -1;
btv->tuner_type  = UNSET;
-- 
2.9.3



[PATCH 11/12] [media] wl128x: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/radio/wl128x/fmdrv_common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/radio/wl128x/fmdrv_common.c 
b/drivers/media/radio/wl128x/fmdrv_common.c
index 74a1b3e..588e2d6 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -1550,9 +1550,8 @@ int fmc_prepare(struct fmdev *fmdev)
atomic_set(&fmdev->tx_cnt, 1);
fmdev->resp_comp = NULL;
 
-   init_timer(&fmdev->irq_info.timer);
-   fmdev->irq_info.timer.function = &int_timeout_handler;
-   fmdev->irq_info.timer.data = (unsigned long)fmdev;
+   setup_timer(&fmdev->irq_info.timer, &int_timeout_handler,
+   (unsigned long)fmdev);
/*TODO: add FM_STIC_EVENT later */
fmdev->irq_info.mask = FM_MAL_EVENT;
 
-- 
2.9.3



[PATCH 01/12] [media] saa7134: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/pci/saa7134/saa7134-ts.c| 5 ++---
 drivers/media/pci/saa7134/saa7134-vbi.c   | 5 ++---
 drivers/media/pci/saa7134/saa7134-video.c | 5 ++---
 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/media/pci/saa7134/saa7134-ts.c 
b/drivers/media/pci/saa7134/saa7134-ts.c
index 578e03f..7414878 100644
--- a/drivers/media/pci/saa7134/saa7134-ts.c
+++ b/drivers/media/pci/saa7134/saa7134-ts.c
@@ -223,9 +223,8 @@ int saa7134_ts_init1(struct saa7134_dev *dev)
dev->ts.nr_packets = ts_nr_packets;
 
INIT_LIST_HEAD(&dev->ts_q.queue);
-   init_timer(&dev->ts_q.timeout);
-   dev->ts_q.timeout.function = saa7134_buffer_timeout;
-   dev->ts_q.timeout.data = (unsigned long)(&dev->ts_q);
+   setup_timer(&dev->ts_q.timeout, saa7134_buffer_timeout,
+   (unsigned long)(&dev->ts_q));
dev->ts_q.dev  = dev;
dev->ts_q.need_two = 1;
dev->ts_started= 0;
diff --git a/drivers/media/pci/saa7134/saa7134-vbi.c 
b/drivers/media/pci/saa7134/saa7134-vbi.c
index 4619337..bcad9b2 100644
--- a/drivers/media/pci/saa7134/saa7134-vbi.c
+++ b/drivers/media/pci/saa7134/saa7134-vbi.c
@@ -181,9 +181,8 @@ struct vb2_ops saa7134_vbi_qops = {
 int saa7134_vbi_init1(struct saa7134_dev *dev)
 {
INIT_LIST_HEAD(&dev->vbi_q.queue);
-   init_timer(&dev->vbi_q.timeout);
-   dev->vbi_q.timeout.function = saa7134_buffer_timeout;
-   dev->vbi_q.timeout.data = (unsigned long)(&dev->vbi_q);
+   setup_timer(&dev->vbi_q.timeout, saa7134_buffer_timeout,
+   (unsigned long)(&dev->vbi_q));
dev->vbi_q.dev  = dev;
 
if (vbibufs < 2)
diff --git a/drivers/media/pci/saa7134/saa7134-video.c 
b/drivers/media/pci/saa7134/saa7134-video.c
index 4b1c432..51d42bb 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -2145,9 +2145,8 @@ int saa7134_video_init1(struct saa7134_dev *dev)
dev->automute   = 0;
 
INIT_LIST_HEAD(&dev->video_q.queue);
-   init_timer(&dev->video_q.timeout);
-   dev->video_q.timeout.function = saa7134_buffer_timeout;
-   dev->video_q.timeout.data = (unsigned long)(&dev->video_q);
+   setup_timer(&dev->video_q.timeout, saa7134_buffer_timeout,
+   (unsigned long)(&dev->video_q));
dev->video_q.dev  = dev;
dev->fmt = format_by_fourcc(V4L2_PIX_FMT_BGR24);
dev->width= 720;
-- 
2.9.3



[PATCH 02/12] [media] saa7146: use setup_timer

2017-04-08 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang 
---
 drivers/media/common/saa7146/saa7146_vbi.c   | 5 ++---
 drivers/media/common/saa7146/saa7146_video.c | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/media/common/saa7146/saa7146_vbi.c 
b/drivers/media/common/saa7146/saa7146_vbi.c
index 4923751..3553ac4 100644
--- a/drivers/media/common/saa7146/saa7146_vbi.c
+++ b/drivers/media/common/saa7146/saa7146_vbi.c
@@ -365,9 +365,8 @@ static void vbi_init(struct saa7146_dev *dev, struct 
saa7146_vv *vv)
 
INIT_LIST_HEAD(&vv->vbi_dmaq.queue);
 
-   init_timer(&vv->vbi_dmaq.timeout);
-   vv->vbi_dmaq.timeout.function = saa7146_buffer_timeout;
-   vv->vbi_dmaq.timeout.data = (unsigned long)(&vv->vbi_dmaq);
+   setup_timer(&vv->vbi_dmaq.timeout, saa7146_buffer_timeout,
+   (unsigned long)(&vv->vbi_dmaq));
vv->vbi_dmaq.dev  = dev;
 
init_waitqueue_head(&vv->vbi_wq);
diff --git a/drivers/media/common/saa7146/saa7146_video.c 
b/drivers/media/common/saa7146/saa7146_video.c
index e034bcf..b3b29d4 100644
--- a/drivers/media/common/saa7146/saa7146_video.c
+++ b/drivers/media/common/saa7146/saa7146_video.c
@@ -1201,9 +1201,8 @@ static void video_init(struct saa7146_dev *dev, struct 
saa7146_vv *vv)
 {
INIT_LIST_HEAD(&vv->video_dmaq.queue);
 
-   init_timer(&vv->video_dmaq.timeout);
-   vv->video_dmaq.timeout.function = saa7146_buffer_timeout;
-   vv->video_dmaq.timeout.data = (unsigned long)(&vv->video_dmaq);
+   setup_timer(&vv->video_dmaq.timeout, saa7146_buffer_timeout,
+   (unsigned long)(&vv->video_dmaq));
vv->video_dmaq.dev  = dev;
 
/* set some default values */
-- 
2.9.3



Re: [PATCH v2 00/21] Convert USB documentation to ReST format

2017-04-08 Thread Greg Kroah-Hartman
On Sat, Apr 08, 2017 at 11:23:28AM -0600, Jonathan Corbet wrote:
> On Wed,  5 Apr 2017 10:22:54 -0300
> Mauro Carvalho Chehab  wrote:
> 
> > Currently, there are several USB core documents that are at either
> > written in plain text or in DocBook format. Convert them to ReST
> > and add to the driver-api book.
> 
> Greg, do you see any reason not to apply these for 4.12?  A few of them
> touch comments outside of Documentation/; I'm happy to carry those or
> leave them to you, as you prefer.

I'll queue them up in the next few days, thanks!

greg k-h


Re: [PATCHv3 17/22] staging: android: ion: Collapse internal header files

2017-04-08 Thread Emil Velikov
Hi Laura,

Couple of trivial nitpicks below.

On 3 April 2017 at 19:57, Laura Abbott  wrote:

> --- a/drivers/staging/android/ion/ion.h
> +++ b/drivers/staging/android/ion/ion.h
> @@ -1,5 +1,5 @@
>  /*
> - * drivers/staging/android/ion/ion.h
> + * drivers/staging/android/ion/ion_priv.h
Does not match the actual filename.

>   *
>   * Copyright (C) 2011 Google, Inc.
>   *
> @@ -14,24 +14,26 @@
>   *
>   */
>
> -#ifndef _LINUX_ION_H
> -#define _LINUX_ION_H
> +#ifndef _ION_PRIV_H
> +#define _ION_PRIV_H
>
Ditto.

> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
>  #include 
> +#include 
>
>  #include "../uapi/ion.h"
>
You don't want to use "../" in includes. Perhaps address with another
patch, if you haven't already ?

Regards,
Emil


Re: [PATCH v2 00/21] Convert USB documentation to ReST format

2017-04-08 Thread Jonathan Corbet
On Wed,  5 Apr 2017 10:22:54 -0300
Mauro Carvalho Chehab  wrote:

> Currently, there are several USB core documents that are at either
> written in plain text or in DocBook format. Convert them to ReST
> and add to the driver-api book.

Greg, do you see any reason not to apply these for 4.12?  A few of them
touch comments outside of Documentation/; I'm happy to carry those or
leave them to you, as you prefer.

Thanks,

jon


[PATCH] media: bcm2048: fix several macros

2017-04-08 Thread Nikola Jelic
Some of the macros didn't use the parenthesis around the parameters when
used in the body of the macro.

Signed-off-by: Nikola Jelic 
---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c 
b/drivers/staging/media/bcm2048/radio-bcm2048.c
index 375c6178032a..38f72d069e27 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -177,12 +177,12 @@
 
 #define BCM2048_FREQDEV_UNIT   1
 #define BCM2048_FREQV4L2_MULTI 625
-#define dev_to_v4l2(f) ((f * BCM2048_FREQDEV_UNIT) / BCM2048_FREQV4L2_MULTI)
-#define v4l2_to_dev(f) ((f * BCM2048_FREQV4L2_MULTI) / BCM2048_FREQDEV_UNIT)
+#define dev_to_v4l2(f) (((f) * BCM2048_FREQDEV_UNIT) / BCM2048_FREQV4L2_MULTI)
+#define v4l2_to_dev(f) (((f) * BCM2048_FREQV4L2_MULTI) / BCM2048_FREQDEV_UNIT)
 
-#define msb(x)  ((u8)((u16)x >> 8))
-#define lsb(x)  ((u8)((u16)x &  0x00FF))
-#define compose_u16(msb, lsb)  (((u16)msb << 8) | lsb)
+#define msb(x)  ((u8)((u16)(x) >> 8))
+#define lsb(x)  ((u8)((u16)(x) &  0x00FF))
+#define compose_u16(msb, lsb)  (((u16)(msb) << 8) | (lsb))
 
 #define BCM2048_DEFAULT_POWERING_DELAY 20
 #define BCM2048_DEFAULT_REGION 0x02
@@ -2016,7 +2016,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,  
\
if (!bdev)  \
return -ENODEV; \
\
-   out = kzalloc(size + 1, GFP_KERNEL);\
+   out = kzalloc((size) + 1, GFP_KERNEL);  \
if (!out)   \
return -ENOMEM; \
\
-- 
2.11.0



Re: [PATCH 28/38] Annotate hardware config module parameters in drivers/staging/media/

2017-04-08 Thread Greg KH
On Wed, Apr 05, 2017 at 06:01:01PM +0100, David Howells wrote:
> When the kernel is running in secure boot mode, we lock down the kernel to
> prevent userspace from modifying the running kernel image.  Whilst this
> includes prohibiting access to things like /dev/mem, it must also prevent
> access by means of configuring driver modules in such a way as to cause a
> device to access or modify the kernel image.
> 
> To this end, annotate module_param* statements that refer to hardware
> configuration and indicate for future reference what type of parameter they
> specify.  The parameter parser in the core sees this information and can
> skip such parameters with an error message if the kernel is locked down.
> The module initialisation then runs as normal, but just sees whatever the
> default values for those parameters is.
> 
> Note that we do still need to do the module initialisation because some
> drivers have viable defaults set in case parameters aren't specified and
> some drivers support automatic configuration (e.g. PNP or PCI) in addition
> to manually coded parameters.
> 
> This patch annotates drivers in drivers/staging/media/.
> 
> Suggested-by: Alan Cox 
> Signed-off-by: David Howells 
> cc: Mauro Carvalho Chehab 
> cc: Greg Kroah-Hartman 
> cc: linux-media@vger.kernel.org
> cc: de...@driverdev.osuosl.org

Acked-by: Greg Kroah-Hartman 


Re: [PATCH] staging: media/platform/bcm2835: remove gstreamer workaround

2017-04-08 Thread Greg Kroah-Hartman
On Sun, Apr 02, 2017 at 12:48:15AM -0400, Kevin Wern wrote:
> Gstreamer's v4l2src reacted poorly to certain outputs from the bcm2835
> video driver's ioctl ops function vidioc_enum_framesizes, so a
> workaround was created that could be activated by user input. This
> workaround would replace the driver's ioctl ops struct with another,
> similar struct--only with no function pointed to by
> vidioc_enum_framesizes. With no response, gstreamer would attempt to
> continue with some default settings that happened to work better.
> 
> However, this bug has been fixed in gstreamer since 2014, so we
> shouldn't include this workaround in the stable version of the driver.
> 
> Signed-off-by: Kevin Wern 
> ---
>  drivers/staging/media/platform/bcm2835/TODO|  5 --
>  .../media/platform/bcm2835/bcm2835-camera.c| 59 
> --
>  2 files changed, 64 deletions(-)

Doesn't apply against my tree at all :(

thanks,

greg k-h


[GIT PULL FOR v4.12 (v2)] video/exynos/sti/cec: add CEC notifier & use in drivers + 2 fixes

2017-04-08 Thread Hans Verkuil
This patch series adds the CEC physical address notifier code, based on
Russell's code:

https://patchwork.kernel.org/patch/9277043/

It adds support for it to the exynos4 and sti drm driver, adds support for
it to the CEC framework and finally adds support to the s5p-cec and stih-cec
drivers, which now can be moved out of staging.

Here is Daniel's email to allow this to be pulled through the media subsystem:

http://www.spinics.net/lists/dri-devel/msg137128.html

This pull request contains the v6 patch series:

http://www.spinics.net/lists/dri-devel/msg137320.html

and the v6.1 patch for "media: add CEC notifier support":

https://patchwork.linuxtv.org/patch/40654/

And two CEC fixes:

https://patchwork.linuxtv.org/patch/40599/
https://patchwork.linuxtv.org/patch/40582/

Regards,

Hans

Changes since the previous (now superseded) pull request:

- added the exynos4/s5p-cec driver. Andrzej Hajda added his Reviewed-by tag
  to the exynos4 drm driver, so this is now good to go in as well.


The following changes since commit 2f65ec0567f77b75f459c98426053a3787af356a:

  [media] s5p-g2d: Fix error handling (2017-04-05 16:37:15 -0300)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git cec-not

for you to fetch changes up to 4daddcf63addef9a5ccab0822af9873278c87ce1:

  cec: fix confusing CEC_CAP_RC and IS_REACHABLE(CONFIG_RC_CORE) code 
(2017-04-08 16:22:45 +0200)


Benjamin Gaignard (4):
  sti: hdmi: add CEC notifier support
  stih-cec.txt: document new hdmi phandle
  stih-cec: add CEC notifier support
  ARM: dts: STiH410: update sti-cec for CEC notifier support

Hans Verkuil (7):
  media: add CEC notifier support
  cec: integrate CEC notifier support
  exynos_hdmi: add CEC notifier support
  ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi
  s5p-cec.txt: document the HDMI controller phandle
  s5p-cec: add cec-notifier support, move out of staging
  cec: fix confusing CEC_CAP_RC and IS_REACHABLE(CONFIG_RC_CORE) code

Lee Jones (1):
  cec: Fix runtime BUG when (CONFIG_RC_CORE && !CEC_CAP_RC)

 Documentation/devicetree/bindings/media/s5p-cec.txt  |   2 +
 Documentation/devicetree/bindings/media/stih-cec.txt |   2 +
 MAINTAINERS  |   4 +-
 arch/arm/boot/dts/exynos4.dtsi   |   1 +
 arch/arm/boot/dts/stih407-family.dtsi|  12 ---
 arch/arm/boot/dts/stih410.dtsi   |  13 
 drivers/gpu/drm/exynos/exynos_hdmi.c |  19 
-
 drivers/gpu/drm/sti/sti_hdmi.c   |  11 +++
 drivers/gpu/drm/sti/sti_hdmi.h   |   3 +
 drivers/media/Kconfig|   4 +
 drivers/media/Makefile   |   4 +
 drivers/media/cec-notifier.c | 129 
+++
 drivers/media/cec/cec-core.c |  32 
+++-
 drivers/media/platform/Kconfig   |  28 
+++
 drivers/media/platform/Makefile  |   2 +
 drivers/{staging/media => media/platform}/s5p-cec/Makefile   |   0
 drivers/{staging/media => media/platform}/s5p-cec/exynos_hdmi_cec.h  |   0
 .../{staging/media => media/platform}/s5p-cec/exynos_hdmi_cecctrl.c  |   0
 drivers/{staging/media => media/platform}/s5p-cec/regs-cec.h |   0
 drivers/{staging/media => media/platform}/s5p-cec/s5p_cec.c  |  35 
+++--
 drivers/{staging/media => media/platform}/s5p-cec/s5p_cec.h  |   3 +
 drivers/{staging/media/st-cec => media/platform/sti/cec}/Makefile|   0
 drivers/{staging/media/st-cec => media/platform/sti/cec}/stih-cec.c  |  31 
+++-
 drivers/staging/media/Kconfig|   4 -
 drivers/staging/media/Makefile   |   2 -
 drivers/staging/media/s5p-cec/Kconfig|   9 ---
 drivers/staging/media/s5p-cec/TODO   |   7 --
 drivers/staging/media/st-cec/Kconfig |   8 --
 drivers/staging/media/st-cec/TODO|   7 --
 include/media/cec-notifier.h | 111 
++
 include/media/cec.h  |  10 +++
 31 files changed, 429 insertions(+), 64 deletions(-)
 create mode 100644 drivers/media/cec-notifier.c
 rename drivers/{staging/media => media/platform}/s5p-cec/Makefile (100%)
 rename drivers/{staging/media => media/platform}/s5p-cec/exynos_hdmi_cec.h 
(100%)
 rename drivers/{staging/media 

[PATCH] dvb-scan-tables: updated Digita frequencies for Finland

2017-04-08 Thread Olli Salonen
In summer 2016 some DVB-T/DVB-T2 frequencies were changed by the broadcaster 
Digita. Here are some that have already changed.

Signed-off-by: Olli Salonen 
---
 dvb-t/fi-Espoo  |  6 +++---
 dvb-t/fi-Fiskars|  4 ++--
 dvb-t/fi-Kustavi_Viherlahti |  8 
 dvb-t/fi-Lahti  |  8 
 dvb-t/fi-Salo_Isokyla   |  6 +++---
 dvb-t/fi-Tampere|  8 
 dvb-t/fi-Tampere_Pyynikki   |  6 +++---
 dvb-t/fi-Turku  | 12 ++--
 8 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/dvb-t/fi-Espoo b/dvb-t/fi-Espoo
index ceb906d..6fb0ff2 100644
--- a/dvb-t/fi-Espoo
+++ b/dvb-t/fi-Espoo
@@ -18,16 +18,16 @@
 
 [Espoo-E]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 73000
+   FREQUENCY = 51400
BANDWIDTH_HZ = 800
 
 [Espoo-D]
DELIVERY_SYSTEM = DVBT2
-   FREQUENCY = 58600
+   FREQUENCY = 65000
BANDWIDTH_HZ = 800
 
 [Espoo-H]
DELIVERY_SYSTEM = DVBT2
-   FREQUENCY = 51400
+   FREQUENCY = 61800
BANDWIDTH_HZ = 800
 
diff --git a/dvb-t/fi-Fiskars b/dvb-t/fi-Fiskars
index 0f84bb7..2b6b791 100644
--- a/dvb-t/fi-Fiskars
+++ b/dvb-t/fi-Fiskars
@@ -8,7 +8,7 @@
 
 [Fiskars]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 65800
+   FREQUENCY = 49800
BANDWIDTH_HZ = 800
 
 [Fiskars]
@@ -18,6 +18,6 @@
 
 [Fiskars]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 77000
+   FREQUENCY = 49000
BANDWIDTH_HZ = 800
 
diff --git a/dvb-t/fi-Kustavi_Viherlahti b/dvb-t/fi-Kustavi_Viherlahti
index ecef74d..9840401 100644
--- a/dvb-t/fi-Kustavi_Viherlahti
+++ b/dvb-t/fi-Kustavi_Viherlahti
@@ -3,21 +3,21 @@
 
 [Kustavi_Viherlahti]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 71400
+   FREQUENCY = 53800
BANDWIDTH_HZ = 800
 
 [Kustavi_Viherlahti]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 73800
+   FREQUENCY = 65800
BANDWIDTH_HZ = 800
 
 [Kustavi_Viherlahti]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 76200
+   FREQUENCY = 68200
BANDWIDTH_HZ = 800
 
 [Kustavi_Viherlahti]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 78600
+   FREQUENCY = 63400
BANDWIDTH_HZ = 800
 
diff --git a/dvb-t/fi-Lahti b/dvb-t/fi-Lahti
index f4c89b8..ea4163c 100644
--- a/dvb-t/fi-Lahti
+++ b/dvb-t/fi-Lahti
@@ -13,21 +13,21 @@
 
 [Lahti-C]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 76200
+   FREQUENCY = 62600
BANDWIDTH_HZ = 800
 
 [Lahti-E]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 71400
+   FREQUENCY = 69000
BANDWIDTH_HZ = 800
 
 [Lahti-D]
DELIVERY_SYSTEM = DVBT2
-   FREQUENCY = 62600
+   FREQUENCY = 60200
BANDWIDTH_HZ = 800
 
 [Lahti-H]
DELIVERY_SYSTEM = DVBT2
-   FREQUENCY = 69000
+   FREQUENCY = 64200
BANDWIDTH_HZ = 800
 
diff --git a/dvb-t/fi-Salo_Isokyla b/dvb-t/fi-Salo_Isokyla
index 42df3b4..0cf08b8 100644
--- a/dvb-t/fi-Salo_Isokyla
+++ b/dvb-t/fi-Salo_Isokyla
@@ -3,7 +3,7 @@
 
 [Salo_Isokyla]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 51400
+   FREQUENCY = 61000
BANDWIDTH_HZ = 800
 
 [Salo_Isokyla]
@@ -13,11 +13,11 @@
 
 [Salo_Isokyla]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 68200
+   FREQUENCY = 53000
BANDWIDTH_HZ = 800
 
 [Salo_Isokyla]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 57000
+   FREQUENCY = 69000
BANDWIDTH_HZ = 800
 
diff --git a/dvb-t/fi-Tampere b/dvb-t/fi-Tampere
index 27cf3a7..33d40c4 100644
--- a/dvb-t/fi-Tampere
+++ b/dvb-t/fi-Tampere
@@ -13,21 +13,21 @@
 
 [Tampere-C]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 77000
+   FREQUENCY = 65800
BANDWIDTH_HZ = 800
 
 [Tampere-E]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 77800
+   FREQUENCY = 67400
BANDWIDTH_HZ = 800
 
 [Tampere-D]
DELIVERY_SYSTEM = DVBT2
-   FREQUENCY = 64200
+   FREQUENCY = 65000
BANDWIDTH_HZ = 800
 
 [Tampere-H]
DELIVERY_SYSTEM = DVBT2
-   FREQUENCY = 67400
+   FREQUENCY = 49800
BANDWIDTH_HZ = 800
 
diff --git a/dvb-t/fi-Tampere_Pyynikki b/dvb-t/fi-Tampere_Pyynikki
index 03e8ecc..1da6662 100644
--- a/dvb-t/fi-Tampere_Pyynikki
+++ b/dvb-t/fi-Tampere_Pyynikki
@@ -8,7 +8,7 @@
 
 [Tampere_Pyynikki]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 65800
+   FREQUENCY = 51400
BANDWIDTH_HZ = 800
 
 [Tampere_Pyynikki]
@@ -18,11 +18,11 @@
 
 [Tampere_Pyynikki]
DELIVERY_SYSTEM = DVBT
-   FREQUENCY = 58600
+   FREQUENCY = 61000
BANDWIDTH_HZ = 800
 
 [Tampere_Pyynikki]
DELIVERY_SYSTEM = DVBT2
-   FREQUENCY = 64200
+   FREQUENCY = 56200
BANDWIDTH_HZ = 800
 
diff --git a/dvb-t/fi-Turku b/d

Re: [PATCH] add blank line after declarations

2017-04-08 Thread Greg Kroah-Hartman
On Fri, Apr 07, 2017 at 08:41:11AM -0400, Manny Vindiola wrote:
> Add blank line after variable declarations as part of checkpatch.pl style 
> fixup.
> 
> Signed-off-by: Manny Vindiola 
> ---
>  drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c | 1 +
>  1 file changed, 1 insertion(+)

Your subject line needs a lot of work, please read the reference
material I sent you for your last patch...

thanks,

greg k-h


Re: [RFC PATCH 3/3] encoder-tpd12s015: keep the ls_oe_gpio on while the phys_addr is valid

2017-04-08 Thread Hans Verkuil
On 04/08/2017 12:11 PM, Hans Verkuil wrote:
> Hi Tomi,
> 
> On 05/10/2016 01:36 PM, Tomi Valkeinen wrote:
>> Hi Hans,
>>
>> On 29/04/16 12:39, Hans Verkuil wrote:
>>> From: Hans Verkuil 
>>>
>>> As long as there is a valid physical address in the EDID and the omap
>>> CEC support is enabled, then we keep ls_oe_gpio on to ensure the CEC
>>> signal is passed through the tpd12s015.
>>>
>>> Signed-off-by: Hans Verkuil 
>>> Suggested-by: Tomi Valkeinen 
>>> ---
>>>  drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 13 -
>>>  1 file changed, 12 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c 
>>> b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
>>> index 916a899..efbba23 100644
>>> --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
>>> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
>>> @@ -16,6 +16,7 @@
>>>  #include 
>>>  #include 
>>>  
>>> +#include 
>>>  #include 
>>>  #include 
>>>  
>>> @@ -65,6 +66,7 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
>>> return;
>>>  
>>> gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
>>> +   gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);
>>>  
>>> dst->src = NULL;
>>> dssdev->dst = NULL;
>>> @@ -142,6 +144,7 @@ static int tpd_read_edid(struct omap_dss_device *dssdev,
>>>  {
>>> struct panel_drv_data *ddata = to_panel_data(dssdev);
>>> struct omap_dss_device *in = ddata->in;
>>> +   bool valid_phys_addr = 0;
>>> int r;
>>>  
>>> if (!gpiod_get_value_cansleep(ddata->hpd_gpio))
>>> @@ -151,7 +154,15 @@ static int tpd_read_edid(struct omap_dss_device 
>>> *dssdev,
>>>  
>>> r = in->ops.hdmi->read_edid(in, edid, len);
>>>  
>>> -   gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);
>>> +#ifdef CONFIG_OMAP2_DSS_HDMI_CEC
>>> +   /*
>>> +* In order to support CEC this pin should remain high
>>> +* as long as the EDID has a valid physical address.
>>> +*/
>>> +   valid_phys_addr =
>>> +   cec_get_edid_phys_addr(edid, r, NULL) != CEC_PHYS_ADDR_INVALID;
>>> +#endif
>>> +   gpiod_set_value_cansleep(ddata->ls_oe_gpio, valid_phys_addr);
>>>  
>>> return r;
>>>  }
>>
>> I think this works, but... Maybe it would be cleaner to have the LS_OE
>> enabled if a cable is connected. That's actually what we had earlier,
>> but I removed that due to a race issue:
>>
>> a87a6d6b09de3118e5679c2057b99b7791b7673b ("OMAPDSS: encoder-tpd12s015:
>> Fix race issue with LS_OE"). Now, with CEC, there's need to have LS_OE
>> enabled even after reading the EDID, so I think it's better to go back
>> to the old model (after fixing the race issue, of course =).
> 
> So, this is a bit of a blast from the past since the omap4 CEC development
> has been on hold for almost a year. But I am about to resume my work on this
> now that the CEC framework was merged.
> 
> The latest code is here, if you are interested:
> 
> https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=panda-cec
> 
> It's pretty much unchanged from the version I posted a year ago, just rebased.
> 
> But before I continue with this I have one question for you. First some
> background:
> 
> There is a special corner case (and I wasn't aware of that a year ago!) where
> it is allowed to send a CEC message when there is *no HPD*.
> 
> The reason is that some displays turn off the hotplug detect pin when they go
> into standby or when another input is active. The only way to communicate with
> such displays is via CEC.
> 
> The problem is that without a HPD there is no EDID and basically no way for an
> HDMI transmitter to detect that something is connected at all, unless you are
> using CEC.
> 
> What this means is that if we want to implement this on the omap4 the CEC 
> support
> has to be on all the time.
> 
> We have seen modern displays that behave like this, so this is a real issue. 
> And
> this corner case is specifically allowed by the CEC specification: the Poll,
> Image/Text View On and the Active Source messages can be sent to a TV even 
> when
> there is no HPD in order to turn on the display if it was in standby and to 
> make
> us the active input.
> 
> The CEC framework in the kernel supports this starting with 4.12 (this code is
> in the panda-cec branch above).
> 
> If this *can't* be supported by the omap4, then I will likely have to add a 
> CEC
> capability to signal to the application that this specific corner case is not
> supported.

FYI: I've just added support for this to the panda-cec branch. CEC on the omap4
now works again, but you can't send CEC messages as long as there is no valid
physical address.

Regards,

Hans

> 
> I just did some tests with omap4 and I my impression is that this can't be
> supported: when the HPD goes away it seems like most/all of the HDMI blocks 
> are
> all powered off and any attempt to even access the CEC registers will fail.
> 
> Changing this looks to be non-trivial if not impossible.
> 
> Can you confi

Re: [PATCHv3 00/22] Ion clean up in preparation in moving out of staging

2017-04-08 Thread Greg Kroah-Hartman
On Mon, Apr 03, 2017 at 11:57:42AM -0700, Laura Abbott wrote:
> Hi,
> 
> This is v3 of the series to do some serious Ion cleanup in preparation for
> moving out of staging. I didn't hear much on v2 so I'm going to assume
> people are okay with the series as is. I know there were still some open
> questions about moving away from /dev/ion but in the interest of small
> steps I'd like to go ahead and merge this series assuming there are no more
> major objections. More work can happen on top of this.

I've applied patches 3-11 as those were independant of the CMA changes.
I'd like to take the rest, including the CMA changes, but I need an ack
from someone dealing with the -mm tree before I can do that.

Or, if they just keep ignoring it, I guess I can take them :)

thanks,

greg k-h


Re: [RFC PATCH 3/3] encoder-tpd12s015: keep the ls_oe_gpio on while the phys_addr is valid

2017-04-08 Thread Hans Verkuil
Hi Tomi,

On 05/10/2016 01:36 PM, Tomi Valkeinen wrote:
> Hi Hans,
> 
> On 29/04/16 12:39, Hans Verkuil wrote:
>> From: Hans Verkuil 
>>
>> As long as there is a valid physical address in the EDID and the omap
>> CEC support is enabled, then we keep ls_oe_gpio on to ensure the CEC
>> signal is passed through the tpd12s015.
>>
>> Signed-off-by: Hans Verkuil 
>> Suggested-by: Tomi Valkeinen 
>> ---
>>  drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 13 -
>>  1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c 
>> b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
>> index 916a899..efbba23 100644
>> --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
>> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
>> @@ -16,6 +16,7 @@
>>  #include 
>>  #include 
>>  
>> +#include 
>>  #include 
>>  #include 
>>  
>> @@ -65,6 +66,7 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
>>  return;
>>  
>>  gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
>> +gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);
>>  
>>  dst->src = NULL;
>>  dssdev->dst = NULL;
>> @@ -142,6 +144,7 @@ static int tpd_read_edid(struct omap_dss_device *dssdev,
>>  {
>>  struct panel_drv_data *ddata = to_panel_data(dssdev);
>>  struct omap_dss_device *in = ddata->in;
>> +bool valid_phys_addr = 0;
>>  int r;
>>  
>>  if (!gpiod_get_value_cansleep(ddata->hpd_gpio))
>> @@ -151,7 +154,15 @@ static int tpd_read_edid(struct omap_dss_device *dssdev,
>>  
>>  r = in->ops.hdmi->read_edid(in, edid, len);
>>  
>> -gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);
>> +#ifdef CONFIG_OMAP2_DSS_HDMI_CEC
>> +/*
>> + * In order to support CEC this pin should remain high
>> + * as long as the EDID has a valid physical address.
>> + */
>> +valid_phys_addr =
>> +cec_get_edid_phys_addr(edid, r, NULL) != CEC_PHYS_ADDR_INVALID;
>> +#endif
>> +gpiod_set_value_cansleep(ddata->ls_oe_gpio, valid_phys_addr);
>>  
>>  return r;
>>  }
> 
> I think this works, but... Maybe it would be cleaner to have the LS_OE
> enabled if a cable is connected. That's actually what we had earlier,
> but I removed that due to a race issue:
> 
> a87a6d6b09de3118e5679c2057b99b7791b7673b ("OMAPDSS: encoder-tpd12s015:
> Fix race issue with LS_OE"). Now, with CEC, there's need to have LS_OE
> enabled even after reading the EDID, so I think it's better to go back
> to the old model (after fixing the race issue, of course =).

So, this is a bit of a blast from the past since the omap4 CEC development
has been on hold for almost a year. But I am about to resume my work on this
now that the CEC framework was merged.

The latest code is here, if you are interested:

https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=panda-cec

It's pretty much unchanged from the version I posted a year ago, just rebased.

But before I continue with this I have one question for you. First some
background:

There is a special corner case (and I wasn't aware of that a year ago!) where
it is allowed to send a CEC message when there is *no HPD*.

The reason is that some displays turn off the hotplug detect pin when they go
into standby or when another input is active. The only way to communicate with
such displays is via CEC.

The problem is that without a HPD there is no EDID and basically no way for an
HDMI transmitter to detect that something is connected at all, unless you are
using CEC.

What this means is that if we want to implement this on the omap4 the CEC 
support
has to be on all the time.

We have seen modern displays that behave like this, so this is a real issue. And
this corner case is specifically allowed by the CEC specification: the Poll,
Image/Text View On and the Active Source messages can be sent to a TV even when
there is no HPD in order to turn on the display if it was in standby and to make
us the active input.

The CEC framework in the kernel supports this starting with 4.12 (this code is
in the panda-cec branch above).

If this *can't* be supported by the omap4, then I will likely have to add a CEC
capability to signal to the application that this specific corner case is not
supported.

I just did some tests with omap4 and I my impression is that this can't be
supported: when the HPD goes away it seems like most/all of the HDMI blocks are
all powered off and any attempt to even access the CEC registers will fail.

Changing this looks to be non-trivial if not impossible.

Can you confirm that that isn't possible? If you think this can be done, then
I'd appreciate if you can give me a few pointers.

Regards,

Hans