1 #include <linux/module.h>
11 static int nouveau_agpmode = -1;
29 if (nouveau_agpmode > 0) {
30 bool agpv3 = mode & 0x8;
31 int rate = agpv3 ? nouveau_agpmode / 4 : nouveau_agpmode;
33 mode = (mode & ~0x7) | (rate & 0x7);
44 if (!drm_pci_device_is_agp(dev) || !dev->agp)
66 if (!nouveau_agp_enabled(drm))
81 mode.
mode = get_agp_mode(drm, info.
mode);
84 ret = drm_agp_enable(dev, mode);
95 save[1] = nv_mask(device, 0x000200, 0x00011100, 0x00000000);
96 nv_mask(device, 0x000200, 0x00011100, save[1]);
113 if (!nouveau_agp_enabled(drm))
117 ret = drm_agp_acquire(dev);
119 nv_error(device,
"unable to acquire AGP: %d\n", ret);
125 nv_error(device,
"unable to get AGP info: %d\n", ret);
130 mode.
mode = get_agp_mode(drm, info.
mode);
132 ret = drm_agp_enable(dev, mode);
134 nv_error(device,
"unable to enable AGP: %d\n", ret);
149 if (dev->agp && dev->agp->acquired)
150 drm_agp_release(dev);