drm/nvc0: add initial memory type detection
authorBen Skeggs <bskeggs@redhat.com>
Tue, 13 Dec 2011 02:46:18 +0000 (12:46 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 13 Mar 2012 07:05:52 +0000 (17:05 +1000)
Uses only the VBIOS tables, from what I can tell this is what NVIDIA do
too, I was able to change the detected memory type by modifying this table
on a NVC1 chipset.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvc0_vram.c

index ce984d573a51d03bb6df5b6cc171ed4721a60533..fd687ee888dec6743da7e8aee51b0a8f9b21ea57 100644 (file)
@@ -115,6 +115,8 @@ nvc0_vram_init(struct drm_device *dev)
        NV_DEBUG(dev, "0x100800: 0x%08x\n", nv_rd32(dev, 0x100800));
        NV_DEBUG(dev, "parts 0x%08x bcast_mem_amount 0x%08x\n", parts, bsize);
 
+       dev_priv->vram_type = nouveau_mem_vbios_type(dev);
+
        /* read amount of vram attached to each memory controller */
        part = 0;
        while (parts) {