aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-07-28 12:07:12 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 22:05:32 -0300
commitf4071b85ea0ca3bd06f63c330562b4cfdffa8473 (patch)
tree8390a1bb512949e9520f65de160e1e7291a4c36f /drivers/media/video/ivtv/ivtv-driver.h
parent3562c43be8cfd6e300508d7c33acebf3369eacd3 (diff)
downloadkernel_samsung_smdk4412-f4071b85ea0ca3bd06f63c330562b4cfdffa8473.zip
kernel_samsung_smdk4412-f4071b85ea0ca3bd06f63c330562b4cfdffa8473.tar.gz
kernel_samsung_smdk4412-f4071b85ea0ca3bd06f63c330562b4cfdffa8473.tar.bz2
V4L/DVB (6046): ivtv: always steal full frames if out of buffers.
When there are no more free buffers, then buffers are stolen from the predma queue. Buffers should be stolen from the head of that queue (which is where the most recently added buffers are) and all buffers belonging to a frame should be stolen. Otherwise 'half-frames' would remain in the queue, which leads to ugly playback and complete sync failure for YUV buffers. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.h')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h
index 0a1c16a..f5de2fd 100644
--- a/drivers/media/video/ivtv/ivtv-driver.h
+++ b/drivers/media/video/ivtv/ivtv-driver.h
@@ -356,7 +356,7 @@ struct ivtv_mailbox_data {
};
/* per-buffer bit flags */
-#define IVTV_F_B_NEED_BUF_SWAP 0 /* this buffer should be byte swapped */
+#define IVTV_F_B_NEED_BUF_SWAP (1 << 0) /* this buffer should be byte swapped */
/* per-stream, s_flags */
#define IVTV_F_S_DMA_PENDING 0 /* this stream has pending DMA */
@@ -437,7 +437,8 @@ struct ivtv_dma_page_info {
struct ivtv_buffer {
struct list_head list;
dma_addr_t dma_handle;
- unsigned long b_flags;
+ unsigned short b_flags;
+ unsigned short dma_xfer_cnt;
char *buf;
u32 bytesused;
@@ -487,6 +488,10 @@ struct ivtv_stream {
struct ivtv_queue q_dma; /* waiting for DMA */
struct ivtv_queue q_predma; /* waiting for DMA */
+ /* DMA xfer counter, buffers belonging to the same DMA
+ xfer will have the same dma_xfer_cnt. */
+ u16 dma_xfer_cnt;
+
/* Base Dev SG Array for cx23415/6 */
struct ivtv_SG_element *SGarray;
struct ivtv_SG_element *PIOarray;