diff options
Diffstat (limited to 'drivers/media/pci/saa7134')
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-cards.c | 17 | ||||
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-core.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-dvb.c | 3 | ||||
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-video.c | 13 | ||||
-rw-r--r-- | drivers/media/pci/saa7134/saa7134.h | 7 |
5 files changed, 39 insertions, 3 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-cards.c b/drivers/media/pci/saa7134/saa7134-cards.c index bc08f1dbc293..dc68cf1070f7 100644 --- a/drivers/media/pci/saa7134/saa7134-cards.c +++ b/drivers/media/pci/saa7134/saa7134-cards.c | |||
@@ -5773,6 +5773,23 @@ struct saa7134_board saa7134_boards[] = { | |||
5773 | .gpio = 0x0000000, | 5773 | .gpio = 0x0000000, |
5774 | }, | 5774 | }, |
5775 | }, | 5775 | }, |
5776 | [SAA7134_BOARD_HAWELL_HW_9004V1] = { | ||
5777 | /* Hawell HW-9004V1 */ | ||
5778 | /* Vadim Frolov <fralik@gmail.com> */ | ||
5779 | .name = "Hawell HW-9004V1", | ||
5780 | .audio_clock = 0x00200000, | ||
5781 | .tuner_type = UNSET, | ||
5782 | .radio_type = UNSET, | ||
5783 | .tuner_addr = ADDR_UNSET, | ||
5784 | .radio_addr = ADDR_UNSET, | ||
5785 | .gpiomask = 0x618E700, | ||
5786 | .inputs = {{ | ||
5787 | .name = name_comp1, | ||
5788 | .vmux = 3, | ||
5789 | .amux = LINE1, | ||
5790 | .gpio = 0x6010000, | ||
5791 | } }, | ||
5792 | }, | ||
5776 | 5793 | ||
5777 | }; | 5794 | }; |
5778 | 5795 | ||
diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c index e359d200d698..8fd24e7c9403 100644 --- a/drivers/media/pci/saa7134/saa7134-core.c +++ b/drivers/media/pci/saa7134/saa7134-core.c | |||
@@ -308,7 +308,7 @@ void saa7134_buffer_finish(struct saa7134_dev *dev, | |||
308 | 308 | ||
309 | /* finish current buffer */ | 309 | /* finish current buffer */ |
310 | q->curr->vb.state = state; | 310 | q->curr->vb.state = state; |
311 | do_gettimeofday(&q->curr->vb.ts); | 311 | v4l2_get_timestamp(&q->curr->vb.ts); |
312 | wake_up(&q->curr->vb.done); | 312 | wake_up(&q->curr->vb.done); |
313 | q->curr = NULL; | 313 | q->curr = NULL; |
314 | } | 314 | } |
diff --git a/drivers/media/pci/saa7134/saa7134-dvb.c b/drivers/media/pci/saa7134/saa7134-dvb.c index b209de40a4f8..27915e501db9 100644 --- a/drivers/media/pci/saa7134/saa7134-dvb.c +++ b/drivers/media/pci/saa7134/saa7134-dvb.c | |||
@@ -607,6 +607,9 @@ static int configure_tda827x_fe(struct saa7134_dev *dev, | |||
607 | /* Get the first frontend */ | 607 | /* Get the first frontend */ |
608 | fe0 = videobuf_dvb_get_frontend(&dev->frontends, 1); | 608 | fe0 = videobuf_dvb_get_frontend(&dev->frontends, 1); |
609 | 609 | ||
610 | if (!fe0) | ||
611 | return -EINVAL; | ||
612 | |||
610 | fe0->dvb.frontend = dvb_attach(tda10046_attach, cdec_conf, &dev->i2c_adap); | 613 | fe0->dvb.frontend = dvb_attach(tda10046_attach, cdec_conf, &dev->i2c_adap); |
611 | if (fe0->dvb.frontend) { | 614 | if (fe0->dvb.frontend) { |
612 | if (cdec_conf->i2c_gate) | 615 | if (cdec_conf->i2c_gate) |
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index 3abf52711e13..7c503fb68526 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c | |||
@@ -2248,6 +2248,17 @@ static int saa7134_streamon(struct file *file, void *priv, | |||
2248 | if (!res_get(dev, fh, res)) | 2248 | if (!res_get(dev, fh, res)) |
2249 | return -EBUSY; | 2249 | return -EBUSY; |
2250 | 2250 | ||
2251 | /* The SAA7134 has a 1K FIFO; the datasheet suggests that when | ||
2252 | * configured conservatively, there's 22 usec of buffering for video. | ||
2253 | * We therefore request a DMA latency of 20 usec, giving us 2 usec of | ||
2254 | * margin in case the FIFO is configured differently to the datasheet. | ||
2255 | * Unfortunately, I lack register-level documentation to check the | ||
2256 | * Linux FIFO setup and confirm the perfect value. | ||
2257 | */ | ||
2258 | pm_qos_add_request(&fh->qos_request, | ||
2259 | PM_QOS_CPU_DMA_LATENCY, | ||
2260 | 20); | ||
2261 | |||
2251 | return videobuf_streamon(saa7134_queue(fh)); | 2262 | return videobuf_streamon(saa7134_queue(fh)); |
2252 | } | 2263 | } |
2253 | 2264 | ||
@@ -2259,6 +2270,8 @@ static int saa7134_streamoff(struct file *file, void *priv, | |||
2259 | struct saa7134_dev *dev = fh->dev; | 2270 | struct saa7134_dev *dev = fh->dev; |
2260 | int res = saa7134_resource(fh); | 2271 | int res = saa7134_resource(fh); |
2261 | 2272 | ||
2273 | pm_qos_remove_request(&fh->qos_request); | ||
2274 | |||
2262 | err = videobuf_streamoff(saa7134_queue(fh)); | 2275 | err = videobuf_streamoff(saa7134_queue(fh)); |
2263 | if (err < 0) | 2276 | if (err < 0) |
2264 | return err; | 2277 | return err; |
diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h index 075908fae4d9..71eefef5e324 100644 --- a/drivers/media/pci/saa7134/saa7134.h +++ b/drivers/media/pci/saa7134/saa7134.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/notifier.h> | 29 | #include <linux/notifier.h> |
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/pm_qos.h> | ||
32 | 33 | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | 35 | ||
@@ -41,7 +42,7 @@ | |||
41 | #include <media/videobuf-dma-sg.h> | 42 | #include <media/videobuf-dma-sg.h> |
42 | #include <sound/core.h> | 43 | #include <sound/core.h> |
43 | #include <sound/pcm.h> | 44 | #include <sound/pcm.h> |
44 | #if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) | 45 | #if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB) |
45 | #include <media/videobuf-dvb.h> | 46 | #include <media/videobuf-dvb.h> |
46 | #endif | 47 | #endif |
47 | 48 | ||
@@ -332,6 +333,7 @@ struct saa7134_card_ir { | |||
332 | #define SAA7134_BOARD_SENSORAY811_911 188 | 333 | #define SAA7134_BOARD_SENSORAY811_911 188 |
333 | #define SAA7134_BOARD_KWORLD_PC150U 189 | 334 | #define SAA7134_BOARD_KWORLD_PC150U 189 |
334 | #define SAA7134_BOARD_ASUSTeK_PS3_100 190 | 335 | #define SAA7134_BOARD_ASUSTeK_PS3_100 190 |
336 | #define SAA7134_BOARD_HAWELL_HW_9004V1 191 | ||
335 | 337 | ||
336 | #define SAA7134_MAXBOARDS 32 | 338 | #define SAA7134_MAXBOARDS 32 |
337 | #define SAA7134_INPUT_MAX 8 | 339 | #define SAA7134_INPUT_MAX 8 |
@@ -469,6 +471,7 @@ struct saa7134_fh { | |||
469 | enum v4l2_buf_type type; | 471 | enum v4l2_buf_type type; |
470 | unsigned int resources; | 472 | unsigned int resources; |
471 | enum v4l2_priority prio; | 473 | enum v4l2_priority prio; |
474 | struct pm_qos_request qos_request; | ||
472 | 475 | ||
473 | /* video overlay */ | 476 | /* video overlay */ |
474 | struct v4l2_window win; | 477 | struct v4l2_window win; |
@@ -642,7 +645,7 @@ struct saa7134_dev { | |||
642 | struct work_struct empress_workqueue; | 645 | struct work_struct empress_workqueue; |
643 | int empress_started; | 646 | int empress_started; |
644 | 647 | ||
645 | #if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) | 648 | #if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB) |
646 | /* SAA7134_MPEG_DVB only */ | 649 | /* SAA7134_MPEG_DVB only */ |
647 | struct videobuf_dvb_frontends frontends; | 650 | struct videobuf_dvb_frontends frontends; |
648 | int (*original_demod_sleep)(struct dvb_frontend *fe); | 651 | int (*original_demod_sleep)(struct dvb_frontend *fe); |