Subversion Repositories shark

Rev

Rev 54 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
54 pj 1
#ifndef __SVGALIB_HELPER__
2
#define __SVGALIB_HELPER__
3
 
80 pj 4
#include "ll/sys/cdefs.h"
5
 
6
__BEGIN_DECLS
7
 
54 pj 8
#ifdef __KERNEL__
9
 
10
#define MAX_NR_DEVICES 15
11
 
12
#define address_t unsigned long
13
 
14
struct sh_pci_device {
15
   unsigned short vendor;
16
   unsigned short id;
17
   unsigned char revision;
18
   struct pci_dev *dev;
19
   address_t mem[6];
20
   address_t len[6];
21
   address_t mask[6];
22
   int flags[6];
23
   unsigned long iobase;
24
   int (*test_vsync)(struct sh_pci_device *);
25
   void (*ack_vsync)(struct sh_pci_device *);
26
   void (*enable_vsync)(struct sh_pci_device *);
27
};
28
 
29
#endif
30
 
31
typedef struct {
32
  int port;
33
  int length;
34
  unsigned char* string;
35
} io_string_t;
36
 
37
typedef struct {
38
   int port;
39
   unsigned int val;
40
} io_t;
41
 
42
typedef struct {
43
   int pcipos;
44
   unsigned int address;
45
   unsigned long val;
46
} pcic_t;
47
 
48
typedef struct {
49
   void *win;
50
   void *lfb;
51
} windowing_t;
52
 
53
#define SVGALIB_HELPER_IOC_MAGIC 0xB3
54
 
55
#define SVGALIB_HELPER_IOCSOUTB         _IOR(SVGALIB_HELPER_IOC_MAGIC,1,io_t)
56
#define SVGALIB_HELPER_IOCSOUTW         _IOR(SVGALIB_HELPER_IOC_MAGIC,2,io_t)
57
#define SVGALIB_HELPER_IOCSOUTL         _IOR(SVGALIB_HELPER_IOC_MAGIC,3,io_t)
58
#define SVGALIB_HELPER_IOCGINB          _IOW(SVGALIB_HELPER_IOC_MAGIC,4,io_t)
59
#define SVGALIB_HELPER_IOCGINW          _IOW(SVGALIB_HELPER_IOC_MAGIC,5,io_t)
60
#define SVGALIB_HELPER_IOCGINL          _IOW(SVGALIB_HELPER_IOC_MAGIC,6,io_t)
61
 
62
#define SVGALIB_HELPER_IOCSPCIOUTB      _IOR(SVGALIB_HELPER_IOC_MAGIC,11,pcic_t)
63
#define SVGALIB_HELPER_IOCSPCIOUTW      _IOR(SVGALIB_HELPER_IOC_MAGIC,12,pcic_t)
64
#define SVGALIB_HELPER_IOCSPCIOUTL      _IOR(SVGALIB_HELPER_IOC_MAGIC,13,pcic_t)
65
#define SVGALIB_HELPER_IOCGPCIINB       _IOW(SVGALIB_HELPER_IOC_MAGIC,14,pcic_t)
66
#define SVGALIB_HELPER_IOCGPCIINW       _IOW(SVGALIB_HELPER_IOC_MAGIC,15,pcic_t)
67
#define SVGALIB_HELPER_IOCGPCIINL       _IOW(SVGALIB_HELPER_IOC_MAGIC,16,pcic_t)
68
#define SVGALIB_HELPER_IOCGPCIAPLEN     _IOW(SVGALIB_HELPER_IOC_MAGIC,17,pcic_t)
69
 
70
#define SVGALIB_HELPER_IOCDVMA          _IO(SVGALIB_HELPER_IOC_MAGIC,7)
71
#define SVGALIB_HELPER_IOCSWIND         _IOR(SVGALIB_HELPER_IOC_MAGIC,8,windowing_t)
72
 
73
#define SVGALIB_HELPER_IOCIOPERM        _IO(SVGALIB_HELPER_IOC_MAGIC,9)
74
#define SVGALIB_HELPER_IOCSREPOUTB      _IOR(SVGALIB_HELPER_IOC_MAGIC,10,io_t)
75
 
76
#define SVGALIB_HELPER_IOCGI810GTT      _IOW(SVGALIB_HELPER_IOC_MAGIC,128,unsigned int *)
77
#define SVGALIB_HELPER_IOCGI810GTTE     _IOW(SVGALIB_HELPER_IOC_MAGIC,129,unsigned int *)
78
 
79
#define SVGALIB_HELPER_IOCSWRITEB       _IOR(SVGALIB_HELPER_IOC_MAGIC,21,io_t)
80
#define SVGALIB_HELPER_IOCSWRITEW       _IOR(SVGALIB_HELPER_IOC_MAGIC,22,io_t)
81
#define SVGALIB_HELPER_IOCSWRITEL       _IOR(SVGALIB_HELPER_IOC_MAGIC,23,io_t)
82
#define SVGALIB_HELPER_IOCGREADB        _IOW(SVGALIB_HELPER_IOC_MAGIC,24,io_t)
83
#define SVGALIB_HELPER_IOCGREADW        _IOW(SVGALIB_HELPER_IOC_MAGIC,25,io_t)
84
#define SVGALIB_HELPER_IOCGREADL        _IOW(SVGALIB_HELPER_IOC_MAGIC,26,io_t)
85
 
86
#define SVGALIB_HELPER_IOCWAITRETRACE   _IO(SVGALIB_HELPER_IOC_MAGIC,31)
87
 
88
struct inode {};
89
 
90
int svgalib_helper_ioctl( struct inode *inode, unsigned int cmd, unsigned long arg);
91
 
80 pj 92
__END_DECLS
93
 
54 pj 94
#endif
95
 
96