1
2
3
4
5
6
7
8
9
10
11
12 #ifndef _KYRO_H
13 #define _KYRO_H
14
15 struct kyrofb_info {
16 void __iomem *regbase;
17
18 u32 palette[16];
19 u32 HTot;
20 u32 HFP;
21 u32 HST;
22 u32 HBP;
23 s32 HSP;
24 u32 VTot;
25 u32 VFP;
26 u32 VST;
27 u32 VBP;
28 s32 VSP;
29 u32 XRES;
30 u32 YRES;
31 u32 VFREQ;
32 u32 PIXCLK;
33 u32 HCLK;
34
35
36 u8 PIXDEPTH;
37
38 int wc_cookie;
39 };
40
41 extern int kyro_dev_init(void);
42 extern void kyro_dev_reset(void);
43
44 extern unsigned char *kyro_dev_physical_fb_ptr(void);
45 extern unsigned char *kyro_dev_virtual_fb_ptr(void);
46 extern void *kyro_dev_physical_regs_ptr(void);
47 extern void *kyro_dev_virtual_regs_ptr(void);
48 extern unsigned int kyro_dev_fb_size(void);
49 extern unsigned int kyro_dev_regs_size(void);
50
51 extern u32 kyro_dev_overlay_offset(void);
52
53
54
55
56
57 #define KYRO_IOC_MAGIC 'k'
58
59 #define KYRO_IOCTL_OVERLAY_CREATE _IO(KYRO_IOC_MAGIC, 0)
60 #define KYRO_IOCTL_OVERLAY_VIEWPORT_SET _IO(KYRO_IOC_MAGIC, 1)
61 #define KYRO_IOCTL_SET_VIDEO_MODE _IO(KYRO_IOC_MAGIC, 2)
62 #define KYRO_IOCTL_UVSTRIDE _IO(KYRO_IOC_MAGIC, 3)
63 #define KYRO_IOCTL_OVERLAY_OFFSET _IO(KYRO_IOC_MAGIC, 4)
64 #define KYRO_IOCTL_STRIDE _IO(KYRO_IOC_MAGIC, 5)
65
66
67
68
69
70 typedef struct _OVERLAY_CREATE {
71 u32 ulWidth;
72 u32 ulHeight;
73 int bLinear;
74 } overlay_create;
75
76 typedef struct _OVERLAY_VIEWPORT_SET {
77 u32 xOrgin;
78 u32 yOrgin;
79 u32 xSize;
80 u32 ySize;
81 } overlay_viewport_set;
82
83 typedef struct _SET_VIDEO_MODE {
84 u32 ulWidth;
85 u32 ulHeight;
86 u32 ulScan;
87 u8 displayDepth;
88 int bLinear;
89 } set_video_mode;
90
91 #endif