summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_state.c
diff options
context:
space:
mode:
authorBen Skeggs <darktama@iinet.net.au>2006-09-07 23:59:19 +1000
committerBen Skeggs <darktama@iinet.net.au>2006-09-07 23:59:19 +1000
commit0ef29768ca909421539c3d8f65bb8e94912fa597 (patch)
treee4e4936395d86bf5c1bc398020de88765ed8af2f /shared-core/nouveau_state.c
parentd89c623f8e739815ea952adc77cfe5c0f7204407 (diff)
Fix second start of X server without module reload beforehand, and a couple of other fixes.
- Mark the correct RAMIN slots as free (oops) - Remove a VRAM alloc that shouldn't have been there (oops) - Move HT init out of firstopen() and into dma_init() - Setup PFIFO_RAM{HT,FC,RO} in pfifo_init()
Diffstat (limited to 'shared-core/nouveau_state.c')
-rw-r--r--shared-core/nouveau_state.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index 707d42ef..6c5cc153 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -69,13 +69,6 @@ int nouveau_firstopen(struct drm_device *dev)
else
dev_priv->fb_usable_size=nouveau_mem_fb_amount(dev)-256*1024;
- nouveau_hash_table_init(dev);
-
- 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);
-
return 0;
}
@@ -164,8 +157,12 @@ int nouveau_dma_init(struct drm_device *dev)
struct mem_block *cb;
int cb_min_size = nouveau_fifo_number(dev) * NV03_FIFO_SIZE;
- /* allocate one buffer for all the fifos */
- dev_priv->cmdbuf_alloc = nouveau_mem_alloc(dev, 0, 1024*1024, NOUVEAU_MEM_FB, (DRMFILE)-2);
+ nouveau_hash_table_init(dev);
+
+ 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);
/* Defaults for unconfigured values */
if (!config->cmdbuf.location)