Go to the documentation of this file.
29 #ifndef _AGP_BACKEND_PRIV_H
30 #define _AGP_BACKEND_PRIV_H 1
34 #define PFX "agpgart: "
38 #define DBG(x,y...) printk (KERN_DEBUG PFX "%s: " x "\n", __func__ , ## y)
40 #define DBG(x,y...) do { } while (0)
61 #define AGP_PAGE_DESTROY_UNMAP 1
62 #define AGP_PAGE_DESTROY_FREE 2
128 const struct vm_operations_struct *
vm_ops;
158 #define KB(x) ((x) * 1024)
159 #define MB(x) (KB (KB (x)))
160 #define GB(x) (MB (KB (x)))
162 #define A_SIZE_8(x) ((struct aper_size_info_8 *) x)
163 #define A_SIZE_16(x) ((struct aper_size_info_16 *) x)
164 #define A_SIZE_32(x) ((struct aper_size_info_32 *) x)
165 #define A_SIZE_LVL2(x) ((struct aper_size_info_lvl2 *) x)
166 #define A_SIZE_FIX(x) ((struct aper_size_info_fixed *) x)
167 #define A_IDX8(bridge) (A_SIZE_8((bridge)->driver->aperture_sizes) + i)
168 #define A_IDX16(bridge) (A_SIZE_16((bridge)->driver->aperture_sizes) + i)
169 #define A_IDX32(bridge) (A_SIZE_32((bridge)->driver->aperture_sizes) + i)
170 #define MAXKEY (4096 * 32)
172 #define PGE_EMPTY(b, p) (!(p) || (p) == (unsigned long) (b)->scratch_page)
232 #define AGP_GENERIC_SIZES_ENTRIES 11
241 #define AGP_APBASE 0x10
245 #define AGPNISTAT 0xc
247 #define AGPAPSIZE 0x14
249 #define AGPGARTLO 0x18
250 #define AGPGARTHI 0x1c
251 #define AGPNICMD 0x20
253 #define AGP_MAJOR_VERSION_SHIFT (20)
254 #define AGP_MINOR_VERSION_SHIFT (16)
256 #define AGPSTAT_RQ_DEPTH (0xff000000)
257 #define AGPSTAT_RQ_DEPTH_SHIFT 24
259 #define AGPSTAT_CAL_MASK (1<<12|1<<11|1<<10)
260 #define AGPSTAT_ARQSZ (1<<15|1<<14|1<<13)
261 #define AGPSTAT_ARQSZ_SHIFT 13
263 #define AGPSTAT_SBA (1<<9)
264 #define AGPSTAT_AGP_ENABLE (1<<8)
265 #define AGPSTAT_FW (1<<4)
266 #define AGPSTAT_MODE_3_0 (1<<3)
268 #define AGPSTAT2_1X (1<<0)
269 #define AGPSTAT2_2X (1<<1)
270 #define AGPSTAT2_4X (1<<2)
272 #define AGPSTAT3_RSVD (1<<2)
273 #define AGPSTAT3_8X (1<<1)
274 #define AGPSTAT3_4X (1)
276 #define AGPCTRL_APERENB (1<<8)
277 #define AGPCTRL_GTLBEN (1<<7)
279 #define AGP2_RESERVED_MASK 0x00fffcc8
280 #define AGP3_RESERVED_MASK 0x00ff00c4
282 #define AGP_ERRATA_FASTWRITES 1<<0
283 #define AGP_ERRATA_SBA 1<<1
284 #define AGP_ERRATA_1X 1<<2