summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/ddbridge
diff options
context:
space:
mode:
authorDaniel Scheller2017-08-20 12:41:09 +0200
committerMauro Carvalho Chehab2017-08-20 13:31:03 +0200
commitbae7c75b1155eab295fbe0d504e7cc25a57c0223 (patch)
tree8c14e2c7cabe0c5c976423090b4565593feedd46 /drivers/media/pci/ddbridge
parentmedia: dvb-frontends/stv0910: fix mask for scramblingcode setup (diff)
downloadkernel-qcow2-linux-bae7c75b1155eab295fbe0d504e7cc25a57c0223.tar.gz
kernel-qcow2-linux-bae7c75b1155eab295fbe0d504e7cc25a57c0223.tar.xz
kernel-qcow2-linux-bae7c75b1155eab295fbe0d504e7cc25a57c0223.zip
media: ddbridge: fix gap handling
Force gap setting if given by attribute and enable gap for older regmaps. Also, setting a gap value of 128 via sysfs will now disable gap. Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/ddbridge')
-rw-r--r--drivers/media/pci/ddbridge/ddbridge-core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
index c290d3fecc8d..98a12c644e44 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -336,6 +336,7 @@ static void calc_con(struct ddb_output *output, u32 *con, u32 *con2, u32 flags)
if (output->port->gap != 0xffffffff) {
flags |= 1;
gap = output->port->gap;
+ max_bitrate = 0;
}
if (dev->link[0].info->type == DDB_OCTOPUS_CI && output->port->nr > 1) {
*con = 0x10c;
@@ -372,6 +373,7 @@ static void calc_con(struct ddb_output *output, u32 *con, u32 *con2, u32 flags)
*con |= 0x810; /* 96 MBit/s and gap */
max_bitrate = 96000;
}
+ *con |= 0x10; /* enable gap */
}
}
if (max_bitrate > 0) {
@@ -3203,8 +3205,10 @@ static ssize_t gap_store(struct device *device, struct device_attribute *attr,
if (sscanf(buf, "%u\n", &val) != 1)
return -EINVAL;
- if (val > 20)
+ if (val > 128)
return -EINVAL;
+ if (val == 128)
+ val = 0xffffffff;
dev->port[num].gap = val;
return count;
}