summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cobalt
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-09-05 18:21:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-05 18:21:14 -0700
commit9cfcc658da9693f65e7224e8329e40ada2f3c699 (patch)
tree44fb518eee069733f3f895177899815e7c89e5b0 /drivers/media/pci/cobalt
parente3a98ac47698bf1c1e4e6fae72afc9866953fce5 (diff)
parent50ef28a6ac216fd8b796257a3768fef8f57b917d (diff)
downloadlinux-9cfcc658da9693f65e7224e8329e40ada2f3c699.tar.bz2
Merge tag 'media/v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - new DVB frontend drivers: ascot2e, cxd2841er, horus3a, lnbh25 - new HDMI capture driver: tc358743 - new driver for NetUP DVB new boards (netup_unidvb) - IR support for DVBSky cards (smipcie-ir) - Coda driver has gain macroblock tiling support - Renesas R-Car gains JPEG codec driver - new DVB platform driver for STi boards: c8sectpfe - added documentation for the media core kABI to device-drivers DocBook - lots of driver fixups, cleanups and improvements * tag 'media/v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (297 commits) [media] c8sectpfe: Remove select on undefined LIBELF_32 [media] i2c: fix platform_no_drv_owner.cocci warnings [media] cx231xx: Use wake_up_interruptible() instead of wake_up_interruptible_nr() [media] tc358743: only queue subdev notifications if devnode is set [media] tc358743: add missing Kconfig dependency/select [media] c8sectpfe: Use %pad to print 'dma_addr_t' [media] DocBook media: Fix typo "the the" in xml files [media] tc358743: make reset gpio optional [media] tc358743: set direction of reset gpio using devm_gpiod_get [media] dvbdev: document most of the functions/data structs [media] dvb_frontend.h: document the struct dvb_frontend [media] dvb-frontend.h: document struct dtv_frontend_properties [media] dvb-frontend.h: document struct dvb_frontend_ops [media] dvb: Use DVBFE_ALGO_HW where applicable [media] dvb_frontend.h: document struct analog_demod_ops [media] dvb_frontend.h: Document struct dvb_tuner_ops [media] Docbook: Document struct analog_parameters [media] dvb_frontend.h: get rid of dvbfe_modcod [media] add documentation for struct dvb_tuner_info [media] dvb_frontend: document dvb_frontend_tune_settings ...
Diffstat (limited to 'drivers/media/pci/cobalt')
-rw-r--r--drivers/media/pci/cobalt/Kconfig3
-rw-r--r--drivers/media/pci/cobalt/cobalt-driver.c11
-rw-r--r--drivers/media/pci/cobalt/cobalt-v4l2.c11
3 files changed, 16 insertions, 9 deletions
diff --git a/drivers/media/pci/cobalt/Kconfig b/drivers/media/pci/cobalt/Kconfig
index 6a1c0089bb62..1f88ccc174da 100644
--- a/drivers/media/pci/cobalt/Kconfig
+++ b/drivers/media/pci/cobalt/Kconfig
@@ -1,7 +1,8 @@
config VIDEO_COBALT
tristate "Cisco Cobalt support"
depends on VIDEO_V4L2 && I2C && MEDIA_CONTROLLER
- depends on PCI_MSI && MTD_COMPLEX_MAPPINGS && GPIOLIB
+ depends on PCI_MSI && MTD_COMPLEX_MAPPINGS
+ depends on GPIOLIB || COMPILE_TEST
depends on SND
select I2C_ALGOBIT
select VIDEO_ADV7604
diff --git a/drivers/media/pci/cobalt/cobalt-driver.c b/drivers/media/pci/cobalt/cobalt-driver.c
index b994b8efdc99..8fed61ec712e 100644
--- a/drivers/media/pci/cobalt/cobalt-driver.c
+++ b/drivers/media/pci/cobalt/cobalt-driver.c
@@ -339,15 +339,16 @@ static int cobalt_setup_pci(struct cobalt *cobalt, struct pci_dev *pci_dev,
}
if (pcie_link_get_lanes(cobalt) != 8) {
- cobalt_err("PCI Express link width is not 8 lanes (%d)\n",
+ cobalt_warn("PCI Express link width is %d lanes.\n",
pcie_link_get_lanes(cobalt));
if (pcie_bus_link_get_lanes(cobalt) < 8)
- cobalt_err("The current slot only supports %d lanes, at least 8 are needed\n",
+ cobalt_warn("The current slot only supports %d lanes, for best performance 8 are needed\n",
pcie_bus_link_get_lanes(cobalt));
- else
+ if (pcie_link_get_lanes(cobalt) != pcie_bus_link_get_lanes(cobalt)) {
cobalt_err("The card is most likely not seated correctly in the PCIe slot\n");
- ret = -EIO;
- goto err_disable;
+ ret = -EIO;
+ goto err_disable;
+ }
}
if (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(64))) {
diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c
index b40c2d141b58..9756fd3e8af5 100644
--- a/drivers/media/pci/cobalt/cobalt-v4l2.c
+++ b/drivers/media/pci/cobalt/cobalt-v4l2.c
@@ -28,6 +28,7 @@
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
+#include <media/v4l2-dv-timings.h>
#include <media/adv7604.h>
#include <media/adv7842.h>
@@ -641,13 +642,17 @@ static int cobalt_s_dv_timings(struct file *file, void *priv_fh,
struct cobalt_stream *s = video_drvdata(file);
int err;
- if (vb2_is_busy(&s->q))
- return -EBUSY;
-
if (s->input == 1) {
*timings = cea1080p60;
return 0;
}
+
+ if (v4l2_match_dv_timings(timings, &s->timings, 0))
+ return 0;
+
+ if (vb2_is_busy(&s->q))
+ return -EBUSY;
+
err = v4l2_subdev_call(s->sd,
video, s_dv_timings, timings);
if (!err) {