Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293724
b: refs/heads/master
c: 1072856
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Mar 13, 2012
1 parent 6d30a47 commit 2e85c06
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff92a6cda74c0a51cb723f5e224124cf74e62f25
refs/heads/master: 1072856a1c604726be6a8adfb6b2c86033e6a314
16 changes: 16 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nv50_vram.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,24 @@ nv50_vram_init(struct drm_device *dev)
struct nouveau_vram_engine *vram = &dev_priv->engine.vram;
const u32 rsvd_head = ( 256 * 1024) >> 12; /* vga memory */
const u32 rsvd_tail = (1024 * 1024) >> 12; /* vbios etc */
u32 pfb714 = nv_rd32(dev, 0x100714);
u32 rblock, length;

switch (pfb714 & 0x00000007) {
case 0: dev_priv->vram_type = NV_MEM_TYPE_DDR1; break;
case 1:
if (0 /* some currently unknown condition */)
dev_priv->vram_type = NV_MEM_TYPE_DDR2;
else
dev_priv->vram_type = NV_MEM_TYPE_DDR3;
break;
case 2: dev_priv->vram_type = NV_MEM_TYPE_GDDR3; break;
case 3: dev_priv->vram_type = NV_MEM_TYPE_GDDR4; break;
case 4: dev_priv->vram_type = NV_MEM_TYPE_GDDR5; break;
default:
break;
}

dev_priv->vram_size = nv_rd32(dev, 0x10020c);
dev_priv->vram_size |= (dev_priv->vram_size & 0xff) << 32;
dev_priv->vram_size &= 0xffffffff00ULL;
Expand Down

0 comments on commit 2e85c06

Please sign in to comment.