mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
drm/nv50: cast IGP memory location to u64 before shifting
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
becd214277
commit
8b281db596
1 changed files with 2 additions and 1 deletions
|
@ -540,7 +540,8 @@ nouveau_mem_detect(struct drm_device *dev)
|
||||||
dev_priv->vram_size = nv_rd32(dev, NV04_FIFO_DATA);
|
dev_priv->vram_size = nv_rd32(dev, NV04_FIFO_DATA);
|
||||||
dev_priv->vram_size &= NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK;
|
dev_priv->vram_size &= NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK;
|
||||||
if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac)
|
if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac)
|
||||||
dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10) << 12;
|
dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10);
|
||||||
|
dev_priv->vram_sys_base <<= 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
NV_INFO(dev, "Detected %dMiB VRAM\n", (int)(dev_priv->vram_size >> 20));
|
NV_INFO(dev, "Detected %dMiB VRAM\n", (int)(dev_priv->vram_size >> 20));
|
||||||
|
|
Loading…
Reference in a new issue