drm/nouveau: make portion of vram as reserved for PRAMIN on all chipsets
authorBen Skeggs <bskeggs@redhat.com>
Thu, 5 Mar 2009 23:04:44 +0000 (09:04 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 5 Mar 2009 23:16:54 +0000 (09:16 +1000)
NV04 was completely busted.  Push buffers were getting allocated at the
end of VRAM, overwriting PRAMIN.  So, it turns out PRAMIN is in VRAM on
all chips.  Question answered!

shared-core/nouveau_mem.c
shared-core/nv04_instmem.c

index 991e7d4..64125b6 100644 (file)
@@ -485,10 +485,7 @@ int nouveau_mem_init(struct drm_device *dev)
         */
        if (dev_priv->card_type >= NV_50 && fb_size > (512 * 1024 * 1024))
                fb_size = (512 * 1024 * 1024);
-       /* On at least NV40, RAMIN is actually at the end of vram.
-        * We don't want to allocate this... */
-       if (dev_priv->card_type >= NV_40)
-               fb_size -= dev_priv->ramin_rsvd_vram;
+       fb_size -= dev_priv->ramin_rsvd_vram;
        dev_priv->fb_available_size = fb_size;
        DRM_DEBUG("Available VRAM: %dKiB\n", fb_size>>10);
 
index 7b58aa4..713b02d 100644 (file)
@@ -17,8 +17,7 @@ nv04_instmem_determine_amount(struct drm_device *dev)
                 */
                dev_priv->ramin_rsvd_vram = (1*1024* 1024);
        } else {
-               /*XXX: what *are* the limits on <NV40 cards?, and does RAMIN
-                *     exist in vram on those cards as well?
+               /*XXX: what *are* the limits on <NV40 cards?
                 */
                dev_priv->ramin_rsvd_vram = (512*1024);
        }