diff options
author | Dave Airlie <airlied@linux.ie> | 2007-01-09 13:38:36 +1100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-01-09 13:48:38 +1100 |
commit | a70aedd5fc78a162aeb681d47a75edcc831ed3f3 (patch) | |
tree | a9d8f5776815fda92692cc98611a74d81dcf3145 /shared-core | |
parent | deba42ef32da0c2d0977cdeb639420e1ac1b7f2b (diff) |
novueau: try resource 3 if resource 2 is 0 length
This happens on my NV43 PPC
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/nouveau_state.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c index 44f8c1aa..1e0587f6 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); |