Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357180
b: refs/heads/master
c: 8773986
h: refs/heads/master
v: v3
  • Loading branch information
Simon Farnsworth authored and Mauro Carvalho Chehab committed Dec 27, 2012
1 parent a63b55a commit 4c08f6b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e8d4237325a475b02594d1fd85bb67983f7d57b9
refs/heads/master: 87739868944919beb4e6b3860c74355a114a54a1
13 changes: 13 additions & 0 deletions trunk/drivers/media/pci/saa7134/saa7134-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -2248,6 +2248,17 @@ static int saa7134_streamon(struct file *file, void *priv,
if (!res_get(dev, fh, res))
return -EBUSY;

/* The SAA7134 has a 1K FIFO; the datasheet suggests that when
* configured conservatively, there's 22 usec of buffering for video.
* We therefore request a DMA latency of 20 usec, giving us 2 usec of
* margin in case the FIFO is configured differently to the datasheet.
* Unfortunately, I lack register-level documentation to check the
* Linux FIFO setup and confirm the perfect value.
*/
pm_qos_add_request(&fh->qos_request,
PM_QOS_CPU_DMA_LATENCY,
20);

return videobuf_streamon(saa7134_queue(fh));
}

Expand All @@ -2259,6 +2270,8 @@ static int saa7134_streamoff(struct file *file, void *priv,
struct saa7134_dev *dev = fh->dev;
int res = saa7134_resource(fh);

pm_qos_remove_request(&fh->qos_request);

err = videobuf_streamoff(saa7134_queue(fh));
if (err < 0)
return err;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/pci/saa7134/saa7134.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/notifier.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/pm_qos.h>

#include <asm/io.h>

Expand Down Expand Up @@ -469,6 +470,7 @@ struct saa7134_fh {
enum v4l2_buf_type type;
unsigned int resources;
enum v4l2_priority prio;
struct pm_qos_request qos_request;

/* video overlay */
struct v4l2_window win;
Expand Down

0 comments on commit 4c08f6b

Please sign in to comment.