summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_state.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2007-01-16 09:49:20 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2007-01-16 09:49:20 +0800
commit9f5cda44dbf5b8f3c7cc00b8a58eee2690a864e6 (patch)
treeb92c293d743846a23e145bdd6e76a2e7076fae85 /shared-core/nouveau_state.c
parent6ac742d95dfd717ae730035da34624682c652b7b (diff)
parentfdbc34fab03eba8d257e14c6d557ffed5fa32c2d (diff)
Merge branch 'master' into crestline
Diffstat (limited to 'shared-core/nouveau_state.c')
-rw-r--r--shared-core/nouveau_state.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index 44f8c1aa..f324c5ff 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -66,8 +66,12 @@ int nouveau_firstopen(struct drm_device *dev)
/* map larger RAMIN aperture on NV40 cards */
if (dev_priv->card_type >= NV_40) {
- ret = drm_addmap(dev, drm_get_resource_start(dev, 2),
- drm_get_resource_len(dev, 2),
+ int ramin_resource = 2;
+ if (drm_get_resource_len(dev, ramin_resource) == 0)
+ ramin_resource = 3;
+
+ ret = drm_addmap(dev, drm_get_resource_start(dev, ramin_resource),
+ drm_get_resource_len(dev, ramin_resource),
_DRM_REGISTERS,
_DRM_READ_ONLY,
&dev_priv->ramin);
@@ -92,6 +96,12 @@ int nouveau_firstopen(struct drm_device *dev)
/* FIXME: doesn't belong here, and have no idea what it's for.. */
if (dev_priv->card_type >= NV_40)
nv40_graph_init(dev);
+ else if (dev_priv->card_type >= NV_30) {
+ }
+ else if (dev_priv->card_type >= NV_20)
+ nv20_graph_init(dev);
+ else if (dev_priv->card_type >= NV_10)
+ nv10_graph_init(dev);
return 0;
}