Commit e0435120 authored by Ben Skeggs's avatar Ben Skeggs

drm/nv40: support for 39-bit dma addresses on native PCIE chipsets

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 7948758d
...@@ -393,11 +393,17 @@ nouveau_mem_vram_init(struct drm_device *dev) ...@@ -393,11 +393,17 @@ nouveau_mem_vram_init(struct drm_device *dev)
struct ttm_bo_device *bdev = &dev_priv->ttm.bdev; struct ttm_bo_device *bdev = &dev_priv->ttm.bdev;
int ret, dma_bits; int ret, dma_bits;
if (dev_priv->card_type >= NV_50 && dma_bits = 32;
pci_dma_supported(dev->pdev, DMA_BIT_MASK(40))) if (dev_priv->card_type >= NV_50) {
dma_bits = 40; if (pci_dma_supported(dev->pdev, DMA_BIT_MASK(40)))
else dma_bits = 40;
dma_bits = 32; } else
if (drm_pci_device_is_pcie(dev) &&
dev_priv->chipset != 0x40 &&
dev_priv->chipset != 0x45) {
if (pci_dma_supported(dev->pdev, DMA_BIT_MASK(39)))
dma_bits = 39;
}
ret = pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(dma_bits)); ret = pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(dma_bits));
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment