From faa46122993bc5970b3d67933bd81d863a3c4762 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 8 Jan 2007 00:37:39 +1100 Subject: nouveau: avoid allocating vram that's used as instance memory. --- shared-core/nouveau_fifo.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'shared-core/nouveau_fifo.c') diff --git a/shared-core/nouveau_fifo.c b/shared-core/nouveau_fifo.c index 0e47da08..e5f825e6 100644 --- a/shared-core/nouveau_fifo.c +++ b/shared-core/nouveau_fifo.c @@ -69,11 +69,10 @@ static int nouveau_fifo_ctx_size(drm_device_t* dev) static int nouveau_fifo_instmem_configure(drm_device_t *dev) { drm_nouveau_private_t *dev_priv = dev->dev_private; - uint32_t obj_base, obj_size; int i; - /* Clear RAMIN */ - for (i=0x00710000; i<0x00800000; i++) + /* Clear start of RAMIN, enough to cover RAMFC/HT/RO basically */ + for (i=0x00710000; i<0x00730000; i++) NV_WRITE(i, 0x00000000); /* FIFO hash table (RAMHT) @@ -139,12 +138,9 @@ static int nouveau_fifo_instmem_configure(drm_device_t *dev) dev_priv->ramfc_offset, dev_priv->ramfc_size); - obj_base = dev_priv->ramfc_offset + dev_priv->ramfc_size; - obj_size = (512*1024) - obj_base; /*XXX: probably wrong on some cards*/ - if (nouveau_instmem_init(dev, obj_base, obj_size)) + if (nouveau_instmem_init(dev, dev_priv->ramfc_offset + + dev_priv->ramfc_size)) return 1; - DRM_DEBUG("RAMIN object space: offset=0x%08x, size=%dKiB\n", - obj_base, obj_size>>10); return 0; } -- cgit v1.2.3