summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core/nouveau_state.c')
-rw-r--r--shared-core/nouveau_state.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index 43f9c2a9..951e21f9 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -64,6 +64,21 @@ int nouveau_firstopen(struct drm_device *dev)
DRM_INFO("%lld MB of video ram detected\n",nouveau_mem_fb_amount(dev)>>20);
+ /* 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),
+ _DRM_REGISTERS,
+ _DRM_READ_ONLY,
+ &dev_priv->ramin);
+ if (ret) {
+ DRM_ERROR("Failed to init RAMIN mapping, "
+ "limited instance memory available\n");
+ dev_priv->ramin = NULL;
+ }
+ } else
+ dev_priv->ramin = NULL;
+
/* Clear RAMIN
* Determine locations for RAMHT/FC/RO
* Initialise PFIFO