diff options
author | Christopher James Halse Rogers <raof@ubuntu.com> | 2010-09-17 17:17:55 +0100 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2010-12-13 16:43:03 -0700 |
commit | 1332235ebc103217e5b1b71c2e7a52faf39b1a95 (patch) | |
tree | f4a8e66b0cbdc6a888d23f0f0ea627ffd00db9d3 /drivers | |
parent | eaa6f763cd3248a9dbb7da2ac419bfb3cf81c917 (diff) |
UBUNTU: SAUCE: Nouveau: Add quirk framework to disable acceleration
Add support for Nouveau acceleration quirks.
BugLink: http://bugs.launchpad.net/bugs/546393
BugLink: http://bugs.launchpad.net/bugs/544088
Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 90875494a65a..7b967b47e24b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c @@ -73,7 +73,7 @@ int nouveau_ignorelid = 0; module_param_named(ignorelid, nouveau_ignorelid, int, 0400); MODULE_PARM_DESC(noaccel, "Disable all acceleration"); -int nouveau_noaccel = 0; +int nouveau_noaccel = -1; module_param_named(noaccel, nouveau_noaccel, int, 0400); MODULE_PARM_DESC(nofbaccel, "Disable fbcon acceleration"); diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 049f755567e5..f2ece907c8b8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c @@ -824,6 +824,15 @@ static int nouveau_remove_conflicting_drivers(struct drm_device *dev) return 0; } +static void nouveau_apply_noaccel_quirks (struct drm_device *dev) +{ + struct drm_nouveau_private *dev_priv = dev->dev_private; + if (nouveau_noaccel == -1) { + /* If not specified, noaccel should default off */ + nouveau_noaccel = 0; + } +} + int nouveau_load(struct drm_device *dev, unsigned long flags) { struct drm_nouveau_private *dev_priv; @@ -958,6 +967,9 @@ int nouveau_load(struct drm_device *dev, unsigned long flags) else if (dev->pci_device == 0x01f0) dev_priv->flags |= NV_NFORCE2; + /* Apply noaccel quirks */ + nouveau_apply_noaccel_quirks(dev); + /* For kernel modesetting, init card now and bring up fbcon */ ret = nouveau_card_init(dev); if (ret) |