aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx18/cx18-queue.h')
-rw-r--r--drivers/media/video/cx18/cx18-queue.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/media/video/cx18/cx18-queue.h b/drivers/media/video/cx18/cx18-queue.h
index ff50a2b7e5b..d184e55ce62 100644
--- a/drivers/media/video/cx18/cx18-queue.h
+++ b/drivers/media/video/cx18/cx18-queue.h
@@ -43,9 +43,24 @@ static inline void cx18_buf_sync_for_device(struct cx18_stream *s,
43void cx18_buf_swap(struct cx18_buffer *buf); 43void cx18_buf_swap(struct cx18_buffer *buf);
44 44
45/* cx18_queue utility functions */ 45/* cx18_queue utility functions */
46void cx18_queue_init(struct cx18_queue *q); 46void _cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf,
47 struct cx18_queue *q, int to_front);
48
49static inline
47void cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf, 50void cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf,
48 struct cx18_queue *q); 51 struct cx18_queue *q)
52{
53 _cx18_enqueue(s, buf, q, 0); /* FIFO */
54}
55
56static inline
57void cx18_push(struct cx18_stream *s, struct cx18_buffer *buf,
58 struct cx18_queue *q)
59{
60 _cx18_enqueue(s, buf, q, 1); /* LIFO */
61}
62
63void cx18_queue_init(struct cx18_queue *q);
49struct cx18_buffer *cx18_dequeue(struct cx18_stream *s, struct cx18_queue *q); 64struct cx18_buffer *cx18_dequeue(struct cx18_stream *s, struct cx18_queue *q);
50struct cx18_buffer *cx18_queue_get_buf(struct cx18_stream *s, u32 id, 65struct cx18_buffer *cx18_queue_get_buf(struct cx18_stream *s, u32 id,
51 u32 bytesused); 66 u32 bytesused);