drm/nouveau: default to noaccel on 0xc1/0xc8/0xce for now

Until we know these should work properly, would much rather default to
noaccel than risk giving people corruption/hangs out of the box..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs 2011-05-25 14:48:50 +10:00
parent d4409cc7e2
commit aba99a8400
3 changed files with 24 additions and 5 deletions

View File

@ -73,7 +73,7 @@ int nouveau_ignorelid = 0;
module_param_named(ignorelid, nouveau_ignorelid, int, 0400); module_param_named(ignorelid, nouveau_ignorelid, int, 0400);
MODULE_PARM_DESC(noaccel, "Disable all acceleration"); MODULE_PARM_DESC(noaccel, "Disable all acceleration");
int nouveau_noaccel = 0; int nouveau_noaccel = -1;
module_param_named(noaccel, nouveau_noaccel, int, 0400); module_param_named(noaccel, nouveau_noaccel, int, 0400);
MODULE_PARM_DESC(nofbaccel, "Disable fbcon acceleration"); MODULE_PARM_DESC(nofbaccel, "Disable fbcon acceleration");

View File

@ -608,6 +608,7 @@ enum nouveau_card_type {
struct drm_nouveau_private { struct drm_nouveau_private {
struct drm_device *dev; struct drm_device *dev;
bool noaccel;
/* the card type, takes NV_* as values */ /* the card type, takes NV_* as values */
enum nouveau_card_type card_type; enum nouveau_card_type card_type;

View File

@ -565,7 +565,7 @@ nouveau_card_init(struct drm_device *dev)
if (ret) if (ret)
goto out_timer; goto out_timer;
if (!nouveau_noaccel) { if (!dev_priv->noaccel) {
switch (dev_priv->card_type) { switch (dev_priv->card_type) {
case NV_04: case NV_04:
nv04_graph_create(dev); nv04_graph_create(dev);
@ -677,10 +677,10 @@ out_vblank:
drm_vblank_cleanup(dev); drm_vblank_cleanup(dev);
engine->display.destroy(dev); engine->display.destroy(dev);
out_fifo: out_fifo:
if (!nouveau_noaccel) if (!dev_priv->noaccel)
engine->fifo.takedown(dev); engine->fifo.takedown(dev);
out_engine: out_engine:
if (!nouveau_noaccel) { if (!dev_priv->noaccel) {
for (e = e - 1; e >= 0; e--) { for (e = e - 1; e >= 0; e--) {
if (!dev_priv->eng[e]) if (!dev_priv->eng[e])
continue; continue;
@ -725,7 +725,7 @@ static void nouveau_card_takedown(struct drm_device *dev)
nouveau_channel_put_unlocked(&dev_priv->channel); nouveau_channel_put_unlocked(&dev_priv->channel);
} }
if (!nouveau_noaccel) { if (!dev_priv->noaccel) {
engine->fifo.takedown(dev); engine->fifo.takedown(dev);
for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) { for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) {
if (dev_priv->eng[e]) { if (dev_priv->eng[e]) {
@ -936,6 +936,24 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
NV_INFO(dev, "Detected an NV%2x generation card (0x%08x)\n", NV_INFO(dev, "Detected an NV%2x generation card (0x%08x)\n",
dev_priv->card_type, reg0); dev_priv->card_type, reg0);
/* Determine whether we'll attempt acceleration or not, some
* cards are disabled by default here due to them being known
* non-functional, or never been tested due to lack of hw.
*/
dev_priv->noaccel = !!nouveau_noaccel;
if (nouveau_noaccel == -1) {
switch (dev_priv->chipset) {
case 0xc1: /* known broken */
case 0xc8: /* never tested */
case 0xce: /* never tested */
dev_priv->noaccel = true;
break;
default:
dev_priv->noaccel = false;
break;
}
}
ret = nouveau_remove_conflicting_drivers(dev); ret = nouveau_remove_conflicting_drivers(dev);
if (ret) if (ret)
goto err_mmio; goto err_mmio;