Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nv_type.h
Go to the documentation of this file.
1 #ifndef __NV_TYPE_H__
2 #define __NV_TYPE_H__
3 
4 #include <linux/fb.h>
5 #include <linux/types.h>
6 #include <linux/i2c.h>
7 #include <linux/i2c-algo-bit.h>
8 #include <video/vga.h>
9 
10 #define NV_ARCH_04 0x04
11 #define NV_ARCH_10 0x10
12 #define NV_ARCH_20 0x20
13 #define NV_ARCH_30 0x30
14 #define NV_ARCH_40 0x40
15 
16 #define BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1) << (b))
17 #define MASKEXPAND(mask) BITMASK(1?mask,0?mask)
18 #define SetBF(mask,value) ((value) << (0?mask))
19 #define GetBF(var,mask) (((unsigned)((var) & MASKEXPAND(mask))) >> (0?mask) )
20 #define SetBitField(value,from,to) SetBF(to, GetBF(value,from))
21 #define SetBit(n) (1<<(n))
22 #define Set8Bits(value) ((value)&0xff)
23 
24 #define V_DBLSCAN 1
25 
26 typedef struct {
28  int depth;
30  int weight;
31 } NVFBLayout;
32 
33 #define NUM_SEQ_REGS 0x05
34 #define NUM_CRT_REGS 0x41
35 #define NUM_GRC_REGS 0x09
36 #define NUM_ATC_REGS 0x15
37 
38 struct nvidia_par;
39 
41  struct nvidia_par *par;
42  unsigned long ddc_base;
45 };
46 
47 typedef struct _riva_hw_state {
90 
91 struct riva_regs {
93 };
94 
95 struct nvidia_par {
102  struct pci_dev *pci_dev;
105  int Chipset;
106  unsigned long FbAddress;
112  int FpScale;
120  int lockup;
121  int videoKey;
123  int FPDither;
127  int twoHeads;
129  int fpScaler;
130  int fpWidth;
131  int fpHeight;
134  int LVDS;
135  int pm_state;
151 #ifdef CONFIG_MTRR
152  struct {
153  int vram;
154  int vram_valid;
155  } mtrr;
156 #endif
158 
159  volatile u32 __iomem *REGS;
160  volatile u32 __iomem *PCRTC0;
161  volatile u32 __iomem *PCRTC;
162  volatile u32 __iomem *PRAMDAC0;
163  volatile u32 __iomem *PFB;
164  volatile u32 __iomem *PFIFO;
165  volatile u32 __iomem *PGRAPH;
166  volatile u32 __iomem *PEXTDEV;
167  volatile u32 __iomem *PTIMER;
168  volatile u32 __iomem *PMC;
169  volatile u32 __iomem *PRAMIN;
170  volatile u32 __iomem *FIFO;
171  volatile u32 __iomem *CURSOR;
172  volatile u8 __iomem *PCIO0;
173  volatile u8 __iomem *PCIO;
174  volatile u8 __iomem *PVIO;
175  volatile u8 __iomem *PDIO0;
176  volatile u8 __iomem *PDIO;
177  volatile u32 __iomem *PRAMDAC;
178 };
179 
180 #endif /* __NV_TYPE_H__ */