diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-06-01 20:12:00 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-07-12 20:13:01 -0400 |
commit | 7a2e4e03b77b929b10f3007395128a9870090653 (patch) | |
tree | 66e0007fd5ad3d66e1ef5fbc20459c23ba275738 /drivers/gpu | |
parent | fb4f56214dd632d90b8ac64d7781faeb4dd744c7 (diff) |
drm/nv50: fix memory detection for cards with >=4GiB VRAM
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_mem.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 206bd1670827..2853ba0137af 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c | |||
@@ -364,9 +364,14 @@ nouveau_mem_detect(struct drm_device *dev) | |||
364 | } else | 364 | } else |
365 | if (dev_priv->flags & (NV_NFORCE | NV_NFORCE2)) { | 365 | if (dev_priv->flags & (NV_NFORCE | NV_NFORCE2)) { |
366 | dev_priv->vram_size = nouveau_mem_detect_nforce(dev); | 366 | dev_priv->vram_size = nouveau_mem_detect_nforce(dev); |
367 | } else { | 367 | } else |
368 | if (dev_priv->card_type < NV_50) { | ||
368 | dev_priv->vram_size = nv_rd32(dev, NV04_FIFO_DATA); | 369 | dev_priv->vram_size = nv_rd32(dev, NV04_FIFO_DATA); |
369 | dev_priv->vram_size &= NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK; | 370 | dev_priv->vram_size &= NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK; |
371 | } else { | ||
372 | dev_priv->vram_size = nv_rd32(dev, NV04_FIFO_DATA); | ||
373 | dev_priv->vram_size |= (dev_priv->vram_size & 0xff) << 32; | ||
374 | dev_priv->vram_size &= 0xffffffff00; | ||
370 | if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac) { | 375 | if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac) { |
371 | dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10); | 376 | dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10); |
372 | dev_priv->vram_sys_base <<= 12; | 377 | dev_priv->vram_sys_base <<= 12; |