summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_state.c
diff options
context:
space:
mode:
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>2006-11-16 14:47:52 +0100
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>2006-11-16 14:47:52 +0100
commit5e7f58474dbc766632a71c3eb556e24ead6c6afc (patch)
tree777267a1bca8648e1984e51de656dde696cd447d /shared-core/nouveau_state.c
parent5a0cdf7db34fc679160a58b257afc9e9b216907e (diff)
parent2fd812f8ef8adb09fd8d17cab869f9fc8b047d75 (diff)
Merge branch 'nouveau-1' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drm into nouveau-1
Diffstat (limited to 'shared-core/nouveau_state.c')
-rw-r--r--shared-core/nouveau_state.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index 1901f08c..b05442fb 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -64,6 +64,25 @@ int nouveau_firstopen(struct drm_device *dev)
DRM_INFO("%lld MB of video ram detected\n",nouveau_mem_fb_amount(dev)>>20);
+ /* Clear RAMIN
+ * Determine locations for RAMHT/FC/RO
+ * Initialise PFIFO
+ */
+ ret = nouveau_fifo_init(dev);
+ if (ret) return ret;
+ /* Initialise instance memory allocation */
+ ret = nouveau_object_init(dev);
+ if (ret) return ret;
+
+ /* FIXME: doesn't belong here, and have no idea what it's for.. */
+ if (dev_priv->card_type >= NV_40) {
+ dev_priv->fb_obj = nouveau_dma_object_create(dev,
+ 0, nouveau_mem_fb_amount(dev),
+ NV_DMA_ACCESS_RW, NV_DMA_TARGET_VIDMEM);
+
+ NV_WRITE(NV_PGRAPH_NV40_UNK220, dev_priv->fb_obj->instance >> 4);
+ }
+
return 0;
}