Rev 472 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
472 | giacomo | 1 | #ifndef __RIVAFB_H |
2 | #define __RIVAFB_H |
||
3 | |||
4 | #include <linux/config.h> |
||
5 | #include <linux/fb.h> |
||
6 | #include <video/vga.h> |
||
7 | #include "riva_hw.h" |
||
8 | |||
9 | /* GGI compatibility macros */ |
||
10 | #define NUM_SEQ_REGS 0x05 |
||
11 | #define NUM_CRT_REGS 0x41 |
||
12 | #define NUM_GRC_REGS 0x09 |
||
13 | #define NUM_ATC_REGS 0x15 |
||
14 | |||
15 | /* holds the state of the VGA core and extended Riva hw state from riva_hw.c. |
||
16 | * From KGI originally. */ |
||
17 | struct riva_regs { |
||
18 | u8 attr[NUM_ATC_REGS]; |
||
19 | u8 crtc[NUM_CRT_REGS]; |
||
20 | u8 gra[NUM_GRC_REGS]; |
||
21 | u8 seq[NUM_SEQ_REGS]; |
||
22 | u8 misc_output; |
||
23 | RIVA_HW_STATE ext; |
||
24 | }; |
||
25 | |||
26 | struct riva_par { |
||
27 | RIVA_HW_INST riva; /* interface to riva_hw.c */ |
||
28 | |||
29 | caddr_t ctrl_base; /* virtual control register base addr */ |
||
30 | unsigned dclk_max; /* max DCLK */ |
||
31 | |||
32 | struct riva_regs initial_state; /* initial startup video mode */ |
||
33 | struct riva_regs current_state; |
||
34 | struct vgastate state; |
||
35 | atomic_t ref_count; |
||
36 | u32 cursor_data[32 * 32/4]; |
||
37 | int cursor_reset; |
||
38 | unsigned char *EDID; |
||
39 | |||
40 | int panel_xres, panel_yres; |
||
41 | int hOver_plus, hSync_width, hblank; |
||
42 | int vOver_plus, vSync_width, vblank; |
||
43 | int hAct_high, vAct_high, interlaced; |
||
44 | int synct, misc, clock; |
||
45 | |||
46 | int use_default_var; |
||
47 | int got_dfpinfo; |
||
48 | unsigned int Chipset; |
||
49 | int forceCRTC; |
||
50 | Bool SecondCRTC; |
||
51 | int FlatPanel; |
||
52 | #ifdef CONFIG_MTRR |
||
53 | struct { int vram; int vram_valid; } mtrr; |
||
54 | #endif |
||
55 | }; |
||
56 | |||
57 | void riva_common_setup(struct riva_par *); |
||
58 | unsigned long riva_get_memlen(struct riva_par *); |
||
59 | unsigned long riva_get_maxdclk(struct riva_par *); |
||
60 | |||
61 | #endif /* __RIVAFB_H */ |