aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.c6
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.h2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_mem.c12
3 files changed, 15 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
index 209912a1b7a5..14a4960a989a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -35,9 +35,9 @@
35 35
36#include "drm_pciids.h" 36#include "drm_pciids.h"
37 37
38MODULE_PARM_DESC(noagp, "Disable AGP"); 38MODULE_PARM_DESC(agpmode, "AGP mode (0 to disable AGP)");
39int nouveau_noagp; 39int nouveau_agpmode = -1;
40module_param_named(noagp, nouveau_noagp, int, 0400); 40module_param_named(agpmode, nouveau_agpmode, int, 0400);
41 41
42MODULE_PARM_DESC(modeset, "Enable kernel modesetting"); 42MODULE_PARM_DESC(modeset, "Enable kernel modesetting");
43static int nouveau_modeset = -1; /* kms */ 43static int nouveau_modeset = -1; /* kms */
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index c8b990b09f5d..cc1892cce6cd 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -659,7 +659,7 @@ nouveau_bo_ref(struct nouveau_bo *ref, struct nouveau_bo **pnvbo)
659} while (0) 659} while (0)
660 660
661/* nouveau_drv.c */ 661/* nouveau_drv.c */
662extern int nouveau_noagp; 662extern int nouveau_agpmode;
663extern int nouveau_duallink; 663extern int nouveau_duallink;
664extern int nouveau_uscript_lvds; 664extern int nouveau_uscript_lvds;
665extern int nouveau_uscript_tmds; 665extern int nouveau_uscript_tmds;
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
index a885cd0b27e8..02aa9d2351da 100644
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
@@ -430,6 +430,16 @@ get_agp_mode(struct drm_device *dev, unsigned long mode)
430 if (dev_priv->chipset == 0x18) 430 if (dev_priv->chipset == 0x18)
431 mode &= ~PCI_AGP_COMMAND_FW; 431 mode &= ~PCI_AGP_COMMAND_FW;
432 432
433 /*
434 * AGP mode set in the command line.
435 */
436 if (nouveau_agpmode > 0) {
437 bool agpv3 = mode & 0x8;
438 int rate = agpv3 ? nouveau_agpmode / 4 : nouveau_agpmode;
439
440 mode = (mode & ~0x7) | (rate & 0x7);
441 }
442
433 return mode; 443 return mode;
434} 444}
435#endif 445#endif
@@ -613,7 +623,7 @@ nouveau_mem_gart_init(struct drm_device *dev)
613 dev_priv->gart_info.type = NOUVEAU_GART_NONE; 623 dev_priv->gart_info.type = NOUVEAU_GART_NONE;
614 624
615#if !defined(__powerpc__) && !defined(__ia64__) 625#if !defined(__powerpc__) && !defined(__ia64__)
616 if (drm_device_is_agp(dev) && dev->agp && !nouveau_noagp) { 626 if (drm_device_is_agp(dev) && dev->agp && nouveau_agpmode) {
617 ret = nouveau_mem_init_agp(dev); 627 ret = nouveau_mem_init_agp(dev);
618 if (ret) 628 if (ret)
619 NV_ERROR(dev, "Error initialising AGP: %d\n", ret); 629 NV_ERROR(dev, "Error initialising AGP: %d\n", ret);