cron job: media_tree daily build: ERRORS

2016-07-02 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 Jul  3 04:00:15 CEST 2016
git branch: test
git hash:   d81295d1bed850335f9f4ccb6b1aa4f6a123d4f0
gcc version:i686-linux-gcc (GCC) 5.3.0
sparse version: v0.5.0-56-g7647c77
smatch version: v0.5.0-3428-gdfe27cf
host hardware:  x86_64
host os:4.6.0-164

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mtk: OK
linux-git-arm-mx: OK
linux-git-arm-omap: 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: ERRORS
linux-3.7.4-i686: ERRORS
linux-3.8-i686: ERRORS
linux-3.9.2-i686: ERRORS
linux-3.10.1-i686: ERRORS
linux-3.11.1-i686: ERRORS
linux-3.12.23-i686: ERRORS
linux-3.13.11-i686: ERRORS
linux-3.14.9-i686: ERRORS
linux-3.15.2-i686: ERRORS
linux-3.16.7-i686: ERRORS
linux-3.17.8-i686: ERRORS
linux-3.18.7-i686: ERRORS
linux-3.19-i686: ERRORS
linux-4.0-i686: ERRORS
linux-4.1.1-i686: ERRORS
linux-4.2-i686: ERRORS
linux-4.3-i686: ERRORS
linux-4.4-i686: OK
linux-4.5-i686: OK
linux-4.6-i686: OK
linux-4.7-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: ERRORS
linux-3.7.4-x86_64: ERRORS
linux-3.8-x86_64: ERRORS
linux-3.9.2-x86_64: ERRORS
linux-3.10.1-x86_64: ERRORS
linux-3.11.1-x86_64: ERRORS
linux-3.12.23-x86_64: ERRORS
linux-3.13.11-x86_64: ERRORS
linux-3.14.9-x86_64: ERRORS
linux-3.15.2-x86_64: ERRORS
linux-3.16.7-x86_64: ERRORS
linux-3.17.8-x86_64: ERRORS
linux-3.18.7-x86_64: ERRORS
linux-3.19-x86_64: ERRORS
linux-4.0-x86_64: ERRORS
linux-4.1.1-x86_64: ERRORS
linux-4.2-x86_64: ERRORS
linux-4.3-x86_64: ERRORS
linux-4.4-x86_64: OK
linux-4.5-x86_64: OK
linux-4.6-x86_64: OK
linux-4.7-rc1-x86_64: OK
apps: OK
spec-git: OK
sparse: WARNINGS
smatch: 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/media.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH][media] saa7134: fix warm Medion 7134 EEPROM read

2016-07-02 Thread Maciej S. Szmigiero
When saa7134 module driving a Medion 7134 card is reloaded reads of this
card EEPROM (required for automatic detection of tuner model) will be
corrupted due to I2C gate in DVB-T demod being left closed.
This sometimes also happens on first saa7134 module load after a warm
reboot.

Fix this by opening this I2C gate before doing EEPROM read during i2c
initialization.

Signed-off-by: Maciej S. Szmigiero 
---
This is a modified version of patch submitted a few years ago:
http://www.spinics.net/lists/linux-media/msg24455.html .

That patch was fixing two problems: with TDA9887 detection on cold
board and EEPROM read on warm.

TDA9887 detection issue have been solved since by commit
4aed283c0f7c2 ("switch tuner FMD1216ME_MK3 to analog"),
however EEPROM read issue remained.

This submission fixes this a little bit earlier in the code than previous
attempt (during i2c initialization instead of later board init) so
informational EEPROM read shown in kernel log will also be correct.

 drivers/media/pci/saa7134/saa7134-i2c.c | 31 +++
 1 file changed, 31 insertions(+)

diff --git a/drivers/media/pci/saa7134/saa7134-i2c.c 
b/drivers/media/pci/saa7134/saa7134-i2c.c
index 8ef6399d794f..bc957528f69f 100644
--- a/drivers/media/pci/saa7134/saa7134-i2c.c
+++ b/drivers/media/pci/saa7134/saa7134-i2c.c
@@ -355,12 +355,43 @@ static struct i2c_client saa7134_client_template = {
 
 /* --- */
 
+/* On Medion 7134 reading EEPROM needs DVB-T demod i2c gate open */
+static void saa7134_i2c_eeprom_md7134_gate(struct saa7134_dev *dev)
+{
+   u8 subaddr = 0x7, dmdregval;
+   u8 data[2];
+   int ret;
+   struct i2c_msg i2cgatemsg_r[] = { {.addr = 0x08, .flags = 0,
+  .buf = , .len = 1},
+ {.addr = 0x08,
+  .flags = I2C_M_RD,
+  .buf = , .len = 1}
+   };
+   struct i2c_msg i2cgatemsg_w[] = { {.addr = 0x08, .flags = 0,
+  .buf = data, .len = 2} };
+
+   ret = i2c_transfer(>i2c_adap, i2cgatemsg_r, 2);
+   if ((ret == 2) && (dmdregval & 0x2)) {
+   pr_debug("%s: DVB-T demod i2c gate was left closed\n",
+dev->name);
+
+   data[0] = subaddr;
+   data[1] = (dmdregval & ~0x2);
+   if (i2c_transfer(>i2c_adap, i2cgatemsg_w, 1) != 1)
+   pr_err("%s: EEPROM i2c gate open failure\n",
+ dev->name);
+   }
+}
+
 static int
 saa7134_i2c_eeprom(struct saa7134_dev *dev, unsigned char *eedata, int len)
 {
unsigned char buf;
int i,err;
 
+   if (dev->board == SAA7134_BOARD_MD7134)
+   saa7134_i2c_eeprom_md7134_gate(dev);
+
dev->i2c_client.addr = 0xa0 >> 1;
buf = 0;
if (1 != (err = i2c_master_send(>i2c_client,,1))) {
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2016-07-02 Thread Sean Young
On Fri, Jul 01, 2016 at 05:01:25PM +0900, Andi Shyti wrote:
> 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.

Indeed transmit-only devices don't need an input buffer, which is
just a waste of memory. However can't lirc_register_driver() figure
out from the features if the driver is capable of receiving, i.e.

int lirc_register_driver(struct lirc_driver *d)
{
int err, minor;

minor = lirc_allocate_driver(d);
if (minor < 0)
return minor;

if (d->features & LIRC_CAN_REC_MODE2) {
err = lirc_allocate_buffer(irctls[minor]);
if (err)
lirc_unregister_driver(minor);
}

return err ? err : minor;
}


Sean

> 
> Signed-off-by: Andi Shyti 
> ---
>  drivers/media/rc/lirc_dev.c | 44 ++--
>  include/media/lirc_dev.h| 12 
>  2 files changed, 46 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
> index 5716978..fa562a3 100644
> --- a/drivers/media/rc/lirc_dev.c
> +++ b/drivers/media/rc/lirc_dev.c
> @@ -205,12 +205,14 @@ err_out:
>  
>  static int lirc_allocate_buffer(struct irctl *ir)
>  {
> - int err;
> + int err = 0;
>   int bytes_in_key;
>   unsigned int chunk_size;
>   unsigned int buffer_size;
>   struct lirc_driver *d = >d;
>  
> + mutex_lock(_dev_lock);
> +
>   bytes_in_key = BITS_TO_LONGS(d->code_length) +
>   (d->code_length % 8 ? 1 : 0);
>   buffer_size = d->buffer_size ? d->buffer_size : BUFLEN / bytes_in_key;
> @@ -220,21 +222,26 @@ static int lirc_allocate_buffer(struct irctl *ir)
>   ir->buf = d->rbuf;
>   } else {
>   ir->buf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL);
> - if (!ir->buf)
> - return -ENOMEM;
> + if (!ir->buf) {
> + err = -ENOMEM;
> + goto out;
> + }
>  
>   err = lirc_buffer_init(ir->buf, chunk_size, buffer_size);
>   if (err) {
>   kfree(ir->buf);
> - return err;
> + goto out;
>   }
>   }
>   ir->chunk_size = ir->buf->chunk_size;
>  
> - return 0;
> +out:
> + mutex_unlock(_dev_lock);
> +
> + return err;
>  }
>  
> -int lirc_register_driver(struct lirc_driver *d)
> +static int lirc_allocate_driver(struct lirc_driver *d)
>  {
>   struct irctl *ir;
>   int minor;
> @@ -342,10 +349,6 @@ int lirc_register_driver(struct lirc_driver *d)
>   /* some safety check 8-) */
>   d->name[sizeof(d->name)-1] = '\0';
>  
> - err = lirc_allocate_buffer(ir);
> - if (err)
> - goto out_lock;
> -
>   if (d->features == 0)
>   d->features = LIRC_CAN_REC_LIRCCODE;
>  
> @@ -385,8 +388,29 @@ out_lock:
>  out:
>   return err;
>  }
> +
> +int lirc_register_driver(struct lirc_driver *d)
> +{
> + int err, minor;
> +
> + minor = lirc_allocate_driver(d);
> + if (minor < 0)
> + return minor;
> +
> + err = lirc_allocate_buffer(irctls[minor]);
> + if (err)
> + lirc_unregister_driver(minor);
> +
> + return err ? err : minor;
> +}
>  EXPORT_SYMBOL(lirc_register_driver);
>  
> +int lirc_register_bufferless_driver(struct lirc_driver *d)
> +{
> + return lirc_allocate_driver(d);
> +}
> +EXPORT_SYMBOL(lirc_register_bufferless_driver);
> +
>  int lirc_unregister_driver(int minor)
>  {
>   struct irctl *ir;
> diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h
> index 0ab59a5..8bed57a 100644
> --- a/include/media/lirc_dev.h
> +++ b/include/media/lirc_dev.h
> @@ -214,6 +214,18 @@ struct lirc_driver {
>   */
>  extern int lirc_register_driver(struct lirc_driver *d);
>  
> +/* int lirc_register_bufferless_driver - allocates a lirc bufferless driver
> + * @d: reference to the lirc_driver to initialize
> + *
> + * The difference between lirc_register_driver and
> + * lirc_register_bufferless_driver is that the latter doesn't allocate any
> + * buffer, which means that the driver using the lirc_driver should take 
> care of
> + * it by itself.
> + *
> + * returns 0 on success or a the negative errno number in case of failure.
> + */
> +extern int lirc_register_bufferless_driver(struct lirc_driver *d);
> +
>  /* returns negative value on error or 0 if success
>  */
>  extern int lirc_unregister_driver(int minor);
> -- 
> 2.8.1
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  

Re: [PATCH] [media] hdpvr: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Tejun Heo
On Sat, Jul 02, 2016 at 04:17:31PM +0530, Bhaktipriya Shridhar wrote:
> The workqueue "workqueue" is involved in tranmitting hdpvr buffers.
> It has a single work item(>worker) and hence doesn't require
> ordering. Also, it is not being used on a memory reclaim path. Hence,
> the singlethreaded workqueue has been replaced with the use of system_wq.
> 
> System workqueues have been able to handle high level of concurrency
> for a long time now and hence it's not required to have a singlethreaded
> workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
> created with create_singlethread_workqueue(), system_wq allows multiple
> work items to overlap executions even on the same CPU; however, a
> per-cpu workqueue doesn't have any CPU locality or global ordering
> guarantee unless the target CPU is explicitly specified and thus the
> increase of local concurrency shouldn't make any difference.
> 
> Work item has been flushed in hdpvr_device_release() to ensure
> that there are no pending tasks while disconnecting the driver.
> 
> Signed-off-by: Bhaktipriya Shridhar 

Acked-by: Tejun Heo 

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [media] tc358743: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Tejun Heo
On Sat, Jul 02, 2016 at 04:11:53PM +0530, Bhaktipriya Shridhar wrote:
> The workqueue "work_queues" enables hotplugging.
> It has a single work item(>delayed_work_enable_hotplug) and hence
> doesn't require ordering. Also, it is not being used on a memory
> reclaim path. Hence, the singlethreaded workqueue has been replaced with
> the use of system_wq.
> 
> System workqueues have been able to handle high level of concurrency
> for a long time now and hence it's not required to have a singlethreaded
> workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
> created with create_singlethread_workqueue(), system_wq allows multiple
> work items to overlap executions even on the same CPU; however, a
> per-cpu workqueue doesn't have any CPU locality or global ordering
> guarantee unless the target CPU is explicitly specified and thus the
> increase of local concurrency shouldn't make any difference.
> 
> Work item has been sync cancelled in tc358743_remove() to ensure
> that there are no pending tasks while disconnecting the driver.
> 
> Signed-off-by: Bhaktipriya Shridhar 

Acked-by: Tejun Heo 

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [media] sn9c20x: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Tejun Heo
On Sat, Jul 02, 2016 at 04:21:22PM +0530, Bhaktipriya Shridhar wrote:
> The workqueue "work_thread" is involved in JPEG quality update.
> It has a single work item(>work) and hence doesn't require ordering.
> Also, it is not being used on a memory reclaim path. Hence, the
> singlethreaded workqueue has been replaced with the use of system_wq.
> 
> System workqueues have been able to handle high level of concurrency
> for a long time now and hence it's not required to have a singlethreaded
> workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
> created with create_singlethread_workqueue(), system_wq allows multiple
> work items to overlap executions even on the same CPU; however, a
> per-cpu workqueue doesn't have any CPU locality or global ordering
> guarantee unless the target CPU is explicitly specified and thus the
> increase of local concurrency shouldn't make any difference.
> 
> Work item has been flushed in sd_stop0() to ensure that there are no
> pending tasks while disconnecting the driver.
> 
> Signed-off-by: Bhaktipriya Shridhar 

Acked-by: Tejun Heo 

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [media] zc3xx: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Tejun Heo
On Sat, Jul 02, 2016 at 04:19:28PM +0530, Bhaktipriya Shridhar wrote:
> The workqueue "work_thread" is involved in updating parameters for
> transfers. It has a single work item(>work) and hence
> doesn't require ordering. Also, it is not being used on a memory
> reclaim path. Hence, the singlethreaded workqueue has been replaced with
> the use of system_wq.
> 
> System workqueues have been able to handle high level of concurrency
> for a long time now and hence it's not required to have a singlethreaded
> workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
> created with create_singlethread_workqueue(), system_wq allows multiple
> work items to overlap executions even on the same CPU; however, a
> per-cpu workqueue doesn't have any CPU locality or global ordering
> guarantee unless the target CPU is explicitly specified and thus the
> increase of local concurrency shouldn't make any difference.
> 
> Work item has been flushed in sd_stop0() to ensure that there are no
> pending tasks while disconnecting the driver.
> 
> Signed-off-by: Bhaktipriya Shridhar 
> ---
>  drivers/media/usb/gspca/zc3xx.c | 13 -
>  1 file changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/media/usb/gspca/zc3xx.c b/drivers/media/usb/gspca/zc3xx.c
> index c5d8ee6..ebdfed4d6 100644
> --- a/drivers/media/usb/gspca/zc3xx.c
> +++ b/drivers/media/usb/gspca/zc3xx.c
> @@ -53,7 +53,6 @@ struct sd {
>   struct v4l2_ctrl *jpegqual;
> 
>   struct work_struct work;
> - struct workqueue_struct *work_thread;
> 
>   u8 reg08;   /* webcam compression quality */
> 
> @@ -6826,8 +6825,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
>   return gspca_dev->usb_err;
> 
>   /* Start the transfer parameters update thread */
> - sd->work_thread = create_singlethread_workqueue(KBUILD_MODNAME);
> - queue_work(sd->work_thread, >work);
> + schedule_work(>work);
> 
>   return 0;
>  }
> @@ -6838,12 +6836,9 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
>  {
>   struct sd *sd = (struct sd *) gspca_dev;
> 
> - if (sd->work_thread != NULL) {
> - mutex_unlock(_dev->usb_lock);
> - destroy_workqueue(sd->work_thread);
> - mutex_lock(_dev->usb_lock);
> - sd->work_thread = NULL;
> - }
> + mutex_unlock(_dev->usb_lock);
> + schedule_work(>work);
> + mutex_lock(_dev->usb_lock);

Shouldn't this be flush?

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [media] adv7604: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Tejun Heo
On Sat, Jul 02, 2016 at 04:13:55PM +0530, Bhaktipriya Shridhar wrote:
> The workqueue "work_queues" enables hotplugging.
> It has a single work item(>delayed_work_enable_hotplug) and hence
> doesn't require ordering. Also, it is not being used on a memory
> reclaim path. Hence, the singlethreaded workqueue has been replaced with
> the use of system_wq.
> 
> System workqueues have been able to handle high level of concurrency
> for a long time now and hence it's not required to have a singlethreaded
> workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
> created with create_singlethread_workqueue(), system_wq allows multiple
> work items to overlap executions even on the same CPU; however, a
> per-cpu workqueue doesn't have any CPU locality or global ordering
> guarantee unless the target CPU is explicitly specified and thus the
> increase of local concurrency shouldn't make any difference.
> 
> Work item has been sync cancelled in adv76xx_remove() to ensure
> that there are no pending tasks while disconnecting the driver.
> 
> Signed-off-by: Bhaktipriya Shridhar 

Acked-by: Tejun Heo 

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [media] adv7842: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Tejun Heo
On Sat, Jul 02, 2016 at 04:07:22PM +0530, Bhaktipriya Shridhar wrote:
> The workqueue "work_queues" enables hotplugging.
> It has a single work item(>delayed_work_enable_hotplug) and hence
> doesn't require ordering. Also, it is not being used on a memory
> reclaim path. Hence, the singlethreaded workqueue has been replaced with
> the use of system_wq.
> 
> System workqueues have been able to handle high level of concurrency
> for a long time now and hence it's not required to have a singlethreaded
> workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
> created with create_singlethread_workqueue(), system_wq allows multiple
> work items to overlap executions even on the same CPU; however, a
> per-cpu workqueue doesn't have any CPU locality or global ordering
> guarantee unless the target CPU is explicitly specified and thus the
> increase of local concurrency shouldn't make any difference.
> 
> Work item has been sync cancelled in adv7842_remove() to ensure
> that there are no pending tasks while disconnecting the driver.
> 
> Signed-off-by: Bhaktipriya Shridhar 

Acked-by: Tejun Heo 

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drivers: staging: media: lirc: lirc_parallel: Fix multiline comments by adding trailing '*'

2016-07-02 Thread Aayush Gupta
Signed-off-by: Aayush Gupta 
---
 drivers/staging/media/lirc/lirc_parallel.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_parallel.c 
b/drivers/staging/media/lirc/lirc_parallel.c
index 68ede6c..3906ac6 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -305,9 +305,9 @@ static void lirc_lirc_irq_handler(void *blah)
 
/* enable interrupt */
/*
- enable_irq(irq);
- out(LIRC_PORT_IRQ, in(LIRC_PORT_IRQ)|LP_PINTEN);
-   */
+* enable_irq(irq);
+* out(LIRC_PORT_IRQ, in(LIRC_PORT_IRQ)|LP_PINTEN);
+*/
 }
 
 /*** file operations ***/
@@ -620,7 +620,7 @@ static void kf(void *handle)
lirc_off();
/* this is a bit annoying when you actually print...*/
/*
-   printk(KERN_INFO "%s: reclaimed port\n", LIRC_DRIVER_NAME);
+* printk(KERN_INFO "%s: reclaimed port\n", LIRC_DRIVER_NAME);
*/
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [media] zc3xx: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Bhaktipriya Shridhar
The workqueue "work_thread" is involved in updating parameters for
transfers. It has a single work item(>work) and hence
doesn't require ordering. Also, it is not being used on a memory
reclaim path. Hence, the singlethreaded workqueue has been replaced with
the use of system_wq.

System workqueues have been able to handle high level of concurrency
for a long time now and hence it's not required to have a singlethreaded
workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
created with create_singlethread_workqueue(), system_wq allows multiple
work items to overlap executions even on the same CPU; however, a
per-cpu workqueue doesn't have any CPU locality or global ordering
guarantee unless the target CPU is explicitly specified and thus the
increase of local concurrency shouldn't make any difference.

Work item has been flushed in sd_stop0() to ensure that there are no
pending tasks while disconnecting the driver.

Signed-off-by: Bhaktipriya Shridhar 
---
 drivers/media/usb/gspca/zc3xx.c | 13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/media/usb/gspca/zc3xx.c b/drivers/media/usb/gspca/zc3xx.c
index c5d8ee6..ebdfed4d6 100644
--- a/drivers/media/usb/gspca/zc3xx.c
+++ b/drivers/media/usb/gspca/zc3xx.c
@@ -53,7 +53,6 @@ struct sd {
struct v4l2_ctrl *jpegqual;

struct work_struct work;
-   struct workqueue_struct *work_thread;

u8 reg08;   /* webcam compression quality */

@@ -6826,8 +6825,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
return gspca_dev->usb_err;

/* Start the transfer parameters update thread */
-   sd->work_thread = create_singlethread_workqueue(KBUILD_MODNAME);
-   queue_work(sd->work_thread, >work);
+   schedule_work(>work);

return 0;
 }
@@ -6838,12 +6836,9 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
 {
struct sd *sd = (struct sd *) gspca_dev;

-   if (sd->work_thread != NULL) {
-   mutex_unlock(_dev->usb_lock);
-   destroy_workqueue(sd->work_thread);
-   mutex_lock(_dev->usb_lock);
-   sd->work_thread = NULL;
-   }
+   mutex_unlock(_dev->usb_lock);
+   schedule_work(>work);
+   mutex_lock(_dev->usb_lock);
if (!gspca_dev->present)
return;
send_unknown(gspca_dev, sd->sensor);
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [media] sn9c20x: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Bhaktipriya Shridhar
The workqueue "work_thread" is involved in JPEG quality update.
It has a single work item(>work) and hence doesn't require ordering.
Also, it is not being used on a memory reclaim path. Hence, the
singlethreaded workqueue has been replaced with the use of system_wq.

System workqueues have been able to handle high level of concurrency
for a long time now and hence it's not required to have a singlethreaded
workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
created with create_singlethread_workqueue(), system_wq allows multiple
work items to overlap executions even on the same CPU; however, a
per-cpu workqueue doesn't have any CPU locality or global ordering
guarantee unless the target CPU is explicitly specified and thus the
increase of local concurrency shouldn't make any difference.

Work item has been flushed in sd_stop0() to ensure that there are no
pending tasks while disconnecting the driver.

Signed-off-by: Bhaktipriya Shridhar 
---
 drivers/media/usb/gspca/sn9c20x.c | 14 --
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/media/usb/gspca/sn9c20x.c 
b/drivers/media/usb/gspca/sn9c20x.c
index d0ee899..10269da 100644
--- a/drivers/media/usb/gspca/sn9c20x.c
+++ b/drivers/media/usb/gspca/sn9c20x.c
@@ -92,7 +92,6 @@ struct sd {
struct v4l2_ctrl *jpegqual;

struct work_struct work;
-   struct workqueue_struct *work_thread;

u32 pktsz;  /* (used by pkt_scan) */
u16 npkt;
@@ -2051,8 +2050,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
if (mode & MODE_JPEG) {
sd->pktsz = sd->npkt = 0;
sd->nchg = 0;
-   sd->work_thread =
-   create_singlethread_workqueue(KBUILD_MODNAME);
}

return gspca_dev->usb_err;
@@ -2070,12 +2067,9 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
 {
struct sd *sd = (struct sd *) gspca_dev;

-   if (sd->work_thread != NULL) {
-   mutex_unlock(_dev->usb_lock);
-   destroy_workqueue(sd->work_thread);
-   mutex_lock(_dev->usb_lock);
-   sd->work_thread = NULL;
-   }
+   mutex_unlock(_dev->usb_lock);
+   flush_work(>work);
+   mutex_lock(_dev->usb_lock);
 }

 static void do_autoexposure(struct gspca_dev *gspca_dev, u16 avg_lum)
@@ -2228,7 +,7 @@ static void transfer_check(struct gspca_dev *gspca_dev,
new_qual = sd->jpegqual->maximum;
if (new_qual != curqual) {
sd->jpegqual->cur.val = new_qual;
-   queue_work(sd->work_thread, >work);
+   schedule_work(>work);
}
}
} else {
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [media] hdpvr: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Bhaktipriya Shridhar
The workqueue "workqueue" is involved in tranmitting hdpvr buffers.
It has a single work item(>worker) and hence doesn't require
ordering. Also, it is not being used on a memory reclaim path. Hence,
the singlethreaded workqueue has been replaced with the use of system_wq.

System workqueues have been able to handle high level of concurrency
for a long time now and hence it's not required to have a singlethreaded
workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
created with create_singlethread_workqueue(), system_wq allows multiple
work items to overlap executions even on the same CPU; however, a
per-cpu workqueue doesn't have any CPU locality or global ordering
guarantee unless the target CPU is explicitly specified and thus the
increase of local concurrency shouldn't make any difference.

Work item has been flushed in hdpvr_device_release() to ensure
that there are no pending tasks while disconnecting the driver.

Signed-off-by: Bhaktipriya Shridhar 
---
 drivers/media/usb/hdpvr/hdpvr-core.c  | 10 ++
 drivers/media/usb/hdpvr/hdpvr-video.c |  6 +++---
 drivers/media/usb/hdpvr/hdpvr.h   |  2 --
 3 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c 
b/drivers/media/usb/hdpvr/hdpvr-core.c
index 08f0ca7..a61d8fd 100644
--- a/drivers/media/usb/hdpvr/hdpvr-core.c
+++ b/drivers/media/usb/hdpvr/hdpvr-core.c
@@ -310,10 +310,6 @@ static int hdpvr_probe(struct usb_interface *interface,
init_waitqueue_head(>wait_buffer);
init_waitqueue_head(>wait_data);

-   dev->workqueue = create_singlethread_workqueue("hdpvr_buffer");
-   if (!dev->workqueue)
-   goto error;
-
dev->options = hdpvr_default_options;

if (default_video_input < HDPVR_VIDEO_INPUTS)
@@ -404,9 +400,7 @@ reg_fail:
 #endif
 error:
if (dev) {
-   /* Destroy single thread */
-   if (dev->workqueue)
-   destroy_workqueue(dev->workqueue);
+   flush_work(>worker);
/* this frees allocated memory */
hdpvr_delete(dev);
}
@@ -427,7 +421,7 @@ static void hdpvr_disconnect(struct usb_interface 
*interface)
mutex_unlock(>io_mutex);
v4l2_device_disconnect(>v4l2_dev);
msleep(100);
-   flush_workqueue(dev->workqueue);
+   flush_work(>worker);
mutex_lock(>io_mutex);
hdpvr_cancel_queue(dev);
mutex_unlock(>io_mutex);
diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c 
b/drivers/media/usb/hdpvr/hdpvr-video.c
index ba7f022..2a3a8b4 100644
--- a/drivers/media/usb/hdpvr/hdpvr-video.c
+++ b/drivers/media/usb/hdpvr/hdpvr-video.c
@@ -316,7 +316,7 @@ static int hdpvr_start_streaming(struct hdpvr_device *dev)
dev->status = STATUS_STREAMING;

INIT_WORK(>worker, hdpvr_transmit_buffers);
-   queue_work(dev->workqueue, >worker);
+   schedule_work(>worker);

v4l2_dbg(MSG_BUFFER, hdpvr_debug, >v4l2_dev,
"streaming started\n");
@@ -350,7 +350,7 @@ static int hdpvr_stop_streaming(struct hdpvr_device *dev)
wake_up_interruptible(>wait_buffer);
msleep(50);

-   flush_workqueue(dev->workqueue);
+   flush_work(>worker);

mutex_lock(>io_mutex);
/* kill the still outstanding urbs */
@@ -1123,7 +1123,7 @@ static void hdpvr_device_release(struct video_device 
*vdev)

hdpvr_delete(dev);
mutex_lock(>io_mutex);
-   destroy_workqueue(dev->workqueue);
+   flush_work(>worker);
mutex_unlock(>io_mutex);

v4l2_device_unregister(>v4l2_dev);
diff --git a/drivers/media/usb/hdpvr/hdpvr.h b/drivers/media/usb/hdpvr/hdpvr.h
index 78e8154..a12e0af 100644
--- a/drivers/media/usb/hdpvr/hdpvr.h
+++ b/drivers/media/usb/hdpvr/hdpvr.h
@@ -107,8 +107,6 @@ struct hdpvr_device {
/* waitqueue for data */
wait_queue_head_t   wait_data;
/**/
-   struct workqueue_struct *workqueue;
-   /**/
struct work_struct  worker;
/* current stream owner */
struct v4l2_fh  *owner;
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [media] adv7604: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Bhaktipriya Shridhar
The workqueue "work_queues" enables hotplugging.
It has a single work item(>delayed_work_enable_hotplug) and hence
doesn't require ordering. Also, it is not being used on a memory
reclaim path. Hence, the singlethreaded workqueue has been replaced with
the use of system_wq.

System workqueues have been able to handle high level of concurrency
for a long time now and hence it's not required to have a singlethreaded
workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
created with create_singlethread_workqueue(), system_wq allows multiple
work items to overlap executions even on the same CPU; however, a
per-cpu workqueue doesn't have any CPU locality or global ordering
guarantee unless the target CPU is explicitly specified and thus the
increase of local concurrency shouldn't make any difference.

Work item has been sync cancelled in adv76xx_remove() to ensure
that there are no pending tasks while disconnecting the driver.

Signed-off-by: Bhaktipriya Shridhar 
---
 drivers/media/i2c/adv7604.c | 14 +-
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index beb2841..010f24c 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -184,7 +184,6 @@ struct adv76xx_state {
u16 spa_port_a[2];
struct v4l2_fract aspect_ratio;
u32 rgb_quantization_range;
-   struct workqueue_struct *work_queues;
struct delayed_work delayed_work_enable_hotplug;
bool restart_stdi_once;

@@ -2130,8 +2129,7 @@ static int adv76xx_set_edid(struct v4l2_subdev *sd, 
struct v4l2_edid *edid)
}

/* enable hotplug after 100 ms */
-   queue_delayed_work(state->work_queues,
-   >delayed_work_enable_hotplug, HZ / 10);
+   schedule_delayed_work(>delayed_work_enable_hotplug, HZ / 10);
return 0;
 }

@@ -3182,14 +3180,6 @@ static int adv76xx_probe(struct i2c_client *client,
}
}

-   /* work queues */
-   state->work_queues = create_singlethread_workqueue(client->name);
-   if (!state->work_queues) {
-   v4l2_err(sd, "Could not create work queue\n");
-   err = -ENOMEM;
-   goto err_i2c;
-   }
-
INIT_DELAYED_WORK(>delayed_work_enable_hotplug,
adv76xx_delayed_work_enable_hotplug);

@@ -3225,7 +3215,6 @@ err_entity:
media_entity_cleanup(>entity);
 err_work_queues:
cancel_delayed_work(>delayed_work_enable_hotplug);
-   destroy_workqueue(state->work_queues);
 err_i2c:
adv76xx_unregister_clients(state);
 err_hdl:
@@ -3241,7 +3230,6 @@ static int adv76xx_remove(struct i2c_client *client)
struct adv76xx_state *state = to_state(sd);

cancel_delayed_work(>delayed_work_enable_hotplug);
-   destroy_workqueue(state->work_queues);
v4l2_async_unregister_subdev(sd);
media_entity_cleanup(>entity);
adv76xx_unregister_clients(to_state(sd));
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [media] tc358743: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Bhaktipriya Shridhar
The workqueue "work_queues" enables hotplugging.
It has a single work item(>delayed_work_enable_hotplug) and hence
doesn't require ordering. Also, it is not being used on a memory
reclaim path. Hence, the singlethreaded workqueue has been replaced with
the use of system_wq.

System workqueues have been able to handle high level of concurrency
for a long time now and hence it's not required to have a singlethreaded
workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
created with create_singlethread_workqueue(), system_wq allows multiple
work items to overlap executions even on the same CPU; however, a
per-cpu workqueue doesn't have any CPU locality or global ordering
guarantee unless the target CPU is explicitly specified and thus the
increase of local concurrency shouldn't make any difference.

Work item has been sync cancelled in tc358743_remove() to ensure
that there are no pending tasks while disconnecting the driver.

Signed-off-by: Bhaktipriya Shridhar 
---
 drivers/media/i2c/tc358743.c | 15 +--
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 6cf6d06..1e3a0dd 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -89,8 +89,6 @@ struct tc358743_state {
struct v4l2_ctrl *audio_sampling_rate_ctrl;
struct v4l2_ctrl *audio_present_ctrl;

-   /* work queues */
-   struct workqueue_struct *work_queues;
struct delayed_work delayed_work_enable_hotplug;

/* edid  */
@@ -425,8 +423,7 @@ static void tc358743_enable_edid(struct v4l2_subdev *sd)

/* Enable hotplug after 100 ms. DDC access to EDID is also enabled when
 * hotplug is enabled. See register DDC_CTL */
-   queue_delayed_work(state->work_queues,
-  >delayed_work_enable_hotplug, HZ / 10);
+   schedule_delayed_work(>delayed_work_enable_hotplug, HZ / 10);

tc358743_enable_interrupts(sd, true);
tc358743_s_ctrl_detect_tx_5v(sd);
@@ -1884,14 +1881,6 @@ static int tc358743_probe(struct i2c_client *client,
goto err_hdl;
}

-   /* work queues */
-   state->work_queues = create_singlethread_workqueue(client->name);
-   if (!state->work_queues) {
-   v4l2_err(sd, "Could not create work queue\n");
-   err = -ENOMEM;
-   goto err_hdl;
-   }
-
state->pad.flags = MEDIA_PAD_FL_SOURCE;
err = media_entity_pads_init(>entity, 1, >pad);
if (err < 0)
@@ -1940,7 +1929,6 @@ static int tc358743_probe(struct i2c_client *client,

 err_work_queues:
cancel_delayed_work(>delayed_work_enable_hotplug);
-   destroy_workqueue(state->work_queues);
mutex_destroy(>confctl_mutex);
 err_hdl:
media_entity_cleanup(>entity);
@@ -1954,7 +1942,6 @@ static int tc358743_remove(struct i2c_client *client)
struct tc358743_state *state = to_state(sd);

cancel_delayed_work(>delayed_work_enable_hotplug);
-   destroy_workqueue(state->work_queues);
v4l2_async_unregister_subdev(sd);
v4l2_device_unregister_subdev(sd);
mutex_destroy(>confctl_mutex);
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [media] adv7842: Remove deprecated create_singlethread_workqueue

2016-07-02 Thread Bhaktipriya Shridhar
The workqueue "work_queues" enables hotplugging.
It has a single work item(>delayed_work_enable_hotplug) and hence
doesn't require ordering. Also, it is not being used on a memory
reclaim path. Hence, the singlethreaded workqueue has been replaced with
the use of system_wq.

System workqueues have been able to handle high level of concurrency
for a long time now and hence it's not required to have a singlethreaded
workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
created with create_singlethread_workqueue(), system_wq allows multiple
work items to overlap executions even on the same CPU; however, a
per-cpu workqueue doesn't have any CPU locality or global ordering
guarantee unless the target CPU is explicitly specified and thus the
increase of local concurrency shouldn't make any difference.

Work item has been sync cancelled in adv7842_remove() to ensure
that there are no pending tasks while disconnecting the driver.

Signed-off-by: Bhaktipriya Shridhar 
---
 drivers/media/i2c/adv7842.c | 16 ++--
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index ecaacb0..a18d28d 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -118,7 +118,6 @@ struct adv7842_state {
struct v4l2_fract aspect_ratio;
u32 rgb_quantization_range;
bool is_cea_format;
-   struct workqueue_struct *work_queues;
struct delayed_work delayed_work_enable_hotplug;
bool restart_stdi_once;
bool hdmi_port_a;
@@ -756,8 +755,7 @@ static int edid_write_vga_segment(struct v4l2_subdev *sd)
}

/* enable hotplug after 200 ms */
-   queue_delayed_work(state->work_queues,
-   >delayed_work_enable_hotplug, HZ / 5);
+   schedule_delayed_work(>delayed_work_enable_hotplug, HZ / 5);

return 0;
 }
@@ -855,8 +853,7 @@ static int edid_write_hdmi_segment(struct v4l2_subdev *sd, 
u8 port)
}

/* enable hotplug after 200 ms */
-   queue_delayed_work(state->work_queues,
-   >delayed_work_enable_hotplug, HZ / 5);
+   schedule_delayed_work(>delayed_work_enable_hotplug, HZ / 5);

return 0;
 }
@@ -3311,13 +3308,6 @@ static int adv7842_probe(struct i2c_client *client,
goto err_i2c;
}

-   /* work queues */
-   state->work_queues = create_singlethread_workqueue(client->name);
-   if (!state->work_queues) {
-   v4l2_err(sd, "Could not create work queue\n");
-   err = -ENOMEM;
-   goto err_i2c;
-   }

INIT_DELAYED_WORK(>delayed_work_enable_hotplug,
adv7842_delayed_work_enable_hotplug);
@@ -3339,7 +3329,6 @@ err_entity:
media_entity_cleanup(>entity);
 err_work_queues:
cancel_delayed_work(>delayed_work_enable_hotplug);
-   destroy_workqueue(state->work_queues);
 err_i2c:
adv7842_unregister_clients(sd);
 err_hdl:
@@ -3357,7 +3346,6 @@ static int adv7842_remove(struct i2c_client *client)
adv7842_irq_enable(sd, false);

cancel_delayed_work(>delayed_work_enable_hotplug);
-   destroy_workqueue(state->work_queues);
v4l2_device_unregister_subdev(sd);
media_entity_cleanup(>entity);
adv7842_unregister_clients(sd);
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GIT PULL FOR v4.8] cec updates

2016-07-02 Thread Hans Verkuil
(This supersedes my previous two CEC pull request)

This adds the missing rc-cec keymap module, two bugfixes, Kconfig fixes from
Arnd and it dual-licenses the headers for BSD, just as we do for videodev2.h.

I originally thought the rc-cec module was already merged in the cec topic 
branch,
but I later discovered that it wasn't.

Regards,

Hans

The following changes since commit c7169ad5616229b87cabf886bc5f9cbd1fc35a5f:

  [media] DocBook/media: add CEC documentation (2016-06-28 11:45:24 -0300)

are available in the git repository at:

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

for you to fetch changes up to bdc720ea67e511d1845089d0e3558aa33364a92b:

  cec: fix Kconfig dependency problems (2016-07-01 12:33:10 +0200)


Arnd Bergmann (2):
  s5p_cec: mark suspend/resume as __maybe_unused
  cec: add MEDIA_SUPPORT dependency

Hans Verkuil (4):
  cec-adap: on reply, restore the tx_status value from the transmit
  cec.h/cec-funcs.h: add option to use BSD license
  cec-adap: prevent write to out-of-bounds array index
  cec: fix Kconfig dependency problems

Kamil Debski (1):
  rc-cec: Add HDMI CEC keymap module

 drivers/media/Kconfig   |   2 +-
 drivers/media/Makefile  |   4 +-
 drivers/media/rc/keymaps/Makefile   |   1 +
 drivers/media/rc/keymaps/rc-cec.c   | 182 

 drivers/staging/media/cec/Kconfig   |   3 +-
 drivers/staging/media/cec/Makefile  |   4 +-
 drivers/staging/media/cec/TODO  |   5 ++
 drivers/staging/media/cec/cec-adap.c|  18 +++---
 drivers/staging/media/cec/cec-core.c|  10 ++--
 drivers/staging/media/s5p-cec/s5p_cec.c |   4 +-
 include/linux/cec-funcs.h   |  16 ++
 include/linux/cec.h |  16 ++
 12 files changed, 247 insertions(+), 18 deletions(-)
 create mode 100644 drivers/media/rc/keymaps/rc-cec.c
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] cx23885: Add support for Hauppauge WinTV quadHD DVB version

2016-07-02 Thread Stephen Backway
Add support fo the Hauppauge WinTV quadHD DVB version.
IR support has not been provided, all 4 tuners, demodulators etc are working.
Further documentation can be found on Linux TV wiki.

Signed-Off-by: Stephen Backway 

---

diff --git a/Documentation/video4linux/CARDLIST.cx23885
b/Documentation/video4linux/CARDLIST.cx23885
index 85a8fdc..00ba0e5 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -54,3 +54,4 @@
  53 -> Hauppauge WinTV Starburst   [0070:c12a]
  54 -> ViewCast 260e   [1576:0260]
  55 -> ViewCast 460e   [1576:0460]
+ 56 -> Hauppauge WinTV-quadHD (DVB)   [0070:6a28,0070:6b28]
diff --git a/drivers/media/pci/cx23885/cx23885-cards.c
b/drivers/media/pci/cx23885/cx23885-cards.c
index 310ee76..bff1ffbb 100644
--- a/drivers/media/pci/cx23885/cx23885-cards.c
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
@@ -765,6 +765,11 @@ struct cx23885_board cx23885_boards[] = {
 .amux   = CX25840_AUDIO7,
 } },
 },
+[CX23885_BOARD_HAUPPAUGE_QUADHD_DVB] = {
+.name= "Hauppauge WinTV-QuadHD-DVB",
+.portb= CX23885_MPEG_DVB,
+.portc= CX23885_MPEG_DVB,
+},
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);

@@ -1060,6 +1065,14 @@ struct cx23885_subid cx23885_subids[] = {
 .subvendor = 0x1576,
 .subdevice = 0x0460,
 .card  = CX23885_BOARD_VIEWCAST_460E,
+}, {
+.subvendor = 0x0070,
+.subdevice = 0x6a28,
+.card  = CX23885_BOARD_HAUPPAUGE_QUADHD_DVB, /* Tuner Pair 1 */
+}, {
+.subvendor = 0x0070,
+.subdevice = 0x6b28,
+.card  = CX23885_BOARD_HAUPPAUGE_QUADHD_DVB, /* Tuner Pair 2 */
 },
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -1257,6 +1270,14 @@ static void hauppauge_eeprom(struct cx23885_dev
*dev, u8 *eeprom_data)
 case 150329:
 /* WinTV-HVR5525 (PCIe, DVB-S/S2, DVB-T/T2/C) */
 break;
+case 166100:
+/* WinTV-QuadHD (DVB) Tuner Pair 1 (PCIe, IR, half height,
+DVB-T/T2/C, DVB-T/T2/C */
+break;
+case 166101:
+/* WinTV-QuadHD (DVB) Tuner Pair 2 (PCIe, IR, half height,
+DVB-T/T2/C, DVB-T/T2/C */
+break;
 default:
 printk(KERN_WARNING "%s: warning: "
 "unknown hauppauge model #%d\n",
@@ -1729,20 +1750,22 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
 cx23885_gpio_set(dev, GPIO_2);
 break;
 case CX23885_BOARD_HAUPPAUGE_HVR5525:
+case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
 /*
- * GPIO-00 IR_WIDE
- * GPIO-02 wake#
- * GPIO-03 VAUX Pres.
- * GPIO-07 PROG#
- * GPIO-08 SAT_RESN
- * GPIO-09 TER_RESN
- * GPIO-10 B2_SENSE
- * GPIO-11 B1_SENSE
- * GPIO-15 IR_LED_STATUS
- * GPIO-19 IR_NARROW
- * GPIO-20 Blauster1
- * ALTGPIO VAUX_SWITCH
- * AUX_PLL_CLK : Blaster2
+ * HVR5525 GPIO Details:
+ *  GPIO-00 IR_WIDE
+ *  GPIO-02 wake#
+ *  GPIO-03 VAUX Pres.
+ *  GPIO-07 PROG#
+ *  GPIO-08 SAT_RESN
+ *  GPIO-09 TER_RESN
+ *  GPIO-10 B2_SENSE
+ *  GPIO-11 B1_SENSE
+ *  GPIO-15 IR_LED_STATUS
+ *  GPIO-19 IR_NARROW
+ *  GPIO-20 Blauster1
+ *  ALTGPIO VAUX_SWITCH
+ *  AUX_PLL_CLK : Blaster2
  */
 /* Put the parts into reset and back */
 cx23885_gpio_enable(dev, GPIO_8 | GPIO_9, 1);
@@ -1802,6 +1825,7 @@ int cx23885_ir_init(struct cx23885_dev *dev)
 case CX23885_BOARD_HAUPPAUGE_HVR1255:
 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111:
 case CX23885_BOARD_HAUPPAUGE_HVR1210:
+case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
 /* FIXME: Implement me */
 break;
 case CX23885_BOARD_HAUPPAUGE_HVR1270:
@@ -2000,6 +2024,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
 case CX23885_BOARD_HAUPPAUGE_STARBURST:
 case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE:
 case CX23885_BOARD_HAUPPAUGE_HVR5525:
+case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
 if (dev->i2c_bus[0].i2c_rc == 0)
 hauppauge_eeprom(dev, eeprom+0xc0);
 break;
@@ -2145,6 +2170,14 @@ void cx23885_card_setup(struct cx23885_dev *dev)
 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
 ts2->src_sel_val   = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
 break;
+case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
+ts1->gen_ctrl_val  = 0xc; /* Serial bus + punctured clock */
+ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
+ts1->src_sel_val   = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
+ts2->gen_ctrl_val  = 0xc; /* Serial bus + punctured clock */
+ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
+ts2->src_sel_val   =