added 2.6.29.6 aldebaran kernel
[nao-ulib.git] / kernel / 2.6.29.6-aldebaran-rt / drivers / media / video / lxv4l2 / buf_mem.h
blobc36feb0203b5a3636dacb061433818dc3b9d6b91
1 /* <LIC_AMD_STD>
2 * Copyright (c) 2005 Advanced Micro Devices, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * The full GNU General Public License is included in this distribution in the
19 * file called COPYING
20 * </LIC_AMD_STD> */
21 /* <CTL_AMD_STD>
22 * </CTL_AMD_STD> */
23 /* <DOC_AMD_STD>
24 * </DOC_AMD_STD> */
25 #ifndef _BUFMEM_H_
26 #define _BUFMEM_H_
28 extern unsigned long cim_fb_base;
29 extern unsigned char *cim_fb_ptr;
31 typedef struct s_io_buf io_buf;
33 enum {
34 io_none,
35 io_queued,
36 io_flipped,
39 struct s_io_buf {
40 struct list_head bfrq;
41 int type, index, memory, flags;
42 unsigned long sequence;
43 jiffiez_t jiffies;
44 unsigned long start;
45 vid_mem *vmem;
46 unsigned long phys_addr;
47 unsigned long offset;
48 unsigned char *bfrp;
51 typedef struct s_io_queue io_queue;
53 struct s_io_queue {
54 int io_type;
55 spinlock_t lock;
56 struct list_head rd_qbuf, rd_dqbuf;
57 struct list_head wr_qbuf, wr_dqbuf;
58 unsigned long sequence;
59 unsigned long size;
60 io_buf *stream_bfr;
61 int count, offset;
62 int nbfrs, mbfrs;
63 io_buf bfrs[1];
66 unsigned long phys_bfrsz(unsigned long size);
67 int mmap_bufs(io_queue *qp,unsigned long offset,unsigned long start,
68 unsigned long size,struct vm_area_struct *vma);
69 void del_io_queue(io_queue **pqp);
70 int new_buffer(io_queue *io,io_buf **pbp);
71 int new_vio_queue(int io_type,int nbfrs,int size,io_queue **pio);
73 #endif