[PATCH 57/57] [media] tuners: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/tuners/fc0011.c  |  7 ++
 drivers/media/tuners/mc44s803.c|  3 +--
 drivers/media/tuners/tda18271-common.c |  3 +--
 drivers/media/tuners/tda18271-fe.c |  3 +--
 drivers/media/tuners/tda18271-maps.c   |  6 +-
 drivers/media/tuners/tda8290.c |  3 +--
 drivers/media/tuners/tea5761.c |  6 ++
 drivers/media/tuners/tuner-simple.c| 39 --
 drivers/media/tuners/xc4000.c  | 25 +++---
 9 files changed, 30 insertions(+), 65 deletions(-)

diff --git a/drivers/media/tuners/fc0011.c b/drivers/media/tuners/fc0011.c
index 3932aa81e18c..2dda8d993c14 100644
--- a/drivers/media/tuners/fc0011.c
+++ b/drivers/media/tuners/fc0011.c
@@ -262,8 +262,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW7M;
break;
default:
-   dev_warn(>i2c->dev, "Unsupported bandwidth %u kHz. "
-"Using 6000 kHz.\n",
+   dev_warn(>i2c->dev, "Unsupported bandwidth %u kHz. Using 
6000 kHz.\n",
 bandwidth);
bandwidth = 6000;
/* fallthrough */
@@ -435,9 +434,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
if (err)
return err;
 
-   dev_dbg(>i2c->dev, "Tuned to "
-   "fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X "
-   "vcocal=%02X(%u) bw=%u\n",
+   dev_dbg(>i2c->dev, "Tuned to fa=%02X fp=%02X xin=%02X%02X 
vco=%02X vcosel=%02X vcocal=%02X(%u) bw=%u\n",
(unsigned int)regs[FC11_REG_FA],
(unsigned int)regs[FC11_REG_FP],
(unsigned int)regs[FC11_REG_XINHI],
diff --git a/drivers/media/tuners/mc44s803.c b/drivers/media/tuners/mc44s803.c
index f1b764074661..cc0d5ae11eb9 100644
--- a/drivers/media/tuners/mc44s803.c
+++ b/drivers/media/tuners/mc44s803.c
@@ -349,8 +349,7 @@ struct dvb_frontend *mc44s803_attach(struct dvb_frontend 
*fe,
id = MC44S803_REG_MS(reg, MC44S803_ID);
 
if (id != 0x14) {
-   mc_printk(KERN_ERR, "unsupported ID "
-  "(%x should be 0x14)\n", id);
+   mc_printk(KERN_ERR, "unsupported ID (%x should be 0x14)\n", id);
goto error;
}
 
diff --git a/drivers/media/tuners/tda18271-common.c 
b/drivers/media/tuners/tda18271-common.c
index a26bb33102b8..25c0ec42a1c6 100644
--- a/drivers/media/tuners/tda18271-common.c
+++ b/drivers/media/tuners/tda18271-common.c
@@ -251,8 +251,7 @@ static int __tda18271_write_regs(struct dvb_frontend *fe, 
int idx, int len,
}
 
if (ret != 1)
-   tda_err("ERROR: idx = 0x%x, len = %d, "
-   "i2c_transfer returned: %d\n", idx, max, ret);
+   tda_err("ERROR: idx = 0x%x, len = %d, i2c_transfer returned: 
%d\n", idx, max, ret);
 
return (ret == 1 ? 0 : ret);
 }
diff --git a/drivers/media/tuners/tda18271-fe.c 
b/drivers/media/tuners/tda18271-fe.c
index 2d50e8b1dce1..a4730610c0c6 100644
--- a/drivers/media/tuners/tda18271-fe.c
+++ b/drivers/media/tuners/tda18271-fe.c
@@ -26,8 +26,7 @@
 
 int tda18271_debug;
 module_param_named(debug, tda18271_debug, int, 0644);
-MODULE_PARM_DESC(debug, "set debug level "
-"(info=1, map=2, reg=4, adv=8, cal=16 (or-able))");
+MODULE_PARM_DESC(debug, "set debug level (info=1, map=2, reg=4, adv=8, cal=16 
(or-able))");
 
 static int tda18271_cal_on_startup = -1;
 module_param_named(cal, tda18271_cal_on_startup, int, 0644);
diff --git a/drivers/media/tuners/tda18271-maps.c 
b/drivers/media/tuners/tda18271-maps.c
index 1e89dd93c4bb..7d114677b4ca 100644
--- a/drivers/media/tuners/tda18271-maps.c
+++ b/drivers/media/tuners/tda18271-maps.c
@@ -1024,11 +1024,7 @@ int tda18271_lookup_rf_band(struct dvb_frontend *fe, u32 
*freq, u8 *rf_band)
 
while ((map[i].rfmax * 1000) < *freq) {
if (tda18271_debug & DBG_ADV)
-   tda_map("(%d) rfmax = %d < freq = %d, "
-   "rf1_def = %d, rf2_def = %d, rf3_def = %d, "
-   "rf1 = %d, rf2 = %d, rf3 = %d, "
-   "rf_a1 = %d, rf_a2 = %d, "
-   "rf_b1 = %d, rf_b2 = %d\n",
+   tda_map("(%d) rfmax = %d < freq = %d, rf1_def = %d, 
rf2_def = %d, rf3_def = %d, rf1 = %d, rf2 = %d, rf3 = %d, rf_a1 = %d, rf_a2 = 
%d, rf_b1 = %d, rf_b2 = %d\n",
i, map[i].rfmax * 1000, *freq,
map[i].rf1_def, map[i].rf2_def, map[i].rf3_def,
map[i].rf1, 

[PATCH 56/57] [media] rc: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/rc/ati_remote.c  |  3 +--
 drivers/media/rc/ene_ir.c  |  3 +--
 drivers/media/rc/imon.c| 43 ++
 drivers/media/rc/ite-cir.c |  9 +++--
 drivers/media/rc/mceusb.c  |  4 +---
 drivers/media/rc/rc-main.c |  3 +--
 drivers/media/rc/redrat3.c | 18 ++
 drivers/media/rc/streamzap.c   |  9 +++--
 drivers/media/rc/winbond-cir.c |  9 +++--
 9 files changed, 33 insertions(+), 68 deletions(-)

diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c
index 9f5b59706741..0884b7dc0e71 100644
--- a/drivers/media/rc/ati_remote.c
+++ b/drivers/media/rc/ati_remote.c
@@ -527,8 +527,7 @@ static void ati_remote_input_report(struct urb *urb)
remote_num = (data[3] >> 4) & 0x0f;
if (channel_mask & (1 << (remote_num + 1))) {
dbginfo(_remote->interface->dev,
-   "Masked input from channel 0x%02x: data %02x, "
-   "mask= 0x%02lx\n",
+   "Masked input from channel 0x%02x: data %02x, mask= 
0x%02lx\n",
remote_num, data[2], channel_mask);
return;
}
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index d1c61cd035f6..bd5512e64aea 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -1210,8 +1210,7 @@ MODULE_PARM_DESC(txsim,
 
 MODULE_DEVICE_TABLE(pnp, ene_ids);
 MODULE_DESCRIPTION
-   ("Infrared input driver for KB3926B/C/D/E/F "
-   "(aka ENE0100/ENE0200/ENE0201/ENE0202) CIR port");
+   ("Infrared input driver for KB3926B/C/D/E/F (aka 
ENE0100/ENE0200/ENE0201/ENE0202) CIR port");
 
 MODULE_AUTHOR("Maxim Levitsky");
 MODULE_LICENSE("GPL");
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index d62b1f38292c..bff834f5e018 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -441,13 +441,11 @@ MODULE_PARM_DESC(debug, "Debug messages: 0=no, 1=yes 
(default: no)");
 /* lcd, vfd, vga or none? should be auto-detected, but can be overridden... */
 static int display_type;
 module_param(display_type, int, S_IRUGO);
-MODULE_PARM_DESC(display_type, "Type of attached display. 0=autodetect, "
-"1=vfd, 2=lcd, 3=vga, 4=none (default: autodetect)");
+MODULE_PARM_DESC(display_type, "Type of attached display. 0=autodetect, 1=vfd, 
2=lcd, 3=vga, 4=none (default: autodetect)");
 
 static int pad_stabilize = 1;
 module_param(pad_stabilize, int, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(pad_stabilize, "Apply stabilization algorithm to iMON PAD "
-"presses in arrow key mode. 0=disable, 1=enable (default).");
+MODULE_PARM_DESC(pad_stabilize, "Apply stabilization algorithm to iMON PAD 
presses in arrow key mode. 0=disable, 1=enable (default).");
 
 /*
  * In certain use cases, mouse mode isn't really helpful, and could actually
@@ -455,14 +453,12 @@ MODULE_PARM_DESC(pad_stabilize, "Apply stabilization 
algorithm to iMON PAD "
  */
 static bool nomouse;
 module_param(nomouse, bool, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(nomouse, "Disable mouse input device mode when IR device is "
-"open. 0=don't disable, 1=disable. (default: don't disable)");
+MODULE_PARM_DESC(nomouse, "Disable mouse input device mode when IR device is 
open. 0=don't disable, 1=disable. (default: don't disable)");
 
 /* threshold at which a pad push registers as an arrow key in kbd mode */
 static int pad_thresh;
 module_param(pad_thresh, int, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(pad_thresh, "Threshold at which a pad push registers as an "
-"arrow key in kbd mode (default: 28)");
+MODULE_PARM_DESC(pad_thresh, "Threshold at which a pad push registers as an 
arrow key in kbd mode (default: 28)");
 
 
 static void free_imon_context(struct imon_context *ictx)
@@ -785,9 +781,7 @@ static ssize_t show_associate_remote(struct device *d,
else
strcpy(buf, "closed\n");
 
-   dev_info(d, "Visit http://www.lirc.org/html/imon-24g.html for "
-"instructions on how to associate your iMON 2.4G DT/LT "
-"remote\n");
+   dev_info(d, "Visit http://www.lirc.org/html/imon-24g.html for 
instructions on how to associate your iMON 2.4G DT/LT remote\n");
mutex_unlock(>lock);
return strlen(buf);
 }
@@ -1115,8 +1109,7 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 
*rc_type)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 };
 
if (*rc_type && !(*rc_type & rc->allowed_protocols))
-   dev_warn(dev, "Looks like you're trying to use an IR protocol "
-"this device does not 

[PATCH 24/57] [media] marvell-ccic: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/marvell-ccic/mcam-core.c | 26 +++--
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c 
b/drivers/media/platform/marvell-ccic/mcam-core.c
index af59bf4dca2d..a8bda6679422 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -49,24 +49,17 @@
 static bool alloc_bufs_at_read;
 module_param(alloc_bufs_at_read, bool, 0444);
 MODULE_PARM_DESC(alloc_bufs_at_read,
-   "Non-zero value causes DMA buffers to be allocated when the "
-   "video capture device is read, rather than at module load "
-   "time.  This saves memory, but decreases the chances of "
-   "successfully getting those buffers.  This parameter is "
-   "only used in the vmalloc buffer mode");
+   "Non-zero value causes DMA buffers to be allocated when the 
video capture device is read, rather than at module load time.  This saves 
memory, but decreases the chances of successfully getting those buffers.  This 
parameter is only used in the vmalloc buffer mode");
 
 static int n_dma_bufs = 3;
 module_param(n_dma_bufs, uint, 0644);
 MODULE_PARM_DESC(n_dma_bufs,
-   "The number of DMA buffers to allocate.  Can be either two "
-   "(saves memory, makes timing tighter) or three.");
+   "The number of DMA buffers to allocate.  Can be either two 
(saves memory, makes timing tighter) or three.");
 
 static int dma_buf_size = VGA_WIDTH * VGA_HEIGHT * 2;  /* Worst case */
 module_param(dma_buf_size, uint, 0444);
 MODULE_PARM_DESC(dma_buf_size,
-   "The size of the allocated DMA buffers.  If actual operating "
-   "parameters require larger buffers, an attempt to reallocate "
-   "will be made.");
+   "The size of the allocated DMA buffers.  If actual operating 
parameters require larger buffers, an attempt to reallocate will be made.");
 #else /* MCAM_MODE_VMALLOC */
 static const bool alloc_bufs_at_read;
 static const int n_dma_bufs = 3;  /* Used by S/G_PARM */
@@ -75,15 +68,12 @@ static const int n_dma_bufs = 3;  /* Used by S/G_PARM */
 static bool flip;
 module_param(flip, bool, 0444);
 MODULE_PARM_DESC(flip,
-   "If set, the sensor will be instructed to flip the image "
-   "vertically.");
+   "If set, the sensor will be instructed to flip the image 
vertically.");
 
 static int buffer_mode = -1;
 module_param(buffer_mode, int, 0444);
 MODULE_PARM_DESC(buffer_mode,
-   "Set the buffer mode to be used; default is to go with what "
-   "the platform driver asks for.  Set to 0 for vmalloc, 1 for "
-   "DMA contiguous.");
+   "Set the buffer mode to be used; default is to go with what the 
platform driver asks for.  Set to 0 for vmalloc, 1 for DMA contiguous.");
 
 /*
  * Status flags.  Always manipulated with bit operations.
@@ -1759,8 +1749,7 @@ int mccic_register(struct mcam_camera *cam)
cam->buffer_mode = buffer_mode;
if (cam->buffer_mode == B_DMA_sg &&
cam->chip_id == MCAM_CAFE) {
-   printk(KERN_ERR "marvell-cam: Cafe can't do S/G I/O, "
-   "attempting vmalloc mode instead\n");
+   printk(KERN_ERR "marvell-cam: Cafe can't do S/G I/O, attempting 
vmalloc mode instead\n");
cam->buffer_mode = B_vmalloc;
}
if (!mcam_buffer_mode_supported(cam->buffer_mode)) {
@@ -1828,8 +1817,7 @@ int mccic_register(struct mcam_camera *cam)
 */
if (cam->buffer_mode == B_vmalloc && !alloc_bufs_at_read) {
if (mcam_alloc_dma_bufs(cam, 1))
-   cam_warn(cam, "Unable to alloc DMA buffers at load"
-   " will try again later.");
+   cam_warn(cam, "Unable to alloc DMA buffers at load will 
try again later.");
}
 
mutex_unlock(>s_mutex);
-- 
2.7.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 11/57] [media] cx88: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/cx88/cx88-alsa.c| 13 -
 drivers/media/pci/cx88/cx88-cards.c   | 12 
 drivers/media/pci/cx88/cx88-dsp.c |  9 +++--
 drivers/media/pci/cx88/cx88-dvb.c |  6 ++
 drivers/media/pci/cx88/cx88-i2c.c |  3 +--
 drivers/media/pci/cx88/cx88-mpeg.c| 12 
 drivers/media/pci/cx88/cx88-tvaudio.c |  6 ++
 drivers/media/pci/cx88/cx88-video.c   |  3 +--
 8 files changed, 21 insertions(+), 43 deletions(-)

diff --git a/drivers/media/pci/cx88/cx88-alsa.c 
b/drivers/media/pci/cx88/cx88-alsa.c
index 723f06462104..099f14173cb4 100644
--- a/drivers/media/pci/cx88/cx88-alsa.c
+++ b/drivers/media/pci/cx88/cx88-alsa.c
@@ -120,9 +120,7 @@ MODULE_AUTHOR("Mauro Carvalho Chehab 
");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(CX88_VERSION);
 
-MODULE_SUPPORTED_DEVICE("{{Conexant,23881},"
-   "{{Conexant,23882},"
-   "{{Conexant,23883}");
+MODULE_SUPPORTED_DEVICE("{{Conexant,23881},{{Conexant,23882},{{Conexant,23883}");
 static unsigned int debug;
 module_param(debug,int,0644);
 MODULE_PARM_DESC(debug,"enable debug messages");
@@ -154,8 +152,7 @@ static int _cx88_start_audio_dma(snd_cx88_card_t *chip)
cx_write(MO_AUDD_GPCNTRL, GP_COUNT_CONTROL_RESET);
atomic_set(>count, 0);
 
-   dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d "
-   "byte buffer\n", buf->bpl, cx_read(audio_ch->cmds_start + 8)>>1,
+   dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d 
byte buffer\n", buf->bpl, cx_read(audio_ch->cmds_start + 8)>>1,
chip->num_periods, buf->bpl * chip->num_periods);
 
/* Enables corresponding bits at AUD_INT_STAT */
@@ -425,8 +422,7 @@ static int snd_cx88_pcm_open(struct snd_pcm_substream 
*substream)
int err;
 
if (!chip) {
-   printk(KERN_ERR "BUG: cx88 can't find device struct."
-   " Can't proceed with open\n");
+   printk(KERN_ERR "BUG: cx88 can't find device struct. Can't 
proceed with open\n");
return -ENODEV;
}
 
@@ -914,8 +910,7 @@ static int snd_cx88_create(struct snd_card *card, struct 
pci_dev *pci,
/* print pci info */
pci_read_config_byte(pci, PCI_LATENCY_TIMER, _lat);
 
-   dprintk(1,"ALSA %s/%i: found at %s, rev: %d, irq: %d, "
-  "latency: %d, mmio: 0x%llx\n", core->name, devno,
+   dprintk(1,"ALSA %s/%i: found at %s, rev: %d, irq: %d, latency: %d, 
mmio: 0x%llx\n", core->name, devno,
   pci_name(pci), pci->revision, pci->irq,
   pci_lat, (unsigned long long)pci_resource_start(pci,0));
 
diff --git a/drivers/media/pci/cx88/cx88-cards.c 
b/drivers/media/pci/cx88/cx88-cards.c
index 8f2556ec3971..286d6e2aa590 100644
--- a/drivers/media/pci/cx88/cx88-cards.c
+++ b/drivers/media/pci/cx88/cx88-cards.c
@@ -2847,8 +2847,7 @@ static void leadtek_eeprom(struct cx88_core *core, u8 
*eeprom_data)
break;
}
 
-   info_printk(core, "Leadtek Winfast 2000XP Expert config: "
-   "tuner=%d, eeprom[0]=0x%02x\n",
+   info_printk(core, "Leadtek Winfast 2000XP Expert config: tuner=%d, 
eeprom[0]=0x%02x\n",
core->board.tuner_type, eeprom_data[0]);
 }
 
@@ -3107,8 +3106,7 @@ static void dvico_fusionhdtv_hybrid_init(struct cx88_core 
*core)
msg.len = (i != 12 ? 5 : 2);
err = i2c_transfer(>i2c_adap, , 1);
if (err != 1) {
-   warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
- "failed (err = %d)!\n", i, err);
+   warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d 
failed (err = %d)!\n", i, err);
return;
}
}
@@ -3284,8 +3282,7 @@ static void cx88_card_list(struct cx88_core *core, struct 
pci_dev *pci)
   "%s: version might help as well.\n",
   core->name,core->name,core->name,core->name);
}
-   err_printk(core, "Here is a list of valid choices for the card= "
-  "insmod option:\n");
+   err_printk(core, "Here is a list of valid choices for the card= 
insmod option:\n");
for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
printk(KERN_ERR "%s:card=%d -> %s\n",
   core->name, i, cx88_boards[i].name);
@@ -3510,8 +3507,7 @@ static void cx88_card_setup(struct cx88_core *core)
for (i = 0; i < ARRAY_SIZE(buffer); i++)
if (2 != i2c_master_send(>i2c_client,
   

[PATCH 31/57] [media] si4713: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/si4713/si4713.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/media/radio/si4713/si4713.c 
b/drivers/media/radio/si4713/si4713.c
index 0b04b56571da..797d35e4d0d2 100644
--- a/drivers/media/radio/si4713/si4713.c
+++ b/drivers/media/radio/si4713/si4713.c
@@ -716,8 +716,7 @@ static int si4713_tx_tune_status(struct si4713_device 
*sdev, u8 intack,
*power = val[5];
*antcap = val[6];
*noise = val[7];
-   v4l2_dbg(1, debug, >sd, "%s: response: %d x 10 kHz "
-   "(power %d, antcap %d, rnl %d)\n", __func__,
+   v4l2_dbg(1, debug, >sd, "%s: response: %d x 10 kHz (power 
%d, antcap %d, rnl %d)\n", __func__,
*frequency, *power, *antcap, *noise);
}
 
@@ -758,9 +757,7 @@ static int si4713_tx_rds_buff(struct si4713_device *sdev, 
u8 mode, u16 rdsb,
v4l2_dbg(1, debug, >sd,
"%s: status=0x%02x\n", __func__, val[0]);
*cbleft = (s8)val[2] - val[3];
-   v4l2_dbg(1, debug, >sd, "%s: response: interrupts"
-   " 0x%02x cb avail: %d cb used %d fifo avail"
-   " %d fifo used %d\n", __func__, val[1],
+   v4l2_dbg(1, debug, >sd, "%s: response: interrupts 0x%02x 
cb avail: %d cb used %d fifo avail %d fifo used %d\n", __func__, val[1],
val[2], val[3], val[4], val[5]);
}
 
-- 
2.7.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 09/57] [media] cx18: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/cx18/cx18-alsa-main.c   |  6 ++
 drivers/media/pci/cx18/cx18-av-core.c | 14 -
 drivers/media/pci/cx18/cx18-av-firmware.c |  3 +--
 drivers/media/pci/cx18/cx18-controls.c|  9 +++-
 drivers/media/pci/cx18/cx18-driver.c  | 30 +-
 drivers/media/pci/cx18/cx18-dvb.c |  6 ++
 drivers/media/pci/cx18/cx18-fileops.c |  6 ++
 drivers/media/pci/cx18/cx18-ioctl.c   |  6 ++
 drivers/media/pci/cx18/cx18-irq.c |  3 +--
 drivers/media/pci/cx18/cx18-mailbox.c | 35 +--
 drivers/media/pci/cx18/cx18-queue.c   |  7 ++-
 drivers/media/pci/cx18/cx18-streams.c |  6 ++
 12 files changed, 41 insertions(+), 90 deletions(-)

diff --git a/drivers/media/pci/cx18/cx18-alsa-main.c 
b/drivers/media/pci/cx18/cx18-alsa-main.c
index 0b0e8015ad34..51ebe4962805 100644
--- a/drivers/media/pci/cx18/cx18-alsa-main.c
+++ b/drivers/media/pci/cx18/cx18-alsa-main.c
@@ -217,8 +217,7 @@ static int cx18_alsa_load(struct cx18 *cx)
 
s = >streams[CX18_ENC_STREAM_TYPE_PCM];
if (s->video_dev.v4l2_dev == NULL) {
-   CX18_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - "
-"skipping\n", __func__);
+   CX18_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - 
skipping\n", __func__);
return 0;
}
 
@@ -232,8 +231,7 @@ static int cx18_alsa_load(struct cx18 *cx)
CX18_ALSA_ERR("%s: failed to create struct snd_cx18_card\n",
  __func__);
} else {
-   CX18_DEBUG_ALSA_INFO("%s: created cx18 ALSA interface instance "
-"\n", __func__);
+   CX18_DEBUG_ALSA_INFO("%s: created cx18 ALSA interface instance 
\n", __func__);
}
return 0;
 }
diff --git a/drivers/media/pci/cx18/cx18-av-core.c 
b/drivers/media/pci/cx18/cx18-av-core.c
index 30bbe8d1ea55..2761b09ac935 100644
--- a/drivers/media/pci/cx18/cx18-av-core.c
+++ b/drivers/media/pci/cx18/cx18-av-core.c
@@ -468,21 +468,16 @@ void cx18_av_std_setup(struct cx18 *cx)
CX18_DEBUG_INFO_DEV(sd, "Pixel rate = %d.%06d Mpixel/sec\n",
pll / 800, (pll / 8) % 100);
 
-   CX18_DEBUG_INFO_DEV(sd, "ADC XTAL/pixel clock decimation ratio "
-   "= %d.%03d\n", src_decimation / 256,
+   CX18_DEBUG_INFO_DEV(sd, "ADC XTAL/pixel clock decimation ratio 
= %d.%03d\n", src_decimation / 256,
((src_decimation % 256) * 1000) / 256);
 
tmp = 28636360 * (u64) sc;
do_div(tmp, src_decimation);
fsc = tmp >> 13;
CX18_DEBUG_INFO_DEV(sd,
-   "Chroma sub-carrier initial freq = %d.%06d "
-   "MHz\n", fsc / 100, fsc % 100);
+   "Chroma sub-carrier initial freq = %d.%06d 
MHz\n", fsc / 100, fsc % 100);
 
-   CX18_DEBUG_INFO_DEV(sd, "hblank %i, hactive %i, vblank %i, "
-   "vactive %i, vblank656 %i, src_dec %i, "
-   "burst 0x%02x, luma_lpf %i, uv_lpf %i, "
-   "comb 0x%02x, sc 0x%06x\n",
+   CX18_DEBUG_INFO_DEV(sd, "hblank %i, hactive %i, vblank %i, 
vactive %i, vblank656 %i, src_dec %i, burst 0x%02x, luma_lpf %i, uv_lpf %i, 
comb 0x%02x, sc 0x%06x\n",
hblank, hactive, vblank, vactive, vblank656,
src_decimation, burst, luma_lpf, uv_lpf,
comb, sc);
@@ -1069,8 +1064,7 @@ static void log_video_status(struct cx18 *cx)
CX18_INFO_DEV(sd, "Specified video input: Composite %d\n",
  vid_input - CX18_AV_COMPOSITE1 + 1);
} else {
-   CX18_INFO_DEV(sd, "Specified video input: "
- "S-Video (Luma In%d, Chroma In%d)\n",
+   CX18_INFO_DEV(sd, "Specified video input: S-Video (Luma 
In%d, Chroma In%d)\n",
  (vid_input & 0xf0) >> 4,
  (vid_input & 0xf00) >> 8);
}
diff --git a/drivers/media/pci/cx18/cx18-av-firmware.c 
b/drivers/media/pci/cx18/cx18-av-firmware.c
index a34fd082b76e..160e2e53383f 100644
--- a/drivers/media/pci/cx18/cx18-av-firmware.c
+++ b/drivers/media/pci/cx18/cx18-av-firmware.c
@@ -61,8 +61,7 @@ static int cx18_av_verifyfw(struct cx18 *cx, const struct 
firmware 

[PATCH 00/57] don't break long lines on strings

2016-10-14 Thread Mauro Carvalho Chehab
There are lots of drivers on media that breaks long line strings in order to
fit into 80 columns. This was an usual practice to make checkpatch happy.
However, it makes harder to detect where the strings are with grep.

As we're right now fixing other drivers due to KERN_CONT, we need to be
able to identify what printk strings don't end with a "\n". It is a way easier
to detect those if we don't break long lines.

So, this patch series re-group those strings, violating the 80 columns limit
by purpose.

Later patches will rely on this series to identify the strings that require
KERN_CONT (or that should be converted to hexadecimal dumps).

Originally, I coded this as a single patch, but I opted to split it per
directory, as it makes easy for people to review.

I used the following perl script to merge the strings into a single
line (I ran it 10 times for each file):

#!/usr/bin/perl

while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
print "$next$c2\n";
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}

I did a few manual adjustments afterwards.

Mauro Carvalho Chehab (57):
  [media] b2c2: don't break long lines
  [media] dvb-frontends: don't break long lines
  [media] firewire: don't break long lines
  [media] cx25840: don't break long lines
  [media] smiapp: don't break long lines
  [media] soc_camera: don't break long lines
  [media] b2c2: don't break long lines
  [media] bt8xx: don't break long lines
  [media] cx18: don't break long lines
  [media] cx23885: don't break long lines
  [media] cx88: don't break long lines
  [media] ddbridge: don't break long lines
  [media] dm1105: don't break long lines
  [media] ivtv: don't break long lines
  [media] meye: don't break long lines
  [media] pt1: don't break long lines
  [media] saa7134: don't break long lines
  [media] saa7164: don't break long lines
  [media] solo6x10: don't break long lines
  [media] ttpci: don't break long lines
  [media] tw68: don't break long lines
  [media] davinci: don't break long lines
  [media] exynos4-is: don't break long lines
  [media] marvell-ccic: don't break long lines
  [media] omap: don't break long lines
  [media] omap3isp: don't break long lines
  [media] s5p-mfc: don't break long lines
  [media] c8sectpfe: don't break long lines
  [media] ti-vpe: don't break long lines
  [media] si470x: don't break long lines
  [media] si4713: don't break long lines
  [media] wl128x: don't break long lines
  [media] au0828: don't break long lines
  [media] b2c2: don't break long lines
  [media] cpia2: don't break long lines
  [media] cx231xx: don't break long lines
  [media] dvb-usb: don't break long lines
  [media] dvb-usb-v2: don't break long lines
  [media] em28xx: don't break long lines
  [media] hdpvr: don't break long lines
  [media] pvrusb2: don't break long lines
  [media] pwc: don't break long lines
  [media] siano: don't break long lines
  [media] stkwebcam: don't break long lines
  [media] tm6000: don't break long lines
  [media] ttusb-budget: don't break long lines
  [media] ttusb-dec: don't break long lines
  [media] usbvision: don't break long lines
  [media] uvc: don't break long lines
  [media] zr364xx: don't break long lines
  [media] v4l2-core: don't break long lines
  [media] common: don't break long lines
  [media] i2c: don't break long lines
  [media] platform: don't break long lines
  [media] radio: don't break long lines
  [media] rc: don't break long lines
  [media] tuners: don't break long lines

 drivers/media/common/b2c2/flexcop-eeprom.c |   3 +-
 drivers/media/common/b2c2/flexcop-i2c.c|   3 +-
 drivers/media/common/b2c2/flexcop-misc.c   |   9 +-
 drivers/media/common/b2c2/flexcop.c|   3 +-
 drivers/media/common/tveeprom.c|   3 +-
 drivers/media/dvb-frontends/au8522_common.c|   4 +-
 drivers/media/dvb-frontends/cx24110.c  |   4 +-
 drivers/media/dvb-frontends/cx24113.c  |   4 +-
 drivers/media/dvb-frontends/cx24116.c  |  10 +-
 drivers/media/dvb-frontends/cx24117.c  |   4 +-
 drivers/media/dvb-frontends/cx24123.c  |   4 +-
 drivers/media/dvb-frontends/ds3000.c   |  15 +-
 drivers/media/dvb-frontends/lgdt330x.c |   3 +-
 drivers/media/dvb-frontends/m88rs2000.c|  11 +-
 drivers/media/dvb-frontends/mt312.c|   7 +-
 drivers/media/dvb-frontends/nxt200x.c  |  11 +-
 drivers/media/dvb-frontends/or51132.c  

[PATCH 08/57] [media] bt8xx: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/bt8xx/bttv-cards.c  | 9 +++--
 drivers/media/pci/bt8xx/bttv-driver.c | 6 ++
 drivers/media/pci/bt8xx/bttv-i2c.c| 6 ++
 drivers/media/pci/bt8xx/bttv-input.c  | 3 +--
 4 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-cards.c 
b/drivers/media/pci/bt8xx/bttv-cards.c
index 8a17cc0bfa07..4ad50f978e0e 100644
--- a/drivers/media/pci/bt8xx/bttv-cards.c
+++ b/drivers/media/pci/bt8xx/bttv-cards.c
@@ -125,10 +125,8 @@ module_param_array(remote,   int, NULL, 0444);
 module_param_array(audiodev, int, NULL, 0444);
 module_param_array(audiomux, int, NULL, 0444);
 
-MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
-"[enable bug compatibility for triton1 + others]");
-MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
-"[yet another chipset flaw workaround]");
+MODULE_PARM_DESC(triton1,"set ETBF pci config bit [enable bug compatibility 
for triton1 + others]");
+MODULE_PARM_DESC(vsfx,"set VSFX pci config bit [yet another chipset flaw 
workaround]");
 MODULE_PARM_DESC(latency,"pci latency timer");
 MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a 
list");
 MODULE_PARM_DESC(pll, "specify installed crystal (0=none, 28=28 MHz, 35=35 
MHz, 14=14 MHz)");
@@ -141,8 +139,7 @@ MODULE_PARM_DESC(audiodev, "specify audio device:\n"
"\t\t 2 = tda7432\n"
"\t\t 3 = tvaudio");
 MODULE_PARM_DESC(saa6588, "if 1, then load the saa6588 RDS module, default (0) 
is to use the card definition.");
-MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 
enables)"
-   " [some VIA/SIS chipsets are known to have problem with 
overlay]");
+MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 
enables) [some VIA/SIS chipsets are known to have problem with overlay]");
 
 /* --- */
 /* list of card IDs for bt878+ cards   */
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c 
b/drivers/media/pci/bt8xx/bttv-driver.c
index 97b91a9f9fa9..fb4aefbcc8f8 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -148,8 +148,7 @@ MODULE_PARM_DESC(irq_debug, "irq handler debug messages, 
default is 0 (no)");
 MODULE_PARM_DESC(disable_ir, "disable infrared remote support");
 MODULE_PARM_DESC(gbuffers, "number of capture buffers. range 2-32, default 8");
 MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 0x208000");
-MODULE_PARM_DESC(reset_crop, "reset cropping parameters at open(), default "
-"is 1 (yes) for compatibility with older applications");
+MODULE_PARM_DESC(reset_crop, "reset cropping parameters at open(), default is 
1 (yes) for compatibility with older applications");
 MODULE_PARM_DESC(automute, "mute audio on bad/missing video signal, default is 
1 (yes)");
 MODULE_PARM_DESC(chroma_agc, "enables the AGC of chroma signal, default is 0 
(no)");
 MODULE_PARM_DESC(agc_crush, "enables the luminance AGC crush, default is 1 
(yes)");
@@ -3506,8 +3505,7 @@ static void bttv_irq_debug_low_latency(struct bttv *btv, 
u32 rc)
(unsigned long)rc);
 
if (0 == (btread(BT848_DSTATUS) & BT848_DSTATUS_HLOC)) {
-   pr_notice("%d: Oh, there (temporarily?) is no input signal. "
- "Ok, then this is harmless, don't worry ;)\n",
+   pr_notice("%d: Oh, there (temporarily?) is no input signal. Ok, 
then this is harmless, don't worry ;)\n",
  btv->c.nr);
return;
}
diff --git a/drivers/media/pci/bt8xx/bttv-i2c.c 
b/drivers/media/pci/bt8xx/bttv-i2c.c
index d43911deb617..830437471038 100644
--- a/drivers/media/pci/bt8xx/bttv-i2c.c
+++ b/drivers/media/pci/bt8xx/bttv-i2c.c
@@ -44,15 +44,13 @@ static int i2c_scan;
 module_param(i2c_debug, int, 0644);
 MODULE_PARM_DESC(i2c_debug, "configure i2c debug level");
 module_param(i2c_hw,int, 0444);
-MODULE_PARM_DESC(i2c_hw,"force use of hardware i2c support, "
-   "instead of software bitbang");
+MODULE_PARM_DESC(i2c_hw,"force use of hardware i2c support, instead of 
software bitbang");
 module_param(i2c_scan,  int, 0444);
 MODULE_PARM_DESC(i2c_scan,"scan i2c bus at insmod time");
 
 static unsigned int i2c_udelay = 5;
 module_param(i2c_udelay, int, 0444);
-MODULE_PARM_DESC(i2c_udelay,"soft i2c delay at insmod time, in usecs "
-   "(should be 5 or higher). Lower value means higher bus speed.");
+MODULE_PARM_DESC(i2c_udelay,"soft i2c delay at insmod time, in usecs (should 
be 5 or higher). Lower value 

[PATCH 03/57] [media] firewire: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/firewire/firedtv-avc.c | 5 +++--
 drivers/media/firewire/firedtv-rc.c  | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/media/firewire/firedtv-avc.c 
b/drivers/media/firewire/firedtv-avc.c
index 251a556112a9..e04235ea23fb 100644
--- a/drivers/media/firewire/firedtv-avc.c
+++ b/drivers/media/firewire/firedtv-avc.c
@@ -1181,8 +1181,9 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int 
length)
if (es_info_length > 0) {
pmt_cmd_id = msg[read_pos++];
if (pmt_cmd_id != 1 && pmt_cmd_id != 4)
-   dev_err(fdtv->device, "invalid pmt_cmd_id %d "
-   "at stream level\n", pmt_cmd_id);
+   dev_err(fdtv->device,
+   "invalid pmt_cmd_id %d at stream 
level\n",
+   pmt_cmd_id);
 
if (es_info_length > sizeof(c->operand) - 4 -
 write_pos) {
diff --git a/drivers/media/firewire/firedtv-rc.c 
b/drivers/media/firewire/firedtv-rc.c
index f82d4a93feb3..babfb9cee20e 100644
--- a/drivers/media/firewire/firedtv-rc.c
+++ b/drivers/media/firewire/firedtv-rc.c
@@ -184,8 +184,9 @@ void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code)
else if (code >= 0x4540 && code <= 0x4542)
code = oldtable[code - 0x4521];
else {
-   printk(KERN_DEBUG "firedtv: invalid key code 0x%04x "
-  "from remote control\n", code);
+   printk(KERN_DEBUG
+  "firedtv: invalid key code 0x%04x from remote control\n",
+  code);
return;
}
 
-- 
2.7.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 44/57] [media] stkwebcam: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/stkwebcam/stk-sensor.c | 3 +--
 drivers/media/usb/stkwebcam/stk-webcam.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/usb/stkwebcam/stk-sensor.c 
b/drivers/media/usb/stkwebcam/stk-sensor.c
index e546b014d7ad..65334a00e3b3 100644
--- a/drivers/media/usb/stkwebcam/stk-sensor.c
+++ b/drivers/media/usb/stkwebcam/stk-sensor.c
@@ -391,8 +391,7 @@ int stk_sensor_init(struct stk_camera *dev)
}
stk_sensor_write_regvals(dev, ov_initvals);
msleep(10);
-   STK_INFO("OmniVision sensor detected, id %02X%02X"
-   " at address %x\n", idh, idl, SENSOR_ADDRESS);
+   STK_INFO("OmniVision sensor detected, id %02X%02X at address %x\n", 
idh, idl, SENSOR_ADDRESS);
return 0;
 }
 
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c 
b/drivers/media/usb/stkwebcam/stk-webcam.c
index db200c9d796d..267a22f24f82 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -366,8 +366,7 @@ static void stk_isoc_handler(struct urb *urb)
if (fb->v4lbuf.bytesused != 0
&& fb->v4lbuf.bytesused != dev->frame_size) {
(void) (printk_ratelimit() &&
-   STK_ERROR("frame %d, "
-   "bytesused=%d, skipping\n",
+   STK_ERROR("frame %d, bytesused=%d, skipping\n",
i, fb->v4lbuf.bytesused));
fb->v4lbuf.bytesused = 0;
fill = fb->buffer;
-- 
2.7.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 33/57] [media] au0828: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/au0828/au0828-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-video.c 
b/drivers/media/usb/au0828/au0828-video.c
index 85dd9a8e83ff..7a10eaa38f67 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -253,8 +253,7 @@ static int au0828_init_isoc(struct au0828_dev *dev, int 
max_packets,
dev->isoc_ctl.transfer_buffer[i] = 
usb_alloc_coherent(dev->usbdev,
sb_size, GFP_KERNEL, >transfer_dma);
if (!dev->isoc_ctl.transfer_buffer[i]) {
-   printk("unable to allocate %i bytes for transfer"
-   " buffer %i%s\n",
+   printk("unable to allocate %i bytes for transfer buffer 
%i%s\n",
sb_size, i,
in_interrupt() ? " while in int" : "");
au0828_uninit_isoc(dev);
-- 
2.7.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 12/57] [media] ddbridge: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/ddbridge/ddbridge-core.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c 
b/drivers/media/pci/ddbridge/ddbridge-core.c
index 18e3a4deee64..a6c9fe235974 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -824,8 +824,7 @@ static int dvb_input_attach(struct ddb_input *input)
   >port->dev->pdev->dev,
   adapter_nr);
if (ret < 0) {
-   printk(KERN_ERR "ddbridge: Could not register adapter."
-  "Check if you enabled enough adapters in dvb-core!\n");
+   printk(KERN_ERR "ddbridge: Could not register adapter.Check if 
you enabled enough adapters in dvb-core!\n");
return ret;
}
input->attached = 1;
@@ -1730,8 +1729,7 @@ static __init int module_init_ddbridge(void)
 {
int ret;
 
-   printk(KERN_INFO "Digital Devices PCIE bridge driver, "
-  "Copyright (C) 2010-11 Digital Devices GmbH\n");
+   printk(KERN_INFO "Digital Devices PCIE bridge driver, Copyright (C) 
2010-11 Digital Devices GmbH\n");
 
ret = ddb_class_create();
if (ret < 0)
-- 
2.7.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 04/57] [media] cx25840: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/cx25840/cx25840-core.c | 11 +++
 drivers/media/i2c/cx25840/cx25840-ir.c   |  6 ++
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/media/i2c/cx25840/cx25840-core.c 
b/drivers/media/i2c/cx25840/cx25840-core.c
index 142ae28803bb..0dcf450052ac 100644
--- a/drivers/media/i2c/cx25840/cx25840-core.c
+++ b/drivers/media/i2c/cx25840/cx25840-core.c
@@ -873,10 +873,7 @@ void cx25840_std_setup(struct i2c_client *client)
"Chroma sub-carrier freq = %d.%06d 
MHz\n",
fsc / 100, fsc % 100);
 
-   v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive 
%i, "
-   "vblank %i, vactive %i, vblank656 %i, src_dec 
%i, "
-   "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 
0x%02x, "
-   "sc 0x%06x\n",
+   v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive 
%i, vblank %i, vactive %i, vblank656 %i, src_dec %i, burst 0x%02x, luma_lpf %i, 
uv_lpf %i, comb 0x%02x, sc 0x%06x\n",
hblank, hactive, vblank, vactive, vblank656,
src_decimation, burst, luma_lpf, uv_lpf, comb, 
sc);
}
@@ -5169,11 +5166,9 @@ static int cx25840_probe(struct i2c_client *client,
id = CX2310X_AV;
} else if ((device_id & 0xff) == (device_id >> 8)) {
v4l_err(client,
-   "likely a confused/unresponsive cx2388[578] A/V decoder"
-   " found @ 0x%x (%s)\n",
+   "likely a confused/unresponsive cx2388[578] A/V decoder 
found @ 0x%x (%s)\n",
client->addr << 1, client->adapter->name);
-   v4l_err(client, "A method to reset it from the cx25840 driver"
-   " software is not known at this time\n");
+   v4l_err(client, "A method to reset it from the cx25840 driver 
software is not known at this time\n");
return -ENODEV;
} else {
v4l_dbg(1, cx25840_debug, client, "cx25840 not found\n");
diff --git a/drivers/media/i2c/cx25840/cx25840-ir.c 
b/drivers/media/i2c/cx25840/cx25840-ir.c
index 4b782012cadc..291f7d0a1c5c 100644
--- a/drivers/media/i2c/cx25840/cx25840-ir.c
+++ b/drivers/media/i2c/cx25840/cx25840-ir.c
@@ -1113,8 +1113,7 @@ int cx25840_ir_log_status(struct v4l2_subdev *sd)
j = 0;
break;
}
-   v4l2_info(sd, "\tNext carrier edge window:  16 clocks "
- "-%1d/+%1d, %u to %u Hz\n", i, j,
+   v4l2_info(sd, "\tNext carrier edge window:  16 clocks 
-%1d/+%1d, %u to %u Hz\n", i, j,
  clock_divider_to_freq(rxclk, 16 + j),
  clock_divider_to_freq(rxclk, 16 - i));
}
@@ -1124,8 +1123,7 @@ int cx25840_ir_log_status(struct v4l2_subdev *sd)
v4l2_info(sd, "\tLow pass filter:   %s\n",
  filtr ? "enabled" : "disabled");
if (filtr)
-   v4l2_info(sd, "\tMin acceptable pulse width (LPF):  %u us, "
- "%u ns\n",
+   v4l2_info(sd, "\tMin acceptable pulse width (LPF):  %u us, %u 
ns\n",
  lpf_count_to_us(filtr),
  lpf_count_to_ns(filtr));
v4l2_info(sd, "\tPulse width timer timed-out:   %s\n",
-- 
2.7.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 01/57] [media] b2c2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/common/b2c2/flexcop-eeprom.c | 3 +--
 drivers/media/common/b2c2/flexcop-i2c.c| 3 +--
 drivers/media/common/b2c2/flexcop-misc.c   | 9 +++--
 drivers/media/common/b2c2/flexcop.c| 3 +--
 4 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/media/common/b2c2/flexcop-eeprom.c 
b/drivers/media/common/b2c2/flexcop-eeprom.c
index a25373a9bd84..844c7836c2a6 100644
--- a/drivers/media/common/b2c2/flexcop-eeprom.c
+++ b/drivers/media/common/b2c2/flexcop-eeprom.c
@@ -136,8 +136,7 @@ int flexcop_eeprom_check_mac_addr(struct flexcop_device 
*fc, int extended)
 
if ((ret = flexcop_eeprom_lrc_read(fc,0x3f8,buf,8,4)) == 0) {
if (extended != 0) {
-   err("TODO: extended (EUI64) MAC addresses aren't "
-   "completely supported yet");
+   err("TODO: extended (EUI64) MAC addresses aren't 
completely supported yet");
ret = -EINVAL;
} else
memcpy(fc->dvb_adapter.proposed_mac,buf,6);
diff --git a/drivers/media/common/b2c2/flexcop-i2c.c 
b/drivers/media/common/b2c2/flexcop-i2c.c
index e41cd23f8e45..1c1dc91ccd79 100644
--- a/drivers/media/common/b2c2/flexcop-i2c.c
+++ b/drivers/media/common/b2c2/flexcop-i2c.c
@@ -33,8 +33,7 @@ static int flexcop_i2c_operation(struct flexcop_device *fc,
return -EREMOTEIO;
}
}
-   deb_i2c("tried %d times i2c operation, "
-   "never finished or too many ack errors.\n", i);
+   deb_i2c("tried %d times i2c operation, never finished or too many ack 
errors.\n", i);
return -EREMOTEIO;
 }
 
diff --git a/drivers/media/common/b2c2/flexcop-misc.c 
b/drivers/media/common/b2c2/flexcop-misc.c
index b8eff235367d..bb0d95fe64f9 100644
--- a/drivers/media/common/b2c2/flexcop-misc.c
+++ b/drivers/media/common/b2c2/flexcop-misc.c
@@ -23,18 +23,15 @@ void flexcop_determine_revision(struct flexcop_device *fc)
fc->rev = FLEXCOP_III;
break;
default:
-   err("unknown FlexCop Revision: %x. Please report this to "
-   "linux-...@linuxtv.org.",
+   err("unknown FlexCop Revision: %x. Please report this to 
linux-...@linuxtv.org.",
v.misc_204.Rev_N_sig_revision_hi);
break;
}
 
if ((fc->has_32_hw_pid_filter = v.misc_204.Rev_N_sig_caps))
-   deb_info("this FlexCop has "
-   "the additional 32 hardware pid filter.\n");
+   deb_info("this FlexCop has the additional 32 hardware pid 
filter.\n");
else
-   deb_info("this FlexCop has "
-   "the 6 basic main hardware pid filter.\n");
+   deb_info("this FlexCop has the 6 basic main hardware pid 
filter.\n");
/* bus parts have to decide if hw pid filtering is used or not. */
 }
 
diff --git a/drivers/media/common/b2c2/flexcop.c 
b/drivers/media/common/b2c2/flexcop.c
index 0f5114d406f8..4338ab0043b4 100644
--- a/drivers/media/common/b2c2/flexcop.c
+++ b/drivers/media/common/b2c2/flexcop.c
@@ -46,8 +46,7 @@ int b2c2_flexcop_debug;
 EXPORT_SYMBOL_GPL(b2c2_flexcop_debug);
 module_param_named(debug, b2c2_flexcop_debug,  int, 0644);
 MODULE_PARM_DESC(debug,
-   "set debug level (1=info,2=tuner,4=i2c,8=ts,"
-   "16=sram,32=reg (|-able))."
+   "set debug level (1=info,2=tuner,4=i2c,8=ts,16=sram,32=reg 
(|-able))."
DEBSTATUS);
 #undef DEBSTATUS
 
-- 
2.7.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 06/57] [media] soc_camera: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/soc_camera/ov772x.c | 3 +--
 drivers/media/i2c/soc_camera/ov9740.c | 3 +--
 drivers/media/i2c/soc_camera/tw9910.c | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/media/i2c/soc_camera/ov772x.c 
b/drivers/media/i2c/soc_camera/ov772x.c
index 7e68762b3a4b..985a3672b243 100644
--- a/drivers/media/i2c/soc_camera/ov772x.c
+++ b/drivers/media/i2c/soc_camera/ov772x.c
@@ -1064,8 +1064,7 @@ static int ov772x_probe(struct i2c_client *client,
 
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
dev_err(>dev,
-   "I2C-Adapter doesn't support "
-   "I2C_FUNC_SMBUS_BYTE_DATA\n");
+   "I2C-Adapter doesn't support 
I2C_FUNC_SMBUS_BYTE_DATA\n");
return -EIO;
}
 
diff --git a/drivers/media/i2c/soc_camera/ov9740.c 
b/drivers/media/i2c/soc_camera/ov9740.c
index 0da632d7d33a..f11f76cdacad 100644
--- a/drivers/media/i2c/soc_camera/ov9740.c
+++ b/drivers/media/i2c/soc_camera/ov9740.c
@@ -881,8 +881,7 @@ static int ov9740_video_probe(struct i2c_client *client)
goto done;
}
 
-   dev_info(>dev, "ov9740 Model ID 0x%04x, Revision 0x%02x, "
-"Manufacturer 0x%02x, SMIA Version 0x%02x\n",
+   dev_info(>dev, "ov9740 Model ID 0x%04x, Revision 0x%02x, 
Manufacturer 0x%02x, SMIA Version 0x%02x\n",
 priv->model, priv->revision, priv->manid, priv->smiaver);
 
ret = v4l2_ctrl_handler_setup(>hdl);
diff --git a/drivers/media/i2c/soc_camera/tw9910.c 
b/drivers/media/i2c/soc_camera/tw9910.c
index 4002c07f3857..c9c49ed707b8 100644
--- a/drivers/media/i2c/soc_camera/tw9910.c
+++ b/drivers/media/i2c/soc_camera/tw9910.c
@@ -947,8 +947,7 @@ static int tw9910_probe(struct i2c_client *client,
 
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
dev_err(>dev,
-   "I2C-Adapter doesn't support "
-   "I2C_FUNC_SMBUS_BYTE_DATA\n");
+   "I2C-Adapter doesn't support 
I2C_FUNC_SMBUS_BYTE_DATA\n");
return -EIO;
}
 
-- 
2.7.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 05/57] [media] smiapp: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/smiapp/smiapp-regs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/i2c/smiapp/smiapp-regs.c 
b/drivers/media/i2c/smiapp/smiapp-regs.c
index 1e501c06d18c..f1ba4a2712ce 100644
--- a/drivers/media/i2c/smiapp/smiapp-regs.c
+++ b/drivers/media/i2c/smiapp/smiapp-regs.c
@@ -268,8 +268,7 @@ int smiapp_write_no_quirk(struct smiapp_sensor *sensor, u32 
reg, u32 val)
if (r == 1) {
if (retries)
dev_err(>dev,
-   "sensor i2c stall encountered. "
-   "retries: %d\n", retries);
+   "sensor i2c stall encountered. retries: 
%d\n", retries);
return 0;
}
 
-- 
2.7.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 20/57] [media] ttpci: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/ttpci/av7110.c   | 27 +--
 drivers/media/pci/ttpci/av7110_hw.c| 12 
 drivers/media/pci/ttpci/budget-av.c|  3 +--
 drivers/media/pci/ttpci/budget-ci.c|  4 +---
 drivers/media/pci/ttpci/budget-patch.c |  3 +--
 drivers/media/pci/ttpci/budget.c   |  3 +--
 drivers/media/pci/ttpci/ttpci-eeprom.c |  3 +--
 7 files changed, 18 insertions(+), 37 deletions(-)

diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c
index 382caf200ba1..155a46001631 100644
--- a/drivers/media/pci/ttpci/av7110.c
+++ b/drivers/media/pci/ttpci/av7110.c
@@ -100,8 +100,7 @@ MODULE_PARM_DESC(adac,"audio DAC type: 0 TI, 1 CRYSTAL, 2 
MSP (use if autodetect
 module_param(hw_sections, int, 0444);
 MODULE_PARM_DESC(hw_sections, "0 use software section filter, 1 use hardware");
 module_param(rgb_on, int, 0444);
-MODULE_PARM_DESC(rgb_on, "For Siemens DVB-C cards only: Enable RGB control"
-   " signal on SCART pin 16 to switch SCART video mode from CVBS 
to RGB");
+MODULE_PARM_DESC(rgb_on, "For Siemens DVB-C cards only: Enable RGB control 
signal on SCART pin 16 to switch SCART video mode from CVBS to RGB");
 module_param(volume, int, 0444);
 MODULE_PARM_DESC(volume, "initial volume: default 255 (range 0-255)");
 module_param(budgetpatch, int, 0444);
@@ -833,8 +832,7 @@ static int StartHWFilter(struct dvb_demux_filter 
*dvbdmxfilter)
 
ret = av7110_fw_request(av7110, buf, 20, , 1);
if (ret != 0 || handle >= 32) {
-   printk("dvb-ttpci: %s error  buf %04x %04x %04x %04x  "
-   "ret %d  handle %04x\n",
+   printk("dvb-ttpci: %s error  buf %04x %04x %04x %04x  ret %d  
handle %04x\n",
__func__, buf[0], buf[1], buf[2], buf[3],
ret, handle);
dvbdmxfilter->hw_handle = 0x;
@@ -876,8 +874,7 @@ static int StopHWFilter(struct dvb_demux_filter 
*dvbdmxfilter)
buf[2] = handle;
ret = av7110_fw_request(av7110, buf, 3, answ, 2);
if (ret != 0 || answ[1] != handle) {
-   printk("dvb-ttpci: %s error  cmd %04x %04x %04x  ret %x  "
-   "resp %04x %04x  pid %d\n",
+   printk("dvb-ttpci: %s error  cmd %04x %04x %04x  ret %x  resp 
%04x %04x  pid %d\n",
__func__, buf[0], buf[1], buf[2], ret,
answ[0], answ[1], dvbdmxfilter->feed->pid);
if (!ret)
@@ -1532,15 +1529,11 @@ static int get_firmware(struct av7110* av7110)
ret = request_firmware(, "dvb-ttpci-01.fw", >dev->pci->dev);
if (ret) {
if (ret == -ENOENT) {
-   printk(KERN_ERR "dvb-ttpci: could not load firmware,"
-  " file not found: dvb-ttpci-01.fw\n");
-   printk(KERN_ERR "dvb-ttpci: usually this should be in "
-  "/usr/lib/hotplug/firmware or /lib/firmware\n");
-   printk(KERN_ERR "dvb-ttpci: and can be downloaded from"
-  " https://linuxtv.org/download/dvb/firmware/\n;);
+   printk(KERN_ERR "dvb-ttpci: could not load firmware, 
file not found: dvb-ttpci-01.fw\n");
+   printk(KERN_ERR "dvb-ttpci: usually this should be in 
/usr/lib/hotplug/firmware or /lib/firmware\n");
+   printk(KERN_ERR "dvb-ttpci: and can be downloaded from 
https://linuxtv.org/download/dvb/firmware/\n;);
} else
-   printk(KERN_ERR "dvb-ttpci: cannot request firmware"
-  " (error %i)\n", ret);
+   printk(KERN_ERR "dvb-ttpci: cannot request firmware 
(error %i)\n", ret);
return -EINVAL;
}
 
@@ -2700,8 +2693,7 @@ static int av7110_attach(struct saa7146_dev* dev,
goto err_stop_arm_9;
 
if (FW_VERSION(av7110->arm_app)<0x2501)
-   printk ("dvb-ttpci: Warning, firmware version 0x%04x is too 
old. "
-   "System might be unstable!\n", 
FW_VERSION(av7110->arm_app));
+   printk ("dvb-ttpci: Warning, firmware version 0x%04x is too 
old. System might be unstable!\n", FW_VERSION(av7110->arm_app));
 
thread = kthread_run(arm_thread, (void *) av7110, "arm_mon");
if (IS_ERR(thread)) {
@@ -2944,7 +2936,6 @@ static void __exit av7110_exit(void)
 module_init(av7110_init);
 module_exit(av7110_exit);
 
-MODULE_DESCRIPTION("driver for the SAA7146 based AV110 PCI DVB cards by "
-  "Siemens, Technotrend, Hauppauge");

[PATCH 22/57] [media] davinci: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/davinci/dm355_ccdc.c   |  3 +--
 drivers/media/platform/davinci/dm644x_ccdc.c  |  3 +--
 drivers/media/platform/davinci/vpbe.c | 15 +--
 drivers/media/platform/davinci/vpfe_capture.c |  6 ++
 drivers/media/platform/davinci/vpif_capture.c |  9 ++---
 drivers/media/platform/davinci/vpif_display.c |  9 ++---
 drivers/media/platform/davinci/vpss.c |  6 ++
 7 files changed, 15 insertions(+), 36 deletions(-)

diff --git a/drivers/media/platform/davinci/dm355_ccdc.c 
b/drivers/media/platform/davinci/dm355_ccdc.c
index c90b9a4f0c24..11fa008331dd 100644
--- a/drivers/media/platform/davinci/dm355_ccdc.c
+++ b/drivers/media/platform/davinci/dm355_ccdc.c
@@ -334,8 +334,7 @@ static int ccdc_set_params(void __user *params)
 
x = copy_from_user(_raw_params, params, sizeof(ccdc_raw_params));
if (x) {
-   dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying ccdc"
-   "params, %d\n", x);
+   dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying 
ccdcparams, %d\n", x);
return -EFAULT;
}
 
diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c 
b/drivers/media/platform/davinci/dm644x_ccdc.c
index 6fba32bec974..a83014da57d5 100644
--- a/drivers/media/platform/davinci/dm644x_ccdc.c
+++ b/drivers/media/platform/davinci/dm644x_ccdc.c
@@ -354,8 +354,7 @@ static int ccdc_set_params(void __user *params)
 
x = copy_from_user(_raw_params, params, sizeof(ccdc_raw_params));
if (x) {
-   dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying"
-  "ccdc params, %d\n", x);
+   dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copyingccdc 
params, %d\n", x);
return -EFAULT;
}
 
diff --git a/drivers/media/platform/davinci/vpbe.c 
b/drivers/media/platform/davinci/vpbe.c
index 9a6c2cc38acb..7d2670732805 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -705,15 +705,13 @@ static int vpbe_initialize(struct device *dev, struct 
vpbe_device *vpbe_dev)
  "v4l2 sub device %s registered\n",
  enc_info->module_name);
else {
-   v4l2_err(_dev->v4l2_dev, "encoder %s"
-" failed to register",
+   v4l2_err(_dev->v4l2_dev, "encoder %s 
failed to register",
 enc_info->module_name);
ret = -ENODEV;
goto fail_kfree_encoders;
}
} else
-   v4l2_warn(_dev->v4l2_dev, "non-i2c encoders"
-" currently not supported");
+   v4l2_warn(_dev->v4l2_dev, "non-i2c encoders 
currently not supported");
}
/* Add amplifier subdevice for dm365 */
if ((strcmp(vpbe_dev->cfg->module_name, "dm365-vpbe-display") == 0) &&
@@ -735,8 +733,7 @@ static int vpbe_initialize(struct device *dev, struct 
vpbe_device *vpbe_dev)
  amp_info->module_name);
} else {
vpbe_dev->amp = NULL;
-   v4l2_warn(_dev->v4l2_dev, "non-i2c amplifiers"
-   " currently not supported");
+   v4l2_warn(_dev->v4l2_dev, "non-i2c amplifiers 
currently not supported");
}
} else {
vpbe_dev->amp = NULL;
@@ -835,15 +832,13 @@ static int vpbe_probe(struct platform_device *pdev)
if (!cfg->module_name[0] ||
!cfg->osd.module_name[0] ||
!cfg->venc.module_name[0]) {
-   v4l2_err(pdev->dev.driver, "vpbe display module names not"
-" defined\n");
+   v4l2_err(pdev->dev.driver, "vpbe display module names not 
defined\n");
return ret;
}
 
vpbe_dev = kzalloc(sizeof(*vpbe_dev), GFP_KERNEL);
if (vpbe_dev == NULL) {
-   v4l2_err(pdev->dev.driver, "Unable to allocate memory"
-" for vpbe_device\n");
+   v4l2_err(pdev->dev.driver, "Unable to allocate memory for 
vpbe_device\n");
return -ENOMEM;
}
vpbe_dev->cfg = cfg;
diff --git a/drivers/media/platform/davinci/vpfe_capture.c 
b/drivers/media/platform/davinci/vpfe_capture.c
index 6efb2f1631c4..ca22c3493f55 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ 

[PATCH 23/57] [media] exynos4-is: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/exynos4-is/media-dev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/media-dev.c 
b/drivers/media/platform/exynos4-is/media-dev.c
index 1a1154a9dfa4..e3a8709138fa 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -938,8 +938,7 @@ static int fimc_md_create_links(struct fimc_md *fmd)
 
csis = fmd->csis[pdata->mux_id].sd;
if (WARN(csis == NULL,
-"MIPI-CSI interface specified "
-"but s5p-csis module is not loaded!\n"))
+"MIPI-CSI interface specified but s5p-csis 
module is not loaded!\n"))
return -EINVAL;
 
pad = sensor->entity.num_pads - 1;
-- 
2.7.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 17/57] [media] saa7134: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/saa7134/saa7134-alsa.c  |  3 +--
 drivers/media/pci/saa7134/saa7134-cards.c |  6 ++
 drivers/media/pci/saa7134/saa7134-core.c  | 29 +
 drivers/media/pci/saa7134/saa7134-dvb.c   | 24 
 drivers/media/pci/saa7134/saa7134-input.c | 12 
 5 files changed, 24 insertions(+), 50 deletions(-)

diff --git a/drivers/media/pci/saa7134/saa7134-alsa.c 
b/drivers/media/pci/saa7134/saa7134-alsa.c
index dc0e2fc5f68b..8a35ecfb75e3 100644
--- a/drivers/media/pci/saa7134/saa7134-alsa.c
+++ b/drivers/media/pci/saa7134/saa7134-alsa.c
@@ -813,8 +813,7 @@ static int snd_card_saa7134_capture_open(struct 
snd_pcm_substream * substream)
int amux, err;
 
if (!saa7134) {
-   pr_err("BUG: saa7134 can't find device struct."
-   " Can't proceed with open\n");
+   pr_err("BUG: saa7134 can't find device struct. Can't proceed 
with open\n");
return -ENODEV;
}
dev = saa7134->dev;
diff --git a/drivers/media/pci/saa7134/saa7134-cards.c 
b/drivers/media/pci/saa7134/saa7134-cards.c
index c480a7e87593..803abe8e53f6 100644
--- a/drivers/media/pci/saa7134/saa7134-cards.c
+++ b/drivers/media/pci/saa7134/saa7134-cards.c
@@ -7341,8 +7341,7 @@ static void hauppauge_eeprom(struct saa7134_dev *dev, u8 
*eeprom_data)
case 67659: /* WinTV-HVR1110 (OEM, no IR, hybrid, FM, SVid/Comp, RCA 
aud) */
break;
default:
-   pr_warn("%s: warning: "
-  "unknown hauppauge model #%d\n", dev->name, tv.model);
+   pr_warn("%s: warning: unknown hauppauge model #%d\n", 
dev->name, tv.model);
break;
}
 
@@ -7920,8 +7919,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
msg.addr = 0x0b;
msg.len = 1;
if (1 != i2c_transfer(>i2c_adap, , 1)) {
-   pr_warn("%s: send wake up byte to pic16C505"
-   "(IR chip) failed\n", dev->name);
+   pr_warn("%s: send wake up byte to pic16C505(IR chip) 
failed\n", dev->name);
} else {
msg.flags = I2C_M_RD;
rc = i2c_transfer(>i2c_adap, , 1);
diff --git a/drivers/media/pci/saa7134/saa7134-core.c 
b/drivers/media/pci/saa7134/saa7134-core.c
index ffb66a9ae23e..757bc9acb148 100644
--- a/drivers/media/pci/saa7134/saa7134-core.c
+++ b/drivers/media/pci/saa7134/saa7134-core.c
@@ -66,8 +66,7 @@ MODULE_PARM_DESC(latency,"pci latency timer");
 
 int saa7134_no_overlay=-1;
 module_param_named(no_overlay, saa7134_no_overlay, int, 0444);
-MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 
enables)"
-   " [some VIA/SIS chipsets are known to have problem with 
overlay]");
+MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 
enables) [some VIA/SIS chipsets are known to have problem with overlay]");
 
 bool saa7134_userptr;
 module_param(saa7134_userptr, bool, 0644);
@@ -619,25 +618,21 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id)
print_irqstatus(dev,loop,report,status);
if (report & SAA7134_IRQ_REPORT_PE) {
/* disable all parity error */
-   pr_warn("%s/irq: looping -- "
-  "clearing PE (parity error!) enable 
bit\n",dev->name);
+   pr_warn("%s/irq: looping -- clearing PE (parity error!) 
enable bit\n",dev->name);
saa_clearl(SAA7134_IRQ2,SAA7134_IRQ2_INTE_PE);
} else if (report & SAA7134_IRQ_REPORT_GPIO16) {
/* disable gpio16 IRQ */
-   pr_warn("%s/irq: looping -- "
-  "clearing GPIO16 enable bit\n",dev->name);
+   pr_warn("%s/irq: looping -- clearing GPIO16 enable 
bit\n",dev->name);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16_P);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16_N);
} else if (report & SAA7134_IRQ_REPORT_GPIO18) {
/* disable gpio18 IRQs */
-   pr_warn("%s/irq: looping -- "
-  "clearing GPIO18 enable bit\n",dev->name);
+   pr_warn("%s/irq: looping -- clearing GPIO18 enable 
bit\n",dev->name);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18_P);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18_N);
} else {
/* 

[PATCH 18/57] [media] saa7164: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/saa7164/saa7164-buffer.c  |  3 +-
 drivers/media/pci/saa7164/saa7164-bus.c |  3 +-
 drivers/media/pci/saa7164/saa7164-cards.c   |  3 +-
 drivers/media/pci/saa7164/saa7164-cmd.c | 10 ++
 drivers/media/pci/saa7164/saa7164-core.c| 56 ++---
 drivers/media/pci/saa7164/saa7164-dvb.c | 27 +-
 drivers/media/pci/saa7164/saa7164-encoder.c | 15 +++-
 drivers/media/pci/saa7164/saa7164-fw.c  |  9 ++---
 drivers/media/pci/saa7164/saa7164-vbi.c | 12 +++
 9 files changed, 45 insertions(+), 93 deletions(-)

diff --git a/drivers/media/pci/saa7164/saa7164-buffer.c 
b/drivers/media/pci/saa7164/saa7164-buffer.c
index f30758e24f5d..ff04ef322fc1 100644
--- a/drivers/media/pci/saa7164/saa7164-buffer.c
+++ b/drivers/media/pci/saa7164/saa7164-buffer.c
@@ -218,8 +218,7 @@ int saa7164_buffer_activate(struct saa7164_buffer *buf, int 
i)
saa7164_writel(port->bufptr32h + ((sizeof(u32) * 2) * i), buf->pt_dma);
saa7164_writel(port->bufptr32l + ((sizeof(u32) * 2) * i), 0);
 
-   dprintk(DBGLVL_BUF, "   buf[%d] offset 0x%llx (0x%x) "
-   "buf 0x%llx/%llx (0x%x/%x) nr=%d\n",
+   dprintk(DBGLVL_BUF, "   buf[%d] offset 0x%llx (0x%x) buf 0x%llx/%llx 
(0x%x/%x) nr=%d\n",
buf->idx,
(u64)port->bufoffset + (i * sizeof(u32)),
saa7164_readl(port->bufoffset + (sizeof(u32) * i)),
diff --git a/drivers/media/pci/saa7164/saa7164-bus.c 
b/drivers/media/pci/saa7164/saa7164-bus.c
index a18fe5d47238..00c2aae059a0 100644
--- a/drivers/media/pci/saa7164/saa7164-bus.c
+++ b/drivers/media/pci/saa7164/saa7164-bus.c
@@ -427,8 +427,7 @@ int saa7164_bus_get(struct saa7164_dev *dev, struct 
tmComResInfo* msg,
write_distance = curr_gwp + bus->m_dwSizeGetRing - curr_grp;
 
if (bytes_to_read > write_distance) {
-   printk(KERN_ERR "%s() Invalid bus state, missing msg "
-   "or mangled ring, faulty H/W / bad code?\n", __func__);
+   printk(KERN_ERR "%s() Invalid bus state, missing msg or mangled 
ring, faulty H/W / bad code?\n", __func__);
ret = SAA_ERR_INVALID_COMMAND;
goto out;
}
diff --git a/drivers/media/pci/saa7164/saa7164-cards.c 
b/drivers/media/pci/saa7164/saa7164-cards.c
index c2b738227f58..bfe0af2c00f4 100644
--- a/drivers/media/pci/saa7164/saa7164-cards.c
+++ b/drivers/media/pci/saa7164/saa7164-cards.c
@@ -726,8 +726,7 @@ void saa7164_card_list(struct saa7164_dev *dev)
dev->name, dev->name, dev->name, dev->name);
}
 
-   printk(KERN_ERR "%s: Here are valid choices for the card= insmod "
-   "option:\n", dev->name);
+   printk(KERN_ERR "%s: Here are valid choices for the card= insmod 
option:\n", dev->name);
 
for (i = 0; i < saa7164_bcount; i++)
printk(KERN_ERR "%s:card=%d -> %s\n",
diff --git a/drivers/media/pci/saa7164/saa7164-cmd.c 
b/drivers/media/pci/saa7164/saa7164-cmd.c
index 3285c37b4583..1a6fc8e589b6 100644
--- a/drivers/media/pci/saa7164/saa7164-cmd.c
+++ b/drivers/media/pci/saa7164/saa7164-cmd.c
@@ -301,8 +301,7 @@ static int saa7164_cmd_wait(struct saa7164_dev *dev, u8 
seqno)
else
saa7164_cmd_timeout_seqno(dev, seqno);
 
-   dprintk(DBGLVL_CMD, "%s(seqno=%d) Waiting res = %d "
-   "(signalled=%d)\n", __func__, seqno, r,
+   dprintk(DBGLVL_CMD, "%s(seqno=%d) Waiting res = %d 
(signalled=%d)\n", __func__, seqno, r,
dev->cmds[seqno].signalled);
} else
ret = SAA_OK;
@@ -353,8 +352,7 @@ int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, enum 
tmComResCmd command,
int ret;
int safety = 0;
 
-   dprintk(DBGLVL_CMD, "%s(unitid = %s (%d) , command = 0x%x, "
-   "sel = 0x%x)\n", __func__, saa7164_unitid_name(dev, id), id,
+   dprintk(DBGLVL_CMD, "%s(unitid = %s (%d) , command = 0x%x, sel = 
0x%x)\n", __func__, saa7164_unitid_name(dev, id), id,
command, controlselector);
 
if ((size == 0) || (buf == NULL)) {
@@ -452,9 +450,7 @@ int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, enum 
tmComResCmd command,
if (presponse_t->seqno != pcommand_t->seqno) {
 
dprintk(DBGLVL_CMD,
-   "wrong event: seqno = %d, "
-   "expected seqno = %d, "
-   "will dequeue regardless\n",
+   "wrong event: seqno = %d, expected 

[PATCH 15/57] [media] meye: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/meye/meye.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index ba887e8e1b17..11d81389ab1e 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -60,8 +60,7 @@ MODULE_PARM_DESC(gbuffers, "number of capture buffers, 
default is 2 (32 max)");
 /* size of a grab buffer */
 static unsigned int gbufsize = MEYE_MAX_BUFSIZE;
 module_param(gbufsize, int, 0444);
-MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 614400"
-" (will be rounded up to a page multiple)");
+MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 614400 
(will be rounded up to a page multiple)");
 
 /* /dev/videoX registration number */
 static int video_nr = -1;
@@ -1261,8 +1260,7 @@ static int vidioc_reqbufs(struct file *file, void *fh,
meye.grab_fbuffer = rvmalloc(gbuffers * gbufsize);
 
if (!meye.grab_fbuffer) {
-   printk(KERN_ERR "meye: v4l framebuffer allocation"
-   " failed\n");
+   printk(KERN_ERR "meye: v4l framebuffer allocation failed\n");
mutex_unlock();
return -ENOMEM;
}
@@ -1659,8 +1657,7 @@ static int meye_probe(struct pci_dev *pcidev, const 
struct pci_device_id *ent)
ret = -EIO;
if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
v4l2_err(v4l2_dev, "meye: unable to power on the camera\n");
-   v4l2_err(v4l2_dev, "meye: did you enable the camera in "
-   "sonypi using the module options ?\n");
+   v4l2_err(v4l2_dev, "meye: did you enable the camera in sonypi 
using the module options ?\n");
goto outsonypienable;
}
 
@@ -1834,8 +1831,7 @@ static int __init meye_init(void)
if (gbufsize > MEYE_MAX_BUFSIZE)
gbufsize = MEYE_MAX_BUFSIZE;
gbufsize = PAGE_ALIGN(gbufsize);
-   printk(KERN_INFO "meye: using %d buffers with %dk (%dk total) "
-"for capture\n",
+   printk(KERN_INFO "meye: using %d buffers with %dk (%dk total) for 
capture\n",
 gbuffers,
 gbufsize / 1024, gbuffers * gbufsize / 1024);
return pci_register_driver(_driver);
-- 
2.7.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 26/57] [media] omap3isp: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/omap3isp/isp.c |  3 +--
 drivers/media/platform/omap3isp/ispccdc.c |  6 ++---
 drivers/media/platform/omap3isp/ispcsi2.c | 11 ++--
 drivers/media/platform/omap3isp/ispcsiphy.c   |  3 +--
 drivers/media/platform/omap3isp/isph3a_aewb.c |  6 ++---
 drivers/media/platform/omap3isp/isph3a_af.c   |  6 ++---
 drivers/media/platform/omap3isp/ispstat.c | 36 +--
 7 files changed, 22 insertions(+), 49 deletions(-)

diff --git a/drivers/media/platform/omap3isp/isp.c 
b/drivers/media/platform/omap3isp/isp.c
index 0321d84addc7..a9d4347bf100 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -480,8 +480,7 @@ void omap3isp_hist_dma_done(struct isp_device *isp)
omap3isp_stat_pcr_busy(>isp_hist)) {
/* Histogram cannot be enabled in this frame anymore */
atomic_set(>isp_hist.buf_err, 1);
-   dev_dbg(isp->dev, "hist: Out of synchronization with "
- "CCDC. Ignoring next buffer.\n");
+   dev_dbg(isp->dev, "hist: Out of synchronization with CCDC. 
Ignoring next buffer.\n");
}
 }
 
diff --git a/drivers/media/platform/omap3isp/ispccdc.c 
b/drivers/media/platform/omap3isp/ispccdc.c
index 882310eb45cc..3f8e71c8ea48 100644
--- a/drivers/media/platform/omap3isp/ispccdc.c
+++ b/drivers/media/platform/omap3isp/ispccdc.c
@@ -151,8 +151,7 @@ static int ccdc_lsc_validate_config(struct isp_ccdc_device 
*ccdc,
}
 
if (lsc_cfg->offset & 3) {
-   dev_dbg(isp->dev, "CCDC: LSC: Offset must be a multiple of "
-   "4\n");
+   dev_dbg(isp->dev, "CCDC: LSC: Offset must be a multiple of 
4\n");
return -EINVAL;
}
 
@@ -416,8 +415,7 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc,
return 0;
 
if (update != (OMAP3ISP_CCDC_CONFIG_LSC | OMAP3ISP_CCDC_TBL_LSC)) {
-   dev_dbg(to_device(ccdc), "%s: Both LSC configuration and table "
-   "need to be supplied\n", __func__);
+   dev_dbg(to_device(ccdc), "%s: Both LSC configuration and table 
need to be supplied\n", __func__);
return -EINVAL;
}
 
diff --git a/drivers/media/platform/omap3isp/ispcsi2.c 
b/drivers/media/platform/omap3isp/ispcsi2.c
index f75a1be29d84..53a7573ed2a5 100644
--- a/drivers/media/platform/omap3isp/ispcsi2.c
+++ b/drivers/media/platform/omap3isp/ispcsi2.c
@@ -753,8 +753,7 @@ void omap3isp_csi2_isr(struct isp_csi2_device *csi2)
 ISPCSI2_PHY_IRQSTATUS);
isp_reg_writel(isp, cpxio1_irqstatus,
   csi2->regs1, ISPCSI2_PHY_IRQSTATUS);
-   dev_dbg(isp->dev, "CSI2: ComplexIO Error IRQ "
-   "%x\n", cpxio1_irqstatus);
+   dev_dbg(isp->dev, "CSI2: ComplexIO Error IRQ %x\n", 
cpxio1_irqstatus);
pipe->error = true;
}
 
@@ -763,13 +762,7 @@ void omap3isp_csi2_isr(struct isp_csi2_device *csi2)
  ISPCSI2_IRQSTATUS_ECC_NO_CORRECTION_IRQ |
  ISPCSI2_IRQSTATUS_COMPLEXIO2_ERR_IRQ |
  ISPCSI2_IRQSTATUS_FIFO_OVF_IRQ)) {
-   dev_dbg(isp->dev, "CSI2 Err:"
-   " OCP:%d,"
-   " Short_pack:%d,"
-   " ECC:%d,"
-   " CPXIO2:%d,"
-   " FIFO_OVF:%d,"
-   "\n",
+   dev_dbg(isp->dev, "CSI2 Err: OCP:%d, Short_pack:%d, ECC:%d, 
CPXIO2:%d, FIFO_OVF:%d,\n",
(csi2_irqstatus &
 ISPCSI2_IRQSTATUS_OCP_ERR_IRQ) ? 1 : 0,
(csi2_irqstatus &
diff --git a/drivers/media/platform/omap3isp/ispcsiphy.c 
b/drivers/media/platform/omap3isp/ispcsiphy.c
index 495447d66cfd..f67fd2f09f00 100644
--- a/drivers/media/platform/omap3isp/ispcsiphy.c
+++ b/drivers/media/platform/omap3isp/ispcsiphy.c
@@ -267,8 +267,7 @@ int omap3isp_csiphy_acquire(struct isp_csiphy *phy)
int rval;
 
if (phy->vdd == NULL) {
-   dev_err(phy->isp->dev, "Power regulator for CSI PHY not "
-   "available\n");
+   dev_err(phy->isp->dev, "Power regulator for CSI PHY not 
available\n");
return -ENODEV;
}
 
diff --git a/drivers/media/platform/omap3isp/isph3a_aewb.c 
b/drivers/media/platform/omap3isp/isph3a_aewb.c
index ccaf92f39236..de9bb3ea032e 100644
--- a/drivers/media/platform/omap3isp/isph3a_aewb.c
+++ 

[PATCH 25/57] [media] omap: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/omap/omap_vout.c  | 12 
 drivers/media/platform/omap/omap_vout_vrfb.c |  3 +--
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/omap/omap_vout.c 
b/drivers/media/platform/omap/omap_vout.c
index e668dde6d857..ab0b941c64a4 100644
--- a/drivers/media/platform/omap/omap_vout.c
+++ b/drivers/media/platform/omap/omap_vout.c
@@ -1657,8 +1657,7 @@ static int vidioc_streamoff(struct file *file, void *fh, 
enum v4l2_buf_type i)
/* Turn of the pipeline */
ret = omapvid_apply_changes(vout);
if (ret)
-   v4l2_err(>vid_dev->v4l2_dev, "failed to change mode in"
-   " streamoff\n");
+   v4l2_err(>vid_dev->v4l2_dev, "failed to change mode in 
streamoff\n");
 
INIT_LIST_HEAD(>dma_queue);
ret = videobuf_streamoff(>vbq);
@@ -1858,8 +1857,7 @@ static int __init omap_vout_setup_video_data(struct 
omap_vout_device *vout)
vfd = vout->vfd = video_device_alloc();
 
if (!vfd) {
-   printk(KERN_ERR VOUT_NAME ": could not allocate"
-   " video device struct\n");
+   printk(KERN_ERR VOUT_NAME ": could not allocate video device 
struct\n");
v4l2_ctrl_handler_free(hdl);
return -ENOMEM;
}
@@ -1984,16 +1982,14 @@ static int __init omap_vout_create_video_devices(struct 
platform_device *pdev)
 */
vfd = vout->vfd;
if (video_register_device(vfd, VFL_TYPE_GRABBER, -1) < 0) {
-   dev_err(>dev, ": Could not register "
-   "Video for Linux device\n");
+   dev_err(>dev, ": Could not register Video for 
Linux device\n");
vfd->minor = -1;
ret = -ENODEV;
goto error2;
}
video_set_drvdata(vfd, vout);
 
-   dev_info(>dev, ": registered and initialized"
-   " video device %d\n", vfd->minor);
+   dev_info(>dev, ": registered and initialized video device 
%d\n", vfd->minor);
if (k == (pdev->num_resources - 1))
return 0;
 
diff --git a/drivers/media/platform/omap/omap_vout_vrfb.c 
b/drivers/media/platform/omap/omap_vout_vrfb.c
index b8638e4e1627..19768f249192 100644
--- a/drivers/media/platform/omap/omap_vout_vrfb.c
+++ b/drivers/media/platform/omap/omap_vout_vrfb.c
@@ -139,8 +139,7 @@ int omap_vout_setup_vrfb_bufs(struct platform_device *pdev, 
int vid_num,
(void *) >vrfb_dma_tx, >vrfb_dma_tx.dma_ch);
if (ret < 0) {
vout->vrfb_dma_tx.req_status = DMA_CHAN_NOT_ALLOTED;
-   dev_info(>dev, ": failed to allocate DMA Channel for"
-   " video%d\n", vfd->minor);
+   dev_info(>dev, ": failed to allocate DMA Channel for 
video%d\n", vfd->minor);
}
init_waitqueue_head(>vrfb_dma_tx.wait);
 
-- 
2.7.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 10/57] [media] cx23885: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/cx23885/cimax2.c|  4 +---
 drivers/media/pci/cx23885/cx23885-417.c   | 15 +--
 drivers/media/pci/cx23885/cx23885-alsa.c  | 12 
 drivers/media/pci/cx23885/cx23885-cards.c |  7 ++-
 drivers/media/pci/cx23885/cx23885-core.c  | 12 
 drivers/media/pci/cx23885/cx23885-dvb.c   |  3 +--
 drivers/media/pci/cx23885/cx23885-video.c |  3 +--
 drivers/media/pci/cx23885/cx23888-ir.c|  6 ++
 8 files changed, 20 insertions(+), 42 deletions(-)

diff --git a/drivers/media/pci/cx23885/cimax2.c 
b/drivers/media/pci/cx23885/cimax2.c
index 631e4f24aea6..fdc54f0e60c6 100644
--- a/drivers/media/pci/cx23885/cimax2.c
+++ b/drivers/media/pci/cx23885/cimax2.c
@@ -365,9 +365,7 @@ static void netup_read_ci_status(struct work_struct *work)
if (ret != 0)
return;
 
-   ci_dbg_print("%s: Slot Status Addr=[0x%04x], "
-   "Reg=[0x%02x], data=%02x, "
-   "TS config = %02x\n", __func__,
+   ci_dbg_print("%s: Slot Status Addr=[0x%04x], Reg=[0x%02x], 
data=%02x, TS config = %02x\n", __func__,
state->ci_i2c_addr, 0, buf[0],
buf[0]);
 
diff --git a/drivers/media/pci/cx23885/cx23885-417.c 
b/drivers/media/pci/cx23885/cx23885-417.c
index da892f3e3c29..ab3c99e7cb8b 100644
--- a/drivers/media/pci/cx23885/cx23885-417.c
+++ b/drivers/media/pci/cx23885/cx23885-417.c
@@ -770,8 +770,7 @@ static int cx23885_mbox_func(void *priv,
mc417_memory_read(dev, dev->cx23417_mailbox - 4, );
if (value != 0x12345678) {
printk(KERN_ERR
-   "Firmware and/or mailbox pointer not initialized "
-   "or corrupted, signature = 0x%x, cmd = %s\n", value,
+   "Firmware and/or mailbox pointer not initialized or 
corrupted, signature = 0x%x, cmd = %s\n", value,
cmd_to_str(command));
return -1;
}
@@ -781,8 +780,7 @@ static int cx23885_mbox_func(void *priv,
 */
mc417_memory_read(dev, dev->cx23417_mailbox, );
if (flag) {
-   printk(KERN_ERR "ERROR: Mailbox appears to be in use "
-   "(%x), cmd = %s\n", flag, cmd_to_str(command));
+   printk(KERN_ERR "ERROR: Mailbox appears to be in use (%x), cmd 
= %s\n", flag, cmd_to_str(command));
return -1;
}
 
@@ -935,14 +933,12 @@ static int cx23885_load_firmware(struct cx23885_dev *dev)
printk(KERN_ERR
"ERROR: Hotplug firmware request failed (%s).\n",
CX23885_FIRM_IMAGE_NAME);
-   printk(KERN_ERR "Please fix your hotplug setup, the board will "
-   "not work without firmware loaded!\n");
+   printk(KERN_ERR "Please fix your hotplug setup, the board will 
not work without firmware loaded!\n");
return -1;
}
 
if (firmware->size != CX23885_FIRM_IMAGE_SIZE) {
-   printk(KERN_ERR "ERROR: Firmware size mismatch "
-   "(have %zu, expected %d)\n",
+   printk(KERN_ERR "ERROR: Firmware size mismatch (have %zu, 
expected %d)\n",
firmware->size, CX23885_FIRM_IMAGE_SIZE);
release_firmware(firmware);
return -1;
@@ -1077,8 +1073,7 @@ static int cx23885_initialize_codec(struct cx23885_dev 
*dev, int startencoder)
retval = cx23885_api_cmd(dev, CX2341X_ENC_GET_VERSION, 0, 1,
);
if (retval < 0) {
-   printk(KERN_ERR "ERROR: cx23417 firmware get encoder :"
-   "version failed!\n");
+   printk(KERN_ERR "ERROR: cx23417 firmware get encoder 
:version failed!\n");
return -1;
}
dprintk(1, "cx23417 firmware version is 0x%08x\n", version);
diff --git a/drivers/media/pci/cx23885/cx23885-alsa.c 
b/drivers/media/pci/cx23885/cx23885-alsa.c
index 6115d4e148ba..3404f1e584a8 100644
--- a/drivers/media/pci/cx23885/cx23885-alsa.c
+++ b/drivers/media/pci/cx23885/cx23885-alsa.c
@@ -186,8 +186,7 @@ static int cx23885_start_audio_dma(struct cx23885_audio_dev 
*chip)
cx_write(AUD_INT_A_GPCNT_CTL, GP_COUNT_CONTROL_RESET);
atomic_set(>count, 0);
 
-   dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d "
-   "byte buffer\n", buf->bpl, cx_read(audio_ch->cmds_start+12)>>1,
+   dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d 

[PATCH 13/57] [media] dm1105: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/dm1105/dm1105.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/pci/dm1105/dm1105.c 
b/drivers/media/pci/dm1105/dm1105.c
index 5dd504741b12..a589aa78d1d9 100644
--- a/drivers/media/pci/dm1105/dm1105.c
+++ b/drivers/media/pci/dm1105/dm1105.c
@@ -315,8 +315,7 @@ static void dm1105_card_list(struct pci_dev *pci)
"dm1105: Updating to the latest version might help\n"
"dm1105: as well.\n");
}
-   printk(KERN_ERR "Here is a list of valid choices for the card= "
-  "insmod option:\n");
+   printk(KERN_ERR "Here is a list of valid choices for the card= 
insmod option:\n");
for (i = 0; i < ARRAY_SIZE(dm1105_boards); i++)
printk(KERN_ERR "dm1105:card=%d -> %s\n",
i, dm1105_boards[i].name);
-- 
2.7.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 29/57] [media] ti-vpe: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/ti-vpe/vpdma.c | 12 
 drivers/media/platform/ti-vpe/vpe.c   |  3 +--
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/ti-vpe/vpdma.c 
b/drivers/media/platform/ti-vpe/vpdma.c
index 3e2e3a33e6ed..079a0c894d02 100644
--- a/drivers/media/platform/ti-vpe/vpdma.c
+++ b/drivers/media/platform/ti-vpe/vpdma.c
@@ -466,8 +466,7 @@ static void dump_cfd(struct vpdma_cfd *cfd)
 
pr_debug("word2: payload_addr = 0x%08x\n", cfd->payload_addr);
 
-   pr_debug("word3: pkt_type = %d, direct = %d, class = %d, dest = %d, "
-   "payload_len = %d\n", cfd_get_pkt_type(cfd),
+   pr_debug("word3: pkt_type = %d, direct = %d, class = %d, dest = %d, 
payload_len = %d\n", cfd_get_pkt_type(cfd),
cfd_get_direct(cfd), class, cfd_get_dest(cfd),
cfd_get_payload_len(cfd));
 }
@@ -574,8 +573,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
pr_debug("%s data transfer descriptor for channel %d\n",
dir == DTD_DIR_OUT ? "outbound" : "inbound", chan);
 
-   pr_debug("word0: data_type = %d, notify = %d, field = %d, 1D = %d, "
-   "even_ln_skp = %d, odd_ln_skp = %d, line_stride = %d\n",
+   pr_debug("word0: data_type = %d, notify = %d, field = %d, 1D = %d, 
even_ln_skp = %d, odd_ln_skp = %d, line_stride = %d\n",
dtd_get_data_type(dtd), dtd_get_notify(dtd), dtd_get_field(dtd),
dtd_get_1d(dtd), dtd_get_even_line_skip(dtd),
dtd_get_odd_line_skip(dtd), dtd_get_line_stride(dtd));
@@ -586,8 +584,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
 
pr_debug("word2: start_addr = %pad\n", >start_addr);
 
-   pr_debug("word3: pkt_type = %d, mode = %d, dir = %d, chan = %d, "
-   "pri = %d, next_chan = %d\n", dtd_get_pkt_type(dtd),
+   pr_debug("word3: pkt_type = %d, mode = %d, dir = %d, chan = %d, pri = 
%d, next_chan = %d\n", dtd_get_pkt_type(dtd),
dtd_get_mode(dtd), dir, chan, dtd_get_priority(dtd),
dtd_get_next_chan(dtd));
 
@@ -595,8 +592,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
pr_debug("word4: frame_width = %d, frame_height = %d\n",
dtd_get_frame_width(dtd), dtd_get_frame_height(dtd));
else
-   pr_debug("word4: desc_write_addr = 0x%08x, write_desc = %d, "
-   "drp_data = %d, use_desc_reg = %d\n",
+   pr_debug("word4: desc_write_addr = 0x%08x, write_desc = %d, 
drp_data = %d, use_desc_reg = %d\n",
dtd_get_desc_write_addr(dtd), dtd_get_write_desc(dtd),
dtd_get_drop_data(dtd), dtd_get_use_desc(dtd));
 
diff --git a/drivers/media/platform/ti-vpe/vpe.c 
b/drivers/media/platform/ti-vpe/vpe.c
index 0189f7f7cb03..1cf4a4c1b899 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/platform/ti-vpe/vpe.c
@@ -1263,8 +1263,7 @@ static irqreturn_t vpe_irq(int irq_vpe, void *data)
}
 
if (irqst0 | irqst1) {
-   dev_warn(dev->v4l2_dev.dev, "Unexpected interrupt: "
-   "INT0_STATUS0 = 0x%08x, INT0_STATUS1 = 0x%08x\n",
+   dev_warn(dev->v4l2_dev.dev, "Unexpected interrupt: INT0_STATUS0 
= 0x%08x, INT0_STATUS1 = 0x%08x\n",
irqst0, irqst1);
}
 
-- 
2.7.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 21/57] [media] tw68: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/tw68/tw68-video.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/media/pci/tw68/tw68-video.c 
b/drivers/media/pci/tw68/tw68-video.c
index a45e02367321..165d54925506 100644
--- a/drivers/media/pci/tw68/tw68-video.c
+++ b/drivers/media/pci/tw68/tw68-video.c
@@ -279,8 +279,7 @@ static int tw68_set_scale(struct tw68_dev *dev, unsigned 
int width,
height /= 2;/* we must set for 1-frame */
 
pr_debug("%s: width=%d, height=%d, both=%d\n"
-"  tvnorm h_delay=%d, h_start=%d, h_stop=%d, "
-"v_delay=%d, v_start=%d, v_stop=%d\n" , __func__,
+"  tvnorm h_delay=%d, h_start=%d, h_stop=%d, v_delay=%d, 
v_start=%d, v_stop=%d\n" , __func__,
width, height, V4L2_FIELD_HAS_BOTH(field),
norm->h_delay, norm->h_start, norm->h_stop,
norm->v_delay, norm->video_v_start,
@@ -309,16 +308,14 @@ static int tw68_set_scale(struct tw68_dev *dev, unsigned 
int width,
V4L2_FIELD_HAS_TOP(field)? "T" : "",
V4L2_FIELD_HAS_BOTTOM(field) ? "B" : "",
v4l2_norm_to_name(dev->tvnorm->id));
-   pr_debug("%s: hactive=%d, hdelay=%d, hscale=%d; "
-   "vactive=%d, vdelay=%d, vscale=%d\n", __func__,
+   pr_debug("%s: hactive=%d, hdelay=%d, hscale=%d; vactive=%d, vdelay=%d, 
vscale=%d\n", __func__,
hactive, hdelay, hscale, vactive, vdelay, vscale);
 
comb =  ((vdelay & 0x300)  >> 2) |
((vactive & 0x300) >> 4) |
((hdelay & 0x300)  >> 6) |
((hactive & 0x300) >> 8);
-   pr_debug("%s: setting CROP_HI=%02x, VDELAY_LO=%02x, "
-   "VACTIVE_LO=%02x, HDELAY_LO=%02x, HACTIVE_LO=%02x\n",
+   pr_debug("%s: setting CROP_HI=%02x, VDELAY_LO=%02x, VACTIVE_LO=%02x, 
HDELAY_LO=%02x, HACTIVE_LO=%02x\n",
__func__, comb, vdelay, vactive, hdelay, hactive);
tw_writeb(TW68_CROP_HI, comb);
tw_writeb(TW68_VDELAY_LO, vdelay & 0xff);
@@ -327,8 +324,7 @@ static int tw68_set_scale(struct tw68_dev *dev, unsigned 
int width,
tw_writeb(TW68_HACTIVE_LO, hactive & 0xff);
 
comb = ((vscale & 0xf00) >> 4) | ((hscale & 0xf00) >> 8);
-   pr_debug("%s: setting SCALE_HI=%02x, VSCALE_LO=%02x, "
-   "HSCALE_LO=%02x\n", __func__, comb, vscale, hscale);
+   pr_debug("%s: setting SCALE_HI=%02x, VSCALE_LO=%02x, HSCALE_LO=%02x\n", 
__func__, comb, vscale, hscale);
tw_writeb(TW68_SCALE_HI, comb);
tw_writeb(TW68_VSCALE_LO, vscale);
tw_writeb(TW68_HSCALE_LO, hscale);
-- 
2.7.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 51/57] [media] v4l2-core: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/v4l2-core/v4l2-ioctl.c| 90 -
 drivers/media/v4l2-core/videobuf-core.c |  3 +-
 drivers/media/v4l2-core/videobuf2-core.c| 21 +++
 drivers/media/v4l2-core/videobuf2-v4l2.c|  9 +--
 drivers/media/v4l2-core/videobuf2-vmalloc.c |  3 +-
 5 files changed, 37 insertions(+), 89 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c 
b/drivers/media/v4l2-core/v4l2-ioctl.c
index c52d94c018bb..13b589a8955e 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -174,8 +174,7 @@ static void v4l_print_querycap(const void *arg, bool 
write_only)
 {
const struct v4l2_capability *p = arg;
 
-   pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, "
-   "capabilities=0x%08x, device_caps=0x%08x\n",
+   pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, 
capabilities=0x%08x, device_caps=0x%08x\n",
(int)sizeof(p->driver), p->driver,
(int)sizeof(p->card), p->card,
(int)sizeof(p->bus_info), p->bus_info,
@@ -186,8 +185,7 @@ static void v4l_print_enuminput(const void *arg, bool 
write_only)
 {
const struct v4l2_input *p = arg;
 
-   pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, tuner=%u, "
-   "std=0x%08Lx, status=0x%x, capabilities=0x%x\n",
+   pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, tuner=%u, 
std=0x%08Lx, status=0x%x, capabilities=0x%x\n",
p->index, (int)sizeof(p->name), p->name, p->type, p->audioset,
p->tuner, (unsigned long long)p->std, p->status,
p->capabilities);
@@ -197,8 +195,7 @@ static void v4l_print_enumoutput(const void *arg, bool 
write_only)
 {
const struct v4l2_output *p = arg;
 
-   pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, "
-   "modulator=%u, std=0x%08Lx, capabilities=0x%x\n",
+   pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, modulator=%u, 
std=0x%08Lx, capabilities=0x%x\n",
p->index, (int)sizeof(p->name), p->name, p->type, p->audioset,
p->modulator, (unsigned long long)p->std, p->capabilities);
 }
@@ -256,11 +253,7 @@ static void v4l_print_format(const void *arg, bool 
write_only)
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
pix = >fmt.pix;
-   pr_cont(", width=%u, height=%u, "
-   "pixelformat=%c%c%c%c, field=%s, "
-   "bytesperline=%u, sizeimage=%u, colorspace=%d, "
-   "flags=0x%x, ycbcr_enc=%u, quantization=%u, "
-   "xfer_func=%u\n",
+   pr_cont(", width=%u, height=%u, pixelformat=%c%c%c%c, field=%s, 
bytesperline=%u, sizeimage=%u, colorspace=%d, flags=0x%x, ycbcr_enc=%u, 
quantization=%u, xfer_func=%u\n",
pix->width, pix->height,
(pix->pixelformat & 0xff),
(pix->pixelformat >>  8) & 0xff,
@@ -274,10 +267,7 @@ static void v4l_print_format(const void *arg, bool 
write_only)
case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
mp = >fmt.pix_mp;
-   pr_cont(", width=%u, height=%u, "
-   "format=%c%c%c%c, field=%s, "
-   "colorspace=%d, num_planes=%u, flags=0x%x, "
-   "ycbcr_enc=%u, quantization=%u, xfer_func=%u\n",
+   pr_cont(", width=%u, height=%u, format=%c%c%c%c, field=%s, 
colorspace=%d, num_planes=%u, flags=0x%x, ycbcr_enc=%u, quantization=%u, 
xfer_func=%u\n",
mp->width, mp->height,
(mp->pixelformat & 0xff),
(mp->pixelformat >>  8) & 0xff,
@@ -306,8 +296,7 @@ static void v4l_print_format(const void *arg, bool 
write_only)
case V4L2_BUF_TYPE_VBI_CAPTURE:
case V4L2_BUF_TYPE_VBI_OUTPUT:
vbi = >fmt.vbi;
-   pr_cont(", sampling_rate=%u, offset=%u, samples_per_line=%u, "
-   "sample_format=%c%c%c%c, start=%u,%u, count=%u,%u\n",
+   pr_cont(", sampling_rate=%u, offset=%u, samples_per_line=%u, 
sample_format=%c%c%c%c, start=%u,%u, count=%u,%u\n",
vbi->sampling_rate, vbi->offset,
vbi->samples_per_line,
(vbi->sample_format & 0xff),
@@ -343,9 +332,7 @@ static void v4l_print_framebuffer(const void *arg, bool 
write_only)
 {
const struct v4l2_framebuffer *p = arg;
 
-   pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, "
-   

[PATCH 53/57] [media] i2c: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/as3645a.c  | 9 +++--
 drivers/media/i2c/msp3400-kthreads.c | 3 +--
 drivers/media/i2c/mt9m032.c  | 3 +--
 drivers/media/i2c/mt9p031.c  | 3 +--
 drivers/media/i2c/saa7115.c  | 3 +--
 drivers/media/i2c/saa717x.c  | 3 +--
 drivers/media/i2c/ths8200.c  | 4 +---
 drivers/media/i2c/tvp5150.c  | 3 +--
 drivers/media/i2c/tvp7002.c  | 3 +--
 drivers/media/i2c/upd64083.c | 3 +--
 10 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/drivers/media/i2c/as3645a.c b/drivers/media/i2c/as3645a.c
index 2e90e4094b79..95fcb8f68a1a 100644
--- a/drivers/media/i2c/as3645a.c
+++ b/drivers/media/i2c/as3645a.c
@@ -299,8 +299,7 @@ static int as3645a_read_fault(struct as3645a *flash)
dev_dbg(>dev, "Inductor Peak limit fault\n");
 
if (rval & AS_FAULT_INFO_INDICATOR_LED)
-   dev_dbg(>dev, "Indicator LED fault: "
-   "Short circuit or open loop\n");
+   dev_dbg(>dev, "Indicator LED fault: Short circuit or 
open loop\n");
 
dev_dbg(>dev, "%u connected LEDs\n",
rval & AS_FAULT_INFO_LED_AMOUNT ? 2 : 1);
@@ -315,8 +314,7 @@ static int as3645a_read_fault(struct as3645a *flash)
dev_dbg(>dev, "Short circuit fault\n");
 
if (rval & AS_FAULT_INFO_OVER_VOLTAGE)
-   dev_dbg(>dev, "Over voltage fault: "
-   "Indicates missing capacitor or open connection\n");
+   dev_dbg(>dev, "Over voltage fault: Indicates missing 
capacitor or open connection\n");
 
return rval;
 }
@@ -588,8 +586,7 @@ static int as3645a_registered(struct v4l2_subdev *sd)
 
/* Verify the chip model and version. */
if (model != 0x01 || rfu != 0x00) {
-   dev_err(>dev, "AS3645A not detected "
-   "(model %d rfu %d)\n", model, rfu);
+   dev_err(>dev, "AS3645A not detected (model %d rfu 
%d)\n", model, rfu);
rval = -ENODEV;
goto power_off;
}
diff --git a/drivers/media/i2c/msp3400-kthreads.c 
b/drivers/media/i2c/msp3400-kthreads.c
index 17120804fab7..022bea68cbf0 100644
--- a/drivers/media/i2c/msp3400-kthreads.c
+++ b/drivers/media/i2c/msp3400-kthreads.c
@@ -775,8 +775,7 @@ int msp3410d_thread(void *data)
if (msp_amsound && !state->radio &&
(state->v4l2_std & V4L2_STD_SECAM) && (val != 0x0009)) {
/* autodetection has failed, let backup */
-   v4l_dbg(1, msp_debug, client, "autodetection failed,"
-   " switching to backup standard: %s (0x%04x)\n",
+   v4l_dbg(1, msp_debug, client, "autodetection failed, 
switching to backup standard: %s (0x%04x)\n",
msp_stdlist[8].name ?
msp_stdlist[8].name : "unknown", val);
state->std = val = 0x0009;
diff --git a/drivers/media/i2c/mt9m032.c b/drivers/media/i2c/mt9m032.c
index da076796999e..a045425887d5 100644
--- a/drivers/media/i2c/mt9m032.c
+++ b/drivers/media/i2c/mt9m032.c
@@ -746,8 +746,7 @@ static int mt9m032_probe(struct i2c_client *client,
 
chip_version = mt9m032_read(client, MT9M032_CHIP_VERSION);
if (chip_version != MT9M032_CHIP_VERSION_VALUE) {
-   dev_err(>dev, "MT9M032 not detected, wrong version "
-   "0x%04x\n", chip_version);
+   dev_err(>dev, "MT9M032 not detected, wrong version 
0x%04x\n", chip_version);
ret = -ENODEV;
goto error_sensor;
}
diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c
index 237737fec09c..4d7b56b96a92 100644
--- a/drivers/media/i2c/mt9p031.c
+++ b/drivers/media/i2c/mt9p031.c
@@ -929,8 +929,7 @@ static int mt9p031_registered(struct v4l2_subdev *subdev)
mt9p031_power_off(mt9p031);
 
if (data != MT9P031_CHIP_VERSION_VALUE) {
-   dev_err(>dev, "MT9P031 not detected, wrong version "
-   "0x%04x\n", data);
+   dev_err(>dev, "MT9P031 not detected, wrong version 
0x%04x\n", data);
return -ENODEV;
}
 
diff --git a/drivers/media/i2c/saa7115.c b/drivers/media/i2c/saa7115.c
index 58062b41c923..5db914b7d5ae 100644
--- a/drivers/media/i2c/saa7115.c
+++ b/drivers/media/i2c/saa7115.c
@@ -53,8 +53,7 @@
 #define VRES_60HZ  (480+16)
 
 MODULE_DESCRIPTION("Philips SAA7111/SAA7113/SAA7114/SAA7115/SAA7118 video 
decoder driver");
-MODULE_AUTHOR(  "Maxim Yevtyushkin, Kevin Thayer, Chris Kennedy, "
-   "Hans Verkuil, Mauro Carvalho 

[PATCH 46/57] [media] ttusb-budget: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c 
b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
index d52d4a8d39ad..361e40b56045 100644
--- a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
@@ -767,8 +767,7 @@ static void ttusb_iso_irq(struct urb *urb)
for (i = 0; i < urb->number_of_packets; ++i) {
numpkt++;
if (time_after_eq(jiffies, lastj + HZ)) {
-   dprintk("frames/s: %lu (ts: %d, stuff %d, "
-   "sec: %d, invalid: %d, all: %d)\n",
+   dprintk("frames/s: %lu (ts: %d, stuff %d, sec: 
%d, invalid: %d, all: %d)\n",
numpkt * HZ / (jiffies - lastj),
numts, numstuff, numsec, numinvalid,
numts + numstuff + numsec + numinvalid);
-- 
2.7.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 41/57] [media] pvrusb2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/pvrusb2/pvrusb2-audio.c   |   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c|   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c |   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-debugifc.c|   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-eeprom.c  |   6 +-
 drivers/media/usb/pvrusb2/pvrusb2-encoder.c |  28 +---
 drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 175 +++-
 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c|  33 ++---
 drivers/media/usb/pvrusb2/pvrusb2-io.c  |  33 ++---
 drivers/media/usb/pvrusb2/pvrusb2-ioread.c  |  33 ++---
 drivers/media/usb/pvrusb2/pvrusb2-std.c |   3 +-
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c|   9 +-
 drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c   |   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-wm8775.c  |   3 +-
 14 files changed, 104 insertions(+), 239 deletions(-)

diff --git a/drivers/media/usb/pvrusb2/pvrusb2-audio.c 
b/drivers/media/usb/pvrusb2/pvrusb2-audio.c
index 5f953d837bf1..3bac50a248d4 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-audio.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-audio.c
@@ -74,9 +74,7 @@ void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct 
v4l2_subdev *sd)
input = sp->def[hdw->input_val];
} else {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
-  "*** WARNING *** subdev msp3400 set_input:"
-  " Invalid routing scheme (%u)"
-  " and/or input (%d)",
+  "*** WARNING *** subdev msp3400 set_input: 
Invalid routing scheme (%u) and/or input (%d)",
   sid, hdw->input_val);
return;
}
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c 
b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
index f82f0f0f2c04..7f29a0464f36 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
@@ -72,9 +72,7 @@ void pvr2_cs53l32a_subdev_update(struct pvr2_hdw *hdw, struct 
v4l2_subdev *sd)
(hdw->input_val < 0) ||
(hdw->input_val >= sp->cnt)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
-  "*** WARNING *** subdev v4l2 set_input:"
-  " Invalid routing scheme (%u)"
-  " and/or input (%d)",
+  "*** WARNING *** subdev v4l2 set_input: 
Invalid routing scheme (%u) and/or input (%d)",
   sid, hdw->input_val);
return;
}
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c 
b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
index 7d675fae1846..30eef97ef2ef 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -137,9 +137,7 @@ void pvr2_cx25840_subdev_update(struct pvr2_hdw *hdw, 
struct v4l2_subdev *sd)
(hdw->input_val < 0) ||
(hdw->input_val >= sp->cnt)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
-  "*** WARNING *** subdev cx2584x set_input:"
-  " Invalid routing scheme (%u)"
-  " and/or input (%d)",
+  "*** WARNING *** subdev cx2584x set_input: 
Invalid routing scheme (%u) and/or input (%d)",
   sid, hdw->input_val);
return;
}
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c 
b/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c
index e4022bcb155b..58ec706ebdb3 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c
@@ -176,9 +176,7 @@ int pvr2_debugifc_print_status(struct pvr2_hdw *hdw,
pvr2_stream_get_stats(sp, , 0);
ccnt = scnprintf(
buf,acnt,
-   "Bytes streamed=%u"
-   " URBs: queued=%u idle=%u ready=%u"
-   " processed=%u failed=%u\n",
+   "Bytes streamed=%u URBs: queued=%u idle=%u ready=%u 
processed=%u failed=%u\n",
stats.bytes_processed,
stats.buffers_in_queue,
stats.buffers_in_idle,
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-eeprom.c 
b/drivers/media/usb/pvrusb2/pvrusb2-eeprom.c
index e1907cd0c3b7..14ef4ae907c4 100644
--- 

[PATCH 35/57] [media] cpia2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/cpia2/cpia2_usb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/usb/cpia2/cpia2_usb.c 
b/drivers/media/usb/cpia2/cpia2_usb.c
index 13620cdf0599..2e03f244c59f 100644
--- a/drivers/media/usb/cpia2/cpia2_usb.c
+++ b/drivers/media/usb/cpia2/cpia2_usb.c
@@ -733,9 +733,7 @@ int cpia2_usb_stream_start(struct camera_data *cam, 
unsigned int alternate)
cam->params.camera_state.stream_mode = old_alt;
ret2 = set_alternate(cam, USBIF_CMDONLY);
if (ret2 < 0) {
-   ERR("cpia2_usb_change_streaming_alternate(%d) =%d has 
already "
-   "failed. Then tried to call "
-   "set_alternate(USBIF_CMDONLY) = %d.\n",
+   ERR("cpia2_usb_change_streaming_alternate(%d) =%d has 
already failed. Then tried to call set_alternate(USBIF_CMDONLY) = %d.\n",
alternate, ret, ret2);
}
} else {
-- 
2.7.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 52/57] [media] common: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/common/tveeprom.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/common/tveeprom.c b/drivers/media/common/tveeprom.c
index 47da0378cad8..e0e2cb706087 100644
--- a/drivers/media/common/tveeprom.c
+++ b/drivers/media/common/tveeprom.c
@@ -510,8 +510,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct 
tveeprom *tvee,
len = eeprom_data[i] & 0x07;
++i;
} else {
-   tveeprom_warn("Encountered bad packet header [%02x]. "
-   "Corrupt or not a Hauppauge eeprom.\n",
+   tveeprom_warn("Encountered bad packet header [%02x]. 
Corrupt or not a Hauppauge eeprom.\n",
eeprom_data[i]);
return;
}
-- 
2.7.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 02/57] [media] dvb-frontends: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/dvb-frontends/au8522_common.c |  4 ++--
 drivers/media/dvb-frontends/cx24110.c   |  4 ++--
 drivers/media/dvb-frontends/cx24113.c   |  4 ++--
 drivers/media/dvb-frontends/cx24116.c   | 10 +-
 drivers/media/dvb-frontends/cx24117.c   |  4 ++--
 drivers/media/dvb-frontends/cx24123.c   |  4 ++--
 drivers/media/dvb-frontends/ds3000.c| 15 +++
 drivers/media/dvb-frontends/lgdt330x.c  |  3 +--
 drivers/media/dvb-frontends/m88rs2000.c | 11 +--
 drivers/media/dvb-frontends/mt312.c |  7 +++
 drivers/media/dvb-frontends/nxt200x.c   | 11 +--
 drivers/media/dvb-frontends/or51132.c   |  6 ++
 drivers/media/dvb-frontends/or51211.c   |  3 +--
 drivers/media/dvb-frontends/s5h1409.c   |  4 ++--
 drivers/media/dvb-frontends/s5h1411.c   |  4 ++--
 drivers/media/dvb-frontends/s5h1432.c   |  4 ++--
 drivers/media/dvb-frontends/s921.c  |  4 ++--
 drivers/media/dvb-frontends/si21xx.c|  8 
 drivers/media/dvb-frontends/sp887x.c|  3 +--
 drivers/media/dvb-frontends/stv0288.c   | 11 +--
 drivers/media/dvb-frontends/stv0297.c   |  4 ++--
 drivers/media/dvb-frontends/stv0299.c   |  7 +++
 drivers/media/dvb-frontends/stv0900_sw.c|  3 +--
 drivers/media/dvb-frontends/tda10021.c  |  3 +--
 drivers/media/dvb-frontends/tda10023.c  |  6 ++
 drivers/media/dvb-frontends/tda10048.c  | 12 
 drivers/media/dvb-frontends/ves1820.c   |  8 
 drivers/media/dvb-frontends/zl10036.c   |  4 ++--
 drivers/media/dvb-frontends/zl10039.c   |  3 +--
 29 files changed, 77 insertions(+), 97 deletions(-)

diff --git a/drivers/media/dvb-frontends/au8522_common.c 
b/drivers/media/dvb-frontends/au8522_common.c
index f135126bc373..cf4ac240a01f 100644
--- a/drivers/media/dvb-frontends/au8522_common.c
+++ b/drivers/media/dvb-frontends/au8522_common.c
@@ -50,8 +50,8 @@ int au8522_writereg(struct au8522_state *state, u16 reg, u8 
data)
ret = i2c_transfer(state->i2c, , 1);
 
if (ret != 1)
-   printk("%s: writereg error (reg == 0x%02x, val == 0x%04x, "
-  "ret == %i)\n", __func__, reg, data, ret);
+   printk("%s: writereg error (reg == 0x%02x, val == 0x%04x, ret 
== %i)\n",
+  __func__, reg, data, ret);
 
return (ret != 1) ? -1 : 0;
 }
diff --git a/drivers/media/dvb-frontends/cx24110.c 
b/drivers/media/dvb-frontends/cx24110.c
index 6cb81ec12847..92a08c7bf794 100644
--- a/drivers/media/dvb-frontends/cx24110.c
+++ b/drivers/media/dvb-frontends/cx24110.c
@@ -120,8 +120,8 @@ static int cx24110_writereg (struct cx24110_state* state, 
int reg, int data)
int err;
 
if ((err = i2c_transfer(state->i2c, , 1)) != 1) {
-   dprintk ("%s: writereg error (err == %i, reg == 0x%02x,"
-" data == 0x%02x)\n", __func__, err, reg, data);
+   dprintk("%s: writereg error (err == %i, reg == 0x%02x, data == 
0x%02x)\n",
+   __func__, err, reg, data);
return -EREMOTEIO;
}
 
diff --git a/drivers/media/dvb-frontends/cx24113.c 
b/drivers/media/dvb-frontends/cx24113.c
index 3883c3b31aef..3812ef8cac08 100644
--- a/drivers/media/dvb-frontends/cx24113.c
+++ b/drivers/media/dvb-frontends/cx24113.c
@@ -108,8 +108,8 @@ static int cx24113_writereg(struct cx24113_state *state, 
int reg, int data)
.flags = 0, .buf = buf, .len = 2 };
int err = i2c_transfer(state->i2c, , 1);
if (err != 1) {
-   printk(KERN_DEBUG "%s: writereg error(err == %i, reg == 0x%02x,"
-" data == 0x%02x)\n", __func__, err, reg, data);
+   printk(KERN_DEBUG "%s: writereg error(err == %i, reg == 0x%02x, 
data == 0x%02x)\n",
+  __func__, err, reg, data);
return err;
}
 
diff --git a/drivers/media/dvb-frontends/cx24116.c 
b/drivers/media/dvb-frontends/cx24116.c
index 8814f36d53fb..b652963df103 100644
--- a/drivers/media/dvb-frontends/cx24116.c
+++ b/drivers/media/dvb-frontends/cx24116.c
@@ -209,8 +209,8 @@ static int cx24116_writereg(struct cx24116_state *state, 
int reg, int data)
 
err = i2c_transfer(state->i2c, , 1);
if (err != 1) {
-   printk(KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x,"
-" value == 0x%02x)\n", __func__, err, reg, data);
+   printk(KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x, 
value == 0x%02x)\n",
+  __func__, err, reg, data);
return -EREMOTEIO;
}
 
@@ -498,8 

[PATCH 40/57] [media] hdpvr: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/hdpvr/hdpvr-core.c  | 9 +++--
 drivers/media/usb/hdpvr/hdpvr-i2c.c   | 6 ++
 drivers/media/usb/hdpvr/hdpvr-video.c | 4 +---
 3 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c 
b/drivers/media/usb/hdpvr/hdpvr-core.c
index a61d8fd63c12..15f016ad5b89 100644
--- a/drivers/media/usb/hdpvr/hdpvr-core.c
+++ b/drivers/media/usb/hdpvr/hdpvr-core.c
@@ -41,13 +41,11 @@ MODULE_PARM_DESC(hdpvr_debug, "enable debugging output");
 
 static uint default_video_input = HDPVR_VIDEO_INPUTS;
 module_param(default_video_input, uint, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(default_video_input, "default video input: 0=Component / "
-"1=S-Video / 2=Composite");
+MODULE_PARM_DESC(default_video_input, "default video input: 0=Component / 
1=S-Video / 2=Composite");
 
 static uint default_audio_input = HDPVR_AUDIO_INPUTS;
 module_param(default_audio_input, uint, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(default_audio_input, "default audio input: 0=RCA back / "
-"1=RCA front / 2=S/PDIF");
+MODULE_PARM_DESC(default_audio_input, "default audio input: 0=RCA back / 1=RCA 
front / 2=S/PDIF");
 
 static bool boost_audio;
 module_param(boost_audio, bool, S_IRUGO|S_IWUSR);
@@ -165,8 +163,7 @@ static int device_authorization(struct hdpvr_device *dev)
dev->flags |= HDPVR_FLAG_AC3_CAP;
break;
default:
-   v4l2_info(>v4l2_dev, "untested firmware, the driver might"
- " not work.\n");
+   v4l2_info(>v4l2_dev, "untested firmware, the driver might 
not work.\n");
if (dev->fw_ver >= HDPVR_FIRMWARE_VERSION_AC3)
dev->flags |= HDPVR_FLAG_AC3_CAP;
else
diff --git a/drivers/media/usb/hdpvr/hdpvr-i2c.c 
b/drivers/media/usb/hdpvr/hdpvr-i2c.c
index 9b641c4d4431..db750e7da323 100644
--- a/drivers/media/usb/hdpvr/hdpvr-i2c.c
+++ b/drivers/media/usb/hdpvr/hdpvr-i2c.c
@@ -145,15 +145,13 @@ static int hdpvr_transfer(struct i2c_adapter 
*i2c_adapter, struct i2c_msg *msgs,
 msgs[0].len);
} else if (num == 2) {
if (msgs[0].addr != msgs[1].addr) {
-   v4l2_warn(>v4l2_dev, "refusing 2-phase i2c xfer "
- "with conflicting target addresses\n");
+   v4l2_warn(>v4l2_dev, "refusing 2-phase i2c xfer 
with conflicting target addresses\n");
retval = -EINVAL;
goto out;
}
 
if ((msgs[0].flags & I2C_M_RD) || !(msgs[1].flags & I2C_M_RD)) {
-   v4l2_warn(>v4l2_dev, "refusing complex xfer with "
- "r0=%d, r1=%d\n", msgs[0].flags & I2C_M_RD,
+   v4l2_warn(>v4l2_dev, "refusing complex xfer with 
r0=%d, r1=%d\n", msgs[0].flags & I2C_M_RD,
  msgs[1].flags & I2C_M_RD);
retval = -EINVAL;
goto out;
diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c 
b/drivers/media/usb/hdpvr/hdpvr-video.c
index 6d43d75493ea..a247063c5816 100644
--- a/drivers/media/usb/hdpvr/hdpvr-video.c
+++ b/drivers/media/usb/hdpvr/hdpvr-video.c
@@ -337,9 +337,7 @@ static int hdpvr_stop_streaming(struct hdpvr_device *dev)
 
buf = kmalloc(dev->bulk_in_size, GFP_KERNEL);
if (!buf)
-   v4l2_err(>v4l2_dev, "failed to allocate temporary buffer "
-"for emptying the internal device buffer. "
-"Next capture start will be slow\n");
+   v4l2_err(>v4l2_dev, "failed to allocate temporary buffer 
for emptying the internal device buffer. Next capture start will be slow\n");
 
dev->status = STATUS_SHUTTING_DOWN;
hdpvr_config_call(dev, CTRL_STOP_STREAMING_VALUE, 0x00);
-- 
2.7.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 47/57] [media] ttusb-dec: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/ttusb-dec/ttusb_dec.c | 18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c 
b/drivers/media/usb/ttusb-dec/ttusb_dec.c
index 35d5003ff809..6d1b84be105a 100644
--- a/drivers/media/usb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c
@@ -708,8 +708,7 @@ static void ttusb_dec_process_urb_frame(struct ttusb_dec 
*dec, u8 *b,
dec->packet_payload_length = 2;
dec->packet_state = 7;
} else {
-   printk("%s: unknown packet type: "
-  "%02x%02x\n", __func__,
+   printk("%s: unknown packet type: 
%02x%02x\n", __func__,
   dec->packet[0], dec->packet[1]);
dec->packet_state = 0;
}
@@ -961,8 +960,7 @@ static int ttusb_dec_start_iso_xfer(struct ttusb_dec *dec)
for (i = 0; i < ISO_BUF_COUNT; i++) {
if ((result = usb_submit_urb(dec->iso_urb[i],
 GFP_ATOMIC))) {
-   printk("%s: failed urb submission %d: "
-  "error %d\n", __func__, i, result);
+   printk("%s: failed urb submission %d: error 
%d\n", __func__, i, result);
 
while (i) {
usb_kill_urb(dec->iso_urb[i - 1]);
@@ -1375,8 +1373,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
memcpy(, [56], 4);
crc32_check = ntohl(tmp);
if (crc32_csum != crc32_check) {
-   printk("%s: crc32 check of DSP code failed (calculated "
-  "0x%08x != 0x%08x in file), file invalid.\n",
+   printk("%s: crc32 check of DSP code failed (calculated 0x%08x 
!= 0x%08x in file), file invalid.\n",
__func__, crc32_csum, crc32_check);
release_firmware(fw_entry);
return -ENOENT;
@@ -1453,11 +1450,9 @@ static int ttusb_dec_init_stb(struct ttusb_dec *dec)
 
if (!mode) {
if (version == 0xABCDEFAB)
-   printk(KERN_INFO "ttusb_dec: no version "
-  "info in Firmware\n");
+   printk(KERN_INFO "ttusb_dec: no version info in 
Firmware\n");
else
-   printk(KERN_INFO "ttusb_dec: Firmware "
-  "%x.%02x%c%c\n",
+   printk(KERN_INFO "ttusb_dec: Firmware %x.%02x%c%c\n",
   version >> 24, (version >> 16) & 0xff,
   (version >> 8) & 0xff, version & 0xff);
 
@@ -1481,8 +1476,7 @@ static int ttusb_dec_init_stb(struct ttusb_dec *dec)
ttusb_dec_set_model(dec, TTUSB_DEC2540T);
break;
default:
-   printk(KERN_ERR "%s: unknown model returned "
-  "by firmware (%08x) - please report\n",
+   printk(KERN_ERR "%s: unknown model returned by firmware 
(%08x) - please report\n",
   __func__, model);
return -ENOENT;
}
-- 
2.7.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 55/57] [media] radio: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/radio-gemtek.c | 8 ++--
 drivers/media/radio/radio-wl1273.c | 3 +--
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/media/radio/radio-gemtek.c 
b/drivers/media/radio/radio-gemtek.c
index cff1eb144a5c..ca051ccbc3e4 100644
--- a/drivers/media/radio/radio-gemtek.c
+++ b/drivers/media/radio/radio-gemtek.c
@@ -67,14 +67,10 @@ module_param(probe, bool, 0444);
 MODULE_PARM_DESC(probe, "Enable automatic device probing.");
 
 module_param(hardmute, bool, 0644);
-MODULE_PARM_DESC(hardmute, "Enable 'hard muting' by shutting down PLL, may "
-"reduce static noise.");
+MODULE_PARM_DESC(hardmute, "Enable 'hard muting' by shutting down PLL, may 
reduce static noise.");
 
 module_param_array(io, int, NULL, 0444);
-MODULE_PARM_DESC(io, "Force I/O ports for the GemTek Radio card if automatic "
-"probing is disabled or fails. The most common I/O ports are: 0x20c "
-"0x30c, 0x24c or 0x34c (0x20c, 0x248 and 0x28c have been reported to "
-"work for the combined sound/radiocard).");
+MODULE_PARM_DESC(io, "Force I/O ports for the GemTek Radio card if automatic 
probing is disabled or fails. The most common I/O ports are: 0x20c 0x30c, 0x24c 
or 0x34c (0x20c, 0x248 and 0x28c have been reported to work for the combined 
sound/radiocard).");
 
 module_param_array(radio_nr, int, NULL, 0444);
 MODULE_PARM_DESC(radio_nr, "Radio device numbers");
diff --git a/drivers/media/radio/radio-wl1273.c 
b/drivers/media/radio/radio-wl1273.c
index a93f681aa9d6..9ce4b12299b4 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -2068,8 +2068,7 @@ static int wl1273_fm_radio_probe(struct platform_device 
*pdev)
goto err_request_irq;
}
} else {
-   dev_err(radio->dev, WL1273_FM_DRIVER_NAME ": Core WL1273 IRQ"
-   " not configured");
+   dev_err(radio->dev, WL1273_FM_DRIVER_NAME ": Core WL1273 IRQ 
not configured");
r = -EINVAL;
goto pdata_err;
}
-- 
2.7.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 37/57] [media] dvb-usb: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/dvb-usb/cinergyT2-core.c   |  6 ++
 drivers/media/usb/dvb-usb/dib0700_core.c |  5 +
 drivers/media/usb/dvb-usb/dib0700_devices.c  |  3 +--
 drivers/media/usb/dvb-usb/dvb-usb-dvb.c  |  3 +--
 drivers/media/usb/dvb-usb/dvb-usb-firmware.c |  6 ++
 drivers/media/usb/dvb-usb/dw2102.c   | 10 ++
 drivers/media/usb/dvb-usb/friio.c|  3 +--
 drivers/media/usb/dvb-usb/gp8psk.c   |  3 +--
 drivers/media/usb/dvb-usb/opera1.c   |  3 +--
 drivers/media/usb/dvb-usb/technisat-usb2.c   |  3 +--
 10 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/cinergyT2-core.c 
b/drivers/media/usb/dvb-usb/cinergyT2-core.c
index 9fd1527494eb..f4d9122245ac 100644
--- a/drivers/media/usb/dvb-usb/cinergyT2-core.c
+++ b/drivers/media/usb/dvb-usb/cinergyT2-core.c
@@ -34,8 +34,7 @@
 int dvb_usb_cinergyt2_debug;
 
 module_param_named(debug, dvb_usb_cinergyt2_debug, int, 0644);
-MODULE_PARM_DESC(debug, "set debugging level (1=info, xfer=2, rc=4 "
-   "(or-able)).");
+MODULE_PARM_DESC(debug, "set debugging level (1=info, xfer=2, rc=4 
(or-able)).");
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
@@ -74,8 +73,7 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter 
*adap)
ret = dvb_usb_generic_rw(adap->dev, query, sizeof(query), state,
sizeof(state), 0);
if (ret < 0) {
-   deb_rc("cinergyt2_power_ctrl() Failed to retrieve sleep "
-   "state info\n");
+   deb_rc("cinergyt2_power_ctrl() Failed to retrieve sleep state 
info\n");
}
 
/* Copy this pointer as we are gonna need it in the release phase */
diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c 
b/drivers/media/usb/dvb-usb/dib0700_core.c
index f3196658fb70..855cfc7bf309 100644
--- a/drivers/media/usb/dvb-usb/dib0700_core.c
+++ b/drivers/media/usb/dvb-usb/dib0700_core.c
@@ -16,10 +16,7 @@ MODULE_PARM_DESC(debug, "set debugging level 
(1=info,2=fw,4=fwdata,8=data (or-ab
 static int nb_packet_buffer_size = 21;
 module_param(nb_packet_buffer_size, int, 0644);
 MODULE_PARM_DESC(nb_packet_buffer_size,
-   "Set the dib0700 driver data buffer size. This parameter "
-   "corresponds to the number of TS packets. The actual size of "
-   "the data buffer corresponds to this parameter "
-   "multiplied by 188 (default: 21)");
+   "Set the dib0700 driver data buffer size. This parameter corresponds to 
the number of TS packets. The actual size of the data buffer corresponds to 
this parameter multiplied by 188 (default: 21)");
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c 
b/drivers/media/usb/dvb-usb/dib0700_devices.c
index 0857b56e652c..5668d8d69917 100644
--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -26,8 +26,7 @@
 
 static int force_lna_activation;
 module_param(force_lna_activation, int, 0644);
-MODULE_PARM_DESC(force_lna_activation, "force the activation of 
Low-Noise-Amplifyer(s) (LNA), "
-   "if applicable for the device (default: 0=automatic/off).");
+MODULE_PARM_DESC(force_lna_activation, "force the activation of 
Low-Noise-Amplifyer(s) (LNA), if applicable for the device (default: 
0=automatic/off).");
 
 struct dib0700_adapter_state {
int (*set_param_save) (struct dvb_frontend *);
diff --git a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c 
b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
index a04c0a250625..e5675da286cb 100644
--- a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
+++ b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
@@ -277,8 +277,7 @@ int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter 
*adap)
for (i = 0; i < adap->props.num_frontends; i++) {
 
if (adap->props.fe[i].frontend_attach == NULL) {
-   err("strange: '%s' #%d,%d "
-   "doesn't want to attach a frontend.",
+   err("strange: '%s' #%d,%d doesn't want to attach a 
frontend.",
adap->dev->desc->name, adap->id, i);
 
return 0;
diff --git a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c 
b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c
index dd048a7c461c..f0023dbb7276 100644
--- a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c
+++ b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c
@@ -49,8 +49,7 @@ int usb_cypress_load_firmware(struct usb_device *udev, const 
struct firmware *fw
ret = usb_cypress_writemem(udev,hx.addr,hx.data,hx.len);
 
if (ret != hx.len) {
-   err("error 

[PATCH 32/57] [media] wl128x: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/wl128x/fmdrv_common.c | 21 +++--
 drivers/media/radio/wl128x/fmdrv_rx.c |  6 ++
 2 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/drivers/media/radio/wl128x/fmdrv_common.c 
b/drivers/media/radio/wl128x/fmdrv_common.c
index 642b89c66bcb..db7c1c549fcf 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -230,8 +230,7 @@ inline void dump_rx_skb_data(struct sk_buff *skb)
struct fm_event_msg_hdr *evt_hdr;
 
evt_hdr = (struct fm_event_msg_hdr *)skb->data;
-   printk(KERN_INFO ">> hdr:%02x len:%02x sts:%02x numhci:%02x "
-   "opcode:%02x type:%s dlen:%02x", evt_hdr->hdr, evt_hdr->len,
+   printk(KERN_INFO ">> hdr:%02x len:%02x sts:%02x numhci:%02x opcode:%02x 
type:%s dlen:%02x", evt_hdr->hdr, evt_hdr->len,
evt_hdr->status, evt_hdr->num_fm_hci_cmds, evt_hdr->op,
(evt_hdr->rd_wr) ? "RD" : "WR", evt_hdr->dlen);
 
@@ -271,8 +270,7 @@ static void recv_tasklet(unsigned long arg)
/* Process all packets in the RX queue */
while ((skb = skb_dequeue(>rx_q))) {
if (skb->len < sizeof(struct fm_event_msg_hdr)) {
-   fmerr("skb(%p) has only %d bytes, "
-   "at least need %zu bytes to decode\n", skb,
+   fmerr("skb(%p) has only %d bytes, at least need %zu 
bytes to decode\n", skb,
skb->len, sizeof(struct fm_event_msg_hdr));
kfree_skb(skb);
continue;
@@ -472,8 +470,7 @@ int fmc_send_cmd(struct fmdev *fmdev, u8 fm_op, u16 type, 
void *payload,
 
if (!wait_for_completion_timeout(>maintask_comp,
 FM_DRV_TX_TIMEOUT)) {
-   fmerr("Timeout(%d sec),didn't get reg"
-  "completion signal from RX tasklet\n",
+   fmerr("Timeout(%d sec),didn't get regcompletion signal from RX 
tasklet\n",
   jiffies_to_msecs(FM_DRV_TX_TIMEOUT) / 1000);
return -ETIMEDOUT;
}
@@ -523,8 +520,7 @@ static inline int check_cmdresp_status(struct fmdev *fmdev,
 
fm_evt_hdr = (void *)(*skb)->data;
if (fm_evt_hdr->status != 0) {
-   fmerr("irq: opcode %x response status is not zero "
-   "Initiating irq recovery process\n",
+   fmerr("irq: opcode %x response status is not zero Initiating 
irq recovery process\n",
fm_evt_hdr->op);
 
mod_timer(>irq_info.timer, jiffies + FM_DRV_TX_TIMEOUT);
@@ -564,8 +560,7 @@ static void int_timeout_handler(unsigned long data)
 * reset stage index & retry count values */
fmirq->stage = 0;
fmirq->retry = 0;
-   fmerr("Recovery action failed during"
-   "irq processing, max retry reached\n");
+   fmerr("Recovery action failed duringirq processing, max retry 
reached\n");
return;
}
fm_irq_call_stage(fmdev, FM_SEND_INTMSK_CMD_IDX);
@@ -1516,14 +1511,12 @@ int fmc_prepare(struct fmdev *fmdev)
 
if (!wait_for_completion_timeout(_for_fmdrv_reg_comp,
 FM_ST_REG_TIMEOUT)) {
-   fmerr("Timeout(%d sec), didn't get reg "
-   "completion signal from ST\n",
+   fmerr("Timeout(%d sec), didn't get reg completion 
signal from ST\n",
jiffies_to_msecs(FM_ST_REG_TIMEOUT) / 
1000);
return -ETIMEDOUT;
}
if (fmdev->streg_cbdata != 0) {
-   fmerr("ST reg comp CB called with error "
-   "status %d\n", fmdev->streg_cbdata);
+   fmerr("ST reg comp CB called with error status %d\n", 
fmdev->streg_cbdata);
return -EAGAIN;
}
 
diff --git a/drivers/media/radio/wl128x/fmdrv_rx.c 
b/drivers/media/radio/wl128x/fmdrv_rx.c
index cfaeb2417fbb..84dfad13e4df 100644
--- a/drivers/media/radio/wl128x/fmdrv_rx.c
+++ b/drivers/media/radio/wl128x/fmdrv_rx.c
@@ -120,8 +120,7 @@ int fm_rx_set_freq(struct fmdev *fmdev, u32 freq)
curr_frq_in_khz = (fmdev->rx.region.bot_freq + ((u32)curr_frq * 
FM_FREQ_MUL));
 
if (curr_frq_in_khz != freq) {
-   pr_info("Frequency is set to (%d) but "
-  "requested freq is (%d)\n", curr_frq_in_khz, freq);
+   

[PATCH 38/57] [media] dvb-usb-v2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 10 +++---
 drivers/media/usb/dvb-usb-v2/mxl111sf.c |  9 +++--
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c 
b/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c
index 283495c84ba3..ea39056412c5 100644
--- a/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c
+++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c
@@ -666,8 +666,7 @@ static int mxl111sf_i2c_hw_xfer_msg(struct mxl111sf_state 
*state,
 
if (rd_status[i] == 0x04) {
if (i < 7) {
-   mxl_i2c("i2c fifo empty!"
-   " @ %d", i);
+   mxl_i2c("i2c fifo empty! @ %d", 
i);
msg->buf[(index*8)+i] =
i2c_r_data[(i*3)+1];
/* read again */
@@ -692,8 +691,7 @@ static int mxl111sf_i2c_hw_xfer_msg(struct mxl111sf_state 
*state,
}
goto stop_copy;
} else {
-   mxl_i2c("readagain "
-   "ERROR!");
+   mxl_i2c("readagain 
ERROR!");
}
} else {
msg->buf[(index*8)+i] =
@@ -827,9 +825,7 @@ int mxl111sf_i2c_xfer(struct i2c_adapter *adap,
mxl111sf_i2c_hw_xfer_msg(state, [i]) :
mxl111sf_i2c_sw_xfer_msg(state, [i]);
if (mxl_fail(ret)) {
-   mxl_debug_adv("failed with error %d on i2c "
- "transaction %d of %d, %sing %d bytes "
- "to/from 0x%02x", ret, i+1, num,
+   mxl_debug_adv("failed with error %d on i2c transaction 
%d of %d, %sing %d bytes to/from 0x%02x", ret, i+1, num,
  (msg[i].flags & I2C_M_RD) ?
  "read" : "writ",
  msg[i].len, msg[i].addr);
diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c 
b/drivers/media/usb/dvb-usb-v2/mxl111sf.c
index 5d676b533a3a..58da619b7c59 100644
--- a/drivers/media/usb/dvb-usb-v2/mxl111sf.c
+++ b/drivers/media/usb/dvb-usb-v2/mxl111sf.c
@@ -29,8 +29,7 @@
 
 int dvb_usb_mxl111sf_debug;
 module_param_named(debug, dvb_usb_mxl111sf_debug, int, 0644);
-MODULE_PARM_DESC(debug, "set debugging level "
-"(1=info, 2=xfer, 4=i2c, 8=reg, 16=adv (or-able)).");
+MODULE_PARM_DESC(debug, "set debugging level (1=info, 2=xfer, 4=i2c, 8=reg, 
16=adv (or-able)).");
 
 static int dvb_usb_mxl111sf_isoc;
 module_param_named(isoc, dvb_usb_mxl111sf_isoc, int, 0644);
@@ -137,8 +136,7 @@ int mxl111sf_write_reg_mask(struct mxl111sf_state *state,
 #if 1
/* dont know why this usually errors out on the first try */
if (mxl_fail(ret))
-   pr_err("error writing addr: 0x%02x, mask: 0x%02x, "
-   "data: 0x%02x, retrying...", addr, mask, data);
+   pr_err("error writing addr: 0x%02x, mask: 0x%02x, data: 
0x%02x, retrying...", addr, mask, data);
 
ret = mxl111sf_read_reg(state, addr, );
 #endif
@@ -946,8 +944,7 @@ static int mxl111sf_init(struct dvb_usb_device *d)
case 138001:
break;
default:
-   printk(KERN_WARNING "%s: warning: "
-  "unknown hauppauge model #%d\n",
+   printk(KERN_WARNING "%s: warning: unknown hauppauge model 
#%d\n",
   __func__, state->tv.model);
}
 #endif
-- 
2.7.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 07/57] [media] b2c2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/b2c2/flexcop-dma.c | 6 ++
 drivers/media/pci/b2c2/flexcop-pci.c | 6 ++
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/media/pci/b2c2/flexcop-dma.c 
b/drivers/media/pci/b2c2/flexcop-dma.c
index 2881e0d956ad..913dc97f8b49 100644
--- a/drivers/media/pci/b2c2/flexcop-dma.c
+++ b/drivers/media/pci/b2c2/flexcop-dma.c
@@ -57,8 +57,7 @@ int flexcop_dma_config(struct flexcop_device *fc,
fc->write_ibi_reg(fc,dma2_014,v0x4);
fc->write_ibi_reg(fc,dma2_01c,v0xc);
} else {
-   err("either DMA1 or DMA2 can be configured within one "
-   "flexcop_dma_config call.");
+   err("either DMA1 or DMA2 can be configured within one 
flexcop_dma_config call.");
return -EINVAL;
}
 
@@ -82,8 +81,7 @@ int flexcop_dma_xfer_control(struct flexcop_device *fc,
r0x0 = dma2_010;
r0xc = dma2_01c;
} else {
-   err("either transfer DMA1 or DMA2 can be started within one "
-   "flexcop_dma_xfer_control call.");
+   err("either transfer DMA1 or DMA2 can be started within one 
flexcop_dma_xfer_control call.");
return -EINVAL;
}
 
diff --git a/drivers/media/pci/b2c2/flexcop-pci.c 
b/drivers/media/pci/b2c2/flexcop-pci.c
index 4cac1fc233f2..f0d127e640bb 100644
--- a/drivers/media/pci/b2c2/flexcop-pci.c
+++ b/drivers/media/pci/b2c2/flexcop-pci.c
@@ -185,8 +185,7 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
fc->read_ibi_reg(fc,dma1_008).dma_0x8.dma_cur_addr << 2;
u32 cur_pos = cur_addr - fc_pci->dma[0].dma_addr0;
 
-   deb_irq("%u irq: %08x cur_addr: %llx: cur_pos: %08x, "
-   "last_cur_pos: %08x ",
+   deb_irq("%u irq: %08x cur_addr: %llx: cur_pos: %08x, 
last_cur_pos: %08x ",
jiffies_to_usecs(jiffies - fc_pci->last_irq),
v.raw, (unsigned long long)cur_addr, cur_pos,
fc_pci->last_dma1_cur_pos);
@@ -220,8 +219,7 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
fc_pci->last_dma1_cur_pos = cur_pos;
fc_pci->count++;
} else {
-   deb_irq("isr for flexcop called, "
-   "apparently without reason (%08x)\n", v.raw);
+   deb_irq("isr for flexcop called, apparently without reason 
(%08x)\n", v.raw);
ret = IRQ_NONE;
}
 
-- 
2.7.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 39/57] [media] em28xx: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/em28xx/em28xx-cards.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-cards.c 
b/drivers/media/usb/em28xx/em28xx-cards.c
index bcd6ac61d9f8..fd11084de447 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -1561,8 +1561,7 @@ struct em28xx_board em28xx_boards[] = {
} },
},
[EM2820_BOARD_PINNACLE_DVC_90] = {
-   .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser 
Baas Video to DVD maker "
-  "/ Kworld DVD Maker 2 / Plextor ConvertX 
PX-AV100U",
+   .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser 
Baas Video to DVD maker / Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U",
.tuner_type   = TUNER_ABSENT, /* capture only board */
.decoder  = EM28XX_SAA711X,
.input= { {
-- 
2.7.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 34/57] [media] b2c2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/b2c2/flexcop-usb.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/b2c2/flexcop-usb.c 
b/drivers/media/usb/b2c2/flexcop-usb.c
index d4bdba60b0f7..f9b07649a862 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -33,8 +33,7 @@
 
 static int debug;
 module_param(debug, int, 0644);
-MODULE_PARM_DESC(debug, "set debugging level (1=info,ts=2,"
-   "ctrl=4,i2c=8,v8mem=16 (or-able))." DEBSTATUS);
+MODULE_PARM_DESC(debug, "set debugging level 
(1=info,ts=2,ctrl=4,i2c=8,v8mem=16 (or-able))." DEBSTATUS);
 #undef DEBSTATUS
 
 #define deb_info(args...) dprintk(0x01, args)
@@ -403,8 +402,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb 
*fc_usb)
frame_size, i, j, ret;
int buffer_offset = 0;
 
-   deb_ts("creating %d iso-urbs with %d frames "
-   "each of %d bytes size = %d.\n", B2C2_USB_NUM_ISO_URB,
+   deb_ts("creating %d iso-urbs with %d frames each of %d bytes size = 
%d.\n", B2C2_USB_NUM_ISO_URB,
B2C2_USB_FRAMES_PER_ISO, frame_size, bufsize);
 
fc_usb->iso_buffer = usb_alloc_coherent(fc_usb->udev,
@@ -429,8 +427,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb 
*fc_usb)
for (i = 0; i < B2C2_USB_NUM_ISO_URB; i++) {
int frame_offset = 0;
struct urb *urb = fc_usb->iso_urb[i];
-   deb_ts("initializing and submitting urb no. %d "
-   "(buf_offset: %d).\n", i, buffer_offset);
+   deb_ts("initializing and submitting urb no. %d (buf_offset: 
%d).\n", i, buffer_offset);
 
urb->dev = fc_usb->udev;
urb->context = fc_usb;
-- 
2.7.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 36/57] [media] cx231xx: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/cx231xx/cx231xx-core.c | 9 +++--
 drivers/media/usb/cx231xx/cx231xx-dvb.c  | 3 +--
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c 
b/drivers/media/usb/cx231xx/cx231xx-core.c
index 8b099fe1d592..6bab66d3377e 100644
--- a/drivers/media/usb/cx231xx/cx231xx-core.c
+++ b/drivers/media/usb/cx231xx/cx231xx-core.c
@@ -241,8 +241,7 @@ static int __usb_control_msg(struct cx231xx *dev, unsigned 
int pipe,
int rc, i;
 
if (reg_debug) {
-   printk(KERN_DEBUG "%s: (pipe 0x%08x): "
-   "%s:  %02x %02x %02x %02x %02x %02x %02x %02x ",
+   printk(KERN_DEBUG "%s: (pipe 0x%08x): %s:  %02x %02x %02x %02x 
%02x %02x %02x %02x ",
dev->name,
pipe,
(requesttype & USB_DIR_IN) ? "IN" : "OUT",
@@ -441,8 +440,7 @@ int cx231xx_write_ctrl_reg(struct cx231xx *dev, u8 req, u16 
reg, char *buf,
if (reg_debug) {
int byte;
 
-   cx231xx_isocdbg("(pipe 0x%08x): "
-   "OUT: %02x %02x %02x %02x %02x %02x %02x %02x >>>",
+   cx231xx_isocdbg("(pipe 0x%08x): OUT: %02x %02x %02x %02x %02x 
%02x %02x %02x >>>",
pipe,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
req, 0, val, reg & 0xff,
@@ -600,8 +598,7 @@ int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, 
u8 alt)
return -1;
}
 
-   cx231xx_coredbg("setting alternate %d with wMaxPacketSize=%u,"
-   "Interface = %d\n", alt, max_pkt_size,
+   cx231xx_coredbg("setting alternate %d with wMaxPacketSize=%u,Interface 
= %d\n", alt, max_pkt_size,
usb_interface_index);
 
if (usb_interface_index > 0) {
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c 
b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index 1417515d30eb..653ff20b484d 100644
--- a/drivers/media/usb/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c
@@ -377,8 +377,7 @@ static int attach_xc5000(u8 addr, struct cx231xx *dev)
cfg.i2c_addr = addr;
 
if (!dev->dvb->frontend) {
-   dev_err(dev->dev, "%s/2: dvb frontend not attached. "
-  "Can't attach xc5000\n", dev->name);
+   dev_err(dev->dev, "%s/2: dvb frontend not attached. Can't 
attach xc5000\n", dev->name);
return -EINVAL;
}
 
-- 
2.7.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 48/57] [media] usbvision: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/usbvision/usbvision-core.c  | 15 +--
 drivers/media/usb/usbvision/usbvision-video.c |  3 +--
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/media/usb/usbvision/usbvision-core.c 
b/drivers/media/usb/usbvision/usbvision-core.c
index c23bf73a68ea..4aed365da61d 100644
--- a/drivers/media/usb/usbvision/usbvision-core.c
+++ b/drivers/media/usb/usbvision/usbvision-core.c
@@ -1656,8 +1656,7 @@ static int usbvision_set_video_format(struct 
usb_usbvision *usbvision, int forma
 (__u16) USBVISION_FILT_CONT, value, 2, HZ);
 
if (rc < 0) {
-   printk(KERN_ERR "%s: ERROR=%d. USBVISION stopped - "
-  "reconnect or reload driver.\n", proc, rc);
+   printk(KERN_ERR "%s: ERROR=%d. USBVISION stopped - reconnect or 
reload driver.\n", proc, rc);
}
usbvision->isoc_mode = format;
return rc;
@@ -1890,8 +1889,7 @@ static int usbvision_set_compress_params(struct 
usb_usbvision *usbvision)
 (__u16) USBVISION_INTRA_CYC, value, 5, HZ);
 
if (rc < 0) {
-   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - "
-  "reconnect or reload driver.\n", proc, rc);
+   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or 
reload driver.\n", proc, rc);
return rc;
}
 
@@ -1921,8 +1919,7 @@ static int usbvision_set_compress_params(struct 
usb_usbvision *usbvision)
 (__u16) USBVISION_PCM_THR1, value, 6, HZ);
 
if (rc < 0) {
-   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - "
-  "reconnect or reload driver.\n", proc, rc);
+   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or 
reload driver.\n", proc, rc);
}
return rc;
 }
@@ -1960,8 +1957,7 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
 
rc = usbvision_write_reg(usbvision, USBVISION_VIN_REG1, value[0]);
if (rc < 0) {
-   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - "
-  "reconnect or reload driver.\n", proc, rc);
+   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or 
reload driver.\n", proc, rc);
return rc;
}
 
@@ -2026,8 +2022,7 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
 USB_DIR_OUT | USB_TYPE_VENDOR | 
USB_RECIP_ENDPOINT, 0,
 (__u16) USBVISION_LXSIZE_I, value, 8, HZ);
if (rc < 0) {
-   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - "
-  "reconnect or reload driver.\n", proc, rc);
+   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or 
reload driver.\n", proc, rc);
return rc;
}
 
diff --git a/drivers/media/usb/usbvision/usbvision-video.c 
b/drivers/media/usb/usbvision/usbvision-video.c
index c8b4eb2ee7a2..74d3fb6a48ba 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -1456,8 +1456,7 @@ static int usbvision_probe(struct usb_interface *intf,
}
 
if (interface->desc.bNumEndpoints < 2) {
-   dev_err(>dev, "interface %d has %d endpoints, but must"
-   " have minimum 2\n", ifnum, interface->desc.bNumEndpoints);
+   dev_err(>dev, "interface %d has %d endpoints, but must 
have minimum 2\n", ifnum, interface->desc.bNumEndpoints);
ret = -ENODEV;
goto err_usb;
}
-- 
2.7.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 42/57] [media] pwc: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/pwc/pwc-if.c  | 3 +--
 drivers/media/usb/pwc/pwc-v4l.c | 6 ++
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index ff657644b6b3..aba3d4fad388 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -238,8 +238,7 @@ static void pwc_frame_complete(struct pwc_device *pdev)
} else {
/* Check for underflow first */
if (fbuf->filled < pdev->frame_total_size) {
-   PWC_DEBUG_FLOW("Frame buffer underflow (%d bytes);"
-  " discarded.\n", fbuf->filled);
+   PWC_DEBUG_FLOW("Frame buffer underflow (%d bytes); 
discarded.\n", fbuf->filled);
} else {
fbuf->vb.field = V4L2_FIELD_NONE;
fbuf->vb.sequence = pdev->vframe_count;
diff --git a/drivers/media/usb/pwc/pwc-v4l.c b/drivers/media/usb/pwc/pwc-v4l.c
index 3d987984602f..92f04db6bbae 100644
--- a/drivers/media/usb/pwc/pwc-v4l.c
+++ b/drivers/media/usb/pwc/pwc-v4l.c
@@ -406,8 +406,7 @@ static void pwc_vidioc_fill_fmt(struct v4l2_format *f,
f->fmt.pix.bytesperline = f->fmt.pix.width;
f->fmt.pix.sizeimage= f->fmt.pix.height * f->fmt.pix.width * 3 / 2;
f->fmt.pix.colorspace   = V4L2_COLORSPACE_SRGB;
-   PWC_DEBUG_IOCTL("pwc_vidioc_fill_fmt() "
-   "width=%d, height=%d, bytesperline=%d, sizeimage=%d, 
pixelformat=%c%c%c%c\n",
+   PWC_DEBUG_IOCTL("pwc_vidioc_fill_fmt() width=%d, height=%d, 
bytesperline=%d, sizeimage=%d, pixelformat=%c%c%c%c\n",
f->fmt.pix.width,
f->fmt.pix.height,
f->fmt.pix.bytesperline,
@@ -473,8 +472,7 @@ static int pwc_s_fmt_vid_cap(struct file *file, void *fh, 
struct v4l2_format *f)
 
pixelformat = f->fmt.pix.pixelformat;
 
-   PWC_DEBUG_IOCTL("Trying to set format to: width=%d height=%d fps=%d "
-   "format=%c%c%c%c\n",
+   PWC_DEBUG_IOCTL("Trying to set format to: width=%d height=%d fps=%d 
format=%c%c%c%c\n",
f->fmt.pix.width, f->fmt.pix.height, pdev->vframes,
(pixelformat)&255,
(pixelformat>>8)&255,
-- 
2.7.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 43/57] [media] siano: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/siano/smsusb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
index c2e25876e93b..feace863e8d5 100644
--- a/drivers/media/usb/siano/smsusb.c
+++ b/drivers/media/usb/siano/smsusb.c
@@ -604,8 +604,7 @@ static int smsusb_resume(struct usb_interface *intf)
   intf->cur_altsetting->desc.
   bInterfaceNumber, 0);
if (rc < 0) {
-   printk(KERN_INFO "%s usb_set_interface failed, "
-  "rc %d\n", __func__, rc);
+   printk(KERN_INFO "%s usb_set_interface failed, rc 
%d\n", __func__, rc);
return rc;
}
}
-- 
2.7.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 54/57] [media] platform: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/mx2_emmaprp.c | 3 +--
 drivers/media/platform/pxa_camera.c  | 6 ++
 drivers/media/platform/via-camera.c  | 7 ++-
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/media/platform/mx2_emmaprp.c 
b/drivers/media/platform/mx2_emmaprp.c
index e68d271b10af..ea572718a638 100644
--- a/drivers/media/platform/mx2_emmaprp.c
+++ b/drivers/media/platform/mx2_emmaprp.c
@@ -724,8 +724,7 @@ static int emmaprp_buf_prepare(struct vb2_buffer *vb)
q_data = get_q_data(ctx, vb->vb2_queue->type);
 
if (vb2_plane_size(vb, 0) < q_data->sizeimage) {
-   dprintk(ctx->dev, "%s data will not fit into plane"
- "(%lu < %lu)\n", __func__,
+   dprintk(ctx->dev, "%s data will not fit into plane(%lu < 
%lu)\n", __func__,
  vb2_plane_size(vb, 0),
  (long)q_data->sizeimage);
return -EINVAL;
diff --git a/drivers/media/platform/pxa_camera.c 
b/drivers/media/platform/pxa_camera.c
index c12209c701d3..bcdac4932fb1 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -2347,8 +2347,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
 * Platform hasn't set available data widths. This is bad.
 * Warn and use a default.
 */
-   dev_warn(>dev, "WARNING! Platform hasn't set available "
-"data widths, using default 10 bit\n");
+   dev_warn(>dev, "WARNING! Platform hasn't set available 
data widths, using default 10 bit\n");
pcdev->platform_flags |= PXA_CAMERA_DATAWIDTH_10;
}
if (pcdev->platform_flags & PXA_CAMERA_DATAWIDTH_8)
@@ -2359,8 +2358,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
pcdev->width_flags |= 1 << 9;
if (!pcdev->mclk) {
dev_warn(>dev,
-"mclk == 0! Please, fix your platform data. "
-"Using default 20MHz\n");
+"mclk == 0! Please, fix your platform data. Using 
default 20MHz\n");
pcdev->mclk = 2000;
}
 
diff --git a/drivers/media/platform/via-camera.c 
b/drivers/media/platform/via-camera.c
index 7ca12deba89c..e16f70a5df1d 100644
--- a/drivers/media/platform/via-camera.c
+++ b/drivers/media/platform/via-camera.c
@@ -39,15 +39,12 @@ MODULE_LICENSE("GPL");
 static bool flip_image;
 module_param(flip_image, bool, 0444);
 MODULE_PARM_DESC(flip_image,
-   "If set, the sensor will be instructed to flip the image "
-   "vertically.");
+   "If set, the sensor will be instructed to flip the image 
vertically.");
 
 static bool override_serial;
 module_param(override_serial, bool, 0444);
 MODULE_PARM_DESC(override_serial,
-   "The camera driver will normally refuse to load if "
-   "the XO 1.5 serial port is enabled.  Set this option "
-   "to force-enable the camera.");
+   "The camera driver will normally refuse to load if the XO 1.5 
serial port is enabled.  Set this option to force-enable the camera.");
 
 /*
  * The structure describing our camera.
-- 
2.7.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 30/57] [media] si470x: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/si470x/radio-si470x-i2c.c |  6 ++
 drivers/media/radio/si470x/radio-si470x-usb.c | 12 
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c 
b/drivers/media/radio/si470x/radio-si470x-i2c.c
index ee0470a3196b..ba622439f121 100644
--- a/drivers/media/radio/si470x/radio-si470x-i2c.c
+++ b/drivers/media/radio/si470x/radio-si470x-i2c.c
@@ -387,8 +387,7 @@ static int si470x_i2c_probe(struct i2c_client *client,
radio->registers[DEVICEID], 
radio->registers[SI_CHIPID]);
if ((radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE) < 
RADIO_FW_VERSION) {
dev_warn(>dev,
-   "This driver is known to work with "
-   "firmware version %hu,\n", RADIO_FW_VERSION);
+   "This driver is known to work with firmware version 
%hu,\n", RADIO_FW_VERSION);
dev_warn(>dev,
"but the device has firmware version %hu.\n",
radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE);
@@ -400,8 +399,7 @@ static int si470x_i2c_probe(struct i2c_client *client,
dev_warn(>dev,
"If you have some trouble using this driver,\n");
dev_warn(>dev,
-   "please report to V4L ML at "
-   "linux-media@vger.kernel.org\n");
+   "please report to V4L ML at 
linux-media@vger.kernel.org\n");
}
 
/* set initial frequency */
diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c 
b/drivers/media/radio/si470x/radio-si470x-usb.c
index 4b132c29f290..18e0c7ec2056 100644
--- a/drivers/media/radio/si470x/radio-si470x-usb.c
+++ b/drivers/media/radio/si470x/radio-si470x-usb.c
@@ -351,8 +351,7 @@ static int si470x_get_scratch_page_versions(struct 
si470x_device *radio)
retval = si470x_get_report(radio, radio->usb_buf, SCRATCH_REPORT_SIZE);
 
if (retval < 0)
-   dev_warn(>intf->dev, "si470x_get_scratch: "
-   "si470x_get_report returned %d\n", retval);
+   dev_warn(>intf->dev, "si470x_get_scratch: 
si470x_get_report returned %d\n", retval);
else {
radio->software_version = radio->usb_buf[1];
radio->hardware_version = radio->usb_buf[2];
@@ -688,8 +687,7 @@ static int si470x_usb_driver_probe(struct usb_interface 
*intf,
radio->registers[DEVICEID], 
radio->registers[SI_CHIPID]);
if ((radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE) < 
RADIO_FW_VERSION) {
dev_warn(>dev,
-   "This driver is known to work with "
-   "firmware version %hu,\n", RADIO_FW_VERSION);
+   "This driver is known to work with firmware version 
%hu,\n", RADIO_FW_VERSION);
dev_warn(>dev,
"but the device has firmware version %hu.\n",
radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE);
@@ -705,8 +703,7 @@ static int si470x_usb_driver_probe(struct usb_interface 
*intf,
radio->software_version, radio->hardware_version);
if (radio->hardware_version < RADIO_HW_VERSION) {
dev_warn(>dev,
-   "This driver is known to work with "
-   "hardware version %hu,\n", RADIO_HW_VERSION);
+   "This driver is known to work with hardware version 
%hu,\n", RADIO_HW_VERSION);
dev_warn(>dev,
"but the device has hardware version %hu.\n",
radio->hardware_version);
@@ -718,8 +715,7 @@ static int si470x_usb_driver_probe(struct usb_interface 
*intf,
dev_warn(>dev,
"If you have some trouble using this driver,\n");
dev_warn(>dev,
-   "please report to V4L ML at "
-   "linux-media@vger.kernel.org\n");
+   "please report to V4L ML at 
linux-media@vger.kernel.org\n");
}
 
/* set led to connect state */
-- 
2.7.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 19/57] [media] solo6x10: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/solo6x10/solo6x10-v4l2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2.c 
b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
index b4be47969b6b..12f38e5f2ece 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
@@ -702,8 +702,7 @@ int solo_v4l2_init(struct solo_dev *solo_dev, unsigned nr)
snprintf(solo_dev->vfd->name, sizeof(solo_dev->vfd->name), "%s (%i)",
 SOLO6X10_NAME, solo_dev->vfd->num);
 
-   dev_info(_dev->pdev->dev, "Display as /dev/video%d with "
-"%d inputs (%d extended)\n", solo_dev->vfd->num,
+   dev_info(_dev->pdev->dev, "Display as /dev/video%d with %d inputs 
(%d extended)\n", solo_dev->vfd->num,
 solo_dev->nr_chans, solo_dev->nr_ext);
 
return 0;
-- 
2.7.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


Re: [PATCH 54/57] [media] platform: don't break long lines

2016-10-14 Thread Robert Jarzmik
Mauro Carvalho Chehab  writes:

> Due to the 80-cols checkpatch warnings, several strings
> were broken into multiple lines. This is not considered
> a good practice anymore, as it makes harder to grep for
> strings at the source code. So, join those continuation
> lines.
>
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  drivers/media/platform/mx2_emmaprp.c | 3 +--
>  drivers/media/platform/pxa_camera.c  | 6 ++
>  drivers/media/platform/via-camera.c  | 7 ++-
>  3 files changed, 5 insertions(+), 11 deletions(-)
For pxa_camera, FWIW:
Acked-by: Robert Jarzmik 

Cheers.

--
Robert
--
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 29/57] [media] ti-vpe: don't break long lines

2016-10-14 Thread Benoit Parrot
Acked-by: Benoit Parrot 

Mauro Carvalho Chehab  wrote on Fri [2016-Oct-14 
17:20:17 -0300]:
> Due to the 80-cols checkpatch warnings, several strings
> were broken into multiple lines. This is not considered
> a good practice anymore, as it makes harder to grep for
> strings at the source code. So, join those continuation
> lines.
> 
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  drivers/media/platform/ti-vpe/vpdma.c | 12 
>  drivers/media/platform/ti-vpe/vpe.c   |  3 +--
>  2 files changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/media/platform/ti-vpe/vpdma.c 
> b/drivers/media/platform/ti-vpe/vpdma.c
> index 3e2e3a33e6ed..079a0c894d02 100644
> --- a/drivers/media/platform/ti-vpe/vpdma.c
> +++ b/drivers/media/platform/ti-vpe/vpdma.c
> @@ -466,8 +466,7 @@ static void dump_cfd(struct vpdma_cfd *cfd)
>  
>   pr_debug("word2: payload_addr = 0x%08x\n", cfd->payload_addr);
>  
> - pr_debug("word3: pkt_type = %d, direct = %d, class = %d, dest = %d, "
> - "payload_len = %d\n", cfd_get_pkt_type(cfd),
> + pr_debug("word3: pkt_type = %d, direct = %d, class = %d, dest = %d, 
> payload_len = %d\n", cfd_get_pkt_type(cfd),
>   cfd_get_direct(cfd), class, cfd_get_dest(cfd),
>   cfd_get_payload_len(cfd));
>  }
> @@ -574,8 +573,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
>   pr_debug("%s data transfer descriptor for channel %d\n",
>   dir == DTD_DIR_OUT ? "outbound" : "inbound", chan);
>  
> - pr_debug("word0: data_type = %d, notify = %d, field = %d, 1D = %d, "
> - "even_ln_skp = %d, odd_ln_skp = %d, line_stride = %d\n",
> + pr_debug("word0: data_type = %d, notify = %d, field = %d, 1D = %d, 
> even_ln_skp = %d, odd_ln_skp = %d, line_stride = %d\n",
>   dtd_get_data_type(dtd), dtd_get_notify(dtd), dtd_get_field(dtd),
>   dtd_get_1d(dtd), dtd_get_even_line_skip(dtd),
>   dtd_get_odd_line_skip(dtd), dtd_get_line_stride(dtd));
> @@ -586,8 +584,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
>  
>   pr_debug("word2: start_addr = %pad\n", >start_addr);
>  
> - pr_debug("word3: pkt_type = %d, mode = %d, dir = %d, chan = %d, "
> - "pri = %d, next_chan = %d\n", dtd_get_pkt_type(dtd),
> + pr_debug("word3: pkt_type = %d, mode = %d, dir = %d, chan = %d, pri = 
> %d, next_chan = %d\n", dtd_get_pkt_type(dtd),
>   dtd_get_mode(dtd), dir, chan, dtd_get_priority(dtd),
>   dtd_get_next_chan(dtd));
>  
> @@ -595,8 +592,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
>   pr_debug("word4: frame_width = %d, frame_height = %d\n",
>   dtd_get_frame_width(dtd), dtd_get_frame_height(dtd));
>   else
> - pr_debug("word4: desc_write_addr = 0x%08x, write_desc = %d, "
> - "drp_data = %d, use_desc_reg = %d\n",
> + pr_debug("word4: desc_write_addr = 0x%08x, write_desc = %d, 
> drp_data = %d, use_desc_reg = %d\n",
>   dtd_get_desc_write_addr(dtd), dtd_get_write_desc(dtd),
>   dtd_get_drop_data(dtd), dtd_get_use_desc(dtd));
>  
> diff --git a/drivers/media/platform/ti-vpe/vpe.c 
> b/drivers/media/platform/ti-vpe/vpe.c
> index 0189f7f7cb03..1cf4a4c1b899 100644
> --- a/drivers/media/platform/ti-vpe/vpe.c
> +++ b/drivers/media/platform/ti-vpe/vpe.c
> @@ -1263,8 +1263,7 @@ static irqreturn_t vpe_irq(int irq_vpe, void *data)
>   }
>  
>   if (irqst0 | irqst1) {
> - dev_warn(dev->v4l2_dev.dev, "Unexpected interrupt: "
> - "INT0_STATUS0 = 0x%08x, INT0_STATUS1 = 0x%08x\n",
> + dev_warn(dev->v4l2_dev.dev, "Unexpected interrupt: INT0_STATUS0 
> = 0x%08x, INT0_STATUS1 = 0x%08x\n",
>   irqst0, irqst1);
>   }
>  
> -- 
> 2.7.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 49/57] [media] uvc: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/uvc/uvc_ctrl.c|  24 ++
 drivers/media/usb/uvc/uvc_debugfs.c |   3 +-
 drivers/media/usb/uvc/uvc_driver.c  | 148 
 drivers/media/usb/uvc/uvc_entity.c  |   6 +-
 drivers/media/usb/uvc/uvc_isight.c  |   9 +--
 drivers/media/usb/uvc/uvc_status.c  |  15 ++--
 drivers/media/usb/uvc/uvc_v4l2.c|   6 +-
 drivers/media/usb/uvc/uvc_video.c   |  69 ++---
 8 files changed, 91 insertions(+), 189 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index c2ee6e39fd0c..6f26451bcb75 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -960,8 +960,7 @@ static int uvc_ctrl_populate_cache(struct uvc_video_chain 
*chain,
 * resolution value to zero.
 */
uvc_warn_once(chain->dev, UVC_WARN_XU_GET_RES,
- "UVC non compliance - GET_RES failed on "
- "an XU control. Enabling workaround.\n");
+ "UVC non compliance - GET_RES failed on 
an XU control. Enabling workaround.\n");
memset(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES), 0,
   ctrl->info.size);
}
@@ -1680,8 +1679,7 @@ static int uvc_ctrl_fill_xu_info(struct uvc_device *dev,
 
uvc_ctrl_fixup_xu_info(dev, ctrl, info);
 
-   uvc_trace(UVC_TRACE_CONTROL, "XU control %pUl/%u queried: len %u, "
- "flags { get %u set %u auto %u }.\n",
+   uvc_trace(UVC_TRACE_CONTROL, "XU control %pUl/%u queried: len %u, flags 
{ get %u set %u auto %u }.\n",
  info->entity, info->selector, info->size,
  (info->flags & UVC_CTRL_FLAG_GET_CUR) ? 1 : 0,
  (info->flags & UVC_CTRL_FLAG_SET_CUR) ? 1 : 0,
@@ -1710,8 +1708,7 @@ static int uvc_ctrl_init_xu_ctrl(struct uvc_device *dev,
 
ret = uvc_ctrl_add_info(dev, ctrl, );
if (ret < 0)
-   uvc_trace(UVC_TRACE_CONTROL, "Failed to initialize control "
- "%pUl/%u on device %s entity %u\n", info.entity,
+   uvc_trace(UVC_TRACE_CONTROL, "Failed to initialize control 
%pUl/%u on device %s entity %u\n", info.entity,
  info.selector, dev->udev->devpath, ctrl->entity->id);
 
return ret;
@@ -1904,8 +1901,7 @@ static int uvc_ctrl_add_info(struct uvc_device *dev, 
struct uvc_control *ctrl,
 
ctrl->initialized = 1;
 
-   uvc_trace(UVC_TRACE_CONTROL, "Added control %pUl/%u to device %s "
-   "entity %u\n", ctrl->info.entity, ctrl->info.selector,
+   uvc_trace(UVC_TRACE_CONTROL, "Added control %pUl/%u to device %s entity 
%u\n", ctrl->info.entity, ctrl->info.selector,
dev->udev->devpath, ctrl->entity->id);
 
 done:
@@ -1964,8 +1960,7 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,
int ret;
 
if (mapping->id & ~V4L2_CTRL_ID_MASK) {
-   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', control "
-   "id 0x%08x is invalid.\n", mapping->name,
+   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', control 
id 0x%08x is invalid.\n", mapping->name,
mapping->id);
return -EINVAL;
}
@@ -2004,8 +1999,7 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,
 
list_for_each_entry(map, >info.mappings, list) {
if (mapping->id == map->id) {
-   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', "
-   "control id 0x%08x already exists.\n",
+   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', 
control id 0x%08x already exists.\n",
mapping->name, mapping->id);
ret = -EEXIST;
goto done;
@@ -2015,8 +2009,7 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,
/* Prevent excess memory consumption */
if (atomic_inc_return(>nmappings) > UVC_MAX_CONTROL_MAPPINGS) {
atomic_dec(>nmappings);
-   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', maximum "
-   "mappings count (%u) exceeded.\n", mapping->name,
+   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', maximum 
mappings count (%u) exceeded.\n", mapping->name,
UVC_MAX_CONTROL_MAPPINGS);
ret = -ENOMEM;
goto done;
@@ -2086,8 +2079,7 @@ static void uvc_ctrl_prune_entity(struct uvc_device *dev,
 

[PATCH 27/57] [media] s5p-mfc: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c| 6 ++
 drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 7 ++-
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 52081ddc9bf2..c0e464dcc7d0 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -793,8 +793,7 @@ static int vidioc_g_crop(struct file *file, void *priv,
cr->c.top = top;
cr->c.width = ctx->img_width - left - right;
cr->c.height = ctx->img_height - top - bottom;
-   mfc_debug(2, "Cropping info [h264]: l=%d t=%d "
-   "w=%d h=%d (r=%d b=%d fw=%d fh=%d\n", left, top,
+   mfc_debug(2, "Cropping info [h264]: l=%d t=%d w=%d h=%d (r=%d 
b=%d fw=%d fh=%d\n", left, top,
cr->c.width, cr->c.height, right, bottom,
ctx->buf_width, ctx->buf_height);
} else {
@@ -802,8 +801,7 @@ static int vidioc_g_crop(struct file *file, void *priv,
cr->c.top = 0;
cr->c.width = ctx->img_width;
cr->c.height = ctx->img_height;
-   mfc_debug(2, "Cropping info: w=%d h=%d fw=%d "
-   "fh=%d\n", cr->c.width, cr->c.height, ctx->buf_width,
+   mfc_debug(2, "Cropping info: w=%d h=%d fw=%d fh=%d\n", 
cr->c.width, cr->c.height, ctx->buf_width,
ctx->buf_height);
}
return 0;
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
index 81e1e4ce6c24..f4301d5bbd32 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
@@ -1293,14 +1293,11 @@ static int s5p_mfc_run_init_dec_buffers(struct 
s5p_mfc_ctx *ctx)
 * First set the output frame buffers
 */
if (ctx->capture_state != QUEUE_BUFS_MMAPED) {
-   mfc_err("It seems that not all destionation buffers were "
-   "mmaped\nMFC requires that all destination are mmaped "
-   "before starting processing\n");
+   mfc_err("It seems that not all destionation buffers were 
mmaped\nMFC requires that all destination are mmaped before starting 
processing\n");
return -EAGAIN;
}
if (list_empty(>src_queue)) {
-   mfc_err("Header has been deallocated in the middle of"
-   " initialization\n");
+   mfc_err("Header has been deallocated in the middle of 
initialization\n");
return -EIO;
}
temp_vb = list_entry(ctx->src_queue.next, struct s5p_mfc_buf, list);
-- 
2.7.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 14/57] [media] ivtv: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/ivtv/ivtv-alsa-main.c |  9 +++--
 drivers/media/pci/ivtv/ivtv-driver.c| 36 +++--
 drivers/media/pci/ivtv/ivtv-firmware.c  |  3 +--
 drivers/media/pci/ivtv/ivtv-yuv.c   |  6 ++
 drivers/media/pci/ivtv/ivtvfb.c |  3 +--
 5 files changed, 19 insertions(+), 38 deletions(-)

diff --git a/drivers/media/pci/ivtv/ivtv-alsa-main.c 
b/drivers/media/pci/ivtv/ivtv-alsa-main.c
index 8a86b61a896d..5bb28aa9a328 100644
--- a/drivers/media/pci/ivtv/ivtv-alsa-main.c
+++ b/drivers/media/pci/ivtv/ivtv-alsa-main.c
@@ -177,8 +177,7 @@ static int snd_ivtv_init(struct v4l2_device *v4l2_dev)
 #if 0
ret = snd_ivtv_mixer_create(itvsc);
if (ret) {
-   IVTV_ALSA_WARN("%s: snd_ivtv_mixer_create() failed with err %d:"
-  " proceeding anyway\n", __func__, ret);
+   IVTV_ALSA_WARN("%s: snd_ivtv_mixer_create() failed with err %d: 
proceeding anyway\n", __func__, ret);
}
 #endif
 
@@ -235,8 +234,7 @@ static int ivtv_alsa_load(struct ivtv *itv)
 
s = >streams[IVTV_ENC_STREAM_TYPE_PCM];
if (s->vdev.v4l2_dev == NULL) {
-   IVTV_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - "
-"skipping\n", __func__);
+   IVTV_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - 
skipping\n", __func__);
return 0;
}
 
@@ -250,8 +248,7 @@ static int ivtv_alsa_load(struct ivtv *itv)
IVTV_ALSA_ERR("%s: failed to create struct snd_ivtv_card\n",
  __func__);
} else {
-   IVTV_DEBUG_ALSA_INFO("%s: created ivtv ALSA interface instance "
-"\n", __func__);
+   IVTV_DEBUG_ALSA_INFO("%s: created ivtv ALSA interface instance 
\n", __func__);
}
return 0;
 }
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c 
b/drivers/media/pci/ivtv/ivtv-driver.c
index 374033a5bdaf..7f52b2ac6ada 100644
--- a/drivers/media/pci/ivtv/ivtv-driver.c
+++ b/drivers/media/pci/ivtv/ivtv-driver.c
@@ -885,8 +885,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev 
*pdev,
pci_read_config_byte(pdev, PCI_LATENCY_TIMER, _latency);
 
if (pci_latency < 64 && ivtv_pci_latency) {
-   IVTV_INFO("Unreasonably low latency timer, "
-  "setting to 64 (was %d)\n", pci_latency);
+   IVTV_INFO("Unreasonably low latency timer, setting to 64 (was 
%d)\n", pci_latency);
pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 64);
pci_read_config_byte(pdev, PCI_LATENCY_TIMER, _latency);
}
@@ -896,8 +895,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev 
*pdev,
   these problems. */
pci_write_config_dword(pdev, 0x40, 0x);
 
-   IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, "
-  "irq: %d, latency: %d, memory: 0x%llx\n",
+   IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, irq: %d, latency: %d, 
memory: 0x%llx\n",
   pdev->device, pdev->revision, pdev->bus->number,
   PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn),
   pdev->irq, pci_latency, (u64)itv->base_addr);
@@ -1047,13 +1045,10 @@ static int ivtv_probe(struct pci_dev *pdev, const 
struct pci_device_id *pci_id)
itv->enc_mem = ioremap_nocache(itv->base_addr + IVTV_ENCODER_OFFSET,
   IVTV_ENCODER_SIZE);
if (!itv->enc_mem) {
-   IVTV_ERR("ioremap failed. Can't get a window into CX23415/6 "
-"encoder memory\n");
-   IVTV_ERR("Each capture card with a CX23415/6 needs 8 MB of "
-"vmalloc address space for this window\n");
+   IVTV_ERR("ioremap failed. Can't get a window into CX23415/6 
encoder memory\n");
+   IVTV_ERR("Each capture card with a CX23415/6 needs 8 MB of 
vmalloc address space for this window\n");
IVTV_ERR("Check the output of 'grep Vmalloc /proc/meminfo'\n");
-   IVTV_ERR("Use the vmalloc= kernel command line option to set "
-"VmallocTotal to a larger value\n");
+   IVTV_ERR("Use the vmalloc= kernel command line option to set 
VmallocTotal to a larger value\n");
retval = -ENOMEM;
goto free_mem;
}
@@ -1064,14 +1059,10 @@ static int ivtv_probe(struct pci_dev *pdev, const 
struct pci_device_id *pci_id)
itv->dec_mem = ioremap_nocache(itv->base_addr + 
IVTV_DECODER_OFFSET,
IVTV_DECODER_SIZE);

[PATCH 50/57] [media] zr364xx: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/zr364xx/zr364xx.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/usb/zr364xx/zr364xx.c 
b/drivers/media/usb/zr364xx/zr364xx.c
index cc128db85723..3950708cbb32 100644
--- a/drivers/media/usb/zr364xx/zr364xx.c
+++ b/drivers/media/usb/zr364xx/zr364xx.c
@@ -633,8 +633,7 @@ static int zr364xx_read_video_callback(struct 
zr364xx_camera *cam,
} else {
if (frm->cur_size + purb->actual_length > MAX_FRAME_SIZE) {
dev_info(>udev->dev,
-"%s: buffer (%d bytes) too small to hold "
-"frame data. Discarding frame data.\n",
+"%s: buffer (%d bytes) too small to hold frame 
data. Discarding frame data.\n",
 __func__, MAX_FRAME_SIZE);
} else {
pdest += frm->cur_size;
@@ -1373,8 +1372,7 @@ static int zr364xx_board_init(struct zr364xx_camera *cam)
>buffer.frame[i], i,
cam->buffer.frame[i].lpvbits);
if (cam->buffer.frame[i].lpvbits == NULL) {
-   printk(KERN_INFO KBUILD_MODNAME ": out of memory. "
-  "Using less frames\n");
+   printk(KERN_INFO KBUILD_MODNAME ": out of memory. Using 
less frames\n");
break;
}
}
-- 
2.7.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 28/57] [media] c8sectpfe: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c 
b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 30c148b9d65e..7a2c8fdfbe51 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -112,8 +112,7 @@ static void channel_swdemux_tsklet(unsigned long data)
buf = (u8 *) channel->back_buffer_aligned;
 
dev_dbg(fei->dev,
-   "chan=%d channel=%p num_packets = %d, buf = %p, pos = 0x%x\n\t"
-   "rp=0x%lx, wp=0x%lx\n",
+   "chan=%d channel=%p num_packets = %d, buf = %p, pos = 
0x%x\n\trp=0x%lx, wp=0x%lx\n",
channel->tsin_id, channel, num_packets, buf, pos, rp, wp);
 
for (n = 0; n < num_packets; n++) {
@@ -789,8 +788,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
/* sanity check value */
if (tsin->tsin_id > fei->hw_stats.num_ib) {
dev_err(>dev,
-   "tsin-num %d specified greater than number\n\t"
-   "of input block hw in SoC! (%d)",
+   "tsin-num %d specified greater than 
number\n\tof input block hw in SoC! (%d)",
tsin->tsin_id, fei->hw_stats.num_ib);
ret = -EINVAL;
goto err_clk_disable;
@@ -855,8 +853,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
tsin->demux_mapping = index;
 
dev_dbg(fei->dev,
-   "channel=%p n=%d tsin_num=%d, invert-ts-clk=%d\n\t"
-   "serial-not-parallel=%d pkt-clk-valid=%d dvb-card=%d\n",
+   "channel=%p n=%d tsin_num=%d, 
invert-ts-clk=%d\n\tserial-not-parallel=%d pkt-clk-valid=%d dvb-card=%d\n",
fei->channel_data[index], index,
tsin->tsin_id, tsin->invert_ts_clk,
tsin->serial_not_parallel, tsin->async_not_sync,
@@ -1045,8 +1042,7 @@ static void load_imem_segment(struct c8sectpfei *fei, 
Elf32_Phdr *phdr,
 */
 
dev_dbg(fei->dev,
-   "Loading IMEM segment %d 0x%08x\n\t"
-   " (0x%x bytes) -> 0x%p (0x%x bytes)\n", seg_num,
+   "Loading IMEM segment %d 0x%08x\n\t (0x%x bytes) -> 0x%p (0x%x 
bytes)\n", seg_num,
phdr->p_paddr, phdr->p_filesz,
dest, phdr->p_memsz + phdr->p_memsz / 3);
 
@@ -1075,8 +1071,7 @@ static void load_dmem_segment(struct c8sectpfei *fei, 
Elf32_Phdr *phdr,
 */
 
dev_dbg(fei->dev,
-   "Loading DMEM segment %d 0x%08x\n\t"
-   "(0x%x bytes) -> 0x%p (0x%x bytes)\n",
+   "Loading DMEM segment %d 0x%08x\n\t(0x%x bytes) -> 0x%p (0x%x 
bytes)\n",
seg_num, phdr->p_paddr, phdr->p_filesz,
dst, phdr->p_memsz);
 
-- 
2.7.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 45/57] [media] tm6000: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/tm6000/tm6000-alsa.c  |  4 +---
 drivers/media/usb/tm6000/tm6000-core.c  | 11 +++
 drivers/media/usb/tm6000/tm6000-dvb.c   | 16 +---
 drivers/media/usb/tm6000/tm6000-i2c.c   |  3 +--
 drivers/media/usb/tm6000/tm6000-stds.c  |  3 +--
 drivers/media/usb/tm6000/tm6000-video.c | 15 +--
 6 files changed, 16 insertions(+), 36 deletions(-)

diff --git a/drivers/media/usb/tm6000/tm6000-alsa.c 
b/drivers/media/usb/tm6000/tm6000-alsa.c
index f16fbd1f9f51..422322541af6 100644
--- a/drivers/media/usb/tm6000/tm6000-alsa.c
+++ b/drivers/media/usb/tm6000/tm6000-alsa.c
@@ -58,9 +58,7 @@ MODULE_PARM_DESC(index, "Index value for tm6000x capture 
interface(s).");
 MODULE_DESCRIPTION("ALSA driver module for tm5600/tm6000/tm6010 based TV 
cards");
 MODULE_AUTHOR("Mauro Carvalho Chehab");
 MODULE_LICENSE("GPL");
-MODULE_SUPPORTED_DEVICE("{{Trident,tm5600},"
-   "{{Trident,tm6000},"
-   "{{Trident,tm6010}");
+MODULE_SUPPORTED_DEVICE("{{Trident,tm5600},{{Trident,tm6000},{{Trident,tm6010}");
 static unsigned int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "enable debug messages");
diff --git a/drivers/media/usb/tm6000/tm6000-core.c 
b/drivers/media/usb/tm6000/tm6000-core.c
index 7c32353c59db..0dfef52acd12 100644
--- a/drivers/media/usb/tm6000/tm6000-core.c
+++ b/drivers/media/usb/tm6000/tm6000-core.c
@@ -602,8 +602,7 @@ int tm6000_init(struct tm6000_core *dev)
for (i = 0; i < size; i++) {
rc = tm6000_set_reg(dev, tab[i].req, tab[i].reg, tab[i].val);
if (rc < 0) {
-   printk(KERN_ERR "Error %i while setting req %d, "
-   "reg %d to value %d\n", rc,
+   printk(KERN_ERR "Error %i while setting req %d, reg %d 
to value %d\n", rc,
tab[i].req, tab[i].reg, tab[i].val);
return rc;
}
@@ -761,9 +760,7 @@ int tm6000_tvaudio_set_mute(struct tm6000_core *dev, u8 
mute)
if (dev->dev_type == TM6010)
tm6010_set_mute_sif(dev, mute);
else {
-   printk(KERN_INFO "ERROR: TM5600 and TM6000 don't has"
-   " SIF audio inputs. Please check the %s"
-   " configuration.\n", dev->name);
+   printk(KERN_INFO "ERROR: TM5600 and TM6000 don't has 
SIF audio inputs. Please check the %s configuration.\n", dev->name);
return -EINVAL;
}
break;
@@ -822,9 +819,7 @@ void tm6000_set_volume(struct tm6000_core *dev, int vol)
if (dev->dev_type == TM6010)
tm6010_set_volume_sif(dev, vol);
else
-   printk(KERN_INFO "ERROR: TM5600 and TM6000 don't has"
-   " SIF audio inputs. Please check the %s"
-   " configuration.\n", dev->name);
+   printk(KERN_INFO "ERROR: TM5600 and TM6000 don't has 
SIF audio inputs. Please check the %s configuration.\n", dev->name);
break;
case TM6000_AMUX_ADC1:
case TM6000_AMUX_ADC2:
diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c 
b/drivers/media/usb/tm6000/tm6000-dvb.c
index 0426b210383b..70dbaec1219e 100644
--- a/drivers/media/usb/tm6000/tm6000-dvb.c
+++ b/drivers/media/usb/tm6000/tm6000-dvb.c
@@ -35,9 +35,7 @@ MODULE_DESCRIPTION("DVB driver extension module for 
tm5600/6000/6010 based TV ca
 MODULE_AUTHOR("Mauro Carvalho Chehab");
 MODULE_LICENSE("GPL");
 
-MODULE_SUPPORTED_DEVICE("{{Trident, tm5600},"
-   "{{Trident, tm6000},"
-   "{{Trident, tm6010}");
+MODULE_SUPPORTED_DEVICE("{{Trident, tm5600},{{Trident, tm6000},{{Trident, 
tm6010}");
 
 static int debug;
 
@@ -292,13 +290,11 @@ static int register_dvb(struct tm6000_core *dev)
}
 
if (!dvb_attach(xc2028_attach, dvb->frontend, )) {
-   printk(KERN_ERR "tm6000: couldn't register "
-   "frontend (xc3028)\n");
+   printk(KERN_ERR "tm6000: couldn't register 
frontend (xc3028)\n");
ret = -EINVAL;
goto frontend_err;
}
-   printk(KERN_INFO "tm6000: XC2028/3028 asked to be "
-"attached to frontend!\n");
+   printk(KERN_INFO "tm6000: 

Re: [RFC PATCH 00/11] Introduce writeback connectors

2016-10-14 Thread Archit Taneja

Hi Brian,

On 10/11/2016 08:23 PM, Brian Starkey wrote:

Hi,

This RFC series introduces a new connector type:
 DRM_MODE_CONNECTOR_WRITEBACK
It is a follow-on from a previous discussion: [1]

Writeback connectors are used to expose the memory writeback engines
found in some display controllers, which can write a CRTC's
composition result to a memory buffer.
This is useful e.g. for testing, screen-recording, screenshots,
wireless display, display cloning, memory-to-memory composition.

Patches 1-7 include the core framework changes required, and patches
8-11 implement a writeback connector for the Mali-DP writeback engine.
The Mali-DP patches depend on this other series: [2].

The connector is given the FB_ID property for the output framebuffer,
and two new read-only properties: PIXEL_FORMATS and
PIXEL_FORMATS_SIZE, which expose the supported framebuffer pixel
formats of the engine.

The EDID property is not exposed for writeback connectors.

Writeback connector usage:
--
Due to connector routing changes being treated as "full modeset"
operations, any client which wishes to use a writeback connector
should include the connector in every modeset. The writeback will not
actually become active until a framebuffer is attached.

The writeback itself is enabled by attaching a framebuffer to the
FB_ID property of the connector. The driver must then ensure that the
CRTC content of that atomic commit is written into the framebuffer.

The writeback works in a one-shot mode with each atomic commit. This
prevents the same content from being written multiple times.
In some cases (front-buffer rendering) there might be a desire for
continuous operation - I think a property could be added later for
this kind of control.

Writeback can be disabled by setting FB_ID to zero.

Known issues:
-
 * I'm not sure what "DPMS" should mean for writeback connectors.
   It could be used to disable writeback (even when a framebuffer is
   attached), or it could be hidden entirely (which would break the
   legacy DPMS call for writeback connectors).
 * With Daniel's recent re-iteration of the userspace API rules, I
   fully expect to provide some userspace code to support this. The
   question is what, and where? We want to use writeback for testing,
   so perhaps some tests in igt is suitable.
 * Documentation. Probably some portion of this cover letter needs to
   make it into Documentation/
 * Synchronisation. Our hardware will finish the writeback by the next
   vsync. I've not implemented fence support here, but it would be an
   obvious addition.

See Also:
-
[1] https://lists.freedesktop.org/archives/dri-devel/2016-July/113197.html
[2] https://lists.freedesktop.org/archives/dri-devel/2016-October/120486.html

I welcome any comments, especially if this approach does/doesn't fit
well with anyone else's hardware.


Thanks for working on this! Some points below.

- Writeback hardware generally allows us to specify the region within
the framebuffer we want to write to. It's analogous to the SRC_X/Y/W/H
plane properties. We could have similar props for the writeback
connectors, and maybe set them to the FB_ID dimensions if they aren't
configured by userspace.

- Besides the above property, writeback hardware can have provisions
for scaling, color space conversion and rotation. This would mean that
we'd eventually add more writeback specific props/params in
drm_connector/drm_connector_state. Would we be okay adding more such
props for connectors?

Thanks,
Archit



Thanks,

-Brian

---

Brian Starkey (10):
  drm: add writeback connector type
  drm/fb-helper: skip writeback connectors
  drm: extract CRTC/plane disable from drm_framebuffer_remove
  drm: add __drm_framebuffer_remove_atomic
  drm: add fb to connector state
  drm: expose fb_id property for writeback connectors
  drm: add writeback-connector pixel format properties
  drm: mali-dp: rename malidp_input_format
  drm: mali-dp: add RGB writeback formats for DP550/DP650
  drm: mali-dp: add writeback connector

Liviu Dudau (1):
  drm: mali-dp: Add support for writeback on DP550/DP650

 drivers/gpu/drm/arm/Makefile|1 +
 drivers/gpu/drm/arm/malidp_crtc.c   |   10 ++
 drivers/gpu/drm/arm/malidp_drv.c|   25 +++-
 drivers/gpu/drm/arm/malidp_drv.h|5 +
 drivers/gpu/drm/arm/malidp_hw.c |  104 ++
 drivers/gpu/drm/arm/malidp_hw.h |   27 +++-
 drivers/gpu/drm/arm/malidp_mw.c |  268 +++
 drivers/gpu/drm/arm/malidp_planes.c |8 +-
 drivers/gpu/drm/arm/malidp_regs.h   |   15 ++
 drivers/gpu/drm/drm_atomic.c|   40 ++
 drivers/gpu/drm/drm_atomic_helper.c |4 +
 drivers/gpu/drm/drm_connector.c |   79 ++-
 drivers/gpu/drm/drm_crtc.c  |   14 +-
 drivers/gpu/drm/drm_fb_helper.c |4 +
 drivers/gpu/drm/drm_framebuffer.c   |  249 
 drivers/gpu/drm/drm_ioctl.c |7 +
 include/drm/drmP.h 

Re: [PATCH 02/18] [media] RedRat3: Move two assignments in redrat3_transmit_ir()

2016-10-14 Thread Dan Carpenter
I have asked you about six or seven times to only send bug fixes and
stop sending clean up patches.  You have refused.  But now I'm asking
you to stop randomly doing things without at least thinking about it for
a bit.

The original code was correct.

regards,
dan carpenter

--
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] st-hva: fix some error handling in hva_hw_probe()

2016-10-14 Thread Dan Carpenter
The devm_ioremap_resource() returns error pointers, never NULL.  The
platform_get_resource() returns NULL on error, never error pointers.
The error code needs to be set, as well.  The current code returns
PTR_ERR(NULL) which is success.

Fixes: 57b2c0628b60 ("[media] st-hva: multi-format video encoder V4L2 driver")
Signed-off-by: Dan Carpenter 

diff --git a/drivers/media/platform/sti/hva/hva-hw.c 
b/drivers/media/platform/sti/hva/hva-hw.c
index d341d49..cf2a8d8 100644
--- a/drivers/media/platform/sti/hva/hva-hw.c
+++ b/drivers/media/platform/sti/hva/hva-hw.c
@@ -305,16 +305,16 @@ int hva_hw_probe(struct platform_device *pdev, struct 
hva_dev *hva)
/* get memory for registers */
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
hva->regs = devm_ioremap_resource(dev, regs);
-   if (IS_ERR_OR_NULL(hva->regs)) {
+   if (IS_ERR(hva->regs)) {
dev_err(dev, "%s failed to get regs\n", HVA_PREFIX);
return PTR_ERR(hva->regs);
}
 
/* get memory for esram */
esram = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-   if (IS_ERR_OR_NULL(esram)) {
+   if (!esram) {
dev_err(dev, "%s failed to get esram\n", HVA_PREFIX);
-   return PTR_ERR(esram);
+   return -ENODEV;
}
hva->esram_addr = esram->start;
hva->esram_size = resource_size(esram);
--
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


cron job: media_tree daily build: ERRORS

2016-10-14 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:   Sat Oct 15 05:00:23 CEST 2016
media-tree git hash:11a1e0ed7908f04c896e69d0eb65e478c12f8519
media_build git hash:   ecfc9bfca3012b0c6e19967ce90f621f71a6da94
v4l-utils git hash: 79186f9d3d9d3b6bee4a611bd92435d11807
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.7.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: WARNINGS
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.36.4-i686: WARNINGS
linux-2.6.37.6-i686: WARNINGS
linux-2.6.38.8-i686: ERRORS
linux-2.6.39.4-i686: WARNINGS
linux-3.0.60-i686: WARNINGS
linux-3.1.10-i686: ERRORS
linux-3.2.37-i686: ERRORS
linux-3.3.8-i686: ERRORS
linux-3.4.27-i686: WARNINGS
linux-3.5.7-i686: WARNINGS
linux-3.6.11-i686: WARNINGS
linux-3.7.4-i686: WARNINGS
linux-3.8-i686: WARNINGS
linux-3.9.2-i686: WARNINGS
linux-3.10.1-i686: WARNINGS
linux-3.11.1-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-2.6.36.4-x86_64: WARNINGS
linux-2.6.37.6-x86_64: WARNINGS
linux-2.6.38.8-x86_64: ERRORS
linux-2.6.39.4-x86_64: WARNINGS
linux-3.0.60-x86_64: WARNINGS
linux-3.1.10-x86_64: ERRORS
linux-3.2.37-x86_64: ERRORS
linux-3.3.8-x86_64: ERRORS
linux-3.4.27-x86_64: WARNINGS
linux-3.5.7-x86_64: WARNINGS
linux-3.6.11-x86_64: WARNINGS
linux-3.7.4-x86_64: WARNINGS
linux-3.8-x86_64: WARNINGS
linux-3.9.2-x86_64: WARNINGS
linux-3.10.1-x86_64: WARNINGS
linux-3.11.1-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: OK
apps: WARNINGS
spec-git: OK
smatch: ERRORS
sparse: WARNINGS

Detailed results are available here:

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

Full logs are available here:

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

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/index.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 3/5] [media] winbond-cir: Move assignments for three variables in wbcir_shutdown()

2016-10-14 Thread SF Markus Elfring
From: Markus Elfring 
Date: Fri, 14 Oct 2016 10:40:12 +0200

Move the setting for the local variables "mask", "match" and "rc6_csl"
behind the source code for a condition check by this function
at the beginning.

Signed-off-by: Markus Elfring 
---
 drivers/media/rc/winbond-cir.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index fd997f0..9d05e17 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -702,17 +702,17 @@ wbcir_shutdown(struct pnp_dev *device)
bool do_wake = true;
u8 match[11];
u8 mask[11];
-   u8 rc6_csl = 0;
+   u8 rc6_csl;
int i;
 
-   memset(match, 0, sizeof(match));
-   memset(mask, 0, sizeof(mask));
-
if (wake_sc == INVALID_SCANCODE || !device_may_wakeup(dev)) {
do_wake = false;
goto finish;
}
 
+   rc6_csl = 0;
+   memset(match, 0, sizeof(match));
+   memset(mask, 0, sizeof(mask));
switch (protocol) {
case IR_PROTOCOL_RC5:
if (wake_sc > 0xFFF) {
-- 
2.10.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 4/5] [media] winbond-cir: One variable and its check less in wbcir_shutdown() after error detection

2016-10-14 Thread SF Markus Elfring
From: Markus Elfring 
Date: Fri, 14 Oct 2016 12:48:41 +0200

The local variable "do_wake" was set to "false" after an invalid system
setting was detected so that a bit of error handling was triggered.

* Replace these assignments by direct jumps to the source code with the
desired exception handling.

* Delete this status variable and a corresponding check which became
  unnecessary with this refactoring.

Signed-off-by: Markus Elfring 
---
 drivers/media/rc/winbond-cir.c | 78 ++
 1 file changed, 34 insertions(+), 44 deletions(-)

diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index 9d05e17..3d286b9 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -699,16 +699,13 @@ wbcir_shutdown(struct pnp_dev *device)
 {
struct device *dev = >dev;
struct wbcir_data *data = pnp_get_drvdata(device);
-   bool do_wake = true;
u8 match[11];
u8 mask[11];
u8 rc6_csl;
int i;
 
-   if (wake_sc == INVALID_SCANCODE || !device_may_wakeup(dev)) {
-   do_wake = false;
-   goto finish;
-   }
+   if (wake_sc == INVALID_SCANCODE || !device_may_wakeup(dev))
+   goto clear_bits;
 
rc6_csl = 0;
memset(match, 0, sizeof(match));
@@ -716,9 +713,8 @@ wbcir_shutdown(struct pnp_dev *device)
switch (protocol) {
case IR_PROTOCOL_RC5:
if (wake_sc > 0xFFF) {
-   do_wake = false;
dev_err(dev, "RC5 - Invalid wake scancode\n");
-   break;
+   goto clear_bits;
}
 
/* Mask = 13 bits, ex toggle */
@@ -735,9 +731,8 @@ wbcir_shutdown(struct pnp_dev *device)
 
case IR_PROTOCOL_NEC:
if (wake_sc > 0xFF) {
-   do_wake = false;
dev_err(dev, "NEC - Invalid wake scancode\n");
-   break;
+   goto clear_bits;
}
 
mask[0] = mask[1] = mask[2] = mask[3] = 0xFF;
@@ -757,9 +752,8 @@ wbcir_shutdown(struct pnp_dev *device)
 
if (wake_rc6mode == 0) {
if (wake_sc > 0x) {
-   do_wake = false;
dev_err(dev, "RC6 - Invalid wake scancode\n");
-   break;
+   goto clear_bits;
}
 
/* Command */
@@ -813,9 +807,8 @@ wbcir_shutdown(struct pnp_dev *device)
} else if (wake_sc <= 0x007F) {
rc6_csl = 60;
} else {
-   do_wake = false;
dev_err(dev, "RC6 - Invalid wake scancode\n");
-   break;
+   goto clear_bits;
}
 
/* Header */
@@ -825,49 +818,38 @@ wbcir_shutdown(struct pnp_dev *device)
mask[i++] = 0x0F;
 
} else {
-   do_wake = false;
dev_err(dev, "RC6 - Invalid wake mode\n");
+   goto clear_bits;
}
 
break;
 
default:
-   do_wake = false;
-   break;
+   goto clear_bits;
}
 
-finish:
-   if (do_wake) {
-   /* Set compare and compare mask */
-   wbcir_set_bits(data->wbase + WBCIR_REG_WCEIR_INDEX,
-  WBCIR_REGSEL_COMPARE | WBCIR_REG_ADDR0,
-  0x3F);
-   outsb(data->wbase + WBCIR_REG_WCEIR_DATA, match, 11);
-   wbcir_set_bits(data->wbase + WBCIR_REG_WCEIR_INDEX,
-  WBCIR_REGSEL_MASK | WBCIR_REG_ADDR0,
-  0x3F);
-   outsb(data->wbase + WBCIR_REG_WCEIR_DATA, mask, 11);
-
-   /* RC6 Compare String Len */
-   outb(rc6_csl, data->wbase + WBCIR_REG_WCEIR_CSL);
-
-   /* Clear status bits NEC_REP, BUFF, MSG_END, MATCH */
-   wbcir_set_bits(data->wbase + WBCIR_REG_WCEIR_STS, 0x17, 0x17);
+   /* Set compare and compare mask */
+   wbcir_set_bits(data->wbase + WBCIR_REG_WCEIR_INDEX,
+  WBCIR_REGSEL_COMPARE | WBCIR_REG_ADDR0,
+  0x3F);
+   outsb(data->wbase + WBCIR_REG_WCEIR_DATA, match, 11);
+   wbcir_set_bits(data->wbase + WBCIR_REG_WCEIR_INDEX,
+  WBCIR_REGSEL_MASK | WBCIR_REG_ADDR0,
+  0x3F);
+   outsb(data->wbase + WBCIR_REG_WCEIR_DATA, mask, 11);
 
-   /* Clear BUFF_EN, Clear END_EN, Set MATCH_EN */
-   wbcir_set_bits(data->wbase + WBCIR_REG_WCEIR_EV_EN, 

Re: [PATCH v6 1/2] media: i2c/ov5645: add the device tree binding document

2016-10-14 Thread Todor Tomov
Hi Laurent,

Thank you for the review.

On 09/08/2016 03:22 PM, Laurent Pinchart wrote:
> Hi Todor,
> 
> Thank you for the patch.
> 
> On Thursday 08 Sep 2016 12:13:54 Todor Tomov wrote:
>> Add the document for ov5645 device tree binding.
>>
>> Signed-off-by: Todor Tomov 
>> ---
>>  .../devicetree/bindings/media/i2c/ov5645.txt   | 52 +++
>>  1 file changed, 52 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/media/i2c/ov5645.txt
>>
>> diff --git a/Documentation/devicetree/bindings/media/i2c/ov5645.txt
>> b/Documentation/devicetree/bindings/media/i2c/ov5645.txt new file mode
>> 100644
>> index 000..bcf6dba
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/media/i2c/ov5645.txt
>> @@ -0,0 +1,52 @@
>> +* Omnivision 1/4-Inch 5Mp CMOS Digital Image Sensor
>> +
>> +The Omnivision OV5645 is a 1/4-Inch CMOS active pixel digital image sensor
>> with +an active array size of 2592H x 1944V. It is programmable through a
>> serial I2C +interface.
>> +
>> +Required Properties:
>> +- compatible: Value should be "ovti,ov5645".
>> +- clocks: Reference to the xclk clock.
>> +- clock-names: Should be "xclk".
>> +- clock-frequency: Frequency of the xclk clock.
>> +- enable-gpios: Chip enable GPIO. Polarity is GPIO_ACTIVE_HIGH.
>> +- reset-gpios: Chip reset GPIO. Polarity is GPIO_ACTIVE_LOW.
> 
> Shouldn't the enable and reset GPIOs be optional ?
I don't think so. The operations on the GPIOs are part of the power up sequence
of the sensor so we must have control over them to execute the exact sequence.

> 
>> +- vdddo-supply: Chip digital IO regulator.
>> +- vdda-supply: Chip analog regulator.
>> +- vddd-supply: Chip digital core regulator.
>> +
>> +The device node must contain one 'port' child node for its digital output
>> +video port, in accordance with the video interface bindings defined in
>> +Documentation/devicetree/bindings/media/video-interfaces.txt.
>> +
>> +Example:
>> +
>> + {
>> +...
>> +
>> +ov5645: ov5645@78 {
>> +compatible = "ovti,ov5645";
>> +reg = <0x78>;
>> +
>> +enable-gpios = < 6 GPIO_ACTIVE_HIGH>;
>> +reset-gpios = < 20 GPIO_ACTIVE_LOW>;
>> +pinctrl-names = "default";
>> +pinctrl-0 = <_rear_default>;
>> +
>> +clocks = < 200>;
>> +clock-names = "xclk";
>> +clock-frequency = <2388>;
>> +
>> +vdddo-supply = <_dovdd_1v8>;
>> +vdda-supply = <_avdd_2v8>;
>> +vddd-supply = <_dvdd_1v2>;
>> +
>> +port {
>> +ov5645_ep: endpoint {
>> +clock-lanes = <1>;
>> +data-lanes = <0 2>;
>> +remote-endpoint = <_ep>;
>> +};
>> +};
>> +};
>> +};
> 

-- 
Best regards,
Todor Tomov
--
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 1/5] [media] winbond-cir: Use kmalloc_array() in wbcir_tx()

2016-10-14 Thread SF Markus Elfring
From: Markus Elfring 
Date: Fri, 14 Oct 2016 07:19:00 +0200

A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/media/rc/winbond-cir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index 95ae60e..59050f5 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -660,7 +660,7 @@ wbcir_tx(struct rc_dev *dev, unsigned *b, unsigned count)
unsigned i;
unsigned long flags;
 
-   buf = kmalloc(count * sizeof(*b), GFP_KERNEL);
+   buf = kmalloc_array(count, sizeof(*b), GFP_KERNEL);
if (!buf)
return -ENOMEM;
 
-- 
2.10.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 5/5] [media] winbond-cir: Move a variable assignment in two functions

2016-10-14 Thread SF Markus Elfring
From: Markus Elfring 
Date: Fri, 14 Oct 2016 13:13:11 +0200

Move the assignment for the local variable "data" behind the source code
for condition checks by these functions.

Signed-off-by: Markus Elfring 
---
 drivers/media/rc/winbond-cir.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index 3d286b9..716b1fe 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -566,7 +566,7 @@ wbcir_set_carrier_report(struct rc_dev *dev, int enable)
 static int
 wbcir_txcarrier(struct rc_dev *dev, u32 carrier)
 {
-   struct wbcir_data *data = dev->priv;
+   struct wbcir_data *data;
unsigned long flags;
u8 val;
u32 freq;
@@ -592,6 +592,7 @@ wbcir_txcarrier(struct rc_dev *dev, u32 carrier)
break;
}
 
+   data = dev->priv;
spin_lock_irqsave(>spinlock, flags);
if (data->txstate != WBCIR_TXSTATE_INACTIVE) {
spin_unlock_irqrestore(>spinlock, flags);
@@ -611,7 +612,7 @@ wbcir_txcarrier(struct rc_dev *dev, u32 carrier)
 static int
 wbcir_txmask(struct rc_dev *dev, u32 mask)
 {
-   struct wbcir_data *data = dev->priv;
+   struct wbcir_data *data;
unsigned long flags;
u8 val;
 
@@ -637,6 +638,7 @@ wbcir_txmask(struct rc_dev *dev, u32 mask)
return -EINVAL;
}
 
+   data = dev->priv;
spin_lock_irqsave(>spinlock, flags);
if (data->txstate != WBCIR_TXSTATE_INACTIVE) {
spin_unlock_irqrestore(>spinlock, flags);
-- 
2.10.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 2/5] [media] winbond-cir: Move a variable assignment in wbcir_tx()

2016-10-14 Thread SF Markus Elfring
From: Markus Elfring 
Date: Fri, 14 Oct 2016 07:34:46 +0200

Move the assignment for the local variable "data" behind the source code
for a memory allocation by this function.

Signed-off-by: Markus Elfring 
---
 drivers/media/rc/winbond-cir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index 59050f5..fd997f0 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -655,7 +655,7 @@ wbcir_txmask(struct rc_dev *dev, u32 mask)
 static int
 wbcir_tx(struct rc_dev *dev, unsigned *b, unsigned count)
 {
-   struct wbcir_data *data = dev->priv;
+   struct wbcir_data *data;
unsigned *buf;
unsigned i;
unsigned long flags;
@@ -668,6 +668,7 @@ wbcir_tx(struct rc_dev *dev, unsigned *b, unsigned count)
for (i = 0; i < count; i++)
buf[i] = DIV_ROUND_CLOSEST(b[i], 10);
 
+   data = dev->priv;
/* Not sure if this is possible, but better safe than sorry */
spin_lock_irqsave(>spinlock, flags);
if (data->txstate != WBCIR_TXSTATE_INACTIVE) {
-- 
2.10.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: [media] RedRat3: Move two assignments in redrat3_transmit_ir()?

2016-10-14 Thread SF Markus Elfring
> The original code was correct.

Your view can be appropriate for this function implementation to some degree.

I got the impression that it contains the specification of assignments
which will happen a bit too early here.
Is this a weakness for which software developers can care about?

Regards,
Markus
--
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 2/2] [media] vb2: Add support for use_dma_bidirectional queue flag

2016-10-14 Thread Thierry Escande
From: Pawel Osciak 

When this flag is set for CAPTURE queues by the driver on calling
vb2_queue_init(), it forces the buffers on the queue to be
allocated/mapped with DMA_BIDIRECTIONAL direction flag, instead of
DMA_FROM_DEVICE. This allows the device not only to write to the
buffers, but also read out from them. This may be useful e.g. for codec
hardware, which may be using CAPTURE buffers as reference to decode
other buffers.

This flag is ignored for OUTPUT queues, as we don't want to allow HW to
be able to write to OUTPUT buffers.

Signed-off-by: Pawel Osciak 
Tested-by: Pawel Osciak 
Reviewed-by: Tomasz Figa 
Signed-off-by: Thierry Escande 
---
 drivers/media/v4l2-core/videobuf2-v4l2.c | 8 ++--
 include/media/videobuf2-core.h   | 4 
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c 
b/drivers/media/v4l2-core/videobuf2-v4l2.c
index fde1e2d..9255291 100644
--- a/drivers/media/v4l2-core/videobuf2-v4l2.c
+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
@@ -659,8 +659,12 @@ int vb2_queue_init(struct vb2_queue *q)
 * queues will always initialize waiting_for_buffers to false.
 */
q->quirk_poll_must_check_waiting_for_buffers = true;
-   q->dma_dir = V4L2_TYPE_IS_OUTPUT(q->type)
-  ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
+
+   if (V4L2_TYPE_IS_OUTPUT(q->type))
+   q->dma_dir = DMA_TO_DEVICE;
+   else
+   q->dma_dir = q->use_dma_bidirectional
+  ? DMA_BIDIRECTIONAL : DMA_FROM_DEVICE;
 
return vb2_core_queue_init(q);
 }
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 38410dd..e613c74 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -433,6 +433,9 @@ struct vb2_buf_ops {
  * @quirk_poll_must_check_waiting_for_buffers: Return POLLERR at poll when QBUF
  *  has not been called. This is a vb1 idiom that has been adopted
  *  also by vb2.
+ * @use_dma_bidirectional: use DMA_BIDIRECTIONAL for CAPTURE buffers; this
+ * allows HW to read from the CAPTURE buffers in
+ * addition to writing; ignored for OUTPUT queues
  * @lock:  pointer to a mutex that protects the vb2_queue struct. The
  * driver can set this to a mutex to let the v4l2 core serialize
  * the queuing ioctls. If the driver wants to handle locking
@@ -500,6 +503,7 @@ struct vb2_queue {
unsignedfileio_write_immediately:1;
unsignedallow_zero_bytesused:1;
unsigned   quirk_poll_must_check_waiting_for_buffers:1;
+   unsigneduse_dma_bidirectional:1;
 
struct mutex*lock;
void*owner;
-- 
2.7.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 1/2] [media] vb2: Store dma_dir in vb2_queue

2016-10-14 Thread Thierry Escande
From: Pawel Osciak 

Store dma_dir in struct vb2_queue and reuse it, instead of recalculating
it each time.

Signed-off-by: Pawel Osciak 
Tested-by: Pawel Osciak 
Reviewed-by: Tomasz Figa 
Reviewed-by: Owen Lin 
Signed-off-by: Thierry Escande 
---
 drivers/media/v4l2-core/videobuf2-core.c | 12 +++-
 drivers/media/v4l2-core/videobuf2-v4l2.c |  2 ++
 include/media/videobuf2-core.h   |  2 ++
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
b/drivers/media/v4l2-core/videobuf2-core.c
index 21900202..f12103c 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -194,8 +194,6 @@ static void __enqueue_in_driver(struct vb2_buffer *vb);
 static int __vb2_buf_mem_alloc(struct vb2_buffer *vb)
 {
struct vb2_queue *q = vb->vb2_queue;
-   enum dma_data_direction dma_dir =
-   q->is_output ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
void *mem_priv;
int plane;
int ret = -ENOMEM;
@@ -209,7 +207,7 @@ static int __vb2_buf_mem_alloc(struct vb2_buffer *vb)
 
mem_priv = call_ptr_memop(vb, alloc,
q->alloc_devs[plane] ? : q->dev,
-   q->dma_attrs, size, dma_dir, q->gfp_flags);
+   q->dma_attrs, size, q->dma_dir, q->gfp_flags);
if (IS_ERR(mem_priv)) {
if (mem_priv)
ret = PTR_ERR(mem_priv);
@@ -978,8 +976,6 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const void 
*pb)
void *mem_priv;
unsigned int plane;
int ret = 0;
-   enum dma_data_direction dma_dir =
-   q->is_output ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
bool reacquired = vb->planes[0].mem_priv == NULL;
 
memset(planes, 0, sizeof(planes[0]) * vb->num_planes);
@@ -1030,7 +1026,7 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const 
void *pb)
mem_priv = call_ptr_memop(vb, get_userptr,
q->alloc_devs[plane] ? : q->dev,
planes[plane].m.userptr,
-   planes[plane].length, dma_dir);
+   planes[plane].length, q->dma_dir);
if (IS_ERR(mem_priv)) {
dprintk(1, "failed acquiring userspace "
"memory for plane %d\n", plane);
@@ -1096,8 +1092,6 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const 
void *pb)
void *mem_priv;
unsigned int plane;
int ret = 0;
-   enum dma_data_direction dma_dir =
-   q->is_output ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
bool reacquired = vb->planes[0].mem_priv == NULL;
 
memset(planes, 0, sizeof(planes[0]) * vb->num_planes);
@@ -1156,7 +1150,7 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const 
void *pb)
/* Acquire each plane's memory */
mem_priv = call_ptr_memop(vb, attach_dmabuf,
q->alloc_devs[plane] ? : q->dev,
-   dbuf, planes[plane].length, dma_dir);
+   dbuf, planes[plane].length, q->dma_dir);
if (IS_ERR(mem_priv)) {
dprintk(1, "failed to attach dmabuf\n");
ret = PTR_ERR(mem_priv);
diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c 
b/drivers/media/v4l2-core/videobuf2-v4l2.c
index 52ef883..fde1e2d 100644
--- a/drivers/media/v4l2-core/videobuf2-v4l2.c
+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
@@ -659,6 +659,8 @@ int vb2_queue_init(struct vb2_queue *q)
 * queues will always initialize waiting_for_buffers to false.
 */
q->quirk_poll_must_check_waiting_for_buffers = true;
+   q->dma_dir = V4L2_TYPE_IS_OUTPUT(q->type)
+  ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
 
return vb2_core_queue_init(q);
 }
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index ac5898a..38410dd 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -489,6 +489,7 @@ struct vb2_buf_ops {
  * when a buffer with the V4L2_BUF_FLAG_LAST is dequeued.
  * @fileio:file io emulator internal data, used only if emulator is active
  * @threadio:  thread io internal data, used only if thread is active
+ * @dma_dir:   DMA direction to use for buffers on this queue
  */
 struct vb2_queue {
unsigned inttype;
@@ -540,6 +541,7 @@ struct vb2_queue {
 
struct vb2_fileio_data  *fileio;
struct vb2_threadio_data*threadio;
+   enum dma_data_direction dma_dir;
 
 #ifdef CONFIG_VIDEO_ADV_DEBUG
/*
-- 
2.7.4

--
To unsubscribe 

[PATCH 0/2] [media] DMA direction support in vb2_queue

2016-10-14 Thread Thierry Escande
Hi,

This series adds a dma_dir field to the vb2_queue structure in order to
store the DMA direction once for all in vb2_queue_init();

It also adds a new use_dma_bidirectional flag to the vb2_queue structure
allowing the hardware to read from the CAPTURE buffer. This flag is
ignored for OUTPUT queues. This is used on ChromeOS by the rockchip-vpu
driver.

Pawel Osciak (2):
  [media] vb2: Store dma_dir in vb2_queue
  [media] vb2: Add support for use_dma_bidirectional queue flag

 drivers/media/v4l2-core/videobuf2-core.c | 12 +++-
 drivers/media/v4l2-core/videobuf2-v4l2.c |  6 ++
 include/media/videobuf2-core.h   |  6 ++
 3 files changed, 15 insertions(+), 9 deletions(-)

-- 
2.7.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 0/5] [media] winbond-cir: Fine-tuning for four function implementations

2016-10-14 Thread SF Markus Elfring
From: Markus Elfring 
Date: Fri, 14 Oct 2016 13:24:35 +0200

A few update suggestions were taken into account
from static source code analysis.

Markus Elfring (5):
  Use kmalloc_array() in wbcir_tx()
  Move a variable assignment in wbcir_tx()
  Move assignments for three variables in wbcir_shutdown()
  One variable and its check less in wbcir_shutdown() after error detection
  Move a variable assignment in two functions

 drivers/media/rc/winbond-cir.c | 95 +++---
 1 file changed, 44 insertions(+), 51 deletions(-)

-- 
2.10.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: [RFC PATCH 00/11] Introduce writeback connectors

2016-10-14 Thread Daniel Vetter
On Fri, Oct 14, 2016 at 2:39 PM, Brian Starkey  wrote:
>> - Besides the above property, writeback hardware can have provisions
>> for scaling, color space conversion and rotation. This would mean that
>> we'd eventually add more writeback specific props/params in
>> drm_connector/drm_connector_state. Would we be okay adding more such
>> props for connectors?
>
>
> I've wondered the same thing about bloating non-writeback connectors
> with writeback-specific stuff. If it does become significant, maybe
> we should subclass drm_connector and add a drm_writeback_state pointer
> to drm_connector_state.

No pionters needed, just embedded drm_connector_state into
drm_writeback_connector_state as the "base" member. Then we can
provide ready-made atomic_set/get_property functions for the aditional
writeback functionality.

But tbh I'd only start doing that once we have a few more. It's purely
an implementation change, with no effect on userspace. And if you go
with my drm_writeback_connector_init idea, it won't even be an issue
for drivers.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
--
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 18/22] [media] imx-ipuv3-csi: support downsizing

2016-10-14 Thread Philipp Zabel
Am Freitag, den 07.10.2016, 21:01 +0200 schrieb Marek Vasut:
> On 10/07/2016 06:01 PM, Philipp Zabel wrote:
> > Add support for the CSI internal horizontal and vertical downsizing.
> > 
> > Signed-off-by: Philipp Zabel 
> > ---
> >  drivers/media/platform/imx/imx-ipuv3-csi.c | 20 ++--
> >  1 file changed, 14 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/media/platform/imx/imx-ipuv3-csi.c 
> > b/drivers/media/platform/imx/imx-ipuv3-csi.c
> > index 699460e6..e8a6a7b 100644
> > --- a/drivers/media/platform/imx/imx-ipuv3-csi.c
> > +++ b/drivers/media/platform/imx/imx-ipuv3-csi.c
> > @@ -167,8 +167,16 @@ static int ipucsi_subdev_set_format(struct v4l2_subdev 
> > *sd,
> > width = clamp_t(unsigned int, sdformat->format.width, 16, 8192);
> > height = clamp_t(unsigned int, sdformat->format.height, 16, 
> > 4096);
> > } else {
> > -   width = ipucsi->format_mbus[0].width;
> > -   height = ipucsi->format_mbus[0].height;
> > +   if (sdformat->format.width <
> > +   (ipucsi->format_mbus[0].width * 3 / 4))
> > +   width = ipucsi->format_mbus[0].width / 2;
> > +   else
> > +   width = ipucsi->format_mbus[0].width;
> > +   if (sdformat->format.height <
> > +   (ipucsi->format_mbus[0].height * 3 / 4))
> > +   height = ipucsi->format_mbus[0].height / 2;
> > +   else
> > +   height = ipucsi->format_mbus[0].height;
> > }
> >  
> > mbusformat = __ipucsi_get_pad_format(sd, cfg, sdformat->pad,
> > @@ -212,14 +220,14 @@ static int ipucsi_subdev_s_stream(struct v4l2_subdev 
> > *sd, int enable)
> > window.width = fmt[0].width;
> > window.height = fmt[0].height;
> > ipu_csi_set_window(ipucsi->csi, );
> > +   ipu_csi_set_downsize(ipucsi->csi,
> > +fmt[0].width == 2 * fmt[1].width,
> > +fmt[0].height == 2 * fmt[1].height);
> >  
> > /* Is CSI data source MCT (MIPI)? */
> > mux_mct = (mbus_config.type == V4L2_MBUS_CSI2);
> > -
> > ipu_set_csi_src_mux(ipucsi->ipu, ipucsi->id, mux_mct);
> > -   if (mux_mct)
> > -   ipu_csi_set_mipi_datatype(ipucsi->csi, /*VC*/ 0,
> > - [0]);
> > +   ipu_csi_set_mipi_datatype(ipucsi->csi, /*VC*/ 0, [0]);
> 
> This probably needs fixing , so that the correct VC is passed in ?

Absolutely, right now I don't know how though.
We are still missing API to set the MIPI CSI-2 virtual channel.

regards
Philipp

--
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: [RFC PATCH 00/11] Introduce writeback connectors

2016-10-14 Thread Brian Starkey

Hi Archit,

On Fri, Oct 14, 2016 at 04:20:14PM +0530, Archit Taneja wrote:

Hi Brian,

On 10/11/2016 08:23 PM, Brian Starkey wrote:

Hi,

This RFC series introduces a new connector type:
DRM_MODE_CONNECTOR_WRITEBACK
It is a follow-on from a previous discussion: [1]

Writeback connectors are used to expose the memory writeback engines
found in some display controllers, which can write a CRTC's
composition result to a memory buffer.
This is useful e.g. for testing, screen-recording, screenshots,
wireless display, display cloning, memory-to-memory composition.

Patches 1-7 include the core framework changes required, and patches
8-11 implement a writeback connector for the Mali-DP writeback engine.
The Mali-DP patches depend on this other series: [2].

The connector is given the FB_ID property for the output framebuffer,
and two new read-only properties: PIXEL_FORMATS and
PIXEL_FORMATS_SIZE, which expose the supported framebuffer pixel
formats of the engine.

The EDID property is not exposed for writeback connectors.

Writeback connector usage:
--
Due to connector routing changes being treated as "full modeset"
operations, any client which wishes to use a writeback connector
should include the connector in every modeset. The writeback will not
actually become active until a framebuffer is attached.

The writeback itself is enabled by attaching a framebuffer to the
FB_ID property of the connector. The driver must then ensure that the
CRTC content of that atomic commit is written into the framebuffer.

The writeback works in a one-shot mode with each atomic commit. This
prevents the same content from being written multiple times.
In some cases (front-buffer rendering) there might be a desire for
continuous operation - I think a property could be added later for
this kind of control.

Writeback can be disabled by setting FB_ID to zero.

Known issues:
-
* I'm not sure what "DPMS" should mean for writeback connectors.
  It could be used to disable writeback (even when a framebuffer is
  attached), or it could be hidden entirely (which would break the
  legacy DPMS call for writeback connectors).
* With Daniel's recent re-iteration of the userspace API rules, I
  fully expect to provide some userspace code to support this. The
  question is what, and where? We want to use writeback for testing,
  so perhaps some tests in igt is suitable.
* Documentation. Probably some portion of this cover letter needs to
  make it into Documentation/
* Synchronisation. Our hardware will finish the writeback by the next
  vsync. I've not implemented fence support here, but it would be an
  obvious addition.

See Also:
-
[1] https://lists.freedesktop.org/archives/dri-devel/2016-July/113197.html
[2] https://lists.freedesktop.org/archives/dri-devel/2016-October/120486.html

I welcome any comments, especially if this approach does/doesn't fit
well with anyone else's hardware.


Thanks for working on this! Some points below.

- Writeback hardware generally allows us to specify the region within
the framebuffer we want to write to. It's analogous to the SRC_X/Y/W/H
plane properties. We could have similar props for the writeback
connectors, and maybe set them to the FB_ID dimensions if they aren't
configured by userspace.

- Besides the above property, writeback hardware can have provisions
for scaling, color space conversion and rotation. This would mean that
we'd eventually add more writeback specific props/params in
drm_connector/drm_connector_state. Would we be okay adding more such
props for connectors?


I've wondered the same thing about bloating non-writeback connectors
with writeback-specific stuff. If it does become significant, maybe
we should subclass drm_connector and add a drm_writeback_state pointer
to drm_connector_state.

Ville touched on scaling support previously, suggesting adding a
fixed_mode property (for all types of connectors) - on writeback this
would represent scaling the framebuffer, and on normal connectors it
could control output scaling (like panel-fitting).

Certainly destination coords, color-space converstion etc. are things
that are worth adding, but IMO I'd rather keep this initial
implementation small so we can enable the basic case right away. For
the most part, the additional things are "just properties" which
should be easily added later without impacting the overall interface.

Cheers,
Brian


Thanks,
Archit



Thanks,

-Brian

---

Brian Starkey (10):
 drm: add writeback connector type
 drm/fb-helper: skip writeback connectors
 drm: extract CRTC/plane disable from drm_framebuffer_remove
 drm: add __drm_framebuffer_remove_atomic
 drm: add fb to connector state
 drm: expose fb_id property for writeback connectors
 drm: add writeback-connector pixel format properties
 drm: mali-dp: rename malidp_input_format
 drm: mali-dp: add RGB writeback formats for DP550/DP650
 drm: mali-dp: add writeback connector

Liviu Dudau (1):
 drm: mali-dp: Add support for 

Re: [PATCH 1/2] devicetree/bindings: display: Add bindings for LVDS panels

2016-10-14 Thread Rob Herring
On Sun, Oct 9, 2016 at 11:33 AM, Laurent Pinchart
 wrote:
> Hi Rob,
>
> On Saturday 08 Oct 2016 20:29:39 Rob Herring wrote:
>> On Tue, Oct 04, 2016 at 07:23:29PM +0300, Laurent Pinchart wrote:
>> > LVDS is a physical layer specification defined in ANSI/TIA/EIA-644-A.
>> > Multiple incompatible data link layers have been used over time to
>> > transmit image data to LVDS panels. This binding supports display panels
>> > compatible with the JEIDA-59-1999, Open-LDI and VESA SWPG
>> > specifications.
>> >
>> > Signed-off-by: Laurent Pinchart
>> > 
>> > ---
>> >
>> >  .../bindings/display/panel/panel-lvds.txt  | 119 
>> >  1 file changed, 119 insertions(+)
>> >  create mode 100644
>> >  Documentation/devicetree/bindings/display/panel/panel-lvds.txt>
>> > diff --git
>> > a/Documentation/devicetree/bindings/display/panel/panel-lvds.txt
>> > b/Documentation/devicetree/bindings/display/panel/panel-lvds.txt new file
>> > mode 100644
>> > index ..250861f2673e
>> > --- /dev/null
>> > +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.txt
>> > @@ -0,0 +1,119 @@
>> > +Generic LVDS Panel
>> > +==
>> > +
>> > +LVDS is a physical layer specification defined in ANSI/TIA/EIA-644-A.
>> > Multiple
>> > +incompatible data link layers have been used over time to transmit image
>> > data
>> > +to LVDS panels. This bindings supports display panels compatible with the
>> > +following specifications.
>> > +
>> > +[JEIDA] "Digital Interface Standards for Monitor", JEIDA-59-1999,
>> > February
>> > +1999 (Version 1.0), Japan Electronic Industry Development Association
>> > (JEIDA)
>> > +[LDI] "Open LVDS Display Interface", May 1999 (Version 0.95), National
>> > +Semiconductor
>> > +[VESA] "VESA Notebook Panel Standard", October 2007 (Version 1.0), Video
>> > +Electronics Standards Association (VESA)
>> > +
>> > +Device compatible with those specifications have been marketed under the
>> > +FPD-Link and FlatLink brands.
>> > +
>> > +
>> > +Required properties:
>> > +- compatible: shall contain "panel-lvds"
>>
>> Maybe as a fallback, but on its own, no way.
>
> Which brings an interesting question: when designing generic DT bindings,
> what's the rule regarding

Call it "simple" so I can easily NAK it. :)

Define a generic structure, not a single binding trying to serve all.

>
>> > +- width-mm: panel display width in millimeters
>> > +- height-mm: panel display height in millimeters
>>
>> This is already documented for all panels IIRC.
>
> Note that this DT binding has nothing to do with the simple-panel binding. It
> is instead similar to the panel-dpi and panel-dsi-cm bindings (which currently
> don't but should specify the panel size in DT). The LVDS panel driver will
> *not* include any panel-specific information such as size or timings, these
> are specified in DT.

The panel bindings aren't really different. The biggest difference was
location in the tree, but we now generally allow panels to be either a
child of the LCD controller or connected with OF graph. We probably
need to work on restructuring the panel bindings a bit. We should have
an inheritance with a base panel binding of things like size, label,
graph, backlight, etc, then perhaps an interface specific bindings for
LVDS, DSI, and parallel, then a panel specific binding. With this the
panel specific binding is typically just a compatible string and which
inherited properties apply to it.


>> > +- data-mapping: the color signals mapping order, "jeida-18", "jeida-24"
>> > +  or "vesa-24"
>>
>> Maybe this should be part of the compatible.
>
> I've thought about it, but given that some panels support selecting between
> multiple modes (through a mode pin that is usually hardwired), I believe a
> separate DT property makes sense.

Okay.

> Furthermore, LVDS data organization is controlled by the combination of both
> data-mapping and data-mirror. It makes little sense from my point of view to
> handle one as part of the compatible string and the other one as a separate
> property.
>
>> > +Optional properties:
>> > +- label: a symbolic name for the panel
>>
>> Could be for any panel or display connector.
>
> Yes, but I'm not sure to understand how that's relevant :-)

Meaning it should be a common property.

>> > +- avdd-supply: reference to the regulator that powers the panel
>> analog supply
>> > +- dvdd-supply: reference to the regulator that powers the panel digital
>> > supply
>>
>> Which one has to be powered on first, what voltage, and with what time
>> in between? This is why "generic" or "simple" bindings don't work.
>
> The above-mentioned specifications also define connectors, pinouts and power
> supplies, but many LVDS panels compatible with the LVDS physical and data
> layers use a different connector with small differences in power supplies.
>
> I believe the voltage is irrelevant here, it doesn't need to be 

Re: [RFC PATCH 00/11] Introduce writeback connectors

2016-10-14 Thread Ville Syrjälä
On Fri, Oct 14, 2016 at 01:39:15PM +0100, Brian Starkey wrote:
> Hi Archit,
> 
> On Fri, Oct 14, 2016 at 04:20:14PM +0530, Archit Taneja wrote:
> >Hi Brian,
> >
> >On 10/11/2016 08:23 PM, Brian Starkey wrote:
> >>Hi,
> >>
> >>This RFC series introduces a new connector type:
> >> DRM_MODE_CONNECTOR_WRITEBACK
> >>It is a follow-on from a previous discussion: [1]
> >>
> >>Writeback connectors are used to expose the memory writeback engines
> >>found in some display controllers, which can write a CRTC's
> >>composition result to a memory buffer.
> >>This is useful e.g. for testing, screen-recording, screenshots,
> >>wireless display, display cloning, memory-to-memory composition.
> >>
> >>Patches 1-7 include the core framework changes required, and patches
> >>8-11 implement a writeback connector for the Mali-DP writeback engine.
> >>The Mali-DP patches depend on this other series: [2].
> >>
> >>The connector is given the FB_ID property for the output framebuffer,
> >>and two new read-only properties: PIXEL_FORMATS and
> >>PIXEL_FORMATS_SIZE, which expose the supported framebuffer pixel
> >>formats of the engine.
> >>
> >>The EDID property is not exposed for writeback connectors.
> >>
> >>Writeback connector usage:
> >>--
> >>Due to connector routing changes being treated as "full modeset"
> >>operations, any client which wishes to use a writeback connector
> >>should include the connector in every modeset. The writeback will not
> >>actually become active until a framebuffer is attached.
> >>
> >>The writeback itself is enabled by attaching a framebuffer to the
> >>FB_ID property of the connector. The driver must then ensure that the
> >>CRTC content of that atomic commit is written into the framebuffer.
> >>
> >>The writeback works in a one-shot mode with each atomic commit. This
> >>prevents the same content from being written multiple times.
> >>In some cases (front-buffer rendering) there might be a desire for
> >>continuous operation - I think a property could be added later for
> >>this kind of control.
> >>
> >>Writeback can be disabled by setting FB_ID to zero.
> >>
> >>Known issues:
> >>-
> >> * I'm not sure what "DPMS" should mean for writeback connectors.
> >>   It could be used to disable writeback (even when a framebuffer is
> >>   attached), or it could be hidden entirely (which would break the
> >>   legacy DPMS call for writeback connectors).
> >> * With Daniel's recent re-iteration of the userspace API rules, I
> >>   fully expect to provide some userspace code to support this. The
> >>   question is what, and where? We want to use writeback for testing,
> >>   so perhaps some tests in igt is suitable.
> >> * Documentation. Probably some portion of this cover letter needs to
> >>   make it into Documentation/
> >> * Synchronisation. Our hardware will finish the writeback by the next
> >>   vsync. I've not implemented fence support here, but it would be an
> >>   obvious addition.
> >>
> >>See Also:
> >>-
> >>[1] https://lists.freedesktop.org/archives/dri-devel/2016-July/113197.html
> >>[2] 
> >>https://lists.freedesktop.org/archives/dri-devel/2016-October/120486.html
> >>
> >>I welcome any comments, especially if this approach does/doesn't fit
> >>well with anyone else's hardware.
> >
> >Thanks for working on this! Some points below.
> >
> >- Writeback hardware generally allows us to specify the region within
> >the framebuffer we want to write to. It's analogous to the SRC_X/Y/W/H
> >plane properties. We could have similar props for the writeback
> >connectors, and maybe set them to the FB_ID dimensions if they aren't
> >configured by userspace.
> >
> >- Besides the above property, writeback hardware can have provisions
> >for scaling, color space conversion and rotation. This would mean that
> >we'd eventually add more writeback specific props/params in
> >drm_connector/drm_connector_state. Would we be okay adding more such
> >props for connectors?
> 
> I've wondered the same thing about bloating non-writeback connectors
> with writeback-specific stuff. If it does become significant, maybe
> we should subclass drm_connector and add a drm_writeback_state pointer
> to drm_connector_state.
> 
> Ville touched on scaling support previously, suggesting adding a
> fixed_mode property (for all types of connectors) - on writeback this
> would represent scaling the framebuffer, and on normal connectors it
> could control output scaling (like panel-fitting).

We got some patches [1] posted for i915 recently that added a bunch of new
properties to control post-blending scaling, but I'm not sure I like the
approach since it seems harder to reconcile with the current way we deal
with scaling for eDP/LVDS/DSI/etc. So I'm still somewhat partial to the
fixed mode idea. Just FYI.

[1] https://lists.freedesktop.org/archives/intel-gfx/2016-August/105557.html

> 
> Certainly destination coords, color-space converstion etc. are things
> that are worth adding, but IMO 

[PATCH] [media] videobuf2-dma-contig: Support cacheable MMAP

2016-10-14 Thread Thierry Escande
From: Heng-Ruey Hsu 

DMA allocations for MMAP type are uncached by default. But for
some cases, CPU has to access the buffers. ie: memcpy for format
converter. Supporting cacheable MMAP improves huge performance.

Signed-off-by: Heng-Ruey Hsu 
Tested-by: Heng-ruey Hsu 
Reviewed-by: Tomasz Figa 
Signed-off-by: Thierry Escande 
---
 drivers/media/v4l2-core/videobuf2-dma-contig.c | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c 
b/drivers/media/v4l2-core/videobuf2-dma-contig.c
index fb6a177..c953c24 100644
--- a/drivers/media/v4l2-core/videobuf2-dma-contig.c
+++ b/drivers/media/v4l2-core/videobuf2-dma-contig.c
@@ -42,6 +42,12 @@ struct vb2_dc_buf {
 };
 
 /*/
+/*   Forward declarations*/
+/*/
+
+static struct sg_table *vb2_dc_get_base_sgt(struct vb2_dc_buf *buf);
+
+/*/
 /*scatterlist table functions*/
 /*/
 
@@ -129,6 +135,10 @@ static void vb2_dc_put(void *buf_priv)
sg_free_table(buf->sgt_base);
kfree(buf->sgt_base);
}
+   if (buf->dma_sgt) {
+   sg_free_table(buf->dma_sgt);
+   kfree(buf->dma_sgt);
+   }
dma_free_attrs(buf->dev, buf->size, buf->cookie, buf->dma_addr,
   buf->attrs);
put_device(buf->dev);
@@ -170,6 +180,10 @@ static void *vb2_dc_alloc(struct device *dev, unsigned 
long attrs,
buf->handler.put = vb2_dc_put;
buf->handler.arg = buf;
 
+   if (!(buf->attrs & DMA_ATTR_NO_KERNEL_MAPPING) &&
+(buf->attrs & DMA_ATTR_NON_CONSISTENT))
+   buf->dma_sgt = vb2_dc_get_base_sgt(buf);
+
atomic_inc(>refcount);
 
return buf;
@@ -205,6 +219,11 @@ static int vb2_dc_mmap(void *buf_priv, struct 
vm_area_struct *vma)
 
vma->vm_ops->open(vma);
 
+   if ((buf->attrs & DMA_ATTR_NO_KERNEL_MAPPING) &&
+   (buf->attrs & DMA_ATTR_NON_CONSISTENT) &&
+   !buf->dma_sgt)
+   buf->dma_sgt = vb2_dc_get_base_sgt(buf);
+
pr_debug("%s: mapped dma addr 0x%08lx at 0x%08lx, size %ld\n",
__func__, (unsigned long)buf->dma_addr, vma->vm_start,
buf->size);
-- 
2.7.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


Re: [PATCH 02/22] [media] v4l2-async: allow subdevices to add further subdevices to the notifier waiting list

2016-10-14 Thread Philipp Zabel
Am Donnerstag, den 13.10.2016, 14:56 +0300 schrieb Sakari Ailus:
> Hi Philipp,
> 
> On Wed, Oct 12, 2016 at 03:26:48PM +0200, Philipp Zabel wrote:
> > On Fri, Oct 7, 2016 at 11:52 PM, Sakari Ailus  wrote:
> > > Hi Philipp,
> > >
> > > On Fri, Oct 07, 2016 at 06:00:47PM +0200, Philipp Zabel wrote:
> > >> Currently the v4l2_async_notifier needs to be given a list of matches
> > >> for all expected subdevices on creation. When chaining subdevices that
> > >> are asynchronously probed via device tree, the bridge device that sets
> > >> up the notifier does not know the complete list of subdevices, as it
> > >> can only parse its own device tree node to obtain information about
> > >> the nearest neighbor subdevices.
> > >> To support indirectly connected subdevices, we need to support amending
> > >> the existing notifier waiting list with newly found neighbor subdevices
> > >> with each registered subdevice.
> > >
> > > Could you elaborate a little what's the exact use case for this? What kind
> > > of a device?
> > 
> > On i.MX6 there's a
> > 
> > DW MIPI CSI2 host -> Mux -> IPU/CSI
> > 
> > path and all three are asynchronous subdevices in my patchset and only
> > the last one is directly known to the media device from the device
> > tree, since each driver should only parse its own device tree node an
> > can not follow the of_graph over multiple steps.
> 
> Ok. Are all these devices part of the SoC? Is the mux doing something else
> than just sitting in between the two? :-)

Yes, in this case the muxes are part of the SoC. Depending on the SoC
variant they have a different number of inputs, and they are controlled
via the IOMUXC block that also controls the pin configuration. They
don't have any additional functionality beyond selecting one active
input.

regards
Philipp


--
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 02/22] [media] v4l2-async: allow subdevices to add further subdevices to the notifier waiting list

2016-10-14 Thread Philipp Zabel
Am Samstag, den 08.10.2016, 01:43 +0300 schrieb Sakari Ailus:
[...]
> >  void v4l2_async_notifier_unregister(struct v4l2_async_notifier *notifier)
> >  {
> > struct v4l2_subdev *sd, *tmp;
> > -   unsigned int notif_n_subdev = notifier->num_subdevs;
> > -   unsigned int n_subdev = min(notif_n_subdev, V4L2_MAX_SUBDEVS);
> > +   unsigned int notif_n_subdev = 0;
> > +   unsigned int n_subdev;
> > +   struct list_head *list;
> > struct device **dev;
> > int i = 0;
> >  
> > @@ -218,6 +273,10 @@ void v4l2_async_notifier_unregister(struct 
> > v4l2_async_notifier *notifier)
> >  
> > list_del(>list);
> >  
> > +   list_for_each(list, >done)
> > +   ++notif_n_subdev;
> > +   n_subdev = min(notif_n_subdev, V4L2_MAX_SUBDEVS);
> > +
> 
> Shouldn't this change go to a separate patch? It seems unrelated.

Thanks, this was intended to count the notifier done list instead of
relying on notifier->num_subdevs because of the additional asynchronous
subdevs added to the notifier that are not part of the original array.
Unfortunately this change is a few lines too late, it belongs before the
device cache is allocated. I'll fix this and add a comment.

I don't want to increment notifier->num_subdevs in
__v4l2_async_notifier_add_subdev because the caller of
v4l2_async_notifier_register might still use it to measure the original
array.

> > list_for_each_entry_safe(sd, tmp, >done, async_list) {
> > struct device *d;
> >  
> > @@ -294,8 +353,19 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
> > list_for_each_entry(notifier, _list, list) {
> > struct v4l2_async_subdev *asd = v4l2_async_belongs(notifier, 
> > sd);
> > if (asd) {
> > +   struct list_head *tail = notifier->waiting.prev;
> > int ret = v4l2_async_test_notify(notifier, sd, asd);
> > +
> > +   /*
> > +* If entries were added to the notifier waiting list,
> > +* check if the corresponding subdevices are already
> > +* available.
> > +*/
> > +   if (tail != notifier->waiting.prev)
> > +   ret = v4l2_async_test_notify_all(notifier);
> > +
> > mutex_unlock(_lock);
> > +
> > return ret;
> > }
> > }
> > diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h
> > index 8e2a236..e4e4b11 100644
> > --- a/include/media/v4l2-async.h
> > +++ b/include/media/v4l2-async.h
> > @@ -114,6 +114,18 @@ int v4l2_async_notifier_register(struct v4l2_device 
> > *v4l2_dev,
> >  struct v4l2_async_notifier *notifier);
> >  
> >  /**
> > + * __v4l2_async_notifier_add_subdev - adds a subdevice to the notifier 
> > waitlist
> > + *
> > + * @v4l2_notifier: notifier the calling subdev is bound to
> 
> s/v4l2_//

I'd be happy to, but why should the v4l2 prefix be removed?

regards
Philipp

--
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 04/22] [media] v4l2-subdev.h: add prepare_stream op

2016-10-14 Thread Philipp Zabel
Am Samstag, den 08.10.2016, 02:16 +0300 schrieb Sakari Ailus:
> Hi Philipp,
> 
> On Fri, Oct 07, 2016 at 06:00:49PM +0200, Philipp Zabel wrote:
> > In some cases, for example MIPI CSI-2 input on i.MX6, the sending and
> > receiving subdevice need to be prepared in lock-step before the actual
> > streaming can start. In the i.MX6 MIPI CSI-2 case, the sender needs to
> > put its MIPI CSI-2 transmitter lanes into stop state, and the receiver
> > needs to configure its D-PHY and detect the stop state on all active
> > lanes. Only then the sender can be enabled to stream data and the
> > receiver can lock its PLL to the clock lane.
> 
> Is there a need to explicitly control this? Shouldn't this already be the
> case when the transmitting device is powered on and is not streaming?

Even if the transmitter is expected to keep the lanes in this stop state
all the time while the subdevice is powered but not streaming, I still
have to wait for stop state detection before enabling the transmitter,
and only then enable the reciever.
I'll remove the prepare_streaming callback in the next version and
instead let the subdevices propagate s_stream upstream instead in the
next version.

regards
Philipp

--
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 12/22] [media] tc358743: put lanes in STOP state before starting streaming

2016-10-14 Thread Philipp Zabel
Am Freitag, den 07.10.2016, 21:02 +0200 schrieb Marek Vasut:
> On 10/07/2016 06:00 PM, Philipp Zabel wrote:
> > Without calling tc358743_set_csi from the new prepare_stream callback
> > (or calling tc358743_s_dv_timings or tc358743_set_fmt from userspace
> > after stopping the stream), the i.MX6 MIPI CSI2 input fails waiting
> > for lanes to enter STOP state when streaming is started again.
> 
> What is the impact of that failure ? How does it manifest itself ?

The i.MX MIPI CSI-2 driver fails waiting for the lanes to enter stop
state. If the error is ignored, stream startup is not reliable.

I'll handle this a bit differently in the next version.

regards
Philipp

--
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 03/22] [media] v4l: of: add v4l2_of_subdev_registered

2016-10-14 Thread Philipp Zabel
Am Samstag, den 08.10.2016, 01:50 +0300 schrieb Sakari Ailus:
> Hi Philipp,
> 
> On Fri, Oct 07, 2016 at 06:00:48PM +0200, Philipp Zabel wrote:
> > Provide a default registered callback for device tree probed subdevices
> > that use OF graph bindings to add still missing source subdevices to
> > the async notifier waiting list.
> > This is only necessary for subdevices that have input ports to which
> > other subdevices are connected that are not initially known to the
> > master/bridge device when it sets up the notifier.
> > 
> > Signed-off-by: Philipp Zabel 
> > ---
> >  drivers/media/v4l2-core/v4l2-of.c | 68 
> > +++
> >  include/media/v4l2-of.h   | 12 +++
> >  2 files changed, 80 insertions(+)
> > 
> > diff --git a/drivers/media/v4l2-core/v4l2-of.c 
> > b/drivers/media/v4l2-core/v4l2-of.c
> > index 93b3368..fbdd6b4 100644
> > --- a/drivers/media/v4l2-core/v4l2-of.c
> > +++ b/drivers/media/v4l2-core/v4l2-of.c
> > @@ -19,6 +19,7 @@
> >  #include 
> >  
> >  #include 
> > +#include 
> 
> Alphabetical order, please.

Will fix, thanks.

> >  static int v4l2_of_parse_csi_bus(const struct device_node *node,
> >  struct v4l2_of_endpoint *endpoint)
> > @@ -314,3 +315,70 @@ void v4l2_of_put_link(struct v4l2_of_link *link)
> > of_node_put(link->remote_node);
> >  }
> >  EXPORT_SYMBOL(v4l2_of_put_link);
> > +
> > +struct v4l2_subdev *v4l2_find_subdev_by_node(struct v4l2_device *v4l2_dev,
> > +struct device_node *node)
> > +{
> > +   struct v4l2_subdev *sd;
> > +
> > +   list_for_each_entry(sd, _dev->subdevs, list) {
> > +   if (sd->of_node == node)
> > +   return sd;
> > +   }
> 
> The braces aren't really needed. Up to you.

I'll remove them in the next version.

regards
Philipp

--
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 03/22] [media] v4l: of: add v4l2_of_subdev_registered

2016-10-14 Thread Philipp Zabel
Am Freitag, den 07.10.2016, 20:50 +0200 schrieb Marek Vasut:
> On 10/07/2016 06:00 PM, Philipp Zabel wrote:
> > Provide a default registered callback for device tree probed subdevices
> > that use OF graph bindings to add still missing source subdevices to
> > the async notifier waiting list.
> > This is only necessary for subdevices that have input ports to which
> > other subdevices are connected that are not initially known to the
> > master/bridge device when it sets up the notifier.
> > 
> > Signed-off-by: Philipp Zabel 
> 
> [...]
> 
> > +int v4l2_of_subdev_registered(struct v4l2_subdev *sd)
> > +{
> > +   struct device_node *ep;
> > +
> > +   for_each_endpoint_of_node(sd->of_node, ep) {
> > +   struct v4l2_of_link link;
> > +   struct media_entity *entity;
> > +   unsigned int pad;
> > +   int ret;
> > +
> > +   ret = v4l2_of_parse_link(ep, );
> > +   if (ret)
> > +   continue;
> > +
> > +   /*
> > +* Assume 1:1 correspondence between OF node and entity,
> > +* and between OF port numbers and pad indices.
> > +*/
> > +   entity = >entity;
> 
> This here will not compile if CONFIG_MEDIA_CONTROLLER is not set,
> because ->entity will be missing from struct v4l2_subdev {} .

Thanks, I'll fix this.

regards
Philipp

--
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: V4L2_DEC_CMD_STOP and last_buffer_dequeued

2016-10-14 Thread 李務誠
On Sat, Oct 15, 2016 at 2:20 AM, Nicolas Dufresne
 wrote:
>
> Le mercredi 12 octobre 2016 à 23:33 +0800, Wu-Cheng Li (李務誠) a écrit :
> > I'm trying to use V4L2_DEC_CMD_STOP to implement flush. First the
> > userspace sent V4L2_DEC_CMD_STOP to initiate the flush. The driver
> > set
> > V4L2_BUF_FLAG_LAST on the last CAPTURE buffer. I thought implementing
> > V4L2_DEC_CMD_START in the driver was enough to start the decoder. But
> > last_buffer_dequeued had been set to true in v4l2 core. I couldn't
> > clear last_buffer_dequeued without calling STREAMOFF from the
> > userspace. If I need to call STREAMOFF/STREAMON after
> > V4L2_DEC_CMD_STOP, it looks like V4L2_DEC_CMD_START is not useful.
> > Did
> > I miss anything?
>
> It's likely what the driver do is slightly off what the spec say. All
> user space code so far seems to only drain at EOS. As the next buffer
> is a new stream, it make sense to completely reset the encoder. We'd
> need to review that, but using CMD_START should work if you queue a
> header first.

last_buffer_dequeued is only cleared to false when CAPTURE queue is
STREAMOFF (#1). Queuing a header to OUTPUT queue won't clear
last_buffer_dequeued of CAPTURE queue. It looks to me that v4l2 core
needs to intercept CMD_START and clear last_buffer_dequeued. What do
you think?

http://lxr.free-electrons.com/source/drivers/media/v4l2-core/videobuf2-core.c#L1951
>
>
> Note that for many a flush is the action of getting rid of the pending
> images and achieve by using STREAMOFF. While the effect of CMD_STOP is
> to signal the decoder that no more encoded image will be queued, hence
> remaining images should be delivered to userspace. They will
> differentiate as a flush operation vs as drain operation. This is no
> rocket science of course.

I see. What I want is drain operation. In Chromium terms, CMD_STOP
maps to flush and STREAMOFF maps to reset.
>
>
> regards,
> Nicolas
--
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 v2 03/21] [media] v4l: of: add v4l2_of_subdev_registered

2016-10-14 Thread Philipp Zabel
Provide a default registered callback for device tree probed subdevices
that use OF graph bindings to add still missing source subdevices to
the async notifier waiting list.
This is only necessary for subdevices that have input ports to which
other subdevices are connected that are not initially known to the
master/bridge device when it sets up the notifier.

Signed-off-by: Philipp Zabel 
---
Changes since v1:
 - Alphabetical #include order
 - Compile v4l2_of_subdev_registered only if CONFIG_MEDIA_CONTROLLER is set.
---
 drivers/media/v4l2-core/v4l2-of.c | 69 +++
 include/media/v4l2-of.h   | 15 +
 2 files changed, 84 insertions(+)

diff --git a/drivers/media/v4l2-core/v4l2-of.c 
b/drivers/media/v4l2-core/v4l2-of.c
index 93b3368..73c5643 100644
--- a/drivers/media/v4l2-core/v4l2-of.c
+++ b/drivers/media/v4l2-core/v4l2-of.c
@@ -18,6 +18,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 static int v4l2_of_parse_csi_bus(const struct device_node *node,
@@ -314,3 +315,71 @@ void v4l2_of_put_link(struct v4l2_of_link *link)
of_node_put(link->remote_node);
 }
 EXPORT_SYMBOL(v4l2_of_put_link);
+
+struct v4l2_subdev *v4l2_find_subdev_by_node(struct v4l2_device *v4l2_dev,
+struct device_node *node)
+{
+   struct v4l2_subdev *sd;
+
+   list_for_each_entry(sd, _dev->subdevs, list)
+   if (sd->of_node == node)
+   return sd;
+
+   return NULL;
+}
+EXPORT_SYMBOL(v4l2_find_subdev_by_node);
+
+#ifdef CONFIG_MEDIA_CONTROLLER
+/**
+ * v4l2_of_subdev_registered() - default OF probed subdev registered callback
+ * @subdev: subdevice with initialized entities
+ *
+ * Parse all OF graph endpoints corrensponding to the subdev's entity input 
pads
+ * and add the remote subdevs to the async subdev notifier.
+ */
+int v4l2_of_subdev_registered(struct v4l2_subdev *sd)
+{
+   struct device_node *ep;
+
+   for_each_endpoint_of_node(sd->of_node, ep) {
+   struct v4l2_of_link link;
+   struct media_entity *entity;
+   unsigned int pad;
+   int ret;
+
+   ret = v4l2_of_parse_link(ep, );
+   if (ret)
+   continue;
+
+   /*
+* Assume 1:1 correspondence between OF node and entity,
+* and between OF port numbers and pad indices.
+*/
+   entity = >entity;
+   pad = link.local_port;
+
+   if (pad >= entity->num_pads)
+   return -EINVAL;
+
+   /* Add source subdevs to async notifier */
+   if (entity->pads[pad].flags & MEDIA_PAD_FL_SINK) {
+   struct v4l2_async_subdev *asd;
+
+   asd = devm_kzalloc(sd->dev, sizeof(*asd), GFP_KERNEL);
+   if (!asd) {
+   v4l2_of_put_link();
+   return -ENOMEM;
+   }
+
+   asd->match_type = V4L2_ASYNC_MATCH_OF;
+   asd->match.of.node = link.remote_node;
+
+   __v4l2_async_notifier_add_subdev(sd->notifier, asd);
+   }
+
+   v4l2_of_put_link();
+   }
+
+   return 0;
+}
+#endif /* CONFIG_MEDIA_CONTROLLER */
diff --git a/include/media/v4l2-of.h b/include/media/v4l2-of.h
index 4dc34b2..f99a04b 100644
--- a/include/media/v4l2-of.h
+++ b/include/media/v4l2-of.h
@@ -22,6 +22,8 @@
 #include 
 
 struct device_node;
+struct v4l2_device;
+struct v4l2_subdev;
 
 /**
  * struct v4l2_of_bus_mipi_csi2 - MIPI CSI-2 bus data structure
@@ -95,6 +97,8 @@ void v4l2_of_free_endpoint(struct v4l2_of_endpoint *endpoint);
 int v4l2_of_parse_link(const struct device_node *node,
   struct v4l2_of_link *link);
 void v4l2_of_put_link(struct v4l2_of_link *link);
+struct v4l2_subdev *v4l2_find_subdev_by_node(struct v4l2_device *v4l2_dev,
+struct device_node *node);
 #else /* CONFIG_OF */
 
 static inline int v4l2_of_parse_endpoint(const struct device_node *node,
@@ -123,6 +127,17 @@ static inline void v4l2_of_put_link(struct v4l2_of_link 
*link)
 {
 }
 
+struct v4l2_subdev *v4l2_find_subdev_by_node(struct v4l2_device *v4l2_dev,
+struct device_node *node)
+{
+   return NULL;
+}
 #endif /* CONFIG_OF */
 
+#if defined(CONFIG_OF) && defined(CONFIG_MEDIA_CONTROLLER)
+int v4l2_of_subdev_registered(struct v4l2_subdev *sd);
+#else
+#define v4l2_of_subdev_registered NULL
+#endif /* CONFIG_OF && CONFIG_MEDIA_CONTROLLER */
+
 #endif /* _V4L2_OF_H */
-- 
2.9.3

--
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 v2 07/21] [media] imx-ipu: Add i.MX IPUv3 CSI subdevice driver

2016-10-14 Thread Philipp Zabel
This adds a V4L2 subdevice driver for the two CMOS Sensor Interface (CSI)
modules contained in each IPUv3. These sample video data from the
parallel CSI0/1 pads or from the the MIPI CSI-2 bridge via IOMUXC video
bus multiplexers and write to IPU internal FIFOs to deliver data to
either the IDMAC or IC modules.

Signed-off-by: Sascha Hauer 
Signed-off-by: Marc Kleine-Budde 
Signed-off-by: Philipp Zabel 
---
Changes since v1:
 - Propagate field and colorspace in ipucsi_subdev_set_format.
 - Recursively call s_stream on upstream subdev.
---
 drivers/media/platform/imx/Kconfig |   7 +
 drivers/media/platform/imx/Makefile|   1 +
 drivers/media/platform/imx/imx-ipuv3-csi.c | 547 +
 3 files changed, 555 insertions(+)
 create mode 100644 drivers/media/platform/imx/imx-ipuv3-csi.c

diff --git a/drivers/media/platform/imx/Kconfig 
b/drivers/media/platform/imx/Kconfig
index 1662bb0b..a88c4f7 100644
--- a/drivers/media/platform/imx/Kconfig
+++ b/drivers/media/platform/imx/Kconfig
@@ -8,3 +8,10 @@ config MEDIA_IMX
 
 config VIDEO_IMX_IPU_COMMON
tristate
+
+config VIDEO_IMX_IPU_CSI
+   tristate "i.MX5/6 CMOS Sensor Interface driver"
+   depends on VIDEO_DEV && IMX_IPUV3_CORE && MEDIA_IMX
+   select VIDEO_IMX_IPUV3
+   ---help---
+ This is a v4l2 subdevice driver for two CSI modules in each IPUv3.
diff --git a/drivers/media/platform/imx/Makefile 
b/drivers/media/platform/imx/Makefile
index 0ba601a..82a3616 100644
--- a/drivers/media/platform/imx/Makefile
+++ b/drivers/media/platform/imx/Makefile
@@ -1,2 +1,3 @@
 obj-$(CONFIG_MEDIA_IMX)+= imx-media.o
 obj-$(CONFIG_VIDEO_IMX_IPU_COMMON) += imx-ipu.o
+obj-$(CONFIG_VIDEO_IMX_IPU_CSI)+= imx-ipuv3-csi.o
diff --git a/drivers/media/platform/imx/imx-ipuv3-csi.c 
b/drivers/media/platform/imx/imx-ipuv3-csi.c
new file mode 100644
index 000..83e0511
--- /dev/null
+++ b/drivers/media/platform/imx/imx-ipuv3-csi.c
@@ -0,0 +1,547 @@
+/*
+ * i.MX IPUv3 CSI V4L2 Subdevice Driver
+ *
+ * Copyright (C) 2016, Pengutronix, Philipp Zabel 
+ *
+ * Based on code
+ * Copyright (C) 2006, Sascha Hauer, Pengutronix
+ * Copyright (C) 2008, Guennadi Liakhovetski 
+ * Copyright (C) 2008, Paulius Zaleckas 
+ * Copyright (C) 2009, Darius Augulis 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include "imx-ipu.h"
+
+#define DRIVER_NAME "imx-ipuv3-csi"
+
+struct ipucsi {
+   struct v4l2_subdev  subdev;
+
+   struct device   *dev;
+   u32 id;
+
+   struct ipu_csi  *csi;
+   struct ipu_soc  *ipu;
+   struct v4l2_of_endpoint endpoint;
+   enum ipu_csi_dest   csi_dest;
+
+   struct media_padsubdev_pad[2];
+   struct v4l2_mbus_framefmt   format_mbus[2];
+   struct v4l2_fract   timeperframe[2];
+};
+
+static int ipu_csi_get_mbus_config(struct ipucsi *ipucsi,
+  struct v4l2_mbus_config *config)
+{
+   struct v4l2_subdev *sd;
+   struct media_pad *pad;
+   int ret;
+
+   /*
+* Retrieve media bus configuration from the entity connected directly
+* to the CSI subdev sink pad.
+*/
+   pad = media_entity_remote_pad(>subdev_pad[0]);
+   if (!pad) {
+   dev_err(ipucsi->dev,
+   "failed to retrieve mbus config from source entity\n");
+   return -ENODEV;
+   }
+   sd = media_entity_to_v4l2_subdev(pad->entity);
+   ret = v4l2_subdev_call(sd, video, g_mbus_config, config);
+   if (ret == -ENOIOCTLCMD) {
+   /* Fall back to static mbus configuration from device tree */
+   config->type = ipucsi->endpoint.bus_type;
+   config->flags = ipucsi->endpoint.bus.parallel.flags;
+   ret = 0;
+   }
+
+   return ret;
+}
+
+static struct v4l2_mbus_framefmt *
+__ipucsi_get_pad_format(struct v4l2_subdev *sd,
+   struct v4l2_subdev_pad_config *cfg,
+   unsigned int pad, u32 which)
+{
+   struct ipucsi *ipucsi = container_of(sd, struct ipucsi, subdev);
+
+   switch (which) {
+   case V4L2_SUBDEV_FORMAT_TRY:
+   return v4l2_subdev_get_try_format(sd, cfg, pad);
+   

[PATCH v2 04/21] [media] v4l2-async: add new subdevices to the tail of subdev_list

2016-10-14 Thread Philipp Zabel
That way the asynchronous notifier will pick them up in the order they
were registered.

Signed-off-by: Philipp Zabel 
---
 drivers/media/v4l2-core/v4l2-async.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/v4l2-async.c 
b/drivers/media/v4l2-core/v4l2-async.c
index 3ce6533..4ab1de0 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -373,7 +373,7 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
}
 
/* None matched, wait for hot-plugging */
-   list_add(>async_list, _list);
+   list_add_tail(>async_list, _list);
 
mutex_unlock(_lock);
 
-- 
2.9.3

--
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 v2 06/21] [media] imx: Add IPUv3 media common code

2016-10-14 Thread Philipp Zabel
From: Sascha Hauer 

Add video4linux API routines common to drivers for units that
accept or provide video data via the i.MX IPU IDMAC channels,
such as capture, mem2mem scaler or deinterlacer drivers.

Signed-off-by: Sascha Hauer 
Signed-off-by: Lucas Stach 
Signed-off-by: Philipp Zabel 
---
 drivers/media/platform/imx/Kconfig   |   3 +
 drivers/media/platform/imx/Makefile  |   1 +
 drivers/media/platform/imx/imx-ipu.c | 321 +++
 drivers/media/platform/imx/imx-ipu.h |  34 
 4 files changed, 359 insertions(+)
 create mode 100644 drivers/media/platform/imx/imx-ipu.c
 create mode 100644 drivers/media/platform/imx/imx-ipu.h

diff --git a/drivers/media/platform/imx/Kconfig 
b/drivers/media/platform/imx/Kconfig
index 3bd699c..1662bb0b 100644
--- a/drivers/media/platform/imx/Kconfig
+++ b/drivers/media/platform/imx/Kconfig
@@ -5,3 +5,6 @@ config MEDIA_IMX
---help---
  This driver provides a SoC wide media controller device that all
  multimedia components in i.MX5 and i.MX6 SoCs can register with.
+
+config VIDEO_IMX_IPU_COMMON
+   tristate
diff --git a/drivers/media/platform/imx/Makefile 
b/drivers/media/platform/imx/Makefile
index 74bed76..0ba601a 100644
--- a/drivers/media/platform/imx/Makefile
+++ b/drivers/media/platform/imx/Makefile
@@ -1 +1,2 @@
 obj-$(CONFIG_MEDIA_IMX)+= imx-media.o
+obj-$(CONFIG_VIDEO_IMX_IPU_COMMON) += imx-ipu.o
diff --git a/drivers/media/platform/imx/imx-ipu.c 
b/drivers/media/platform/imx/imx-ipu.c
new file mode 100644
index 000..da1deb0
--- /dev/null
+++ b/drivers/media/platform/imx/imx-ipu.c
@@ -0,0 +1,321 @@
+/*
+ * i.MX IPUv3 common v4l2 support
+ *
+ * Copyright (C) 2011 Pengutronix, Sascha Hauer 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#include 
+#include 
+#include 
+#include 
+
+#include "imx-ipu.h"
+
+/*
+ * These formats are in order of preference: interleaved YUV first,
+ * because those are the most bandwidth efficient, followed by
+ * chroma-interleaved formats, and planar formats last.
+ * In each category, YUV 4:2:0 may be preferrable to 4:2:2 for bandwidth
+ * reasons, if the IDMAC channel supports double read/write reduction
+ * (all write channels, VDIC read channels).
+ */
+static struct ipu_fmt ipu_fmt_yuv[] = {
+   {
+   .fourcc = V4L2_PIX_FMT_YUYV,
+   .bytes_per_pixel = 2,
+   }, {
+   .fourcc = V4L2_PIX_FMT_UYVY,
+   .bytes_per_pixel = 2,
+   }, {
+   .fourcc = V4L2_PIX_FMT_NV12,
+   .bytes_per_pixel = 1,
+   }, {
+   .fourcc = V4L2_PIX_FMT_NV16,
+   .bytes_per_pixel = 1,
+   }, {
+   .fourcc = V4L2_PIX_FMT_YUV420,
+   .bytes_per_pixel = 1,
+   }, {
+   .fourcc = V4L2_PIX_FMT_YVU420,
+   .bytes_per_pixel = 1,
+   }, {
+   .fourcc = V4L2_PIX_FMT_YUV422P,
+   .bytes_per_pixel = 1,
+   },
+};
+
+static struct ipu_fmt ipu_fmt_rgb[] = {
+   {
+   .fourcc = V4L2_PIX_FMT_RGB32,
+   .bytes_per_pixel = 4,
+   }, {
+   .fourcc = V4L2_PIX_FMT_RGB24,
+   .bytes_per_pixel = 3,
+   }, {
+   .fourcc = V4L2_PIX_FMT_BGR24,
+   .bytes_per_pixel = 3,
+   }, {
+   .fourcc = V4L2_PIX_FMT_RGB565,
+   .bytes_per_pixel = 2,
+   },
+   {
+   .fourcc = V4L2_PIX_FMT_BGR32,
+   .bytes_per_pixel = 4,
+   },
+};
+
+struct ipu_fmt *ipu_find_fmt_yuv(unsigned int pixelformat)
+{
+   struct ipu_fmt *fmt;
+   int i;
+
+   for (i = 0; i < ARRAY_SIZE(ipu_fmt_yuv); i++) {
+   fmt = _fmt_yuv[i];
+   if (fmt->fourcc == pixelformat)
+   return fmt;
+   }
+
+   return NULL;
+}
+EXPORT_SYMBOL_GPL(ipu_find_fmt_yuv);
+
+struct ipu_fmt *ipu_find_fmt_rgb(unsigned int pixelformat)
+{
+   struct ipu_fmt *fmt;
+   int i;
+
+   for (i = 0; i < ARRAY_SIZE(ipu_fmt_rgb); i++) {
+   fmt = _fmt_rgb[i];
+   if (fmt->fourcc == pixelformat)
+   return fmt;
+   }
+
+   return NULL;
+}
+EXPORT_SYMBOL_GPL(ipu_find_fmt_rgb);
+
+static struct ipu_fmt *ipu_find_fmt(unsigned long pixelformat)
+{
+   struct ipu_fmt *fmt;
+
+   fmt = ipu_find_fmt_yuv(pixelformat);
+   

[PATCH v2 11/21] [media] tc358743: put lanes in STOP state before starting streaming

2016-10-14 Thread Philipp Zabel
Without calling tc358743_set_csi after stopping streaming (or calling
tc358743_s_dv_timings or tc358743_set_fmt from userspace after stopping
the stream), the i.MX6 MIPI CSI2 input fails waiting for lanes to enter
STOP state when streaming is started again.

Signed-off-by: Philipp Zabel 
---
Change since v1:
 - Put lanes in stop state again after stopping streaming
---
 drivers/media/i2c/tc358743.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 1e3a0dd2..7f82932 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -1466,6 +1466,10 @@ static int tc358743_g_mbus_config(struct v4l2_subdev *sd,
 static int tc358743_s_stream(struct v4l2_subdev *sd, int enable)
 {
enable_stream(sd, enable);
+   if (!enable) {
+   /* Put all lanes in PL-11 state (STOPSTATE) */
+   tc358743_set_csi(sd);
+   }
 
return 0;
 }
-- 
2.9.3

--
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 v2 05/21] [media] imx: Add i.MX SoC wide media device driver

2016-10-14 Thread Philipp Zabel
This driver registers a single, SoC wide media device, which all entities
in the media graph can be registered to. It is probed from device tree
using a capture-subsystem node, listing the IPUv3 input ports, similarly
to the already existing display-subsystem node that lists the IPUv3 output
ports.

Signed-off-by: Philipp Zabel 
---
 .../devicetree/bindings/media/fsl-imx-capture.txt  |  25 +++
 drivers/media/platform/Kconfig |   2 +
 drivers/media/platform/Makefile|   1 +
 drivers/media/platform/imx/Kconfig |   7 +
 drivers/media/platform/imx/Makefile|   1 +
 drivers/media/platform/imx/imx-media.c | 249 +
 6 files changed, 285 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/fsl-imx-capture.txt
 create mode 100644 drivers/media/platform/imx/Kconfig
 create mode 100644 drivers/media/platform/imx/Makefile
 create mode 100644 drivers/media/platform/imx/imx-media.c

diff --git a/Documentation/devicetree/bindings/media/fsl-imx-capture.txt 
b/Documentation/devicetree/bindings/media/fsl-imx-capture.txt
new file mode 100644
index 000..5805331
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/fsl-imx-capture.txt
@@ -0,0 +1,25 @@
+Freescale i.MX IPUv3 capture subsystem
+==
+
+The i.MX5/6 IPUv3 capture subsystem consists of one or two IPUs and all
+external subdevices connected to the IPU CSI input ports. On i.MX5 these
+are only external subdevices. On i.MX6, there are additional SoC internal
+multiplexers and a MIPI CSI-2 bridge connected to the CSI input ports via
+of_graph bindings.
+
+On i.MX6 variants with two IPUs, either a single capture subsystem node may be
+defined, containing all CSI ports, or two separate capture subsystem nodes may
+be defined, each containing the CSI ports of a single IPU. In the latter case
+there must be no external of_graph links between the two subsystems.
+
+Required properties:
+- compatible: should be "fsl,imx-capture-subsystem"
+- ports: should contain a list of phandles pointing to the capture interface
+  ports of IPU devices
+
+Example:
+
+capture-subsystem {
+compatible = "fsl,imx-capture-subsystem";
+ports = <_csi0>, <_csi1>, <_csi0>, <_csi1>;
+};
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index ce4a96f..105bf57 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -29,6 +29,8 @@ config VIDEO_VIA_CAMERA
 
 source "drivers/media/platform/davinci/Kconfig"
 
+source "drivers/media/platform/imx/Kconfig"
+
 source "drivers/media/platform/omap/Kconfig"
 
 source "drivers/media/platform/blackfin/Kconfig"
diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile
index 40b18d1..f7f9008 100644
--- a/drivers/media/platform/Makefile
+++ b/drivers/media/platform/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_VIDEO_RENESAS_FCP)   += rcar-fcp.o
 obj-$(CONFIG_VIDEO_RENESAS_JPU)+= rcar_jpu.o
 obj-$(CONFIG_VIDEO_RENESAS_VSP1)   += vsp1/
 
+obj-y  += imx/
 obj-y  += omap/
 
 obj-$(CONFIG_VIDEO_AM437X_VPFE)+= am437x/
diff --git a/drivers/media/platform/imx/Kconfig 
b/drivers/media/platform/imx/Kconfig
new file mode 100644
index 000..3bd699c
--- /dev/null
+++ b/drivers/media/platform/imx/Kconfig
@@ -0,0 +1,7 @@
+config MEDIA_IMX
+   tristate "Multimedia Support for Freescale i.MX"
+   depends on MEDIA_CONTROLLER
+   default y if IMX_IPUV3_CORE
+   ---help---
+ This driver provides a SoC wide media controller device that all
+ multimedia components in i.MX5 and i.MX6 SoCs can register with.
diff --git a/drivers/media/platform/imx/Makefile 
b/drivers/media/platform/imx/Makefile
new file mode 100644
index 000..74bed76
--- /dev/null
+++ b/drivers/media/platform/imx/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_MEDIA_IMX)+= imx-media.o
diff --git a/drivers/media/platform/imx/imx-media.c 
b/drivers/media/platform/imx/imx-media.c
new file mode 100644
index 000..1f1fab4
--- /dev/null
+++ b/drivers/media/platform/imx/imx-media.c
@@ -0,0 +1,249 @@
+/*
+ * i.MX V4L2 Capture Driver
+ *
+ * Copyright (C) 2016, Pengutronix, Philipp Zabel 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define IMX_MEDIA_MAX_PORTS4
+
+struct imx_media {
+   struct media_device mdev;
+   struct v4l2_device v4l2_dev;
+   struct v4l2_async_notifier subdev_notifier;
+   struct v4l2_async_subdev subdevs[IMX_MEDIA_MAX_PORTS];
+};
+
+static int v4l2_of_create_pad_link(struct v4l2_subdev *sd,
+  

[PATCH v2 10/21] [media] imx: Add i.MX MIPI CSI-2 subdevice driver

2016-10-14 Thread Philipp Zabel
Add a v4l2 subdevice driver for the Synopsys DesignWare MIPI CSI-2 host
controller on i.MX6. Here its output is connected to the CSI2IPU gasket,
which distributes the time division multiplexed virtual channels to the
four IPU CSI inputs, directly or through video bus multiplexers.

Signed-off-by: Philipp Zabel 
---
Changes since v1:
 - Call mipi_csi2_prepare_stream from mipi_csi2_s_stream and propagate
   s_stream to MIPI CSI-2 transmitter in the correct order.
---
 .../devicetree/bindings/media/fsl-imx-capture.txt  |  67 ++
 drivers/media/platform/imx/Kconfig |   7 +
 drivers/media/platform/imx/Makefile|   1 +
 drivers/media/platform/imx/imx-mipi-csi2.c | 697 +
 4 files changed, 772 insertions(+)
 create mode 100644 drivers/media/platform/imx/imx-mipi-csi2.c

diff --git a/Documentation/devicetree/bindings/media/fsl-imx-capture.txt 
b/Documentation/devicetree/bindings/media/fsl-imx-capture.txt
index 5805331..b5ef101 100644
--- a/Documentation/devicetree/bindings/media/fsl-imx-capture.txt
+++ b/Documentation/devicetree/bindings/media/fsl-imx-capture.txt
@@ -23,3 +23,70 @@ capture-subsystem {
 compatible = "fsl,imx-capture-subsystem";
 ports = <_csi0>, <_csi1>, <_csi0>, <_csi1>;
 };
+
+i.MX MIPI CSI-2 Host Controller
+===
+
+The i.MX6 contains an implementation of a Synopsys DesignWare MIPI CSI-2 host
+controller combined with a CSI2IPU gasket that distributes the virtual channels
+to up to four IPUv3 CSIs.
+
+Required properties:
+- compatible: should be "fsl,imx6q-mipi-csi2", "snps,dw-mipi-csi2"
+- reg: should be register base and length as documented in the SoC
+  reference manual
+- clocks: should contain the pclk, cfg, ref, and pixel clocks, in the
+  order determined by the clock-names property.
+- clock-names: should be "pclk", "cfg", "ref", "pixel"
+- address-cells: should be 1
+- size-cells: should be 0
+- port@*: five port nodes using of_graph bindings, one input port and four
+  output ports corresponding to the virtual channels.
+
+Example:
+
+mipi_csi: mipi@021dc000 {
+   compatible = "fsl,imx6q-mipi-csi2", "snps,dw-mipi-csi2";
+   reg = <0x021dc000 0x4000>;
+   clocks = < IMX6QDL_CLK_HSI_TX>, < IMX6QDL_CLK_HSI_TX>,
+< IMX6QDL_CLK_HSI_TX>, < IMX6QDL_CLK_EIM_PODF>;
+   clock-names = "pclk", "cfg", "ref", "pixel";
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   };
+
+   port@1 {
+   reg = <1>;
+
+   vc0: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+
+   port@2 {
+   reg = <2>;
+
+   vc1: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+
+   port@3 {
+   reg = <3>;
+
+   vc2: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+
+   port@4 {
+   reg = <4>;
+
+   vc3: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+};
diff --git a/drivers/media/platform/imx/Kconfig 
b/drivers/media/platform/imx/Kconfig
index 69e8648..db04e64 100644
--- a/drivers/media/platform/imx/Kconfig
+++ b/drivers/media/platform/imx/Kconfig
@@ -6,6 +6,13 @@ config MEDIA_IMX
  This driver provides a SoC wide media controller device that all
  multimedia components in i.MX5 and i.MX6 SoCs can register with.
 
+config MEDIA_IMX_MIPI_CSI2
+   tristate "i.MX MIPI CSI-2 Host Controller"
+   depends on VIDEO_V4L2_SUBDEV_API
+   help
+ This driver provides support for the MIPI CSI-2 Host Controller that
+ is connected to the IPU CSI input multiplexers on i.MX6 SoCs.
+
 config VIDEO_IMX_IPU_COMMON
tristate
 
diff --git a/drivers/media/platform/imx/Makefile 
b/drivers/media/platform/imx/Makefile
index 919eaa1..22d86fd 100644
--- a/drivers/media/platform/imx/Makefile
+++ b/drivers/media/platform/imx/Makefile
@@ -1,4 +1,5 @@
 obj-$(CONFIG_MEDIA_IMX)+= imx-media.o
+obj-$(CONFIG_MEDIA_IMX_MIPI_CSI2)  += imx-mipi-csi2.o
 obj-$(CONFIG_VIDEO_IMX_IPU_COMMON) += imx-ipu.o
 obj-$(CONFIG_VIDEO_IMX_IPU_CAPTURE)+= imx-ipu-capture.o
 obj-$(CONFIG_VIDEO_IMX_IPU_CSI)+= imx-ipuv3-csi.o
diff --git a/drivers/media/platform/imx/imx-mipi-csi2.c 
b/drivers/media/platform/imx/imx-mipi-csi2.c
new file mode 100644
index 000..7b289cc
--- /dev/null
+++ b/drivers/media/platform/imx/imx-mipi-csi2.c
@@ -0,0 +1,697 @@
+/*
+ * i.MX MIPI CSI-2 Host Controller driver
+ *
+ * Copyright (C) 2016, Pengutronix, Philipp Zabel 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include 
+#include 

[PATCH v2 08/21] [media] imx: Add i.MX IPUv3 capture driver

2016-10-14 Thread Philipp Zabel
This driver uses the IDMAC module's double buffering feature to do the
processing of finished frames in the new frame acknowledge (NFACK)
interrupt handler while the next frame is already being captured. This
avoids a race condition between the end of frame interrupt and NFACK for
very short blanking intervals, but causes the driver to need at least
two buffers in flight. The last remaining frame will never be handed out
to userspace until a new one is queued.
It supports interlaced input and allows to translate between sequential
and interlaced field formats using the IDMAC scan order and interlace
offset parameters.
Currently the direct CSI -> SMFC -> IDMAC path is supported.

Signed-off-by: Sascha Hauer 
Signed-off-by: Marc Kleine-Budde 
Signed-off-by: Philipp Zabel 
---
Changes since v1:
 - Remove v4l2_media_subdev_prepare_stream and v4l2_media_subdev_s_stream,
   subdevices will propagate s_stream calls to their upstream subdevices
   themselves.
 - Fix width/height to CSI output size
 - Use colorspace provided by CSI output
 - Implement enum/g/s/_input for v4l2-compliance
 - Fix ipu_capture_g_parm to use the correct pad
---
 drivers/media/platform/imx/Kconfig   |9 +
 drivers/media/platform/imx/Makefile  |1 +
 drivers/media/platform/imx/imx-ipu-capture.c | 1015 ++
 drivers/media/platform/imx/imx-ipu.h |9 +
 drivers/media/platform/imx/imx-ipuv3-csi.c   |   29 +-
 5 files changed, 1061 insertions(+), 2 deletions(-)
 create mode 100644 drivers/media/platform/imx/imx-ipu-capture.c

diff --git a/drivers/media/platform/imx/Kconfig 
b/drivers/media/platform/imx/Kconfig
index a88c4f7..69e8648 100644
--- a/drivers/media/platform/imx/Kconfig
+++ b/drivers/media/platform/imx/Kconfig
@@ -9,6 +9,15 @@ config MEDIA_IMX
 config VIDEO_IMX_IPU_COMMON
tristate
 
+config VIDEO_IMX_IPU_CAPTURE
+   tristate "i.MX5/6 Video Capture driver"
+   depends on IMX_IPUV3_CORE && VIDEO_V4L2_SUBDEV_API && MEDIA_IMX
+   select VIDEOBUF2_DMA_CONTIG
+   select VIDEO_IMX_IPU_COMMON
+   select VIDEO_IMX_IPUV3
+   help
+ This is a v4l2 video capture driver for the IPUv3 on i.MX5/6.
+
 config VIDEO_IMX_IPU_CSI
tristate "i.MX5/6 CMOS Sensor Interface driver"
depends on VIDEO_DEV && IMX_IPUV3_CORE && MEDIA_IMX
diff --git a/drivers/media/platform/imx/Makefile 
b/drivers/media/platform/imx/Makefile
index 82a3616..919eaa1 100644
--- a/drivers/media/platform/imx/Makefile
+++ b/drivers/media/platform/imx/Makefile
@@ -1,3 +1,4 @@
 obj-$(CONFIG_MEDIA_IMX)+= imx-media.o
 obj-$(CONFIG_VIDEO_IMX_IPU_COMMON) += imx-ipu.o
+obj-$(CONFIG_VIDEO_IMX_IPU_CAPTURE)+= imx-ipu-capture.o
 obj-$(CONFIG_VIDEO_IMX_IPU_CSI)+= imx-ipuv3-csi.o
diff --git a/drivers/media/platform/imx/imx-ipu-capture.c 
b/drivers/media/platform/imx/imx-ipu-capture.c
new file mode 100644
index 000..1308c1e
--- /dev/null
+++ b/drivers/media/platform/imx/imx-ipu-capture.c
@@ -0,0 +1,1015 @@
+/*
+ * i.MX IPUv3 V4L2 Capture Driver
+ *
+ * Copyright (C) 2016, Pengutronix, Philipp Zabel 
+ *
+ * Based on code
+ * Copyright (C) 2006, Pengutronix, Sascha Hauer 
+ * Copyright (C) 2008, Guennadi Liakhovetski 
+ * Copyright (C) 2008, Paulius Zaleckas 
+ * Copyright (C) 2009, Darius Augulis 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include "imx-ipu.h"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define DRIVER_NAME "imx-ipuv3-capture"
+
+/* buffer for one video frame */
+struct ipu_capture_buffer {
+   struct vb2_v4l2_buffer  vb;
+   struct list_headqueue;
+};
+
+struct ipu_capture {
+   struct video_device vdev;
+
+   struct device   *dev;
+   struct v4l2_fh  fh;
+   struct vb2_queuevb2_vidq;
+   struct media_padpad;
+   struct media_pipeline   pipe;
+   struct v4l2_format  format;
+
+   struct v4l2_subdev  *csi_sd;
+   struct ipu_smfc *smfc;
+   struct ipuv3_channel*ipuch;
+   struct ipu_soc  *ipu;
+   int id;
+
+   spinlock_t  lock;
+   struct mutexmutex;
+
+   /* The currently active buffer, set by NFACK and cleared by EOF 
interrupt */
+   struct ipu_capture_buffer   *active;
+ 

[PATCH v2 12/21] ARM: dts: imx6qdl: Add capture-subsystem node

2016-10-14 Thread Philipp Zabel
Signed-off-by: Philipp Zabel 
---
 arch/arm/boot/dts/imx6dl.dtsi | 5 +
 arch/arm/boot/dts/imx6q.dtsi  | 5 +
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi
index 9a4c22c..3c817de 100644
--- a/arch/arm/boot/dts/imx6dl.dtsi
+++ b/arch/arm/boot/dts/imx6dl.dtsi
@@ -100,6 +100,11 @@
};
};
 
+   capture-subsystem {
+   compatible = "fsl,imx-capture-subsystem";
+   ports = <_csi0>, <_csi1>;
+   };
+
display-subsystem {
compatible = "fsl,imx-display-subsystem";
ports = <_di0>, <_di1>;
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index c30c836..0c87a69 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -198,6 +198,11 @@
};
};
 
+   capture-subsystem {
+   compatible = "fsl,imx-capture-subsystem";
+   ports = <_csi0>, <_csi1>, <_csi0>, <_csi1>;
+   };
+
display-subsystem {
compatible = "fsl,imx-display-subsystem";
ports = <_di0>, <_di1>, <_di0>, <_di1>;
-- 
2.9.3

--
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 v2 14/21] ARM: dts: imx6qdl: Add MIPI CSI-2 D-PHY compatible and clocks

2016-10-14 Thread Philipp Zabel
>From the data sheets it is not quite clear what the clock inputs should
be named, but freescale code calls them "dphy_clk" (would that be per?)
and "pixel_clk" and connects them to the mipi_core_cfg and emi_podf
clocks, respectively.  The mipi_core_cfg control is called hsi_tx
currently, but it really gates a whole lot of other clocks, too.

Signed-off-by: Philipp Zabel 
---
 arch/arm/boot/dts/imx6qdl.dtsi | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index cd325bd..2be6de4 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -1123,9 +1123,16 @@
};
 
mipi_csi: mipi@021dc000 {
+   compatible = "fsl,imx6q-mipi-csi2", 
"dw-mipi-csi2";
reg = <0x021dc000 0x4000>;
+   clocks = < IMX6QDL_CLK_HSI_TX>,/* 
mipi_core_cfg/ipg_clk_root */
+< IMX6QDL_CLK_HSI_TX>,/* 
mipi_core_cfg/video_27m_clk_root */
+< IMX6QDL_CLK_HSI_TX>,/* 
mipi_core_cfg/video_27m_clk_root */
+< IMX6QDL_CLK_EIM_PODF>;  /* 
shoid be ipu1_ipu_hsp_clk_root on S/DL, axi_clk_root on D/Q */
+   clock-names = "pclk", "cfg", "ref", "pixel";
#address-cells = <1>;
#size-cells = <0>;
+   status = "disabled";
};
 
mipi_dsi: mipi@021e {
-- 
2.9.3

--
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 v2 00/21] Basic i.MX IPUv3 capture support

2016-10-14 Thread Philipp Zabel
Hi,

the second round removes the prepare_stream callback and instead lets the
intermediate subdevices propagate s_stream calls to their sources rather
than individually calling s_stream on each subdevice from the bridge driver.
This is similar to how drm bridges recursively call into their next neighbor.
It makes it easier to do bringup ordering on a per-link level, as long as the
source preparation can be done at s_power, and the sink can just prepare, call
s_stream on its source, and then enable itself inside s_stream. Obviously this
would only work in a generic fashion if all asynchronous subdevices with both
inputs and outputs would propagate s_stream to their source subdevices.

Changes since v1:
 - Propagate field and colorspace in ipucsi_subdev_set_format.
 - Remove v4l2_media_subdev_prepare_stream and v4l2_media_subdev_s_stream,
   let subdevices propagate s_stream calls to their upstream subdevices
   themselves.
 - Various fixes (see individual patches for details)

regards
Philipp

Philipp Zabel (20):
  [media] v4l2-async: move code out of v4l2_async_notifier_register into
v4l2_async_test_nofity_all
  [media] v4l2-async: allow subdevices to add further subdevices to the
notifier waiting list
  [media] v4l: of: add v4l2_of_subdev_registered
  [media] v4l2-async: add new subdevices to the tail of subdev_list
  [media] imx: Add i.MX SoC wide media device driver
  [media] imx-ipu: Add i.MX IPUv3 CSI subdevice driver
  [media] imx: Add i.MX IPUv3 capture driver
  [media] platform: add video-multiplexer subdevice driver
  [media] imx: Add i.MX MIPI CSI-2 subdevice driver
  [media] tc358743: put lanes in STOP state before starting streaming
  ARM: dts: imx6qdl: Add capture-subsystem node
  ARM: dts: imx6qdl: Add mipi_ipu1/2 multiplexers, mipi_csi, and their
connections
  ARM: dts: imx6qdl: Add MIPI CSI-2 D-PHY compatible and clocks
  ARM: dts: nitrogen6x: Add dtsi for BD_HDMI_MIPI HDMI to MIPI CSI-2
receiver board
  gpu: ipuv3: add ipu_csi_set_downsize
  [media] imx-ipuv3-csi: support downsizing
  [media] add mux and video interface bridge entity functions
  [media] video-multiplexer: set entity function to mux
  [media] imx: Set i.MX MIPI CSI-2 entity function to bridge
  [media] tc358743: set entity function to video interface bridge

Sascha Hauer (1):
  [media] imx: Add IPUv3 media common code

 .../devicetree/bindings/media/fsl-imx-capture.txt  |   92 ++
 .../bindings/media/video-multiplexer.txt   |   59 ++
 Documentation/media/uapi/mediactl/media-types.rst  |   22 +
 arch/arm/boot/dts/imx6dl.dtsi  |  187 
 arch/arm/boot/dts/imx6q.dtsi   |  123 +++
 .../boot/dts/imx6qdl-nitrogen6x-bd-hdmi-mipi.dtsi  |   73 ++
 arch/arm/boot/dts/imx6qdl.dtsi |   17 +-
 drivers/gpu/ipu-v3/ipu-csi.c   |   16 +
 drivers/media/i2c/tc358743.c   |5 +
 drivers/media/platform/Kconfig |   10 +
 drivers/media/platform/Makefile|3 +
 drivers/media/platform/imx/Kconfig |   33 +
 drivers/media/platform/imx/Makefile|5 +
 drivers/media/platform/imx/imx-ipu-capture.c   | 1015 
 drivers/media/platform/imx/imx-ipu.c   |  321 +++
 drivers/media/platform/imx/imx-ipu.h   |   43 +
 drivers/media/platform/imx/imx-ipuv3-csi.c |  578 +++
 drivers/media/platform/imx/imx-media.c |  249 +
 drivers/media/platform/imx/imx-mipi-csi2.c |  698 ++
 drivers/media/platform/video-multiplexer.c |  473 +
 drivers/media/v4l2-core/v4l2-async.c   |  102 +-
 drivers/media/v4l2-core/v4l2-of.c  |   69 ++
 include/media/v4l2-async.h |   12 +
 include/media/v4l2-of.h|   15 +
 include/uapi/linux/media.h |6 +
 include/video/imx-ipu-v3.h |1 +
 26 files changed, 4214 insertions(+), 13 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/fsl-imx-capture.txt
 create mode 100644 
Documentation/devicetree/bindings/media/video-multiplexer.txt
 create mode 100644 arch/arm/boot/dts/imx6qdl-nitrogen6x-bd-hdmi-mipi.dtsi
 create mode 100644 drivers/media/platform/imx/Kconfig
 create mode 100644 drivers/media/platform/imx/Makefile
 create mode 100644 drivers/media/platform/imx/imx-ipu-capture.c
 create mode 100644 drivers/media/platform/imx/imx-ipu.c
 create mode 100644 drivers/media/platform/imx/imx-ipu.h
 create mode 100644 drivers/media/platform/imx/imx-ipuv3-csi.c
 create mode 100644 drivers/media/platform/imx/imx-media.c
 create mode 100644 drivers/media/platform/imx/imx-mipi-csi2.c
 create mode 100644 drivers/media/platform/video-multiplexer.c

-- 
2.9.3

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

[PATCH v2 20/21] [media] imx: Set i.MX MIPI CSI-2 entity function to bridge

2016-10-14 Thread Philipp Zabel
The i.MX6 MIPI CSI2 bridge converts the external MIPI CSI2 input into
a SoC internal parallel bus connected to the IPU CSIs via the CSI2IPU
gasket.

Signed-off-by: Philipp Zabel 
---
 drivers/media/platform/imx/imx-mipi-csi2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/imx/imx-mipi-csi2.c 
b/drivers/media/platform/imx/imx-mipi-csi2.c
index 7b289cc..6b00a67 100644
--- a/drivers/media/platform/imx/imx-mipi-csi2.c
+++ b/drivers/media/platform/imx/imx-mipi-csi2.c
@@ -606,6 +606,7 @@ static int mipi_csi2_probe(struct platform_device *pdev)
csi2->pads[2].flags = MEDIA_PAD_FL_SOURCE;
csi2->pads[3].flags = MEDIA_PAD_FL_SOURCE;
csi2->pads[4].flags = MEDIA_PAD_FL_SOURCE;
+   csi2->subdev.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
ret = media_entity_pads_init(>subdev.entity, MIPI_CSI2_PADS,
csi2->pads);
if (ret < 0)
-- 
2.9.3

--
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 v2 19/21] [media] video-multiplexer: set entity function to mux

2016-10-14 Thread Philipp Zabel
Signed-off-by: Philipp Zabel 
---
 drivers/media/platform/video-multiplexer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/video-multiplexer.c 
b/drivers/media/platform/video-multiplexer.c
index f79b90e..466d9d0 100644
--- a/drivers/media/platform/video-multiplexer.c
+++ b/drivers/media/platform/video-multiplexer.c
@@ -138,6 +138,7 @@ static int vidsw_async_init(struct vidsw *vidsw, struct 
device_node *node)
vidsw->pads[i].flags = MEDIA_PAD_FL_SINK;
vidsw->pads[numports - 1].flags = MEDIA_PAD_FL_SOURCE;
 
+   vidsw->subdev.entity.function = MEDIA_ENT_F_MUX;
ret = media_entity_pads_init(>subdev.entity, numports,
 vidsw->pads);
if (ret < 0)
-- 
2.9.3

--
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


  1   2   >