Linux Audio
Check our new training course
Embedded Linux Audio
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
#ifndef __NV_TYPE_H__ #define __NV_TYPE_H__ #include <linux/fb.h> #include <linux/types.h> #include <linux/i2c.h> #include <linux/i2c-id.h> #include <linux/i2c-algo-bit.h> #define NV_ARCH_04 0x04 #define NV_ARCH_10 0x10 #define NV_ARCH_20 0x20 #define NV_ARCH_30 0x30 #define NV_ARCH_40 0x40 #define BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1) << (b)) #define MASKEXPAND(mask) BITMASK(1?mask,0?mask) #define SetBF(mask,value) ((value) << (0?mask)) #define GetBF(var,mask) (((unsigned)((var) & MASKEXPAND(mask))) >> (0?mask) ) #define SetBitField(value,from,to) SetBF(to, GetBF(value,from)) #define SetBit(n) (1<<(n)) #define Set8Bits(value) ((value)&0xff) #define V_DBLSCAN 1 typedef struct { int bitsPerPixel; int depth; int displayWidth; int weight; } NVFBLayout; #define NUM_SEQ_REGS 0x05 #define NUM_CRT_REGS 0x41 #define NUM_GRC_REGS 0x09 #define NUM_ATC_REGS 0x15 struct nvidia_par; struct nvidia_i2c_chan { struct nvidia_par *par; unsigned long ddc_base; struct i2c_adapter adapter; struct i2c_algo_bit_data algo; }; typedef struct _riva_hw_state { u8 attr[NUM_ATC_REGS]; u8 crtc[NUM_CRT_REGS]; u8 gra[NUM_GRC_REGS]; u8 seq[NUM_SEQ_REGS]; u8 misc_output; u32 bpp; u32 width; u32 height; u32 interlace; u32 repaint0; u32 repaint1; u32 screen; u32 scale; u32 dither; u32 extra; u32 fifo; u32 pixel; u32 horiz; u32 arbitration0; u32 arbitration1; u32 pll; u32 pllB; u32 vpll; u32 vpll2; u32 vpllB; u32 vpll2B; u32 pllsel; u32 general; u32 crtcOwner; u32 head; u32 head2; u32 config; u32 cursorConfig; u32 cursor0; u32 cursor1; u32 cursor2; u32 timingH; u32 timingV; u32 displayV; u32 crtcSync; } RIVA_HW_STATE; struct riva_regs { RIVA_HW_STATE ext; }; struct nvidia_par { RIVA_HW_STATE SavedReg; RIVA_HW_STATE ModeReg; RIVA_HW_STATE *CurrentState; u32 pseudo_palette[16]; struct pci_dev *pci_dev; u32 Architecture; u32 CursorStart; int Chipset; int bus; unsigned long FbAddress; u8 __iomem *FbStart; u32 FbMapSize; u32 FbUsableSize; u32 ScratchBufferSize; u32 ScratchBufferStart; int FpScale; u32 MinVClockFreqKHz; u32 MaxVClockFreqKHz; u32 CrystalFreqKHz; u32 RamAmountKBytes; u32 IOBase; NVFBLayout CurrentLayout; int cursor_reset; int lockup; int videoKey; int FlatPanel; int FPDither; int Television; int CRTCnumber; int alphaCursor; int twoHeads; int twoStagePLL; int fpScaler; int fpWidth; int fpHeight; int PanelTweak; int paneltweak; int LVDS; int pm_state; u32 crtcSync_read; u32 fpSyncs; u32 dmaPut; u32 dmaCurrent; u32 dmaFree; u32 dmaMax; u32 __iomem *dmaBase; u32 currentRop; int WaitVSyncPossible; int BlendingPossible; u32 paletteEnabled; u32 forceCRTC; u8 DDCBase; #ifdef CONFIG_MTRR struct { int vram; int vram_valid; } mtrr; #endif struct nvidia_i2c_chan chan[3]; volatile u32 __iomem *REGS; volatile u32 __iomem *PCRTC0; volatile u32 __iomem *PCRTC; volatile u32 __iomem *PRAMDAC0; volatile u32 __iomem *PFB; volatile u32 __iomem *PFIFO; volatile u32 __iomem *PGRAPH; volatile u32 __iomem *PEXTDEV; volatile u32 __iomem *PTIMER; volatile u32 __iomem *PMC; volatile u32 __iomem *PRAMIN; volatile u32 __iomem *FIFO; volatile u32 __iomem *CURSOR; volatile u8 __iomem *PCIO0; volatile u8 __iomem *PCIO; volatile u8 __iomem *PVIO; volatile u8 __iomem *PDIO0; volatile u8 __iomem *PDIO; volatile u32 __iomem *PRAMDAC; }; #endif /* __NV_TYPE_H__ */