Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260098
b: refs/heads/master
c: aba99a8
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Jun 23, 2011
1 parent ff74f7d commit e37f7fe
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4409cc7e26b5f20b38a791e4c29b6c221e95acf
refs/heads/master: aba99a8400e0b1ca9e6306e3a71013cc7a25bc29
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ enum nouveau_card_type {

struct drm_nouveau_private {
struct drm_device *dev;
bool noaccel;

/* the card type, takes NV_* as values */
enum nouveau_card_type card_type;
Expand Down
26 changes: 22 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nouveau_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ nouveau_card_init(struct drm_device *dev)
if (ret)
goto out_timer;

if (!nouveau_noaccel) {
if (!dev_priv->noaccel) {
switch (dev_priv->card_type) {
case NV_04:
nv04_graph_create(dev);
Expand Down Expand Up @@ -677,10 +677,10 @@ nouveau_card_init(struct drm_device *dev)
drm_vblank_cleanup(dev);
engine->display.destroy(dev);
out_fifo:
if (!nouveau_noaccel)
if (!dev_priv->noaccel)
engine->fifo.takedown(dev);
out_engine:
if (!nouveau_noaccel) {
if (!dev_priv->noaccel) {
for (e = e - 1; e >= 0; e--) {
if (!dev_priv->eng[e])
continue;
Expand Down Expand Up @@ -725,7 +725,7 @@ static void nouveau_card_takedown(struct drm_device *dev)
nouveau_channel_put_unlocked(&dev_priv->channel);
}

if (!nouveau_noaccel) {
if (!dev_priv->noaccel) {
engine->fifo.takedown(dev);
for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) {
if (dev_priv->eng[e]) {
Expand Down Expand Up @@ -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",
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);
if (ret)
goto err_mmio;
Expand Down

0 comments on commit e37f7fe

Please sign in to comment.